wikiparser-node 1.13.6 → 1.13.7

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,38 +1,38 @@
1
- "use strict";(()=>{var zn=Object.create;var De=Object.defineProperty;var Wn=Object.getOwnPropertyDescriptor;var co=Object.getOwnPropertyNames;var ho=Object.getPrototypeOf,mo=Object.prototype.hasOwnProperty;var Un=(a,r)=>(r=Symbol[a])?r:Symbol.for("Symbol."+a),dt=a=>{throw TypeError(a)};var fo=(a,r,e)=>r in a?De(a,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[r]=e;var Gn=(a,r)=>De(a,"name",{value:r,configurable:!0});var b=(a,r)=>()=>(a&&(r=a(a=0)),r);var Dn=(a,r)=>()=>(r||a((r={exports:{}}).exports,r),r.exports),se=(a,r)=>{for(var e in r)De(a,e,{get:r[e],enumerable:!0})},Hn=(a,r,e,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of co(r))!mo.call(a,n)&&n!==e&&De(a,n,{get:()=>r[n],enumerable:!(t=Wn(r,n))||t.enumerable});return a};var xo=(a,r,e)=>(e=a!=null?zn(ho(a)):{},Hn(r||!a||!a.__esModule?De(e,"default",{value:a,enumerable:!0}):e,a)),Z=a=>Hn(De({},"__esModule",{value:!0}),a);var le=a=>{var r;return[,,,zn((r=a==null?void 0:a[Un("metadata")])!=null?r:null)]},Vn=["class","method","getter","setter","accessor","field","value","get","set"],Ot=a=>a!==void 0&&typeof a!="function"?dt("Function expected"):a,bo=(a,r,e,t,n)=>({kind:Vn[a],name:r,metadata:t,addInitializer:i=>e._?dt("Already initialized"):n.push(Ot(i||null))}),de=(a,r,e,t)=>{for(var n=0,i=a[r>>1],s=i&&i.length;n<s;n++)r&1?i[n].call(e):t=i[n].call(e,t);return t},ge=(a,r,e,t,n,i)=>{var s,o,l,p,g,d=r&7,c=!!(r&8),h=!!(r&16),m=d>3?a.length+1:d?c?1:2:0,k=Vn[d+5],x=d>3&&(a[m-1]=[]),A=a[m]||(a[m]=[]),S=d&&(!h&&!c&&(n=n.prototype),d<5&&(d>3||!h)&&Wn(d<4?n:{get[e](){return u(this,i)},set[e](w){return v(this,i,w)}},e));d?h&&d<4&&Gn(i,(d>2?"set ":d>1?"get ":"")+e):Gn(n,e);for(var $=t.length-1;$>=0;$--)p=bo(d,e,l={},a[3],A),d&&(p.static=c,p.private=h,g=p.access={has:h?w=>To(n,w):w=>e in w},d^3&&(g.get=h?w=>(d^1?u:R)(w,n,d^4?i:S.get):w=>w[e]),d>2&&(g.set=h?(w,L)=>v(w,n,L,d^4?i:S.set):(w,L)=>w[e]=L)),o=(0,t[$])(d?d<4?h?i:S[k]:d>4?void 0:{get:S.get,set:S.set}:n,p),l._=1,d^4||o===void 0?Ot(o)&&(d>4?x.unshift(o):d?h?i=o:S[k]=o:n=o):typeof o!="object"||o===null?dt("Object expected"):(Ot(s=o.get)&&(S.get=s),Ot(s=o.set)&&(S.set=s),Ot(s=o.init)&&x.unshift(s));return d||(n[Un("metadata")]=a[3]),S&&De(n,e,S),h?d^4?i:S:n},X=(a,r,e)=>fo(a,typeof r!="symbol"?r+"":r,e),Qr=(a,r,e)=>r.has(a)||dt("Cannot "+e),To=(a,r)=>Object(r)!==r?dt('Cannot use the "in" operator on this value'):a.has(r),u=(a,r,e)=>(Qr(a,r,"read from private field"),e?e.call(a):r.get(a)),T=(a,r,e)=>r.has(a)?dt("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(a):r.set(a,e),v=(a,r,e,t)=>(Qr(a,r,"write to private field"),t?t.call(a,e):r.set(a,e),e),R=(a,r,e)=>(Qr(a,r,"access private method"),e);var dr=(a,r,e,t)=>({set _(n){v(a,r,n,e)},get _(){return u(a,r,t)}});var Zr,Xn,Qn=b(()=>{"use strict";Zr={redirect:1,onlyinclude:1,noinclude:1,include:1,comment:1,ext:1,arg:2,"magic-word":2,template:2,heading:2,html:3,table:4,hr:5,"double-underscore":5,link:6,category:6,file:6,quote:7,"ext-link":8,"free-ext-link":9,"magic-link":9,list:10,dd:10,converter:11};Object.setPrototypeOf(Zr,null);Xn=["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 ni=Dn((Ea,ri)=>{"use strict";var Kr=Object.defineProperty,yo=Object.getOwnPropertyDescriptor,ko=Object.getOwnPropertyNames,vo=Object.prototype.hasOwnProperty,Ao=(a,r)=>{for(var e in r)Kr(a,e,{get:r[e],enumerable:!0})},wo=(a,r,e,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of ko(r))!vo.call(a,n)&&n!==e&&Kr(a,n,{get:()=>r[n],enumerable:!(t=yo(r,n))||t.enumerable});return a},So=a=>wo(Kr({},"__esModule",{value:!0}),a),Jn={};Ao(Jn,{CDN:()=>Kn,getObject:()=>Ro,loadScript:()=>Fo,normalizeTitle:()=>Eo,numToHex:()=>Lo,parseVersion:()=>Bo,rawurldecode:()=>ti,setObject:()=>Po,splitColors:()=>Io});ri.exports=So(Jn);var Kn="https://testingcf.jsdelivr.net",Yn=String.raw`#(?:[\da-f]{3,4}|(?:[\da-f]{2}){3,4})(?![\p{L}\d_])`,Be=String.raw`(?:\d*\.)?\d+%?`,Zn=String.raw`(?:\d*\.)?\d+(?:deg|grad|rad|turn)?`,ei=String.raw`rgba?\(\s*(?:${String.raw`${new Array(3).fill(Be).join(String.raw`\s+`)}(?:\s*\/\s*${Be})?`}|${String.raw`${new Array(3).fill(Be).join(String.raw`\s*,\s*`)}(?:\s*,\s*${Be})?`})\s*\)`,Co=String.raw`hsla?\(\s*(?:${String.raw`${Zn}\s+${Be}\s+${Be}(?:\s*\/\s*${Be})?`}|${String.raw`${Zn}${String.raw`\s*,\s*(?:\d*\.)?\d+%`.repeat(2)}(?:\s*,\s*${Be})?`})\s*\)`,$o=new RegExp(String.raw`(^|[^\p{L}\d_])(${Yn}|${ei}|${Co})`,"giu"),No=new RegExp(String.raw`(^|[^\p{L}\d_])(${Yn}|${ei})`,"giu"),Jr;typeof document=="object"&&(Jr=document.createElement("span"));var ti=a=>decodeURIComponent(a.replace(/%(?![\da-f]{2})/giu,"%25")),Eo=a=>{let r=ti(a);return/[<>[\]|{}]/u.test(r)?r:(Jr.innerHTML=r,Jr.textContent)},Lo=a=>Math.round(a*255).toString(16).padStart(2,"0"),Io=(a,r=!0)=>{let e=[],t=r?$o:No;t.lastIndex=0;let n=t.exec(a),i=0;for(;n;){let s=n.index+n[1].length;s>i&&e.push([a.slice(i,s),i,s,!1]),{lastIndex:i}=t,e.push([n[2],s,i,!0]),n=t.exec(a)}return a.length>i&&e.push([a.slice(i),i,a.length,!1]),e},Fo=(a,r,e)=>new Promise(t=>{let n=`${Kn}/${a}`,i=window;for(let s of r.split("."))i=i==null?void 0:i[s];if(i)t();else if(e&&typeof define=="function"&&"amd"in define){let s=window.require;s.config({paths:{[r]:n}}),s([r],o=>{Object.assign(window,{[r]:o}),t()})}else{let s=document.createElement("script");s.src=n,s.onload=()=>{t()},document.head.append(s)}}),Ro=a=>JSON.parse(String(localStorage.getItem(a))),Po=(a,r)=>{localStorage.setItem(a,JSON.stringify(r))},Bo=a=>a.split(".",3).map(Number)});var gr,ii,Ae,we,He,si,te,oi,pe,jo,Mt,ai,li,qo,_o,gt,Ne,J=b(()=>{"use strict";gr=xo(ni()),ii=String.raw`[^[\]<>"\0-\x1F\x7F\p{Zs}\uFFFD]`,Ae=String.raw`(?:\[[\da-f:.]+\]|${ii})`,we=String.raw`(?:${ii}|\0\d+[cn!~]\x7F)*`,He=(a,r)=>e=>e.replace(a,r),si=He(/[\0\x7F]|\r$/gmu,""),te=He(/\0\d+[cn]\x7F/gu,""),oi=He(/[\\{}()|.?*+^$[\]]/gu,String.raw`\$&`),pe=(a,r="")=>a.map(e=>typeof e=="string"?e:e.text()).join(r),jo={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},Mt=He(/&(?:#(\d+|[Xx][\da-fA-F]+)|([lLgG][tT]|[lr]brac[ke]|nbsp|amp|AMP|quot|QUOT));/gu,(a,r,e)=>r?String.fromCodePoint(+((/^x/iu.test(r)?"0":"")+r)):jo[e.toLowerCase()]),ai=He(/&#(\d+|x[\da-f]+);/giu,(a,r)=>String.fromCodePoint(+((/^x/iu.test(r)?"0":"")+r))),li=He(/\n/gu,String.raw`\n`),qo={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},_o=a=>He(a,r=>`&${qo[r]};`),gt=_o(/[&<>]/gu),Ne=(a,r={})=>{let{pre:e="",post:t="",sep:n=""}=r;return e+a.map(i=>i.print()).join(n)+t}});var di=Dn((Ia,Oo)=>{Oo.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:{"0":"","6":"File","10":"Template","828":"Module"},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"},["!","=","#FORMAL","#timef","#timefl"],["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 Yr,Se=b(()=>{"use strict";Yr=di()});var Ve,E,Q=b(()=>{"use strict";E=class{constructor(r,e){T(this,Ve);X(this,"token");X(this,"start");this.token=r,this.start=e}get top(){var r;return(r=u(this,Ve))!=null||v(this,Ve,this.getPosition()),u(this,Ve).top}get left(){var r;return(r=u(this,Ve))!=null||v(this,Ve,this.getPosition()),u(this,Ve).left}getPosition(){return this.token.getRootNode().posFromIndex(this.start)}};Ve=new WeakMap});var gi,C,N,_=b(()=>{"use strict";Q();F();gi=a=>(r,e,t,n,i="error")=>{let{start:s}=e,{top:o,left:l}=e instanceof E?e:new E(r,s),{offsetHeight:p,offsetWidth:g}=r,{startIndex:d,startLine:c,startCol:h}=a(r,s,o,l);return{rule:t,message:f.msg(n),severity:i,startIndex:d,endIndex:d+r.toString().length,startLine:c,endLine:c+p-1,startCol:h,endCol:p===1?h+g:g}},C=gi((a,r,e,t)=>{let n=a.getRelativeIndex(),{top:i,left:s}=a.parentNode.posFromIndex(n);return{startIndex:r+n,startLine:e+i,startCol:i?s:t+s}}),N=gi((a,r,e,t)=>({startIndex:r,startLine:e,startCol:t}))});var pr,pi=b(()=>{"use strict";pr=(a,r,e)=>({type:t,name:n})=>a.split(",").some(i=>{let[s,...o]=i.trim().split("#");return(!s||s===t)&&o.every(l=>l===n)})});var ui,ci,Gt,zt,en,pt,tn=b(()=>{"use strict";ui=a=>{let r=a.split(`
2
- `),e=r.length;return{height:e,width:r[e-1].length}},ci=(a,r)=>r.childNodes.slice(0,a).reduce((e,t,n)=>e+t.toString().length+r.getGaps(n),0)+r.getAttribute("padding"),pt=class{constructor(){T(this,zt);X(this,"childNodes",[]);T(this,Gt)}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get parentNode(){return u(this,Gt)}get nextSibling(){var e;let r=(e=this.parentNode)==null?void 0:e.childNodes;return r&&r[r.indexOf(this)+1]}get previousSibling(){var e;let r=(e=this.parentNode)==null?void 0:e.childNodes;return r&&r[r.indexOf(this)-1]}get offsetHeight(){return R(this,zt,en).call(this).height}get offsetWidth(){return R(this,zt,en).call(this).width}getAttribute(r){return r==="padding"?0:this[r]}setAttribute(r,e){r==="parentNode"?v(this,Gt,e):this[r]=e}getRootNode(){let{parentNode:r}=this;for(;r!=null&&r.parentNode;)({parentNode:r}=r);return r!=null?r:this}indexFromPos(r,e){let t=String(this).split(`
3
- `);return r>=0&&e>=0&&r<=t.length-1&&e<=t[r].length?t.slice(0,r).reduce((n,i)=>n+i.length+1,0)+e:void 0}posFromIndex(r){let e=String(this);if(r>=-e.length&&r<=e.length){let{height:t,width:n}=ui(e.slice(0,r));return{top:t-1,left:n}}}getGaps(r){return 0}getRelativeIndex(r){if(r===void 0){let{parentNode:e}=this;return e?ci(e.childNodes.indexOf(this),e):0}return ci(r,this)}getAbsoluteIndex(){let{parentNode:r}=this;return r?r.getAbsoluteIndex()+this.getRelativeIndex():0}seal(r,e){Object.defineProperty(this,r,{enumerable:!e&&!!this[r],configurable:!0})}is(r){return this.type===r}};Gt=new WeakMap,zt=new WeakSet,en=function(){return ui(String(this))}});var je,rn,nn,ur,hi=b(()=>{"use strict";J();be();pi();tn();ur=class extends pt{constructor(){super(...arguments);T(this,je)}get length(){return this.childNodes.length}text(e){return pe(this.childNodes,e)}normalize(){let e=[...this.childNodes],t=n=>{e.splice(n,1)};for(let n=e.length-1;n>=0;n--){let{type:i,data:s}=e[n];i!=="text"||this.getGaps(n-1)||s===""&&t(n)}this.setAttribute("childNodes",e)}removeAt(e){return sn(this,e,1)[0]}insertAt(e,t=this.length){return sn(this,t,0,[e]),e}closest(e){let t=pr(e,this),{parentNode:n}=this;for(;n;){if(t(n))return n;({parentNode:n}=n)}}querySelector(e){let t=pr(e,this);return R(this,je,rn).call(this,t)}querySelectorAll(e){let t=pr(e,this);return R(this,je,nn).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 n=this.childNodes[t],{data:i}=n;return n.replaceData(e),i}toString(e,t=""){return this.childNodes.map(n=>n.toString(e)).join(t)}lint(e=this.getAbsoluteIndex(),t){let n=[];for(let i=0,s=e+this.getAttribute("padding");i<this.length;i++){let o=this.childNodes[i];n.push(...o.lint(s,t)),s+=o.toString().length+this.getGaps(i)}return n}print(e={}){let t=e.class;return this.toString()?`${t===""?"":`<span class="wpb-${t!=null?t:this.type}">`}${Ne(this.childNodes,e)}${t===""?"":"</span>"}`:""}json(e,t=this.getAbsoluteIndex()){let n={...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();n.childNodes.push(o.type==="text"?{data:o.data,range:[s,s+l]}:o.json(void 0,s)),s+=l+this.getGaps(i)}return n}};je=new WeakSet,rn=function(e){var t;for(let n of this.childNodes){if(n.type==="text")continue;if(e(n))return n;let i=R(t=n,je,rn).call(t,e);if(i)return i}},nn=function(e){var n;let t=[];for(let i of this.childNodes)i.type!=="text"&&(e(i)&&t.push(i),t.push(...R(n=i,je,nn).call(n,e)));return t}});var mi,Mo,Go,zo,Wo,Uo,Do,cr,fi,Wt,xi=b(()=>{"use strict";J();F();tn();mi=String.raw`<\s*(?:/\s*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+`,Mo=new RegExp(String.raw`${mi}|https?[:/]/+`,"giu"),Go=new RegExp(mi,"giu"),zo=new RegExp(String.raw`^https?://${Ae}${we}\.(?:gif|png|jpg|jpeg)$`,"iu"),Wo={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},Uo={"<":"tag-like","[":"lonely-bracket","{":"lonely-bracket","]":"lonely-bracket","}":"lonely-bracket",h:"lonely-http"},Do=["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"],Wt=class extends pt{constructor(e){super();T(this,cr);X(this,"data","");Object.defineProperties(this,{childNodes:{enumerable:!1,configurable:!1},data:{value:e}})}get type(){return"text"}toString(e){var t;return e&&!((t=this.parentNode)!=null&&t.getAttribute("built"))?te(this.data):this.data}text(){return this.data}lint(e=this.getAbsoluteIndex(),t){var B,j,q;if(t===!1)return[];let{data:n,parentNode:i,nextSibling:s,previousSibling:o}=this;if(!i)throw new Error("An isolated text node cannot be linted!");let{type:l,name:p,parentNode:g}=i,d=!1;if(l==="attr-value"){let{type:D,name:H,tag:ne}=g;if(D!=="ext-attr")d=!0;else if(ne==="choose"&&(H==="before"||H==="after"))return[]}if(t!=null||(t=l==="free-ext-link"||l==="ext-link-url"||l==="ext-link-text"||l==="image-parameter"&&p==="link"||d?Go:Mo),n.search(t)===-1)return[];t.lastIndex=0;let c=[],h=s==null?void 0:s.type,m=s==null?void 0:s.name,k=o==null?void 0:o.type,x=this.getRootNode(),{ext:A,html:S}=x.getAttribute("config"),{top:$,left:w}=x.posFromIndex(e),L=new Set(["onlyinclude","noinclude","includeonly",A,S,Do].flat(2));for(let D=t.exec(n);D;D=t.exec(n)){let[,H,ne]=D,{0:ee,index:W}=D;if(ne&&ne!=="]"){let{length:ae}=ne;W+=ae,ee=ee.slice(ae)}let{0:I,length:xe}=ee;if(I==="<"&&!L.has(H.toLowerCase())||I==="["&&l==="ext-link-text"&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(n.slice(W+1))||s!=null&&s.is("ext")&&m==="nowiki"&&((B=s.innerText)!=null&&B.includes("]"))))continue;if(I==="]"&&(W||xe>1))t.lastIndex--;else if(I==="h"&&W===0&&l==="ext-link-text"&&zo.test(n))continue;let ke=e+W,Pe=ke+xe,ie=x.toString(),ve=ie[Pe],lt=ie[ke-1],Hr=xe>1&&!(I==="<"&&!/[\s/>]/u.test(ve!=null?ve:"")||d&&(I==="["||I==="]"))||I==="{"&&(ve===I||lt==="-")||I==="}"&&(lt===I||ve==="-")||I==="["&&(ve===I||l==="ext-link-text"||h==="free-ext-link"&&!n.slice(W+1).trim())||I==="]"&&(lt===I||k==="free-ext-link"&&!n.slice(0,W).includes("]"))?"error":"warning",Vr=I==="{"||I==="[";if(Hr==="warning"&&(Vr||(I==="]"||I==="}"))){let ae=Wo[I],Xr=Vr?n.slice(W+1):n.slice(0,W);if(I==="{"&&((j=ae.exec(Xr))==null?void 0:j[0])==="}"||I==="}"&&((q=ae.exec(Xr))==null?void 0:q[0])==="{")continue;if(!Xr.includes(I)){let Mn=Vr?"nextSibling":"previousSibling",Ue=this[Mn];for(;Ue&&(Ue.type!=="text"||!ae.test(Ue.data));)Ue=Ue[Mn];if(Ue&&ae.exec(Ue.data)[0]!==I)continue}}let lr=n.slice(0,W).split(`
4
- `),qn=lr.length+$-1,_n=lr[lr.length-1],On=lr.length===1?w+_n.length:_n.length,_t={rule:Uo[I],message:f.msg('lonely "$1"',I==="h"?ee:I),severity:Hr,startIndex:ke,endIndex:Pe,startLine:qn,endLine:qn,startCol:On,endCol:On+xe};if(I==="<")_t.suggestions=[{desc:"escape",range:[ke,ke+1],text:"&lt;"}];else if(I==="h"&&!(l==="ext-link-text"||l==="link-text")&&/[\p{L}\d_]/u.test(lt||""))_t.suggestions=[{desc:"whitespace",range:[ke,ke],text:" "}];else if(I==="["&&l==="ext-link-text"){let ae=i.getAbsoluteIndex()+i.toString().length;_t.suggestions=[{desc:"escape",range:[ae,ae+1],text:"&#93;"}]}else if(I==="]"&&k==="free-ext-link"&&Hr==="error"){let ae=e-o.toString().length;_t.fix={range:[ae,ae],text:"["}}c.push(_t)}return c}replaceData(e){R(this,cr,fi).call(this,e)}print(){return gt(this.data)}};cr=new WeakSet,fi=function(e){this.setAttribute("data",e)}});var ue,Xe=b(()=>{"use strict";be();ue=(a=!0,r=!0)=>(e,t)=>{class n extends e{text(){return""}lint(s){return a?[]:super.lint(s)}}return hr(n,e),n}});var Ut,ce,ut=b(()=>{"use strict";P();ce=class extends y{constructor(e,t,n,i,s,o){super(e,i,s,o);T(this,Ut);v(this,Ut,n)}get type(){return u(this,Ut)}lint(e=this.getAbsoluteIndex()){return super.lint(e,!1)}};Ut=new WeakMap});var ct,G,Ee=b(()=>{"use strict";P();G=class extends y{constructor(e,t,n,i,s){super(e,n,i,s);T(this,ct);v(this,ct,t)}get type(){return u(this,ct)}set type(e){v(this,ct,e)}};ct=new WeakMap});var Ho,Qe,Te,qe,Ce,Ht=b(()=>{"use strict";_();Se();Q();F();P();Ee();Ho=a=>a==="redirect-target"||a==="link",Ce=class extends y{constructor(e,t,n=f.getConfig(),i=[],s="|"){super(void 0,n,i,{});T(this,Qe,!0);T(this,Te);T(this,qe);if(this.insertAt(new G(e,"link-target",n,i,{})),t!==void 0){let o=new y(t,n,i,{});o.type="link-text",o.setAttribute("stage",10),this.insertAt(o)}v(this,Te,s)}afterBuild(){v(this,qe,this.getTitle()),u(this,Te).includes("\0")&&v(this,Te,this.buildFromStr(u(this,Te),0)),this.setAttribute("name",u(this,qe).title),super.afterBuild()}setAttribute(e,t){e==="bracket"?v(this,Qe,t):e==="title"?v(this,qe,t):super.setAttribute(e,t)}toString(e){let t=super.toString(e,u(this,Te));return u(this,Qe)?`[[${t}]]`:t}text(){let e=super.text("|");return u(this,Qe)?`[[${e}]]`:e}getAttribute(e){return e==="title"?u(this,qe):e==="padding"?2:super.getAttribute(e)}getGaps(e){return e===0?u(this,Te).length:1}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),{childNodes:[i,s],type:o}=this,{encoded:l,fragment:p}=u(this,qe),g=new E(this,e);if(i.childNodes.some(({type:d})=>d==="template")&&n.push(C(i,g,"unknown-page","template in an internal link target","warning")),l&&n.push(C(i,g,"url-encoding","unnecessary URL encoding in an internal link")),o==="link"||o==="category"){let d=s==null?void 0:s.childNodes.find(c=>c.type==="text"&&c.data.includes("|"));if(d){let c=C(s,g,"pipe-like",'additional "|" in the link text',"warning"),h=c.startIndex+d.getRelativeIndex();c.suggestions=[{desc:"escape",range:[h,h+d.data.length],text:d.data.replace(/\|/gu,"&#124;")}],n.push(c)}}if(p!==void 0&&!Ho(o)){let d=C(i,g,"no-ignored","useless fragment"),c=i.childNodes.find(h=>h.type==="text"&&h.data.includes("#"));c&&(d.fix={range:[d.startIndex+c.getRelativeIndex()+c.data.indexOf("#"),d.endIndex],text:""}),n.push(d)}return n}getTitle(e){return this.normalizeTitle(this.firstChild.toString(!0),0,e,!0,!0)}print(){return super.print(u(this,Qe)?{pre:"[[",post:"]]",sep:u(this,Te)}:{sep:u(this,Te)})}};Qe=new WeakMap,Te=new WeakMap,qe=new WeakMap});var re,_e=b(()=>{"use strict";P();re=class extends y{get innerText(){return this.firstChild.data}constructor(r="",e,t){super(r,e,t)}}});var bi,on,Vo,U,Oe=b(()=>{"use strict";Xe();_e();bi=[ue()];U=class extends(Vo=re){get type(){return"noinclude"}toString(r){return r?"":super.toString()}};on=le(Vo),U=ge(on,0,"NoincludeToken",bi,U),de(on,1,U)});var mr,Ti=b(()=>{"use strict";_();F();Ht();Oe();mr=class extends Ce{get type(){return"redirect-target"}constructor(r,e,t=f.getConfig(),n=[]){super(r,void 0,t,n),e!==void 0&&this.insertAt(new U(e,t,n))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,!0,!0)}lint(r=this.getAbsoluteIndex()){let e=super.lint(r,!1);if(this.length===2){let t=C(this.lastChild,{start:r},"no-ignored","useless link text");t.startIndex--,t.startCol--,t.fix={range:[t.startIndex,t.endIndex],text:""},e.push(t)}return e}}});var yi,Me,ht,an,Xo,Ze,ki=b(()=>{"use strict";Xe();F();P();ut();Ti();yi=[ue(!1,!1)];Ze=class extends(Xo=y){constructor(e,t,n,i,s,o=f.getConfig(),l=[]){super(void 0,o,l);T(this,Me);T(this,ht);v(this,Me,e),v(this,ht,s);let p=new RegExp(String.raw`^(?:${o.redirection.join("|")})\s*(?::\s*)?$`,"iu");this.append(new ce(t,p,"redirect-syntax",o,l,{}),new mr(n,i==null?void 0:i.slice(1),o,l))}get type(){return"redirect"}getAttribute(e){return e==="padding"?u(this,Me).length:super.getAttribute(e)}toString(e){return u(this,Me)+super.toString(e)+u(this,ht)}lint(e=this.getAbsoluteIndex()){return this.lastChild.lint(e+u(this,Me).length+this.firstChild.toString().length)}print(){return super.print({pre:u(this,Me),post:u(this,ht)})}};an=le(Xo),Me=new WeakMap,ht=new WeakMap,Ze=ge(an,0,"RedirectToken",yi,Ze),de(an,1,Ze)});var vi={};se(vi,{parseRedirect:()=>Qo});var Qo,Ai=b(()=>{"use strict";F();ki();Qo=(a,r,e)=>{var n;(n=r.regexRedirect)!=null||(r.regexRedirect=new RegExp(String.raw`^(\s*)((?:${r.redirection.join("|")})\s*(?::\s*)?)\[\[([^\n|\]]+)(\|.*?)?\]\](\s*)`,"iu"));let t=r.regexRedirect.exec(a);return t&&f.normalizeTitle(t[3],0,!1,r,!0,!0).valid?(a=`\0${e.length}o\x7F${a.slice(t[0].length)}`,new Ze(...t.slice(1),r,e),a):!1}});var fr,wi=b(()=>{"use strict";P();fr=class extends y{get type(){return"onlyinclude"}toString(r){return`<onlyinclude>${super.toString(r)}</onlyinclude>`}getAttribute(r){return r==="padding"?13:r==="plain"||super.getAttribute(r)}print(){return super.print({pre:'<span class="wpb-ext">&lt;onlyinclude&gt;</span>',post:'<span class="wpb-ext">&lt;/onlyinclude&gt;</span>'})}}});var Ge,mt,ln=b(()=>{"use strict";P();mt=class extends y{constructor(e,t,n,i,s,o=[]){super(void 0,s);T(this,Ge);X(this,"closed");X(this,"selfClosing");this.setAttribute("name",e.toLowerCase()),v(this,Ge,[e,i||e]),this.closed=i!=="",this.selfClosing=i===void 0,this.append(t,n);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:n,lastChild:i}=this,[s,o]=u(this,Ge);return t?`<${s}${n.toString(e)}/>`:`<${s}${n.toString(e)}>${i.toString(e)}${this.closed?`</${o}>`:""}`}text(){let[e,t]=u(this,Ge);return this.selfClosing?`<${e}${this.firstChild.text()}/>`:`<${e}${super.text(">")}${this.closed?`</${t}>`:""}`}getAttribute(e){return e==="padding"?u(this,Ge)[0].length+1:super.getAttribute(e)}getGaps(){return 1}print(){let[e,t]=u(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 Si,dn,Zo,Je,Ci=b(()=>{"use strict";_();Q();Xe();F();ln();Si=[ue(!1)];Je=class extends(Zo=mt){get type(){return"include"}constructor(r,e="",t,n,i,s){super(r,e,t!=null?t:"",t===void 0||n!=null?n:"",i,s)}toString(r){return r?"":super.toString()}lint(r=this.getAbsoluteIndex()){let e=[],{firstChild:t,closed:n,name:i}=this,s=new E(this,r);if(t.data.trim()){let o=C(t,s,"no-ignored","useless attribute","warning");o.suggestions=[{desc:"remove",range:[o.startIndex,o.endIndex],text:""}],e.push(o)}if(!n){let o=N(this,s,"unclosed-comment",f.msg("unclosed $1",`<${i}>`));o.suggestions=[{desc:"close",range:[o.endIndex,o.endIndex],text:`</${i}>`}],e.push(o)}return e}};dn=le(Zo),Je=ge(dn,0,"IncludeToken",Si,Je),de(dn,1,Je)});var V,$i,Ni,br,gn,Ei,ft,Li,Ii,Fi,xr,Ri,Pi,Bi,ji,qi=b(()=>{"use strict";V=new Set(["align"]),$i=new Set(["cite"]),Ni=new Set(["cite","datetime"]),br=new Set(["width"]),gn=new Set(["axis","align","bgcolor","height","width","valign"]),Ei=new Set([...gn,"abbr","headers","scope","rowspan","colspan"]),ft=new Set(["type"]),Li=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),Ii=new Set(["clear"]),Fi=new Set(["bgcolor","align","valign"]),xr=new Set,Ri=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"]),Pi={div:V,h1:V,h2:V,h3:V,h4:V,h5:V,h6:V,blockquote:$i,q:$i,p:V,br:Ii,pre:br,ins:Ni,del:Ni,ul:ft,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...Li,"border"]),caption:V,tr:Fi,td:Ei,th:Ei,img:new Set(["alt","src","width","height","srcset"]),font:new Set(["size","color","face"]),hr:br,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:ft,poem:V,categorytree:V,combooption:V},Bi={gallery:new Set(["mode","showfilename","caption","perrow","widths","heights","showthumbnails"]),poem:new Set(["compact"]),categorytree:new Set(["hideroot","onlyroot","depth","mode","hideprefix","namespaces","showcount","notranslations"]),combooption:new Set(["name","for","inline"]),nowiki:xr,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:xr,inputbox:xr,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:xr,poll:new Set(["id","show-results-before-voting"]),sm2:ft,flashmp3:ft,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"])},ji={table:Li,td:new Set([...gn,"scope"]),th:gn,br:Ii,caption:V,div:V,hr:br,h1:V,h2:V,h3:V,h4:V,h5:V,h6:V,li:ft,p:V,pre:br,tr:Fi,ul:ft}});var Jo,Vt,xt,Y,$e,bt,_i=b(()=>{"use strict";_();J();Se();qi();Q();F();P();Ee();Jo=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,bt=class extends y{constructor(e,t,n,i="",s,o=[],l=f.getConfig(),p=[]){let g=new G(n,"attr-key",l,p),d;if(n==="title"||t==="img"&&n==="alt")d=new y(s,l,p,{}),d.type="attr-value",d.setAttribute("stage",10);else if(t==="gallery"&&n==="caption"||t==="choose"&&(n==="before"||n==="after")){let c={...l,excludes:[...l.excludes,"heading","html","table","hr","list"]};d=new y(s,c,p,{}),d.type="attr-value",d.setAttribute("stage",1)}else d=new G(s,"attr-value",l,p,{});super(void 0,l,p);T(this,Vt);T(this,xt);T(this,Y);T(this,$e);v(this,Vt,e),this.append(g,d),v(this,Y,i),v(this,$e,[...o]),v(this,xt,t),this.setAttribute("name",te(n).trim().toLowerCase())}get type(){return u(this,Vt)}get tag(){return u(this,xt)}get balanced(){return!u(this,Y)||u(this,$e)[0]===u(this,$e)[1]}afterBuild(){u(this,Y).includes("\0")&&v(this,Y,this.buildFromStr(u(this,Y),0)),this.parentNode&&v(this,xt,this.parentNode.name),this.setAttribute("name",this.firstChild.toString(!0).trim().toLowerCase()),super.afterBuild()}toString(e){let[t="",n=""]=u(this,$e);return u(this,Y)?super.toString(e,u(this,Y)+t)+n:this.firstChild.toString(e)}text(){return u(this,Y)?`${super.text(`${u(this,Y).trim()}"`)}"`:this.firstChild.text()}getGaps(){var e,t;return u(this,Y)?u(this,Y).length+((t=(e=u(this,$e)[0])==null?void 0:e.length)!=null?t:0):0}lint(e=this.getAbsoluteIndex(),t){var k;let n=super.lint(e,t),{balanced:i,firstChild:s,lastChild:o,type:l,name:p,tag:g}=this,d=this.getValue(),c=new E(this,e);if(!i){let x=C(o,c,"unclosed-quote",f.msg("unclosed $1","quotes"),"warning");x.startIndex--,x.startCol--;let A={range:[x.endIndex,x.endIndex],text:u(this,$e)[0]};o.childNodes.some(({type:S,data:$})=>S==="text"&&/\s/u.test($))?x.suggestions=[{desc:"close",...A}]:x.fix=A,n.push(x)}let h=Bi[g],m=Pi[g];if(!(h!=null&&h.has(p))&&!(m!=null&&m.has(p))&&(l==="ext-attr"?h||m:!/\{\{[^{]+\}\}/u.test(p))&&(l==="ext-attr"&&!m||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(p)&&(g==="meta"||g==="link"||!Ri.has(p))))n.push(C(s,c,"illegal-attr","illegal attribute name"));else if((k=ji[g])!=null&&k.has(p))n.push(C(s,c,"obsolete-attr","obsolete attribute","warning"));else if(p==="style"&&typeof d=="string"&&Jo.test(d))n.push(C(o,c,"insecure-style","insecure style"));else if(p==="tabindex"&&typeof d=="string"&&d!=="0"){let x=C(o,c,"illegal-attr","nonzero tabindex");x.suggestions=[{desc:"remove",range:[e,x.endIndex],text:""},{desc:"0 tabindex",range:[x.startIndex,x.endIndex],text:"0"}],n.push(x)}return n}getValue(){return u(this,Y)?this.lastChild.text().trim():this.type==="ext-attr"||""}print(){let[e="",t=""]=u(this,$e);return u(this,Y)?super.print({sep:gt(u(this,Y))+e,post:t}):super.print()}};Vt=new WeakMap,xt=new WeakMap,Y=new WeakMap,$e=new WeakMap});var Oi,Ko,Xt,ze,Tr=b(()=>{"use strict";_();J();Q();F();P();Ee();_i();Oi=a=>a.slice(0,-1),Ko=a=>`${Oi(a)}-dirty`,ze=class extends y{constructor(e,t,n,i=f.getConfig(),s=[]){super(void 0,i,s,{});T(this,Xt);if(v(this,Xt,t),this.setAttribute("name",n),e){let o=/([^\s/](?:(?!\0\d+~\x7F)[^\s/=])*)(?:((?:\s(?:\s|\0\d+[cn]\x7F)*)?(?:=|\0\d+~\x7F)(?:\s|\0\d+[cn]\x7F)*)(?:(["'])(.*?)(\3|$)|(\S*)))?/gsu,l="",p=o.exec(e),g=0,d=()=>{l&&(super.insertAt(new G(l,Ko(t),i,s,{})),l="")};for(;p;){let{index:c,0:h,1:m,2:k,3:x,4:A,5:S,6:$}=p;if(l+=e.slice(g,c),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(te(m).trim())){let w=A!=null?A:$,L=[x,S],B=new bt(Oi(t),n,m,k,w,L,i,s);d(),super.insertAt(B)}else l+=h;({lastIndex:g}=o),p=o.exec(e)}l+=e.slice(g),d()}}get type(){return u(this,Xt)}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 bt&&(!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 n=super.lint(e,t),{parentNode:i,childNodes:s}=this,o=new Map,l=new Set,p=new E(this,e);if((i==null?void 0:i.type)==="html"&&i.closing&&this.text().trim()){let g=N(this,p,"no-ignored","attributes of a closing tag");g.fix={range:[e,g.endIndex],text:""},n.push(g)}for(let g of s)if(g instanceof bt){let{name:d}=g;o.has(d)?(l.add(d),o.get(d).push(g)):o.set(d,[g])}else{let d=g.text().trim();if(d){let c=C(g,p,"no-ignored","containing invalid attribute",/[\p{L}\d]/u.test(d)?"error":"warning");c.suggestions=[{desc:"remove",range:[c.startIndex,c.endIndex],text:" "}],n.push(c)}}if(l.size>0)for(let g of l)n.push(...o.get(g).map(d=>C(d,p,"no-duplicate",f.msg("duplicated $1 attribute",g))));return n}print(){return this.toString()?`<span class="wpb-${this.type}">${this.childNodes.map(e=>e.print(e instanceof G?{class:e.toString().trim()&&"attr-dirty"}:void 0)).join("")}</span>`:""}};Xt=new WeakMap});var yr,Mi=b(()=>{"use strict";Se();F();P();Oe();yr=class extends y{get type(){return"ext-inner"}constructor(r,e=f.getConfig(),t=[]){if(r){let n=/<nowiki>/giu,i=/<\/nowiki>/giu,{length:s}=n.source,o=n.exec(r);o&&(i.lastIndex=o.index+s);let l=i.exec(r),p=0,g="";for(;o&&l;)new U(o[0],e,t),new U(l[0],e,t),g+=`${r.slice(p,o.index)}\0${t.length-1}n\x7F${r.slice(o.index+s,l.index)}\0${t.length}n\x7F`,p=l.index+s+1,n.lastIndex=p,o=n.exec(r),o&&(i.lastIndex=o.index+s),l=i.exec(r);r=g+r.slice(p)}super(r,e,t,{}),this.setAttribute("stage",10)}getAttribute(r){return r==="plain"||super.getAttribute(r)}lint(r=this.getAbsoluteIndex()){return super.lint(r,/<\s*\/\s*(pre)\b/giu)}}});var Tt,pn=b(()=>{"use strict";_();Q();Qt();F();P();Ee();Tt=class extends y{get type(){return"ext-inner"}constructor(r,e,t=f.getConfig(),n=[],i){if(super(void 0,t,n,{}),e){let s=G;this.append(...e.split(`
1
+ "use strict";(()=>{var zn=Object.create;var De=Object.defineProperty;var Wn=Object.getOwnPropertyDescriptor;var ho=Object.getOwnPropertyNames;var mo=Object.getPrototypeOf,fo=Object.prototype.hasOwnProperty;var Un=(a,r)=>(r=Symbol[a])?r:Symbol.for("Symbol."+a),dt=a=>{throw TypeError(a)};var Dn=(a,r,e)=>r in a?De(a,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[r]=e;var Gn=(a,r)=>De(a,"name",{value:r,configurable:!0});var b=(a,r)=>()=>(a&&(r=a(a=0)),r);var Hn=(a,r)=>()=>(r||a((r={exports:{}}).exports,r),r.exports),se=(a,r)=>{for(var e in r)De(a,e,{get:r[e],enumerable:!0})},Vn=(a,r,e,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of ho(r))!fo.call(a,n)&&n!==e&&De(a,n,{get:()=>r[n],enumerable:!(t=Wn(r,n))||t.enumerable});return a};var xo=(a,r,e)=>(e=a!=null?zn(mo(a)):{},Vn(r||!a||!a.__esModule?De(e,"default",{value:a,enumerable:!0}):e,a)),Z=a=>Vn(De({},"__esModule",{value:!0}),a);var le=a=>{var r;return[,,,zn((r=a==null?void 0:a[Un("metadata")])!=null?r:null)]},Xn=["class","method","getter","setter","accessor","field","value","get","set"],Mt=a=>a!==void 0&&typeof a!="function"?dt("Function expected"):a,bo=(a,r,e,t,n)=>({kind:Xn[a],name:r,metadata:t,addInitializer:i=>e._?dt("Already initialized"):n.push(Mt(i||null))}),To=(a,r)=>Dn(r,Un("metadata"),a[3]),de=(a,r,e,t)=>{for(var n=0,i=a[r>>1],s=i&&i.length;n<s;n++)r&1?i[n].call(e):t=i[n].call(e,t);return t},ge=(a,r,e,t,n,i)=>{var s,o,l,p,g,d=r&7,c=!!(r&8),h=!!(r&16),m=d>3?a.length+1:d?c?1:2:0,k=Xn[d+5],x=d>3&&(a[m-1]=[]),A=a[m]||(a[m]=[]),S=d&&(!h&&!c&&(n=n.prototype),d<5&&(d>3||!h)&&Wn(d<4?n:{get[e](){return u(this,i)},set[e](w){return v(this,i,w)}},e));d?h&&d<4&&Gn(i,(d>2?"set ":d>1?"get ":"")+e):Gn(n,e);for(var C=t.length-1;C>=0;C--)p=bo(d,e,l={},a[3],A),d&&(p.static=c,p.private=h,g=p.access={has:h?w=>yo(n,w):w=>e in w},d^3&&(g.get=h?w=>(d^1?u:F)(w,n,d^4?i:S.get):w=>w[e]),d>2&&(g.set=h?(w,L)=>v(w,n,L,d^4?i:S.set):(w,L)=>w[e]=L)),o=(0,t[C])(d?d<4?h?i:S[k]:d>4?void 0:{get:S.get,set:S.set}:n,p),l._=1,d^4||o===void 0?Mt(o)&&(d>4?x.unshift(o):d?h?i=o:S[k]=o:n=o):typeof o!="object"||o===null?dt("Object expected"):(Mt(s=o.get)&&(S.get=s),Mt(s=o.set)&&(S.set=s),Mt(s=o.init)&&x.unshift(s));return d||To(a,n),S&&De(n,e,S),h?d^4?i:S:n},X=(a,r,e)=>Dn(a,typeof r!="symbol"?r+"":r,e),Zr=(a,r,e)=>r.has(a)||dt("Cannot "+e),yo=(a,r)=>Object(r)!==r?dt('Cannot use the "in" operator on this value'):a.has(r),u=(a,r,e)=>(Zr(a,r,"read from private field"),e?e.call(a):r.get(a)),T=(a,r,e)=>r.has(a)?dt("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(a):r.set(a,e),v=(a,r,e,t)=>(Zr(a,r,"write to private field"),t?t.call(a,e):r.set(a,e),e),F=(a,r,e)=>(Zr(a,r,"access private method"),e);var dr=(a,r,e,t)=>({set _(n){v(a,r,n,e)},get _(){return u(a,r,t)}});var Jr,Qn,Zn=b(()=>{"use strict";Jr={redirect:1,onlyinclude:1,noinclude:1,include:1,comment:1,ext:1,arg:2,"magic-word":2,template:2,heading:2,html:3,table:4,hr:5,"double-underscore":5,link:6,category:6,file:6,quote:7,"ext-link":8,"free-ext-link":9,"magic-link":9,list:10,dd:10,converter:11};Object.setPrototypeOf(Jr,null);Qn=["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 ii=Hn((La,ni)=>{"use strict";var Yr=Object.defineProperty,ko=Object.getOwnPropertyDescriptor,vo=Object.getOwnPropertyNames,Ao=Object.prototype.hasOwnProperty,wo=(a,r)=>{for(var e in r)Yr(a,e,{get:r[e],enumerable:!0})},So=(a,r,e,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of vo(r))!Ao.call(a,n)&&n!==e&&Yr(a,n,{get:()=>r[n],enumerable:!(t=ko(r,n))||t.enumerable});return a},Co=a=>So(Yr({},"__esModule",{value:!0}),a),Kn={};wo(Kn,{CDN:()=>Yn,getObject:()=>Po,loadScript:()=>Ro,normalizeTitle:()=>Lo,numToHex:()=>Io,parseVersion:()=>jo,rawurldecode:()=>ri,setObject:()=>Bo,splitColors:()=>Fo});ni.exports=Co(Kn);var Yn="https://testingcf.jsdelivr.net",ei=String.raw`#(?:[\da-f]{3,4}|(?:[\da-f]{2}){3,4})(?![\p{L}\d_])`,Be=String.raw`(?:\d*\.)?\d+%?`,Jn=String.raw`(?:\d*\.)?\d+(?:deg|grad|rad|turn)?`,ti=String.raw`rgba?\(\s*(?:${String.raw`${new Array(3).fill(Be).join(String.raw`\s+`)}(?:\s*\/\s*${Be})?`}|${String.raw`${new Array(3).fill(Be).join(String.raw`\s*,\s*`)}(?:\s*,\s*${Be})?`})\s*\)`,$o=String.raw`hsla?\(\s*(?:${String.raw`${Jn}\s+${Be}\s+${Be}(?:\s*\/\s*${Be})?`}|${String.raw`${Jn}${String.raw`\s*,\s*(?:\d*\.)?\d+%`.repeat(2)}(?:\s*,\s*${Be})?`})\s*\)`,No=new RegExp(String.raw`(^|[^\p{L}\d_])(${ei}|${ti}|${$o})`,"giu"),Eo=new RegExp(String.raw`(^|[^\p{L}\d_])(${ei}|${ti})`,"giu"),Kr;typeof document=="object"&&(Kr=document.createElement("span"));var ri=a=>decodeURIComponent(a.replace(/%(?![\da-f]{2})/giu,"%25")),Lo=a=>{let r=ri(a);return/[<>[\]|{}]/u.test(r)?r:(Kr.innerHTML=r,Kr.textContent)},Io=a=>Math.round(a*255).toString(16).padStart(2,"0"),Fo=(a,r=!0)=>{let e=[],t=r?No:Eo;t.lastIndex=0;let n=t.exec(a),i=0;for(;n;){let s=n.index+n[1].length;s>i&&e.push([a.slice(i,s),i,s,!1]),{lastIndex:i}=t,e.push([n[2],s,i,!0]),n=t.exec(a)}return a.length>i&&e.push([a.slice(i),i,a.length,!1]),e},Ro=(a,r,e)=>new Promise(t=>{let n=`${Yn}/${a}`,i=globalThis;for(let s of r.split("."))i=i==null?void 0:i[s];if(i)t();else if(e&&typeof define=="function"&&"amd"in define){let s=globalThis.require;s.config({paths:{[r]:n}}),s([r],o=>{Object.assign(globalThis,{[r]:o}),t()})}else{let s=document.createElement("script");s.src=n,s.onload=()=>{t()},document.head.append(s)}}),Po=a=>JSON.parse(String(localStorage.getItem(a))),Bo=(a,r)=>{localStorage.setItem(a,JSON.stringify(r))},jo=a=>a.split(".",3).map(Number)});var gr,si,Ae,we,He,oi,te,ai,pe,qo,Gt,li,di,_o,Oo,gt,Ne,J=b(()=>{"use strict";gr=xo(ii()),si=String.raw`[^[\]<>"\0-\x1F\x7F\p{Zs}\uFFFD]`,Ae=String.raw`(?:\[[\da-f:.]+\]|${si})`,we=String.raw`(?:${si}|\0\d+[cn!~]\x7F)*`,He=(a,r)=>e=>e.replace(a,r),oi=He(/[\0\x7F]|\r$/gmu,""),te=He(/\0\d+[cn]\x7F/gu,""),ai=He(/[\\{}()|.?*+^$[\]]/gu,String.raw`\$&`),pe=(a,r="")=>a.map(e=>typeof e=="string"?e:e.text()).join(r),qo={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},Gt=He(/&(?:#(\d+|[Xx][\da-fA-F]+)|([lLgG][tT]|[lr]brac[ke]|nbsp|amp|AMP|quot|QUOT));/gu,(a,r,e)=>r?String.fromCodePoint(+((/^x/iu.test(r)?"0":"")+r)):qo[e.toLowerCase()]),li=He(/&#(\d+|x[\da-f]+);/giu,(a,r)=>String.fromCodePoint(+((/^x/iu.test(r)?"0":"")+r))),di=He(/\n/gu,String.raw`\n`),_o={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},Oo=a=>He(a,r=>`&${_o[r]};`),gt=Oo(/[&<>]/gu),Ne=(a,r={})=>{let{pre:e="",post:t="",sep:n=""}=r;return e+a.map(i=>i.print()).join(n)+t}});var gi=Hn((Fa,Mo)=>{Mo.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:{"0":"","6":"File","10":"Template","828":"Module"},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"},["!","=","#FORMAL","#timef","#timefl"],["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 en,Se=b(()=>{"use strict";en=gi()});var Ve,E,Q=b(()=>{"use strict";E=class{constructor(r,e){T(this,Ve);X(this,"token");X(this,"start");this.token=r,this.start=e}get top(){var r;return(r=u(this,Ve))!=null||v(this,Ve,this.getPosition()),u(this,Ve).top}get left(){var r;return(r=u(this,Ve))!=null||v(this,Ve,this.getPosition()),u(this,Ve).left}getPosition(){return this.token.getRootNode().posFromIndex(this.start)}};Ve=new WeakMap});var pi,$,N,_=b(()=>{"use strict";Q();R();pi=a=>(r,e,t,n,i="error")=>{let{start:s}=e,{top:o,left:l}=e instanceof E?e:new E(r,s),{offsetHeight:p,offsetWidth:g}=r,{startIndex:d,startLine:c,startCol:h}=a(r,s,o,l);return{rule:t,message:f.msg(n),severity:i,startIndex:d,endIndex:d+r.toString().length,startLine:c,endLine:c+p-1,startCol:h,endCol:p===1?h+g:g}},$=pi((a,r,e,t)=>{let n=a.getRelativeIndex(),{top:i,left:s}=a.parentNode.posFromIndex(n);return{startIndex:r+n,startLine:e+i,startCol:i?s:t+s}}),N=pi((a,r,e,t)=>({startIndex:r,startLine:e,startCol:t}))});var pr,ui=b(()=>{"use strict";pr=(a,r,e)=>({type:t,name:n})=>a.split(",").some(i=>{let[s,...o]=i.trim().split("#");return(!s||s===t)&&o.every(l=>l===n)})});var ci,hi,zt,pt,ur,ut,tn=b(()=>{"use strict";ci=a=>{let r=a.split(`
2
+ `),e=r.length;return{height:e,width:r[e-1].length}},hi=(a,r)=>r.childNodes.slice(0,a).reduce((e,t,n)=>e+t.toString().length+r.getGaps(n),0)+r.getAttribute("padding"),ut=class{constructor(){T(this,pt);X(this,"childNodes",[]);T(this,zt)}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get parentNode(){return u(this,zt)}get nextSibling(){var e;let r=(e=this.parentNode)==null?void 0:e.childNodes;return r&&r[r.indexOf(this)+1]}get previousSibling(){var e;let r=(e=this.parentNode)==null?void 0:e.childNodes;return r&&r[r.indexOf(this)-1]}get offsetHeight(){return F(this,pt,ur).call(this).height}get offsetWidth(){return F(this,pt,ur).call(this).width}getAttribute(r){return r==="padding"?0:this[r]}setAttribute(r,e){r==="parentNode"?v(this,zt,e):this[r]=e}getRootNode(){let{parentNode:r}=this;for(;r!=null&&r.parentNode;)({parentNode:r}=r);return r!=null?r:this}indexFromPos(r,e){let t=String(this).split(`
3
+ `);return r>=0&&e>=0&&r<=t.length-1&&e<=t[r].length?t.slice(0,r).reduce((n,i)=>n+i.length+1,0)+e:void 0}posFromIndex(r){let e=String(this);if(r>=-e.length&&r<=e.length){let{height:t,width:n}=ci(e.slice(0,r));return{top:t-1,left:n}}}getGaps(r){return 0}getRelativeIndex(r){if(r===void 0){let{parentNode:e}=this;return e?hi(e.childNodes.indexOf(this),e):0}return hi(r,this)}getAbsoluteIndex(){let{parentNode:r}=this;return r?r.getAbsoluteIndex()+this.getRelativeIndex():0}getBoundingClientRect(){return{...F(this,pt,ur).call(this),...this.getRootNode().posFromIndex(this.getAbsoluteIndex())}}seal(r,e){Object.defineProperty(this,r,{enumerable:!e&&!!this[r],configurable:!0})}is(r){return this.type===r}};zt=new WeakMap,pt=new WeakSet,ur=function(){return ci(String(this))}});var je,rn,nn,cr,mi=b(()=>{"use strict";J();be();ui();tn();cr=class extends ut{constructor(){super(...arguments);T(this,je)}get length(){return this.childNodes.length}text(e){return pe(this.childNodes,e)}normalize(){let e=[...this.childNodes],t=n=>{e.splice(n,1)};for(let n=e.length-1;n>=0;n--){let{type:i,data:s}=e[n];i!=="text"||this.getGaps(n-1)||s===""&&t(n)}this.setAttribute("childNodes",e)}removeAt(e){return sn(this,e,1)[0]}insertAt(e,t=this.length){return sn(this,t,0,[e]),e}closest(e){let t=pr(e,this),{parentNode:n}=this;for(;n;){if(t(n))return n;({parentNode:n}=n)}}querySelector(e){let t=pr(e,this);return F(this,je,rn).call(this,t)}querySelectorAll(e){let t=pr(e,this);return F(this,je,nn).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 n=this.childNodes[t],{data:i}=n;return n.replaceData(e),i}toString(e,t=""){return this.childNodes.map(n=>n.toString(e)).join(t)}lint(e=this.getAbsoluteIndex(),t){let n=[];for(let i=0,s=e+this.getAttribute("padding");i<this.length;i++){let o=this.childNodes[i];n.push(...o.lint(s,t)),s+=o.toString().length+this.getGaps(i)}return n}print(e={}){let t=e.class;return this.toString()?`${t===""?"":`<span class="wpb-${t!=null?t:this.type}">`}${Ne(this.childNodes,e)}${t===""?"":"</span>"}`:""}json(e,t=this.getAbsoluteIndex()){let n={...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();n.childNodes.push(o.type==="text"?{data:o.data,range:[s,s+l]}:o.json(void 0,s)),s+=l+this.getGaps(i)}return n}};je=new WeakSet,rn=function(e){var t;for(let n of this.childNodes){if(n.type==="text")continue;if(e(n))return n;let i=F(t=n,je,rn).call(t,e);if(i)return i}},nn=function(e){var n;let t=[];for(let i of this.childNodes)i.type!=="text"&&(e(i)&&t.push(i),t.push(...F(n=i,je,nn).call(n,e)));return t}});var fi,Go,zo,Wo,Uo,Do,Ho,hr,xi,Wt,bi=b(()=>{"use strict";J();R();tn();fi=String.raw`<\s*(?:/\s*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+`,Go=new RegExp(String.raw`${fi}|https?[:/]/+`,"giu"),zo=new RegExp(fi,"giu"),Wo=new RegExp(String.raw`^https?://${Ae}${we}\.(?:gif|png|jpg|jpeg)$`,"iu"),Uo={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},Do={"<":"tag-like","[":"lonely-bracket","{":"lonely-bracket","]":"lonely-bracket","}":"lonely-bracket",h:"lonely-http"},Ho=["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"],Wt=class extends ut{constructor(e){super();T(this,hr);X(this,"data","");Object.defineProperties(this,{childNodes:{enumerable:!1,configurable:!1},data:{value:e}})}get type(){return"text"}toString(e){var t;return e&&!((t=this.parentNode)!=null&&t.getAttribute("built"))?te(this.data):this.data}text(){return this.data}lint(e=this.getAbsoluteIndex(),t){var B,j,q;if(t===!1)return[];let{data:n,parentNode:i,nextSibling:s,previousSibling:o}=this;if(!i)throw new Error("An isolated text node cannot be linted!");let{type:l,name:p,parentNode:g}=i,d=!1;if(l==="attr-value"){let{type:D,name:H,tag:ne}=g;if(D!=="ext-attr")d=!0;else if(ne==="choose"&&(H==="before"||H==="after"))return[]}if(t!=null||(t=l==="free-ext-link"||l==="ext-link-url"||l==="ext-link-text"||l==="image-parameter"&&p==="link"||d?zo:Go),n.search(t)===-1)return[];t.lastIndex=0;let c=[],h=s==null?void 0:s.type,m=s==null?void 0:s.name,k=o==null?void 0:o.type,x=this.getRootNode(),{ext:A,html:S}=x.getAttribute("config"),{top:C,left:w}=x.posFromIndex(e),L=new Set(["onlyinclude","noinclude","includeonly",A,S,Ho].flat(2));for(let D=t.exec(n);D;D=t.exec(n)){let[,H,ne]=D,{0:ee,index:W}=D;if(ne&&ne!=="]"){let{length:ae}=ne;W+=ae,ee=ee.slice(ae)}let{0:I,length:xe}=ee;if(I==="<"&&!L.has(H.toLowerCase())||I==="["&&l==="ext-link-text"&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(n.slice(W+1))||s!=null&&s.is("ext")&&m==="nowiki"&&((B=s.innerText)!=null&&B.includes("]"))))continue;if(I==="]"&&(W||xe>1))t.lastIndex--;else if(I==="h"&&W===0&&l==="ext-link-text"&&Wo.test(n))continue;let ke=e+W,Pe=ke+xe,ie=x.toString(),ve=ie[Pe],lt=ie[ke-1],Vr=xe>1&&!(I==="<"&&!/[\s/>]/u.test(ve!=null?ve:"")||d&&(I==="["||I==="]"))||I==="{"&&(ve===I||lt==="-")||I==="}"&&(lt===I||ve==="-")||I==="["&&(ve===I||l==="ext-link-text"||h==="free-ext-link"&&!n.slice(W+1).trim())||I==="]"&&(lt===I||k==="free-ext-link"&&!n.slice(0,W).includes("]"))?"error":"warning",Xr=I==="{"||I==="[";if(Vr==="warning"&&(Xr||(I==="]"||I==="}"))){let ae=Uo[I],Qr=Xr?n.slice(W+1):n.slice(0,W);if(I==="{"&&((j=ae.exec(Qr))==null?void 0:j[0])==="}"||I==="}"&&((q=ae.exec(Qr))==null?void 0:q[0])==="{")continue;if(!Qr.includes(I)){let Mn=Xr?"nextSibling":"previousSibling",Ue=this[Mn];for(;Ue&&(Ue.type!=="text"||!ae.test(Ue.data));)Ue=Ue[Mn];if(Ue&&ae.exec(Ue.data)[0]!==I)continue}}let lr=n.slice(0,W).split(`
4
+ `),qn=lr.length+C-1,_n=lr[lr.length-1],On=lr.length===1?w+_n.length:_n.length,Ot={rule:Do[I],message:f.msg('lonely "$1"',I==="h"?ee:I),severity:Vr,startIndex:ke,endIndex:Pe,startLine:qn,endLine:qn,startCol:On,endCol:On+xe};if(I==="<")Ot.suggestions=[{desc:"escape",range:[ke,ke+1],text:"&lt;"}];else if(I==="h"&&!(l==="ext-link-text"||l==="link-text")&&/[\p{L}\d_]/u.test(lt||""))Ot.suggestions=[{desc:"whitespace",range:[ke,ke],text:" "}];else if(I==="["&&l==="ext-link-text"){let ae=i.getAbsoluteIndex()+i.toString().length;Ot.suggestions=[{desc:"escape",range:[ae,ae+1],text:"&#93;"}]}else if(I==="]"&&k==="free-ext-link"&&Vr==="error"){let ae=e-o.toString().length;Ot.fix={range:[ae,ae],text:"["}}c.push(Ot)}return c}replaceData(e){F(this,hr,xi).call(this,e)}print(){return gt(this.data)}};hr=new WeakSet,xi=function(e){this.setAttribute("data",e)}});var ue,Xe=b(()=>{"use strict";be();ue=(a=!0,r=!0)=>(e,t)=>{class n extends e{text(){return""}lint(s){return a?[]:super.lint(s)}}return mr(n,e),n}});var Ut,ce,ct=b(()=>{"use strict";P();ce=class extends y{constructor(e,t,n,i,s,o){super(e,i,s,o);T(this,Ut);v(this,Ut,n)}get type(){return u(this,Ut)}lint(e=this.getAbsoluteIndex()){return super.lint(e,!1)}};Ut=new WeakMap});var ht,G,Ee=b(()=>{"use strict";P();G=class extends y{constructor(e,t,n,i,s){super(e,n,i,s);T(this,ht);v(this,ht,t)}get type(){return u(this,ht)}set type(e){v(this,ht,e)}};ht=new WeakMap});var Vo,Qe,Te,qe,Ce,Ht=b(()=>{"use strict";_();Se();Q();R();P();Ee();Vo=a=>a==="redirect-target"||a==="link",Ce=class extends y{constructor(e,t,n=f.getConfig(),i=[],s="|"){super(void 0,n,i,{});T(this,Qe,!0);T(this,Te);T(this,qe);if(this.insertAt(new G(e,"link-target",n,i,{})),t!==void 0){let o=new y(t,n,i,{});o.type="link-text",o.setAttribute("stage",10),this.insertAt(o)}v(this,Te,s)}afterBuild(){v(this,qe,this.getTitle()),u(this,Te).includes("\0")&&v(this,Te,this.buildFromStr(u(this,Te),0)),this.setAttribute("name",u(this,qe).title),super.afterBuild()}setAttribute(e,t){e==="bracket"?v(this,Qe,t):e==="title"?v(this,qe,t):super.setAttribute(e,t)}toString(e){let t=super.toString(e,u(this,Te));return u(this,Qe)?`[[${t}]]`:t}text(){let e=super.text("|");return u(this,Qe)?`[[${e}]]`:e}getAttribute(e){return e==="title"?u(this,qe):e==="padding"?2:super.getAttribute(e)}getGaps(e){return e===0?u(this,Te).length:1}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),{childNodes:[i,s],type:o}=this,{encoded:l,fragment:p}=u(this,qe),g=new E(this,e);if(i.childNodes.some(({type:d})=>d==="template")&&n.push($(i,g,"unknown-page","template in an internal link target","warning")),l&&n.push($(i,g,"url-encoding","unnecessary URL encoding in an internal link")),o==="link"||o==="category"){let d=s==null?void 0:s.childNodes.find(c=>c.type==="text"&&c.data.includes("|"));if(d){let c=$(s,g,"pipe-like",'additional "|" in the link text',"warning"),h=c.startIndex+d.getRelativeIndex();c.suggestions=[{desc:"escape",range:[h,h+d.data.length],text:d.data.replace(/\|/gu,"&#124;")}],n.push(c)}}if(p!==void 0&&!Vo(o)){let d=$(i,g,"no-ignored","useless fragment"),c=i.childNodes.find(h=>h.type==="text"&&h.data.includes("#"));c&&(d.fix={range:[d.startIndex+c.getRelativeIndex()+c.data.indexOf("#"),d.endIndex],text:""}),n.push(d)}return n}getTitle(e){return this.normalizeTitle(this.firstChild.toString(!0),0,e,!0,!0)}print(){return super.print(u(this,Qe)?{pre:"[[",post:"]]",sep:u(this,Te)}:{sep:u(this,Te)})}};Qe=new WeakMap,Te=new WeakMap,qe=new WeakMap});var re,_e=b(()=>{"use strict";P();re=class extends y{get innerText(){return this.firstChild.data}constructor(r="",e,t){super(r,e,t)}}});var Ti,on,Xo,U,Oe=b(()=>{"use strict";Xe();_e();Ti=[ue()];U=class extends(Xo=re){get type(){return"noinclude"}toString(r){return r?"":super.toString()}};on=le(Xo),U=ge(on,0,"NoincludeToken",Ti,U),de(on,1,U)});var fr,yi=b(()=>{"use strict";_();R();Ht();Oe();fr=class extends Ce{get type(){return"redirect-target"}constructor(r,e,t=f.getConfig(),n=[]){super(r,void 0,t,n),e!==void 0&&this.insertAt(new U(e,t,n))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,!0,!0)}lint(r=this.getAbsoluteIndex()){let e=super.lint(r,!1);if(this.length===2){let t=$(this.lastChild,{start:r},"no-ignored","useless link text");t.startIndex--,t.startCol--,t.fix={range:[t.startIndex,t.endIndex],text:""},e.push(t)}return e}}});var ki,Me,mt,an,Qo,Ze,vi=b(()=>{"use strict";Xe();R();P();ct();yi();ki=[ue(!1,!1)];Ze=class extends(Qo=y){constructor(e,t,n,i,s,o=f.getConfig(),l=[]){super(void 0,o,l);T(this,Me);T(this,mt);v(this,Me,e),v(this,mt,s);let p=new RegExp(String.raw`^(?:${o.redirection.join("|")})\s*(?::\s*)?$`,"iu");this.append(new ce(t,p,"redirect-syntax",o,l,{}),new fr(n,i==null?void 0:i.slice(1),o,l))}get type(){return"redirect"}getAttribute(e){return e==="padding"?u(this,Me).length:super.getAttribute(e)}toString(e){return u(this,Me)+super.toString(e)+u(this,mt)}lint(e=this.getAbsoluteIndex()){return this.lastChild.lint(e+u(this,Me).length+this.firstChild.toString().length)}print(){return super.print({pre:u(this,Me),post:u(this,mt)})}};an=le(Qo),Me=new WeakMap,mt=new WeakMap,Ze=ge(an,0,"RedirectToken",ki,Ze),de(an,1,Ze)});var Ai={};se(Ai,{parseRedirect:()=>Zo});var Zo,wi=b(()=>{"use strict";R();vi();Zo=(a,r,e)=>{var n;(n=r.regexRedirect)!=null||(r.regexRedirect=new RegExp(String.raw`^(\s*)((?:${r.redirection.join("|")})\s*(?::\s*)?)\[\[([^\n|\]]+)(\|.*?)?\]\](\s*)`,"iu"));let t=r.regexRedirect.exec(a);return t&&f.normalizeTitle(t[3],0,!1,r,!0,!0).valid?(a=`\0${e.length}o\x7F${a.slice(t[0].length)}`,new Ze(...t.slice(1),r,e),a):!1}});var xr,Si=b(()=>{"use strict";P();xr=class extends y{get type(){return"onlyinclude"}toString(r){return`<onlyinclude>${super.toString(r)}</onlyinclude>`}getAttribute(r){return r==="padding"?13:r==="plain"||super.getAttribute(r)}print(){return super.print({pre:'<span class="wpb-ext">&lt;onlyinclude&gt;</span>',post:'<span class="wpb-ext">&lt;/onlyinclude&gt;</span>'})}}});var Ge,ft,ln=b(()=>{"use strict";P();ft=class extends y{constructor(e,t,n,i,s,o=[]){super(void 0,s);T(this,Ge);X(this,"closed");X(this,"selfClosing");this.setAttribute("name",e.toLowerCase()),v(this,Ge,[e,i||e]),this.closed=i!=="",this.selfClosing=i===void 0,this.append(t,n);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:n,lastChild:i}=this,[s,o]=u(this,Ge);return t?`<${s}${n.toString(e)}/>`:`<${s}${n.toString(e)}>${i.toString(e)}${this.closed?`</${o}>`:""}`}text(){let[e,t]=u(this,Ge);return this.selfClosing?`<${e}${this.firstChild.text()}/>`:`<${e}${super.text(">")}${this.closed?`</${t}>`:""}`}getAttribute(e){return e==="padding"?u(this,Ge)[0].length+1:super.getAttribute(e)}getGaps(){return 1}print(){let[e,t]=u(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 Ci,dn,Jo,Je,$i=b(()=>{"use strict";_();Q();Xe();R();ln();Ci=[ue(!1)];Je=class extends(Jo=ft){get type(){return"include"}constructor(r,e="",t,n,i,s){super(r,e,t!=null?t:"",t===void 0||n!=null?n:"",i,s)}toString(r){return r?"":super.toString()}lint(r=this.getAbsoluteIndex()){let e=[],{firstChild:t,closed:n,name:i}=this,s=new E(this,r);if(t.data.trim()){let o=$(t,s,"no-ignored","useless attribute","warning");o.suggestions=[{desc:"remove",range:[o.startIndex,o.endIndex],text:""}],e.push(o)}if(!n){let o=N(this,s,"unclosed-comment",f.msg("unclosed $1",`<${i}>`));o.suggestions=[{desc:"close",range:[o.endIndex,o.endIndex],text:`</${i}>`}],e.push(o)}return e}};dn=le(Jo),Je=ge(dn,0,"IncludeToken",Ci,Je),de(dn,1,Je)});var V,Ni,Ei,Tr,gn,Li,xt,Ii,Fi,Ri,br,Pi,Bi,ji,qi,_i=b(()=>{"use strict";V=new Set(["align"]),Ni=new Set(["cite"]),Ei=new Set(["cite","datetime"]),Tr=new Set(["width"]),gn=new Set(["axis","align","bgcolor","height","width","valign"]),Li=new Set([...gn,"abbr","headers","scope","rowspan","colspan"]),xt=new Set(["type"]),Ii=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),Fi=new Set(["clear"]),Ri=new Set(["bgcolor","align","valign"]),br=new Set,Pi=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"]),Bi={div:V,h1:V,h2:V,h3:V,h4:V,h5:V,h6:V,blockquote:Ni,q:Ni,p:V,br:Fi,pre:Tr,ins:Ei,del:Ei,ul:xt,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...Ii,"border"]),caption:V,tr:Ri,td:Li,th:Li,img:new Set(["alt","src","width","height","srcset"]),font:new Set(["size","color","face"]),hr:Tr,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:xt,poem:V,categorytree:V,combooption:V},ji={gallery:new Set(["mode","showfilename","caption","perrow","widths","heights","showthumbnails"]),poem:new Set(["compact"]),categorytree:new Set(["hideroot","onlyroot","depth","mode","hideprefix","namespaces","showcount","notranslations"]),combooption:new Set(["name","for","inline"]),nowiki:br,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:br,inputbox:br,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:br,poll:new Set(["id","show-results-before-voting"]),sm2:xt,flashmp3:xt,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"])},qi={table:Ii,td:new Set([...gn,"scope"]),th:gn,br:Fi,caption:V,div:V,hr:Tr,h1:V,h2:V,h3:V,h4:V,h5:V,h6:V,li:xt,p:V,pre:Tr,tr:Ri,ul:xt}});var Ko,Vt,bt,Y,$e,Tt,Oi=b(()=>{"use strict";_();J();Se();_i();Q();R();P();Ee();Ko=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,Tt=class extends y{constructor(e,t,n,i="",s,o=[],l=f.getConfig(),p=[]){let g=new G(n,"attr-key",l,p),d;if(n==="title"||t==="img"&&n==="alt")d=new y(s,l,p,{}),d.type="attr-value",d.setAttribute("stage",10);else if(t==="gallery"&&n==="caption"||t==="choose"&&(n==="before"||n==="after")){let c={...l,excludes:[...l.excludes,"heading","html","table","hr","list"]};d=new y(s,c,p,{}),d.type="attr-value",d.setAttribute("stage",1)}else d=new G(s,"attr-value",l,p,{});super(void 0,l,p);T(this,Vt);T(this,bt);T(this,Y);T(this,$e);v(this,Vt,e),this.append(g,d),v(this,Y,i),v(this,$e,[...o]),v(this,bt,t),this.setAttribute("name",te(n).trim().toLowerCase())}get type(){return u(this,Vt)}get tag(){return u(this,bt)}get balanced(){return!u(this,Y)||u(this,$e)[0]===u(this,$e)[1]}afterBuild(){u(this,Y).includes("\0")&&v(this,Y,this.buildFromStr(u(this,Y),0)),this.parentNode&&v(this,bt,this.parentNode.name),this.setAttribute("name",this.firstChild.toString(!0).trim().toLowerCase()),super.afterBuild()}toString(e){let[t="",n=""]=u(this,$e);return u(this,Y)?super.toString(e,u(this,Y)+t)+n:this.firstChild.toString(e)}text(){return u(this,Y)?`${super.text(`${u(this,Y).trim()}"`)}"`:this.firstChild.text()}getGaps(){var e,t;return u(this,Y)?u(this,Y).length+((t=(e=u(this,$e)[0])==null?void 0:e.length)!=null?t:0):0}lint(e=this.getAbsoluteIndex(),t){var k;let n=super.lint(e,t),{balanced:i,firstChild:s,lastChild:o,type:l,name:p,tag:g}=this,d=this.getValue(),c=new E(this,e);if(!i){let x=$(o,c,"unclosed-quote",f.msg("unclosed $1","quotes"),"warning");x.startIndex--,x.startCol--;let A={range:[x.endIndex,x.endIndex],text:u(this,$e)[0]};o.childNodes.some(({type:S,data:C})=>S==="text"&&/\s/u.test(C))?x.suggestions=[{desc:"close",...A}]:x.fix=A,n.push(x)}let h=ji[g],m=Bi[g];if(!(h!=null&&h.has(p))&&!(m!=null&&m.has(p))&&(l==="ext-attr"?h||m:!/\{\{[^{]+\}\}/u.test(p))&&(l==="ext-attr"&&!m||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(p)&&(g==="meta"||g==="link"||!Pi.has(p))))n.push($(s,c,"illegal-attr","illegal attribute name"));else if((k=qi[g])!=null&&k.has(p))n.push($(s,c,"obsolete-attr","obsolete attribute","warning"));else if(p==="style"&&typeof d=="string"&&Ko.test(d))n.push($(o,c,"insecure-style","insecure style"));else if(p==="tabindex"&&typeof d=="string"&&d!=="0"){let x=$(o,c,"illegal-attr","nonzero tabindex");x.suggestions=[{desc:"remove",range:[e,x.endIndex],text:""},{desc:"0 tabindex",range:[x.startIndex,x.endIndex],text:"0"}],n.push(x)}return n}getValue(){return u(this,Y)?this.lastChild.text().trim():this.type==="ext-attr"||""}print(){let[e="",t=""]=u(this,$e);return u(this,Y)?super.print({sep:gt(u(this,Y))+e,post:t}):super.print()}};Vt=new WeakMap,bt=new WeakMap,Y=new WeakMap,$e=new WeakMap});var Mi,Yo,Xt,ze,yr=b(()=>{"use strict";_();J();Q();R();P();Ee();Oi();Mi=a=>a.slice(0,-1),Yo=a=>`${Mi(a)}-dirty`,ze=class extends y{constructor(e,t,n,i=f.getConfig(),s=[]){super(void 0,i,s,{});T(this,Xt);if(v(this,Xt,t),this.setAttribute("name",n),e){let o=/([^\s/](?:(?!\0\d+~\x7F)[^\s/=])*)(?:((?:\s(?:\s|\0\d+[cn]\x7F)*)?(?:=|\0\d+~\x7F)(?:\s|\0\d+[cn]\x7F)*)(?:(["'])(.*?)(\3|$)|(\S*)))?/gsu,l="",p=o.exec(e),g=0,d=()=>{l&&(super.insertAt(new G(l,Yo(t),i,s,{})),l="")};for(;p;){let{index:c,0:h,1:m,2:k,3:x,4:A,5:S,6:C}=p;if(l+=e.slice(g,c),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(te(m).trim())){let w=A!=null?A:C,L=[x,S],B=new Tt(Mi(t),n,m,k,w,L,i,s);d(),super.insertAt(B)}else l+=h;({lastIndex:g}=o),p=o.exec(e)}l+=e.slice(g),d()}}get type(){return u(this,Xt)}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 Tt&&(!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 n=super.lint(e,t),{parentNode:i,childNodes:s}=this,o=new Map,l=new Set,p=new E(this,e);if((i==null?void 0:i.type)==="html"&&i.closing&&this.text().trim()){let g=N(this,p,"no-ignored","attributes of a closing tag");g.fix={range:[e,g.endIndex],text:""},n.push(g)}for(let g of s)if(g instanceof Tt){let{name:d}=g;o.has(d)?(l.add(d),o.get(d).push(g)):o.set(d,[g])}else{let d=g.text().trim();if(d){let c=$(g,p,"no-ignored","containing invalid attribute",/[\p{L}\d]/u.test(d)?"error":"warning");c.suggestions=[{desc:"remove",range:[c.startIndex,c.endIndex],text:" "}],n.push(c)}}if(l.size>0)for(let g of l)n.push(...o.get(g).map(d=>$(d,p,"no-duplicate",f.msg("duplicated $1 attribute",g))));return n}print(){return this.toString()?`<span class="wpb-${this.type}">${this.childNodes.map(e=>e.print(e instanceof G?{class:e.toString().trim()&&"attr-dirty"}:void 0)).join("")}</span>`:""}};Xt=new WeakMap});var kr,Gi=b(()=>{"use strict";Se();R();P();Oe();kr=class extends y{get type(){return"ext-inner"}constructor(r,e=f.getConfig(),t=[]){if(r){let n=/<nowiki>/giu,i=/<\/nowiki>/giu,{length:s}=n.source,o=n.exec(r);o&&(i.lastIndex=o.index+s);let l=i.exec(r),p=0,g="";for(;o&&l;)new U(o[0],e,t),new U(l[0],e,t),g+=`${r.slice(p,o.index)}\0${t.length-1}n\x7F${r.slice(o.index+s,l.index)}\0${t.length}n\x7F`,p=l.index+s+1,n.lastIndex=p,o=n.exec(r),o&&(i.lastIndex=o.index+s),l=i.exec(r);r=g+r.slice(p)}super(r,e,t,{}),this.setAttribute("stage",10)}getAttribute(r){return r==="plain"||super.getAttribute(r)}lint(r=this.getAbsoluteIndex()){return super.lint(r,/<\s*\/\s*(pre)\b/giu)}}});var yt,pn=b(()=>{"use strict";_();Q();Qt();R();P();Ee();yt=class extends y{get type(){return"ext-inner"}constructor(r,e,t=f.getConfig(),n=[],i){if(super(void 0,t,n,{}),e){let s=G;this.append(...e.split(`
5
5
  `).map(o=>i?o:Ke(o,t,n,r)).map(o=>new s(o,"param-line",t,n,{})))}n.splice(n.indexOf(this),1),n.push(this)}toString(r){return super.toString(r,`
6
6
  `)}text(){return super.text(`
7
- `)}getGaps(){return 1}lint(r=this.getAbsoluteIndex()){let e=new E(this,r),t=f.msg("invalid parameter of <$1>",this.name),n=[];for(let i of this.childNodes){let s=i.childNodes.filter(({type:o})=>o!=="comment"&&o!=="include"&&o!=="noinclude");if(s.some(({type:o})=>o==="ext"))n.push(C(i,e,"no-ignored",t));else{let o=s.findIndex(({type:p})=>p!=="text"),l=s.slice(0,o>=0?o:void 0).map(String).join("");if(l&&!(o>=0?/^[a-z]+(?:\[\])?\s*(?:=|$)/iu:/^[a-z]+(?:\[\])?\s*=/iu).test(l)){let p=C(i,e,"no-ignored",t);p.suggestions=[{desc:"remove",range:[p.startIndex,p.endIndex],text:""}],n.push(p)}else n.push(...i.lint(r,!1))}r+=i.toString().length+1}return n}print(){return super.print({sep:`
8
- `})}}});var Zt,yt,kr,kt,un=b(()=>{"use strict";_();be();Q();F();P();ut();kt=class extends y{constructor(e,t,n=f.getConfig(),i=[]){super(void 0,n,i);T(this,yt);T(this,Zt);v(this,Zt,e);let s=new y(t[0],n,i);s.type="heading-title",s.setAttribute("stage",2);let o=new ce(t[1],/^\s*$/u,"heading-trail",n,i,{});this.append(s,o)}get type(){return"heading"}get level(){return u(this,Zt)}toString(e){let t=u(this,yt,kr);return t+this.firstChild.toString(e)+t+this.lastChild.toString(e)}text(){let e=u(this,yt,kr);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 n=super.lint(e,t),{firstChild:i,level:s}=this,o=i.toString(),l=i.childNodes.filter(vt("quote")),p=l.filter(({bold:c})=>c),g=l.filter(({italic:c})=>c),d=new E(this,e);return this.level===1&&n.push(C(i,d,"h1","<h1>")),(o.startsWith("=")||o.endsWith("="))&&n.push(C(i,d,"unbalanced-header",f.msg("unbalanced $1 in a section header",'"="'))),this.closest("html-attrs,table-attrs")&&n.push(N(this,d,"parsing-order","section header in a HTML tag")),p.length%2&&n.push(C(p[p.length-1],{...d,start:e+s,left:d.left+s},"format-leakage",f.msg("unbalanced $1 in a section header","bold apostrophes"))),g.length%2&&n.push(C(g[g.length-1],{start:e+s},"format-leakage",f.msg("unbalanced $1 in a section header","italic apostrophes"))),n}print(){let e=u(this,yt,kr);return super.print({pre:e,sep:e})}json(){let e=super.json();return e.level=this.level,e}};Zt=new WeakMap,yt=new WeakSet,kr=function(){return"=".repeat(this.level)}});var Yo,vr,Gi=b(()=>{"use strict";J();_();F();P();Yo=new RegExp(`https?://${Ae}${we}$`,"iu"),vr=class extends y{get type(){return"parameter"}get anon(){return this.firstChild.length===0}constructor(r,e,t=f.getConfig(),n=[]){super(void 0,t,n);let i=new y(typeof r=="number"?void 0:r,t,n,{}),s=new y(e,t,n);i.type="parameter-key",i.setAttribute("stage",2),s.type="parameter-value",s.setAttribute("stage",2),this.append(i,s)}trimName(r,e=!0){let t=(typeof r=="string"?r:r.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:r,firstChild:e}=this,t=this.trimName(e);r&&r.getArgs(t,!1,!1).add(this)}super.afterBuild()}toString(r){return this.anon?this.lastChild.toString(r):super.toString(r,"=")}text(){return this.anon?this.lastChild.text():super.text("=")}getGaps(){return this.anon?0:1}lint(r=this.getAbsoluteIndex(),e){var s;let t=super.lint(r,e),{firstChild:n}=this,i=(s=Yo.exec(n.text()))==null?void 0:s[0];if(i&&new URL(i).search){let o=C(n,{start:r},"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 r=super.json();return r.anon=this.anon,r}}});var ea,Kt,Ye,et,tt,cn,zi,Jt,Wi=b(()=>{"use strict";J();_();be();Se();Q();F();P();Gi();Ee();ut();ea=new Set(["pageid","articlepath","server","servername","scriptpath","stylepath"]),Jt=class extends y{constructor(e,t,n=f.getConfig(),i=[]){var m,k;let s,o=/^(?:\s|\0\d+[cn]\x7F)*\0(\d+)h\x7F(?:\s|\0\d+[cn]\x7F)*/u.exec(e);o&&(s=Number(o[1]),e=e.replace(`\0${s}h\x7F`,i[s].toString().replace(/^\n/u,"")));super(void 0,n,i,{});T(this,tt);X(this,"modifier","");T(this,Kt,"template");T(this,Ye,!1);T(this,et,new Map);let{parserFunction:[l,p]}=n,g=(m=/^(?:\s|\0\d+[cn]\x7F)*\0\d+s\x7F/u.exec(e))==null?void 0:m[0];if(g)this.setAttribute("modifier",g),e=e.slice(g.length);else if(e.includes(":")){let[x,...A]=e.split(":"),[S]=/^(?:\s|\0\d+[cn]\x7F)*/u.exec((k=A[0])!=null?k:"");this.setModifier(`${x}:${S}`)&&(e=A.join(":").slice(S.length))}let d=e.includes(":");if(d||t.length===0&&!u(this,Ye)){let[x,...A]=e.split(":"),S=te(x),$=S[A.length>0?"trimStart":"trim"](),w=$.toLowerCase(),L=Object.prototype.hasOwnProperty.call(l,w)&&l[w],B=p.includes($);if(B||ea.has(L)||d&&L){this.setAttribute("name",L||w.replace(/^#/u,"")),v(this,Kt,"magic-word");let q=new RegExp(String.raw`^\s*${$}\s*$`,B?"u":"iu"),D=new ce(x,q,"magic-word-name",n,i,{});if(super.insertAt(D),A.length>0&&t.unshift([A.join(":")]),this.name==="invoke")for(let H=0;H<2;H++){let ne=t.shift();if(!ne)break;let ee=new G(ne.join("="),`invoke-${H?"function":"module"}`,n,i);super.insertAt(ee)}}}if(this.type==="template"){let x=te(e).trim();if(!this.normalizeTitle(x,10,!0).valid)throw i.pop(),new SyntaxError("Invalid template name");let A=new G(e,"template-name",n,i,{});super.insertAt(A)}typeof s=="number"&&(i[s]=void 0);let c=this.isTemplate(),h=1;for(let[x,A]of t.entries())!c&&!(this.name==="switch"&&x>0)&&(A[0]=A.join("="),A.length=1),A.length===1&&(A.unshift(h),h++),this.insertAt(new vr(...A,n,i));this.seal("modifier")}get type(){return u(this,Kt)}setModifier(e){let{parserFunction:[,,t,n]}=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=n.includes(s);return u(this,Ye)&&o||!u(this,Ye)&&(l||e==="")||(ye.running||this.length>1)&&(o||l||e==="")?(this.setAttribute("modifier",e),v(this,Ye,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(),this.isTemplate()&&this.type==="template"&&this.setAttribute("name",R(this,tt,cn).call(this).title)}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:n,modifier:i,type:s,name:o}=this;return s==="magic-word"&&o==="vardefine"?"":`{{${i}${s==="magic-word"?n.text()+(t===1?"":":")+pe(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 n=super.lint(e,t);if(!this.isTemplate())return n;let{type:i,childNodes:s,length:o}=this,l=new E(this,e),p=i==="magic-word";if(p&&!R(this,tt,cn).call(this).valid)n.push(C(s[1],l,"invalid-invoke","illegal module name"));else{let d=s[p?1:0],c=d.childNodes.find(h=>h.type==="text"&&Mt(h.data).includes("#"));if(c){let h=C(d,l,"no-ignored","useless fragment");h.fix={range:[h.startIndex+c.getRelativeIndex()+c.data.indexOf("#"),h.endIndex],text:""},n.push(h)}}if(p&&o===2)return n.push(N(this,l,"invalid-invoke","missing module function")),n;let g=this.getDuplicatedArgs().filter(([,d])=>!d[0].querySelector("ext"));return g.length>0&&n.push(...g.flatMap(([,d])=>d).map(d=>C(d,l,"no-duplicate","duplicated parameter"))),n}insertAt(e,t=this.length){return super.insertAt(e,t),e.anon?R(this,tt,zi).call(this,e):e.name&&this.getArgs(e.name,!1,!1).add(e),e}getAllArgs(){return this.childNodes.filter(vt("parameter"))}getAnonArgs(){return this.getAllArgs().filter(({anon:e})=>e)}getArgs(e,t,n=!0){let i=String(e).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1"),s;return u(this,et).has(i)?s=u(this,et).get(i):(s=new Set(this.getAllArgs().filter(({name:o})=>i===o)),u(this,et).set(i,s)),s}getDuplicatedArgs(){return[...u(this,et)].filter(([,{size:e}])=>e>1).map(([e,t])=>[e,[...t]])}getPossibleValues(){let{type:e,name:t,childNodes:n}=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=n.slice(i,i+2).map(({childNodes:[,o]})=>o);for(let o=0;o<s.length;){let{length:l,0:p}=s[o].childNodes.filter(g=>g.text().trim());if(l===0)s.splice(o,1);else if(l>1||p.type!=="magic-word")o++;else try{let g=p.getPossibleValues();s.splice(o,1,...g),o+=g.length}catch(g){o++}}return s}print(){let{childNodes:e,length:t,firstChild:n,modifier:i,type:s}=this;return`<span class="wpb-${s}">{{${gt(i)}${s==="magic-word"?n.print()+(t===1?"":":")+Ne(e.slice(1),{sep:"|"}):Ne(e,{sep:"|"})}}}</span>`}};Kt=new WeakMap,Ye=new WeakMap,et=new WeakMap,tt=new WeakSet,cn=function(){let e=this.type==="template",t=this.childNodes[e?0:1];return this.normalizeTitle(t.toString(!0),e?10:828)},zi=function(e){let t=this.getAnonArgs(),n=typeof e!="number";for(let i=n?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 Ui,hn,ta,rt,Di=b(()=>{"use strict";Xe();P();Ui=[ue()];rt=class extends(ta=y){get type(){return"hidden"}};hn=le(ta),rt=ge(hn,0,"HiddenToken",Ui,rt),de(hn,1,rt)});var wr,Hi,Ar,Vi=b(()=>{"use strict";J();_();Q();F();P();Ee();Di();Ar=class extends y{constructor(e,t=f.getConfig(),n=[]){super(void 0,t,n,{});T(this,wr);for(let[i,s]of e.entries())if(i===0){let o=new G(s,"arg-name",t,n,{});super.insertAt(o)}else if(i>1){let o=new rt(s,t,n);super.insertAt(o)}else{let o=new y(s,t,n);o.type="arg-default",o.setAttribute("stage",2),super.insertAt(o)}}get type(){return"arg"}get default(){var e,t;return(t=(e=this.childNodes[1])==null?void 0:e.text())!=null?t:!1}toString(e){return`{{{${super.toString(e,"|")}}}}`}text(){return`{{{${pe(this.childNodes.slice(0,2),"|")}}}}`}getAttribute(e){return e==="padding"?3:super.getAttribute(e)}getGaps(){return 1}afterBuild(){R(this,wr,Hi).call(this),super.afterBuild()}lint(e=this.getAbsoluteIndex(),t){let{childNodes:[n,i,...s]}=this;if(!this.getAttribute("include")){let l=N(this,{start:e},"no-arg","unexpected template argument");return i&&(l.fix={range:[e,l.endIndex],text:i.text()}),[l]}let o=n.lint(e+3,t);if(i&&o.push(...i.lint(e+4+n.toString().length,t)),s.length>0){let l=new E(this,e);o.push(...s.map(p=>{let g=C(p,l,"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 o}print(){return super.print({pre:"{{{",post:"}}}",sep:"|"})}};wr=new WeakSet,Hi=function(){this.setAttribute("name",this.firstChild.toString(!0).trim())}});var Xi={};se(Xi,{parseBraces:()=>Yt});var ra,mn,na,Yt,Sr=b(()=>{"use strict";J();un();Wi();Vi();ra={"=":String.raw`\n(?!(?:[^\S\n]|\0\d+[cn]\x7F)*\n)`,"{":String.raw`\}{2,}|\|`,"-":String.raw`\}-`,"[":String.raw`\]\]`},mn=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"],["server","m"]]),na=/\{\{\s*([^\s\0<>[\]{}|_#&%:.]+)\s*\}\}(?!\})/gu,Yt=(a,r,e)=>{var c,h,m,k,x,A;let t=String.raw`${(c=r.excludes)!=null&&c.includes("heading")?"":String.raw`^((?:\0\d+[cno]\x7F)*)={1,6}|`}\[\[|-\{(?!\{)`,n=String.raw`|\{{2,}`,{parserFunction:[,,,i]}=r,s=[];a=a.replace(na,(S,$)=>{var w;return new Jt(S.slice(2,-2),[],r,e),`\0${e.length-2}${(w=mn.get($.toLowerCase()))!=null?w:"t"}\x7F`});let o=a.lastIndexOf("}}")-a.length,l=o+a.length!==-1,p=new RegExp(t+(l?n:""),"gmu"),g=p.exec(a),d;for(;g||d!==void 0&&d<=a.length&&((m=(h=s[s.length-1])==null?void 0:h[0])!=null&&m.startsWith("="));){if(g!=null&&g[1]){let[,{length:W}]=g;g[0]=g[0].slice(W),g.index+=W}let{0:S,index:$}=g!=null?g:{0:`
9
- `,index:a.length},w=(k=s.pop())!=null?k:{},{0:L,index:B,parts:j,findEqual:q,pos:D}=w,H=S==="="&&q,ne=W=>{j[j.length-1].push(W.slice(D,$))};if(S==="]]"||S==="}-")d=$+2;else if(S===`
10
- `){d=$+1;let{pos:W,findEqual:I}=(x=s[s.length-1])!=null?x:{};if(W===void 0||I||te(a.slice(W,B))!==""){let xe=/^(={1,6})(.+)\1((?:\s|\0\d+[cn]\x7F)*)$/u.exec(a.slice(B,$));xe&&(a=`${a.slice(0,B)}\0${e.length}h\x7F${a.slice($)}`,d=B+4+String(e.length).length,new kt(xe[1].length,xe.slice(2),r,e))}}else if(S==="|"||H)d=$+1,ne(a),S==="|"&&j.push([]),w.pos=d,w.findEqual=S==="|",s.push(w);else if(S.startsWith("}}")){let W=S.slice(0,Math.min(L.length,3)),I=L.length-W.length,{length:xe}=e;d=$+W.length,ne(a);let ke=!1,Pe="t";if(W.length===3){let ie=j.map(lt=>lt.join("=")),ve=ie.length>1&&te(ie[1]).trim();new Ar(ie,r,e),ve&&ve.endsWith(":")&&i.includes(ve.slice(0,-1).toLowerCase())&&(Pe="s")}else try{new Jt(j[0][0],j.slice(1),r,e);let ie=te(j[0][0]).trim();mn.has(ie.toLowerCase())?Pe=mn.get(ie.toLowerCase()):/^(?:filepath|(?:full|canonical)urle?):./iu.test(ie)?Pe="m":/^#vardefine:./iu.test(ie)&&(Pe="n")}catch(ie){if(ie instanceof SyntaxError&&ie.message==="Invalid template name")ke=!0;else throw ie}ke||(a=`${a.slice(0,B+I)}\0${xe}${Pe}\x7F${a.slice(d)}`,d=B+I+3+String(xe).length,I>1?s.push({0:L.slice(0,I),index:B,pos:B+I,parts:[[]]}):I===1&&a[B-1]==="-"&&s.push({0:"-{",index:B-1,pos:B+1,parts:[[]]}))}else d=$+S.length,S.startsWith("{")&&(g.pos=d,g.parts=[[]]),s.push(..."0"in w?[w]:[],g);let ee=s[s.length-1];if(l&&o+a.length<d)for(l=!1;(A=ee==null?void 0:ee[0])!=null&&A.startsWith("{");)s.pop(),ee=s[s.length-1];p=new RegExp(t+(l?n:"")+(ee?`|${ra[ee[0][0]]}${ee.findEqual?"|=":""}`:""),"gmu"),p.lastIndex=d,g=p.exec(a)}return a}});var Cr,Qi=b(()=>{"use strict";Qt();Sr();F();pn();Cr=class extends Tt{constructor(r,e,t=f.getConfig(),n=[]){let i=Symbol("InputboxToken"),{length:s}=n;n.push(i),e&&(e=Ke(e,t,n,r)),e&&(e=Yt(e,t,n)),n.splice(s,1),super(r,e,t,n,{})}}});function Zi(a,r,e,t,n){r=r.trim();let i=r.replace(a==="link"?/\0\d+[tq]\x7F/gu:/\0\d+t\x7F/gu,"").trim();switch(a){case"width":return!i&&!!r||/^(?:\d+x?|\d*x\d+)(?:\s*px)?$/u.test(i);case"link":{if(!i)return r;let s=new RegExp(String.raw`^(?:${e.protocol}|//|\0\d+m\x7F)`,"iu"),o=new RegExp(String.raw`^(?:(?:${e.protocol}|//)${Ae}|\0\d+m\x7F)${we}$`,"iu");if(s.test(i))return o.test(i)&&r;i.startsWith("[[")&&i.endsWith("]]")&&(i=i.slice(2,-2));let l=f.normalizeTitle(i,0,!1,e,t,!0,!0);return l.valid&&l}case"lang":return(n==="svg"||n==="svgz")&&!/[^a-z\d-]/u.test(i);case"alt":case"class":case"manualthumb":return!0;case"page":return(n==="djvu"||n==="djv"||n==="pdf")&&Number(i)>0;default:return!!i&&!isNaN(i)}}var ia,oe,Nr,Ji,$r,Ki=b(()=>{"use strict";J();_();F();P();ia=new Set(["alt","link","lang","page","caption"]);$r=class extends y{constructor(e,t,n=f.getConfig(),i){var r=(...vg)=>(super(...vg),T(this,Nr),T(this,oe,""),this);var p;let s,o=Object.entries(n.img).map(([g,d])=>[g,d,new RegExp(String.raw`^(\s*(?!\s))${g.replace("$1","(.*)")}${g.endsWith("$1")?`(?=$|
11
- )`:""}(\s*)$`,"u")]),l=o.find(([,g,d])=>(s=d.exec(e),s&&(s.length!==4||Zi(g,s[2],n,!0,t)!==!1)));if(l&&s){s.length===3?(r(void 0,n,i),v(this,oe,e)):(r(s[2],n,i,{}),v(this,oe,s[1]+l[0]+s[3])),this.setAttribute("name",l[1]);return}r(e,{...n,excludes:[...(p=n.excludes)!=null?p:[],"list"]},i),this.setAttribute("name","caption"),this.setAttribute("stage",7)}get type(){return"image-parameter"}get link(){return this.name==="link"?Zi("link",super.text(),this.getAttribute("config")):void 0}afterBuild(){var e;((e=this.parentNode)==null?void 0:e.type)==="gallery-image"&&!ia.has(this.name)&&this.setAttribute("name","invalid"),super.afterBuild()}toString(e){return u(this,oe)?u(this,oe).replace("$1",super.toString(e)):super.toString(e)}text(){return u(this,oe)?u(this,oe).replace("$1",super.text()).trim():super.text().trim()}getAttribute(e){return e==="plain"?this.name==="caption":e==="padding"?Math.max(0,u(this,oe).indexOf("$1")):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),{link:i,name:s}=this;if(s==="invalid"){let o=N(this,{start:e},"invalid-gallery","invalid image parameter");o.fix={range:[e-1,o.endIndex],text:""},n.push(o)}else typeof i=="object"&&i.encoded&&n.push(N(this,{start:e},"url-encoding","unnecessary URL encoding in an internal link"));return n}getValue(){return this.name==="invalid"?this.text():R(this,Nr,Ji).call(this)||super.text()}print(){return u(this,oe)?`<span class="wpb-image-parameter">${u(this,oe).replace("$1",`<span class="wpb-image-caption">${Ne(this.childNodes)}</span>`)}</span>`:super.print({class:"image-caption"})}};oe=new WeakMap,Nr=new WeakSet,Ji=function(){return u(this,oe)&&!u(this,oe).includes("$1")}});var Yi,es,ts,sa,At,fn=b(()=>{"use strict";J();_();Q();F();Ht();Ki();Yi=new Map([["manualthumb","Thumb"],["frameless","Frameless"],["framed","Frame"],["thumbnail","Thumb"]]),es=new Set(["left","right","center","none"]),ts=new Set(["baseline","sub","super","top","text-top","middle","bottom","text-bottom"]),sa=(a,r,e,t)=>{if(t===void 0)return[];let n=new RegExp(`${[a,r,e].map(oi).join("|")}`,"gu"),i=[],s=n.exec(t),o=0,l=0;for(;s;){let{0:p,index:g}=s;p!==e?o+=p===a?1:-1:o===0&&(i.push(t.slice(l,g)),{lastIndex:l}=n),s=n.exec(t)}return i.push(t.slice(l)),i},At=class extends Ce{get type(){return"file"}get extension(){return this.getTitle().extension}constructor(r,e,t=f.getConfig(),n=[],i="|"){super(r,void 0,t,n,i);let{extension:s}=this.getTitle(!0);this.append(...sa("-{","}-","|",e).map(o=>new $r(o,s,t,n)))}lint(r=this.getAbsoluteIndex(),e){var h;let t=super.lint(r,e),n=this.getAllArgs().filter(({childNodes:m})=>{let k=m.filter(x=>x.text().trim());return k.length!==1||k[0].type!=="arg"}),i=[...new Set(n.map(({name:m})=>m))],s=i.filter(m=>Yi.has(m)),o=i.filter(m=>es.has(m)),l=i.filter(m=>ts.has(m)),[p]=s,g=p==="framed"||p==="manualthumb",d=new E(this,r);if(this.closest("ext-link-text")&&((h=this.getValue("link"))==null?void 0:h.trim())!==""&&t.push(N(this,d,"nested-link","internal link in an external link")),g)for(let m of n.filter(({name:k})=>k==="width")){let k=C(m,d,"invalid-gallery","invalid image parameter");k.fix={range:[k.startIndex-1,k.endIndex],text:""},t.push(k)}if(n.length===i.length&&s.length<2&&o.length<2&&l.length<2)return t;let c=(m,k)=>x=>C(x,d,"no-duplicate",f.msg(`${m} image $1 parameter`,k));for(let m of i){if(m==="invalid"||m==="width"&&g)continue;let k=n.filter(({name:x})=>x===m);m==="caption"&&(k=[...k.slice(0,-1).filter(x=>x.text()),...k.slice(-1)]),k.length>1&&t.push(...k.map(c("duplicated",m)))}return s.length>1&&t.push(...n.filter(({name:m})=>Yi.has(m)).map(c("conflicting","frame"))),o.length>1&&t.push(...n.filter(({name:m})=>es.has(m)).map(c("conflicting","horizontal-alignment"))),l.length>1&&t.push(...n.filter(({name:m})=>ts.has(m)).map(c("conflicting","vertical-alignment"))),t}getAllArgs(){return this.childNodes.slice(1)}getArgs(r){return this.getAllArgs().filter(({name:e})=>r===e)}getArg(r){let e=this.getArgs(r);return e[r==="manualthumb"?0:e.length-1]}getValue(r){var e;return(e=this.getArg(r))==null?void 0:e.getValue()}}});var wt,xn=b(()=>{"use strict";_();Se();F();P();fn();wt=class extends At{constructor(e,t,n,i=f.getConfig(),s=[]){let o;if(n!==void 0){let{length:l}=s;o=new y(n,i,s);for(let p=1;p<11;p++)o.parseOnce();s.splice(l,1)}super(t,o==null?void 0:o.toString(),i,s);X(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 n=super.lint(e,t),{ns:i,interwiki:s}=this.getAttribute("title");return(s||i!==6)&&n.push(N(this,{start:e},"invalid-gallery","invalid gallery image")),n}}});var Lr,rs,Er,ns=b(()=>{"use strict";F();P();xn();Oe();Er=class extends y{constructor(e,t=f.getConfig(),n=[]){var i;super(void 0,t,n,{});T(this,Lr);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 U(s,t,n):s);continue}let[,l,p]=o;R(this,Lr,rs).call(this,l)?super.insertAt(new wt("gallery",l,p,t,n)):super.insertAt(new U(s,t,n))}}get type(){return"ext-inner"}toString(e){return super.toString(e,`
7
+ `)}getGaps(){return 1}lint(r=this.getAbsoluteIndex()){let e=new E(this,r),t=f.msg("invalid parameter of <$1>",this.name),n=[];for(let i of this.childNodes){let s=i.childNodes.filter(({type:o})=>o!=="comment"&&o!=="include"&&o!=="noinclude");if(s.some(({type:o})=>o==="ext"))n.push($(i,e,"no-ignored",t));else{let o=s.findIndex(({type:p})=>p!=="text"),l=s.slice(0,o===-1?void 0:o).map(String).join("");if(l&&!(o===-1?/^[a-z]+(?:\[\])?\s*=/iu:/^[a-z]+(?:\[\])?\s*(?:=|$)/iu).test(l)){let p=$(i,e,"no-ignored",t);p.suggestions=[{desc:"remove",range:[p.startIndex,p.endIndex],text:""}],n.push(p)}else n.push(...i.lint(r,!1))}r+=i.toString().length+1}return n}print(){return super.print({sep:`
8
+ `})}}});var Zt,kt,vr,vt,un=b(()=>{"use strict";_();be();Q();R();P();ct();vt=class extends y{constructor(e,t,n=f.getConfig(),i=[]){super(void 0,n,i);T(this,kt);T(this,Zt);v(this,Zt,e);let s=new y(t[0],n,i);s.type="heading-title",s.setAttribute("stage",2);let o=new ce(t[1],/^\s*$/u,"heading-trail",n,i,{});this.append(s,o)}get type(){return"heading"}get level(){return u(this,Zt)}toString(e){let t=u(this,kt,vr);return t+this.firstChild.toString(e)+t+this.lastChild.toString(e)}text(){let e=u(this,kt,vr);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 n=super.lint(e,t),{firstChild:i,level:s}=this,o=i.toString(),l=i.childNodes.filter(At("quote")),p=l.filter(({bold:c})=>c),g=l.filter(({italic:c})=>c),d=new E(this,e);return this.level===1&&n.push($(i,d,"h1","<h1>")),(o.startsWith("=")||o.endsWith("="))&&n.push($(i,d,"unbalanced-header",f.msg("unbalanced $1 in a section header",'"="'))),this.closest("html-attrs,table-attrs")&&n.push(N(this,d,"parsing-order","section header in a HTML tag")),p.length%2&&n.push($(p[p.length-1],{...d,start:e+s,left:d.left+s},"format-leakage",f.msg("unbalanced $1 in a section header","bold apostrophes"))),g.length%2&&n.push($(g[g.length-1],{start:e+s},"format-leakage",f.msg("unbalanced $1 in a section header","italic apostrophes"))),n}print(){let e=u(this,kt,vr);return super.print({pre:e,sep:e})}json(){let e=super.json();return e.level=this.level,e}};Zt=new WeakMap,kt=new WeakSet,vr=function(){return"=".repeat(this.level)}});var ea,Ar,zi=b(()=>{"use strict";J();_();R();P();ea=new RegExp(`https?://${Ae}${we}$`,"iu"),Ar=class extends y{get type(){return"parameter"}get anon(){return this.firstChild.length===0}constructor(r,e,t=f.getConfig(),n=[]){super(void 0,t,n);let i=new y(typeof r=="number"?void 0:r,t,n,{}),s=new y(e,t,n);i.type="parameter-key",i.setAttribute("stage",2),s.type="parameter-value",s.setAttribute("stage",2),this.append(i,s)}trimName(r,e=!0){let t=(typeof r=="string"?r:r.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:r,firstChild:e}=this,t=this.trimName(e);r&&r.getArgs(t,!1,!1).add(this)}super.afterBuild()}toString(r){return this.anon?this.lastChild.toString(r):super.toString(r,"=")}text(){return this.anon?this.lastChild.text():super.text("=")}getGaps(){return this.anon?0:1}lint(r=this.getAbsoluteIndex(),e){var s;let t=super.lint(r,e),{firstChild:n}=this,i=(s=ea.exec(n.text()))==null?void 0:s[0];if(i&&new URL(i).search){let o=$(n,{start:r},"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 r=super.json();return r.anon=this.anon,r}}});var ta,Kt,Ye,et,tt,cn,Wi,Jt,Ui=b(()=>{"use strict";J();_();be();Se();Q();R();P();zi();Ee();ct();ta=new Set(["pageid","articlepath","server","servername","scriptpath","stylepath"]),Jt=class extends y{constructor(e,t,n=f.getConfig(),i=[]){var m,k;let s,o=/^(?:\s|\0\d+[cn]\x7F)*\0(\d+)h\x7F(?:\s|\0\d+[cn]\x7F)*/u.exec(e);o&&(s=Number(o[1]),e=e.replace(`\0${s}h\x7F`,i[s].toString().replace(/^\n/u,"")));super(void 0,n,i,{});T(this,tt);X(this,"modifier","");T(this,Kt,"template");T(this,Ye,!1);T(this,et,new Map);let{parserFunction:[l,p]}=n,g=(m=/^(?:\s|\0\d+[cn]\x7F)*\0\d+s\x7F/u.exec(e))==null?void 0:m[0];if(g)this.setAttribute("modifier",g),e=e.slice(g.length);else if(e.includes(":")){let[x,...A]=e.split(":"),[S]=/^(?:\s|\0\d+[cn]\x7F)*/u.exec((k=A[0])!=null?k:"");this.setModifier(`${x}:${S}`)&&(e=A.join(":").slice(S.length))}let d=e.includes(":");if(d||t.length===0&&!u(this,Ye)){let[x,...A]=e.split(":"),S=te(x),C=S[A.length>0?"trimStart":"trim"](),w=C.toLowerCase(),L=Object.prototype.hasOwnProperty.call(l,w)&&l[w],B=p.includes(C);if(B||ta.has(L)||d&&L){this.setAttribute("name",L||w.replace(/^#/u,"")),v(this,Kt,"magic-word");let q=new RegExp(String.raw`^\s*${C}\s*$`,B?"u":"iu"),D=new ce(x,q,"magic-word-name",n,i,{});if(super.insertAt(D),A.length>0&&t.unshift([A.join(":")]),this.name==="invoke")for(let H=0;H<2;H++){let ne=t.shift();if(!ne)break;let ee=new G(ne.join("="),`invoke-${H?"function":"module"}`,n,i);super.insertAt(ee)}}}if(this.type==="template"){let x=te(e).trim();if(!this.normalizeTitle(x,10,!0).valid)throw i.pop(),new SyntaxError("Invalid template name");let A=new G(e,"template-name",n,i,{});super.insertAt(A)}typeof s=="number"&&(i[s]=void 0);let c=this.isTemplate(),h=1;for(let[x,A]of t.entries())!c&&!(this.name==="switch"&&x>0)&&(A[0]=A.join("="),A.length=1),A.length===1&&(A.unshift(h),h++),this.insertAt(new Ar(...A,n,i));this.seal("modifier")}get type(){return u(this,Kt)}setModifier(e){let{parserFunction:[,,t,n]}=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=n.includes(s);return u(this,Ye)&&o||!u(this,Ye)&&(l||e==="")||(ye.running||this.length>1)&&(o||l||e==="")?(this.setAttribute("modifier",e),v(this,Ye,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(),this.isTemplate()&&this.type==="template"&&this.setAttribute("name",F(this,tt,cn).call(this).title)}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:n,modifier:i,type:s,name:o}=this;return s==="magic-word"&&o==="vardefine"?"":`{{${i}${s==="magic-word"?n.text()+(t===1?"":":")+pe(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 n=super.lint(e,t);if(!this.isTemplate())return n;let{type:i,childNodes:s,length:o}=this,l=new E(this,e),p=i==="magic-word";if(p&&!F(this,tt,cn).call(this).valid)n.push($(s[1],l,"invalid-invoke","illegal module name"));else{let d=s[p?1:0],c=d.childNodes.find(h=>h.type==="text"&&Gt(h.data).includes("#"));if(c){let h=$(d,l,"no-ignored","useless fragment");h.fix={range:[h.startIndex+c.getRelativeIndex()+c.data.indexOf("#"),h.endIndex],text:""},n.push(h)}}if(p&&o===2)return n.push(N(this,l,"invalid-invoke","missing module function")),n;let g=this.getDuplicatedArgs().filter(([,d])=>!d[0].querySelector("ext"));return g.length>0&&n.push(...g.flatMap(([,d])=>d).map(d=>$(d,l,"no-duplicate","duplicated parameter"))),n}insertAt(e,t=this.length){return super.insertAt(e,t),e.anon?F(this,tt,Wi).call(this,e):e.name&&this.getArgs(e.name,!1,!1).add(e),e}getAllArgs(){return this.childNodes.filter(At("parameter"))}getAnonArgs(){return this.getAllArgs().filter(({anon:e})=>e)}getArgs(e,t,n=!0){let i=String(e).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1"),s;return u(this,et).has(i)?s=u(this,et).get(i):(s=new Set(this.getAllArgs().filter(({name:o})=>i===o)),u(this,et).set(i,s)),s}getDuplicatedArgs(){return[...u(this,et)].filter(([,{size:e}])=>e>1).map(([e,t])=>[e,[...t]])}getPossibleValues(){let{type:e,name:t,childNodes:n}=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=n.slice(i,i+2).map(({childNodes:[,o]})=>o);for(let o=0;o<s.length;){let{length:l,0:p}=s[o].childNodes.filter(g=>g.text().trim());if(l===0)s.splice(o,1);else if(l>1||p.type!=="magic-word")o++;else try{let g=p.getPossibleValues();s.splice(o,1,...g),o+=g.length}catch(g){o++}}return s}print(){let{childNodes:e,length:t,firstChild:n,modifier:i,type:s}=this;return`<span class="wpb-${s}">{{${gt(i)}${s==="magic-word"?n.print()+(t===1?"":":")+Ne(e.slice(1),{sep:"|"}):Ne(e,{sep:"|"})}}}</span>`}};Kt=new WeakMap,Ye=new WeakMap,et=new WeakMap,tt=new WeakSet,cn=function(){let e=this.type==="template",t=this.childNodes[e?0:1];return this.normalizeTitle(t.toString(!0),e?10:828)},Wi=function(e){let t=this.getAnonArgs(),n=typeof e!="number";for(let i=n?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 Di,hn,ra,rt,Hi=b(()=>{"use strict";Xe();P();Di=[ue()];rt=class extends(ra=y){get type(){return"hidden"}};hn=le(ra),rt=ge(hn,0,"HiddenToken",Di,rt),de(hn,1,rt)});var Sr,Vi,wr,Xi=b(()=>{"use strict";J();_();Q();R();P();Ee();Hi();wr=class extends y{constructor(e,t=f.getConfig(),n=[]){super(void 0,t,n,{});T(this,Sr);for(let[i,s]of e.entries())if(i===0){let o=new G(s,"arg-name",t,n,{});super.insertAt(o)}else if(i>1){let o=new rt(s,t,n);super.insertAt(o)}else{let o=new y(s,t,n);o.type="arg-default",o.setAttribute("stage",2),super.insertAt(o)}}get type(){return"arg"}get default(){var e,t;return(t=(e=this.childNodes[1])==null?void 0:e.text())!=null?t:!1}toString(e){return`{{{${super.toString(e,"|")}}}}`}text(){return`{{{${pe(this.childNodes.slice(0,2),"|")}}}}`}getAttribute(e){return e==="padding"?3:super.getAttribute(e)}getGaps(){return 1}afterBuild(){F(this,Sr,Vi).call(this),super.afterBuild()}lint(e=this.getAbsoluteIndex(),t){let{childNodes:[n,i,...s]}=this;if(!this.getAttribute("include")){let l=N(this,{start:e},"no-arg","unexpected template argument");return i&&(l.fix={range:[e,l.endIndex],text:i.text()}),[l]}let o=n.lint(e+3,t);if(i&&o.push(...i.lint(e+4+n.toString().length,t)),s.length>0){let l=new E(this,e);o.push(...s.map(p=>{let g=$(p,l,"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 o}print(){return super.print({pre:"{{{",post:"}}}",sep:"|"})}};Sr=new WeakSet,Vi=function(){this.setAttribute("name",this.firstChild.toString(!0).trim())}});var Qi={};se(Qi,{parseBraces:()=>Yt});var na,mn,ia,Yt,Cr=b(()=>{"use strict";J();un();Ui();Xi();na={"=":String.raw`\n(?!(?:[^\S\n]|\0\d+[cn]\x7F)*\n)`,"{":String.raw`\}{2,}|\|`,"-":String.raw`\}-`,"[":String.raw`\]\]`},mn=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"],["server","m"]]),ia=/\{\{\s*([^\s\0<>[\]{}|_#&%:.]+)\s*\}\}(?!\})/gu,Yt=(a,r,e)=>{var c,h,m,k,x,A;let t=String.raw`${(c=r.excludes)!=null&&c.includes("heading")?"":String.raw`^((?:\0\d+[cno]\x7F)*)={1,6}|`}\[\[|-\{(?!\{)`,n=String.raw`|\{{2,}`,{parserFunction:[,,,i]}=r,s=[];a=a.replace(ia,(S,C)=>{var w;return new Jt(S.slice(2,-2),[],r,e),`\0${e.length-2}${(w=mn.get(C.toLowerCase()))!=null?w:"t"}\x7F`});let o=a.lastIndexOf("}}")-a.length,l=o+a.length!==-1,p=new RegExp(t+(l?n:""),"gmu"),g=p.exec(a),d;for(;g||d!==void 0&&d<=a.length&&((m=(h=s[s.length-1])==null?void 0:h[0])!=null&&m.startsWith("="));){if(g!=null&&g[1]){let[,{length:W}]=g;g[0]=g[0].slice(W),g.index+=W}let{0:S,index:C}=g!=null?g:{0:`
9
+ `,index:a.length},w=(k=s.pop())!=null?k:{},{0:L,index:B,parts:j,findEqual:q,pos:D}=w,H=S==="="&&q,ne=W=>{j[j.length-1].push(W.slice(D,C))};if(S==="]]"||S==="}-")d=C+2;else if(S===`
10
+ `){d=C+1;let{pos:W,findEqual:I}=(x=s[s.length-1])!=null?x:{};if(W===void 0||I||te(a.slice(W,B))!==""){let xe=/^(={1,6})(.+)\1((?:\s|\0\d+[cn]\x7F)*)$/u.exec(a.slice(B,C));xe&&(a=`${a.slice(0,B)}\0${e.length}h\x7F${a.slice(C)}`,d=B+4+String(e.length).length,new vt(xe[1].length,xe.slice(2),r,e))}}else if(S==="|"||H)d=C+1,ne(a),S==="|"&&j.push([]),w.pos=d,w.findEqual=S==="|",s.push(w);else if(S.startsWith("}}")){let W=S.slice(0,Math.min(L.length,3)),I=L.length-W.length,{length:xe}=e;d=C+W.length,ne(a);let ke=!1,Pe="t";if(W.length===3){let ie=j.map(lt=>lt.join("=")),ve=ie.length>1&&te(ie[1]).trim();new wr(ie,r,e),ve&&ve.endsWith(":")&&i.includes(ve.slice(0,-1).toLowerCase())&&(Pe="s")}else try{new Jt(j[0][0],j.slice(1),r,e);let ie=te(j[0][0]).trim();mn.has(ie.toLowerCase())?Pe=mn.get(ie.toLowerCase()):/^(?:filepath|(?:full|canonical)urle?):./iu.test(ie)?Pe="m":/^#vardefine:./iu.test(ie)&&(Pe="n")}catch(ie){if(ie instanceof SyntaxError&&ie.message==="Invalid template name")ke=!0;else throw ie}ke||(a=`${a.slice(0,B+I)}\0${xe}${Pe}\x7F${a.slice(d)}`,d=B+I+3+String(xe).length,I>1?s.push({0:L.slice(0,I),index:B,pos:B+I,parts:[[]]}):I===1&&a[B-1]==="-"&&s.push({0:"-{",index:B-1,pos:B+1,parts:[[]]}))}else d=C+S.length,S.startsWith("{")&&(g.pos=d,g.parts=[[]]),s.push(..."0"in w?[w]:[],g);let ee=s[s.length-1];if(l&&o+a.length<d)for(l=!1;(A=ee==null?void 0:ee[0])!=null&&A.startsWith("{");)s.pop(),ee=s[s.length-1];p=new RegExp(t+(l?n:"")+(ee?`|${na[ee[0][0]]}${ee.findEqual?"|=":""}`:""),"gmu"),p.lastIndex=d,g=p.exec(a)}return a}});var $r,Zi=b(()=>{"use strict";Qt();Cr();R();pn();$r=class extends yt{constructor(r,e,t=f.getConfig(),n=[]){let i=Symbol("InputboxToken"),{length:s}=n;n.push(i),e&&(e=Ke(e,t,n,r)),e&&(e=Yt(e,t,n)),n.splice(s,1),super(r,e,t,n,{})}}});function Ji(a,r,e,t,n){r=r.trim();let i=r.replace(a==="link"?/\0\d+[tq]\x7F/gu:/\0\d+t\x7F/gu,"").trim();switch(a){case"width":return!i&&!!r||/^(?:\d+x?|\d*x\d+)(?:\s*px)?$/u.test(i);case"link":{if(!i)return r;let s=new RegExp(String.raw`^(?:${e.protocol}|//|\0\d+m\x7F)`,"iu"),o=new RegExp(String.raw`^(?:(?:${e.protocol}|//)${Ae}|\0\d+m\x7F)${we}$`,"iu");if(s.test(i))return o.test(i)&&r;i.startsWith("[[")&&i.endsWith("]]")&&(i=i.slice(2,-2));let l=f.normalizeTitle(i,0,!1,e,t,!0,!0);return l.valid&&l}case"lang":return(n==="svg"||n==="svgz")&&!/[^a-z\d-]/u.test(i);case"alt":case"class":case"manualthumb":return!0;case"page":return(n==="djvu"||n==="djv"||n==="pdf")&&Number(i)>0;default:return!!i&&!isNaN(i)}}var sa,oe,Er,Ki,Nr,Yi=b(()=>{"use strict";J();_();R();P();sa=new Set(["alt","link","lang","page","caption"]);Nr=class extends y{constructor(e,t,n=f.getConfig(),i){var r=(...Ag)=>(super(...Ag),T(this,Er),T(this,oe,""),this);var p;let s,o=Object.entries(n.img).map(([g,d])=>[g,d,new RegExp(String.raw`^(\s*(?!\s))${g.replace("$1","(.*)")}${g.endsWith("$1")?`(?=$|
11
+ )`:""}(\s*)$`,"u")]),l=o.find(([,g,d])=>(s=d.exec(e),s&&(s.length!==4||Ji(g,s[2],n,!0,t)!==!1)));if(l&&s){s.length===3?(r(void 0,n,i),v(this,oe,e)):(r(s[2],n,i,{}),v(this,oe,s[1]+l[0]+s[3])),this.setAttribute("name",l[1]);return}r(e,{...n,excludes:[...(p=n.excludes)!=null?p:[],"list"]},i),this.setAttribute("name","caption"),this.setAttribute("stage",7)}get type(){return"image-parameter"}get link(){return this.name==="link"?Ji("link",super.text(),this.getAttribute("config")):void 0}afterBuild(){var e;((e=this.parentNode)==null?void 0:e.type)==="gallery-image"&&!sa.has(this.name)&&this.setAttribute("name","invalid"),super.afterBuild()}toString(e){return u(this,oe)?u(this,oe).replace("$1",super.toString(e)):super.toString(e)}text(){return u(this,oe)?u(this,oe).replace("$1",super.text()).trim():super.text().trim()}getAttribute(e){return e==="plain"?this.name==="caption":e==="padding"?Math.max(0,u(this,oe).indexOf("$1")):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),{link:i,name:s}=this;if(s==="invalid"){let o=N(this,{start:e},"invalid-gallery","invalid image parameter");o.fix={range:[e-1,o.endIndex],text:""},n.push(o)}else typeof i=="object"&&i.encoded&&n.push(N(this,{start:e},"url-encoding","unnecessary URL encoding in an internal link"));return n}getValue(){return this.name==="invalid"?this.text():F(this,Er,Ki).call(this)||super.text()}print(){return u(this,oe)?`<span class="wpb-image-parameter">${u(this,oe).replace("$1",`<span class="wpb-image-caption">${Ne(this.childNodes)}</span>`)}</span>`:super.print({class:"image-caption"})}};oe=new WeakMap,Er=new WeakSet,Ki=function(){return u(this,oe)&&!u(this,oe).includes("$1")}});var es,ts,rs,oa,wt,fn=b(()=>{"use strict";J();_();Q();R();Ht();Yi();es=new Map([["manualthumb","Thumb"],["frameless","Frameless"],["framed","Frame"],["thumbnail","Thumb"]]),ts=new Set(["left","right","center","none"]),rs=new Set(["baseline","sub","super","top","text-top","middle","bottom","text-bottom"]),oa=(a,r,e,t)=>{if(t===void 0)return[];let n=new RegExp(`${[a,r,e].map(ai).join("|")}`,"gu"),i=[],s=n.exec(t),o=0,l=0;for(;s;){let{0:p,index:g}=s;p!==e?o+=p===a?1:-1:o===0&&(i.push(t.slice(l,g)),{lastIndex:l}=n),s=n.exec(t)}return i.push(t.slice(l)),i},wt=class extends Ce{get type(){return"file"}get extension(){return this.getTitle().extension}constructor(r,e,t=f.getConfig(),n=[],i="|"){super(r,void 0,t,n,i);let{extension:s}=this.getTitle(!0);this.append(...oa("-{","}-","|",e).map(o=>new Nr(o,s,t,n)))}lint(r=this.getAbsoluteIndex(),e){var h;let t=super.lint(r,e),n=this.getAllArgs().filter(({childNodes:m})=>{let k=m.filter(x=>x.text().trim());return k.length!==1||k[0].type!=="arg"}),i=[...new Set(n.map(({name:m})=>m))],s=i.filter(m=>es.has(m)),o=i.filter(m=>ts.has(m)),l=i.filter(m=>rs.has(m)),[p]=s,g=p==="framed"||p==="manualthumb",d=new E(this,r);if(this.closest("ext-link-text")&&((h=this.getValue("link"))==null?void 0:h.trim())!==""&&t.push(N(this,d,"nested-link","internal link in an external link")),g)for(let m of n.filter(({name:k})=>k==="width")){let k=$(m,d,"invalid-gallery","invalid image parameter");k.fix={range:[k.startIndex-1,k.endIndex],text:""},t.push(k)}if(n.length===i.length&&s.length<2&&o.length<2&&l.length<2)return t;let c=(m,k)=>x=>$(x,d,"no-duplicate",f.msg(`${m} image $1 parameter`,k));for(let m of i){if(m==="invalid"||m==="width"&&g)continue;let k=n.filter(({name:x})=>x===m);m==="caption"&&(k=[...k.slice(0,-1).filter(x=>x.text()),...k.slice(-1)]),k.length>1&&t.push(...k.map(c("duplicated",m)))}return s.length>1&&t.push(...n.filter(({name:m})=>es.has(m)).map(c("conflicting","frame"))),o.length>1&&t.push(...n.filter(({name:m})=>ts.has(m)).map(c("conflicting","horizontal-alignment"))),l.length>1&&t.push(...n.filter(({name:m})=>rs.has(m)).map(c("conflicting","vertical-alignment"))),t}getAllArgs(){return this.childNodes.slice(1)}getArgs(r){return this.getAllArgs().filter(({name:e})=>r===e)}getArg(r){let e=this.getArgs(r);return e[r==="manualthumb"?0:e.length-1]}getValue(r){var e;return(e=this.getArg(r))==null?void 0:e.getValue()}}});var St,xn=b(()=>{"use strict";_();Se();R();P();fn();St=class extends wt{constructor(e,t,n,i=f.getConfig(),s=[]){let o;if(n!==void 0){let{length:l}=s;o=new y(n,i,s);for(let p=1;p<11;p++)o.parseOnce();s.splice(l,1)}super(t,o==null?void 0:o.toString(),i,s);X(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 n=super.lint(e,t),{ns:i,interwiki:s}=this.getAttribute("title");return(s||i!==6)&&n.push(N(this,{start:e},"invalid-gallery","invalid gallery image")),n}}});var Ir,ns,Lr,is=b(()=>{"use strict";R();P();xn();Oe();Lr=class extends y{constructor(e,t=f.getConfig(),n=[]){var i;super(void 0,t,n,{});T(this,Ir);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 U(s,t,n):s);continue}let[,l,p]=o;F(this,Ir,ns).call(this,l)?super.insertAt(new St("gallery",l,p,t,n)):super.insertAt(new U(s,t,n))}}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:n,left:i}=this.getRootNode().posFromIndex(e),s=[];for(let[o,l]of this.childNodes.entries()){let p=l.toString(),{length:g}=p,d=p.trim(),c=n+o,h=o?0:i;if(l.type==="noinclude"&&d&&!/^<!--.*-->$/u.test(d)){let m=e+g;s.push({rule:"no-ignored",message:f.msg("invalid content in <$1>","gallery"),severity:d.startsWith("|")?"warning":"error",startIndex:e,endIndex:m,startLine:c,endLine:c,startCol:h,endCol:h+g,suggestions:[{desc:"remove",range:[e,m],text:""},{desc:"comment",range:[e,m],text:`<!--${p}-->`}]})}else l.type!=="noinclude"&&l.type!=="text"&&s.push(...l.lint(e,t));e+=g+1}return s}print(){return super.print({sep:`
16
- `})}};Lr=new WeakSet,rs=function(e){return this.normalizeTitle(e,6,!0,!0).valid}});var St,bn=b(()=>{"use strict";_();Ht();St=class extends Ce{get type(){return"link"}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e);return this.closest("ext-link-text")&&t.push(N(this,{start:r},"nested-link","internal link in an external link")),t}}});var oa,aa,er,Le,Ir=b(()=>{"use strict";_();J();Q();F();P();oa=String.raw`(?:[\p{Zs}\t]|&nbsp;|&#0*160;|&#[xX]0*[aA]0;)`,aa=new RegExp(`${oa}+`,"gu"),Le=class extends y{constructor(e,t="free-ext-link",n=f.getConfig(),i){super(e,n,i,{});T(this,er);v(this,er,t)}get type(){return u(this,er)}get innerText(){let e=new Map([["!","|"],["=","="]]),t=pe(this.childNodes.map(n=>{let{type:i}=n,s=String(n.name);return i==="magic-word"&&e.has(s)?e.get(s):n}));return this.type==="magic-link"&&(t=t.replace(aa," ")),t}get link(){let{innerText:e}=this;return this.type==="magic-link"?e.startsWith("ISBN")?`ISBN ${e.slice(5).replace(/[- ]/gu,"").replace(/x$/u,"X")}`:e:ai(e)}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),i=new E(this,e);if(this.type==="magic-link"){let{link:p}=this;if(p.startsWith("ISBN")){let g=[...p.slice(5)].map(d=>d==="X"?10:Number(d));(g.length===10&&g.reduce((d,c,h)=>d+c*(10-h),0)%11||g.length===13&&(g[12]===10||g.reduce((d,c,h)=>d+c*(h%2?3:1),0)%10))&&n.push(N(this,i,"invalid-isbn","invalid ISBN"))}return n}let s=this.type==="ext-link-url",o=s?/\|/u:/[,;。:!?()]+/u,l=this.childNodes.find(p=>p.type==="text"&&o.test(p.data));if(l){let{data:p}=l,g=C(l,i,"unterminated-url",f.msg("$1 in URL",s?'"|"':"full-width punctuation"),"warning"),{index:d,0:c}=o.exec(p),h=g.startIndex+d;g.suggestions=s?[{desc:"whitespace",range:[h,h+1],text:" "}]:[{desc:"whitespace",range:[h,h],text:" "},{desc:"escape",range:[h,h+c.length],text:encodeURI(c)}],n.push(g)}return n}};er=new WeakMap});var Ie,Ct,Tn=b(()=>{"use strict";Se();_();F();P();Ir();Ct=class extends y{constructor(e,t="",n="",i=f.getConfig(),s=[]){super(void 0,i,s,{});T(this,Ie);let o=e&&/^\0\d+f\x7F$/u.test(e)?s[Number(e.slice(1,-2))]:new Le(e,"ext-link-url",i,s);if(this.insertAt(o),v(this,Ie,t),n){let l=new y(n,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)}${u(this,Ie)}]`:`[${super.toString(e,u(this,Ie))}]`}text(){return`[${super.text(" ")}]`}getAttribute(e){return e==="padding"?1:super.getAttribute(e)}getGaps(){return u(this,Ie).length}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t);return this.length===1&&this.closest("heading-title")&&n.push(N(this,{start:e},"var-anchor","variable anchor in a section header")),n}print(){return super.print(this.length===1?{pre:"[",post:`${u(this,Ie)}]`}:{pre:"[",sep:u(this,Ie),post:"]"})}};Ie=new WeakMap});var tr,is=b(()=>{"use strict";F();P();Oe();bn();Tn();tr=class extends y{get type(){return"imagemap-link"}constructor(r,e,t,n=f.getConfig(),i=[]){super(void 0,n,i),this.append(r,e.length===2?new St(...e,n,i):new Ct(...e,n,i),new U(t,n,i))}}});var Fr,ss=b(()=>{"use strict";_();be();Q();F();P();Oe();xn();is();Fr=class extends y{get type(){return"ext-inner"}get image(){return this.childNodes.find(vt("imagemap-image"))}constructor(r,e=f.getConfig(),t=[]){if(super(void 0,e,t,{}),!r)return;let n=r.split(`
17
- `),i=new Set(e.protocol.split("|")),s=U,o=!0,l=!1;for(let p of n){let g=p.trim();if(!(l||!g||g.startsWith("#"))){if(o){let[d,...c]=p.split("|"),h=this.normalizeTitle(d,0,!0);if(h.valid&&!h.interwiki&&h.ns===6){let m=new wt("imagemap",d,c.length>0?c.join("|"):void 0,e,t);super.insertAt(m),o=!1;continue}else l=!0}else if(p.trim().split(/[\t ]/u)[0]==="desc"){super.insertAt(p);continue}else if(p.includes("[")){let d=p.indexOf("["),c=p.slice(d),h=/^\[\[([^|]+)(?:\|([^\]]+))?\]\][\w\s]*$/u.exec(c);if(h){if(this.normalizeTitle(h[1],0,!0,!1,!0).valid){super.insertAt(new tr(p.slice(0,d),h.slice(1),c.slice(c.indexOf("]]")+2),e,t));continue}}else if(i.has(c.slice(1,c.indexOf(":")+1))||i.has(c.slice(1,c.indexOf("//")+2))){let m=/^\[([^\]\s]+)(?:(\s+(?!\s))([^\]]*))?\][\w\s]*$/u.exec(c);if(m){super.insertAt(new tr(p.slice(0,d),m.slice(1),c.slice(c.indexOf("]")+1),e,t));continue}}}}super.insertAt(new s(p,e,t))}}toString(r){return super.toString(r,`
16
+ `})}};Ir=new WeakSet,ns=function(e){return this.normalizeTitle(e,6,!0,!0).valid}});var Ct,bn=b(()=>{"use strict";_();Ht();Ct=class extends Ce{get type(){return"link"}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e);return this.closest("ext-link-text")&&t.push(N(this,{start:r},"nested-link","internal link in an external link")),t}}});var aa,la,er,Le,Fr=b(()=>{"use strict";_();J();Q();R();P();aa=String.raw`(?:[\p{Zs}\t]|&nbsp;|&#0*160;|&#[xX]0*[aA]0;)`,la=new RegExp(`${aa}+`,"gu"),Le=class extends y{constructor(e,t="free-ext-link",n=f.getConfig(),i){super(e,n,i,{});T(this,er);v(this,er,t)}get type(){return u(this,er)}get innerText(){let e=new Map([["!","|"],["=","="]]),t=pe(this.childNodes.map(n=>{let{type:i}=n,s=String(n.name);return i==="magic-word"&&e.has(s)?e.get(s):n}));return this.type==="magic-link"&&(t=t.replace(la," ")),t}get link(){let{innerText:e}=this;return this.type==="magic-link"?e.startsWith("ISBN")?`ISBN ${e.slice(5).replace(/[- ]/gu,"").replace(/x$/u,"X")}`:e:li(e)}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),i=new E(this,e);if(this.type==="magic-link"){let{link:p}=this;if(p.startsWith("ISBN")){let g=[...p.slice(5)].map(d=>d==="X"?10:Number(d));(g.length===10&&g.reduce((d,c,h)=>d+c*(10-h),0)%11||g.length===13&&(g[12]===10||g.reduce((d,c,h)=>d+c*(h%2?3:1),0)%10))&&n.push(N(this,i,"invalid-isbn","invalid ISBN"))}return n}let s=this.type==="ext-link-url",o=s?/\|/u:/[,;。:!?()]+/u,l=this.childNodes.find(p=>p.type==="text"&&o.test(p.data));if(l){let{data:p}=l,g=$(l,i,"unterminated-url",f.msg("$1 in URL",s?'"|"':"full-width punctuation"),"warning"),{index:d,0:c}=o.exec(p),h=g.startIndex+d;g.suggestions=s?[{desc:"whitespace",range:[h,h+1],text:" "}]:[{desc:"whitespace",range:[h,h],text:" "},{desc:"escape",range:[h,h+c.length],text:encodeURI(c)}],n.push(g)}return n}};er=new WeakMap});var Ie,$t,Tn=b(()=>{"use strict";Se();_();R();P();Fr();$t=class extends y{constructor(e,t="",n="",i=f.getConfig(),s=[]){super(void 0,i,s,{});T(this,Ie);let o=e&&/^\0\d+f\x7F$/u.test(e)?s[Number(e.slice(1,-2))]:new Le(e,"ext-link-url",i,s);if(this.insertAt(o),v(this,Ie,t),n){let l=new y(n,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)}${u(this,Ie)}]`:`[${super.toString(e,u(this,Ie))}]`}text(){return`[${super.text(" ")}]`}getAttribute(e){return e==="padding"?1:super.getAttribute(e)}getGaps(){return u(this,Ie).length}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t);return this.length===1&&this.closest("heading-title")&&n.push(N(this,{start:e},"var-anchor","variable anchor in a section header")),n}print(){return super.print(this.length===1?{pre:"[",post:`${u(this,Ie)}]`}:{pre:"[",sep:u(this,Ie),post:"]"})}};Ie=new WeakMap});var tr,ss=b(()=>{"use strict";R();P();Oe();bn();Tn();tr=class extends y{get type(){return"imagemap-link"}constructor(r,e,t,n=f.getConfig(),i=[]){super(void 0,n,i),this.append(r,e.length===2?new Ct(...e,n,i):new $t(...e,n,i),new U(t,n,i))}}});var Rr,os=b(()=>{"use strict";_();be();Q();R();P();Oe();xn();ss();Rr=class extends y{get type(){return"ext-inner"}get image(){return this.childNodes.find(At("imagemap-image"))}constructor(r,e=f.getConfig(),t=[]){if(super(void 0,e,t,{}),!r)return;let n=r.split(`
17
+ `),i=new Set(e.protocol.split("|")),s=U,o=!0,l=!1;for(let p of n){let g=p.trim();if(!(l||!g||g.startsWith("#"))){if(o){let[d,...c]=p.split("|"),h=this.normalizeTitle(d,0,!0);if(h.valid&&!h.interwiki&&h.ns===6){let m=new St("imagemap",d,c.length>0?c.join("|"):void 0,e,t);super.insertAt(m),o=!1;continue}else l=!0}else if(p.trim().split(/[\t ]/u)[0]==="desc"){super.insertAt(p);continue}else if(p.includes("[")){let d=p.indexOf("["),c=p.slice(d),h=/^\[\[([^|]+)(?:\|([^\]]+))?\]\][\w\s]*$/u.exec(c);if(h){if(this.normalizeTitle(h[1],0,!0,!1,!0).valid){super.insertAt(new tr(p.slice(0,d),h.slice(1),c.slice(c.indexOf("]]")+2),e,t));continue}}else if(i.has(c.slice(1,c.indexOf(":")+1))||i.has(c.slice(1,c.indexOf("//")+2))){let m=/^\[([^\]\s]+)(?:(\s+(?!\s))([^\]]*))?\][\w\s]*$/u.exec(c);if(m){super.insertAt(new tr(p.slice(0,d),m.slice(1),c.slice(c.indexOf("]")+1),e,t));continue}}}}super.insertAt(new s(p,e,t))}}toString(r){return super.toString(r,`
18
18
  `)}text(){return super.text(`
19
19
  `).replace(/\n{2,}/gu,`
20
- `)}getGaps(){return 1}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e),n=new E(this,r);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,n,"invalid-imagemap","invalid link in <imagemap>"))):t.push(N(this,n,"invalid-imagemap","<imagemap> without an image")),t}print(){return super.print({sep:`
21
- `})}}});var Rr,os=b(()=>{"use strict";_();F();_e();Rr=class extends re{get type(){return"ext-inner"}lint(r=this.getAbsoluteIndex()){let{name:e,firstChild:{data:t}}=this;if((e==="templatestyles"||e==="section")&&t){let n=N(this,{start:r},"void-ext",f.msg("nothing should be in <$1>",e));return n.fix={range:[r,n.endIndex],text:""},[n]}return super.lint(r,new RegExp(String.raw`<\s*(?:/\s*)${e==="nowiki"?"":"?"}(${e})\b`,"giu"))}}});var Pr={};se(Pr,{NestedToken:()=>yn});var la,rr,$t,yn,Br=b(()=>{"use strict";_();Q();Qt();Sr();F();P();kn();Oe();la=new Set(["comment","include","arg","template","magic-word"]),yn=class extends y{constructor(e,t,n,i=f.getConfig(),s=[]){if(typeof t=="boolean"){let o=Symbol("InputboxToken"),{length:l}=s;s.push(o),e&&(e=Ke(e,i,s,t)),e&&(e=Yt(e,i,s)),s.splice(l,1)}else e&&(e=e.replace(t,(o,l,p,g,d)=>{let c=`\0${s.length+1}e\x7F`;return new Nt(l,p,g,d,i,!1,s),c}));e&&(e=e.replace(/(^|\0\d+.\x7F)([^\0]+)(?=$|\0\d+.\x7F)/gu,(o,l,p)=>(new U(p,i,s),`${l}\0${s.length}n\x7F`)));super(e,i,s);T(this,rr);T(this,$t);v(this,rr,[...n]),v(this,$t,t)}get type(){return"ext-inner"}lint(e=this.getAbsoluteIndex(),t){let n=new E(this,e),i=u(this,$t)?"includeonly":"noinclude",s=typeof u(this,$t)=="boolean"?new RegExp(String.raw`^(?:<${i}(?:\s[^>]*)?/?>|</${i}\s*>)$`,"iu"):/^<!--.*-->$/su;return[...super.lint(e,t),...this.childNodes.filter(o=>{if(o.type==="ext")return!u(this,rr).includes(o.name);if(la.has(o.type))return!1;let l=o.toString().trim();return l&&!s.test(l)}).map(o=>{let l=C(o,n,"no-ignored",f.msg("invalid content in <$1>",this.name));return l.suggestions=[{desc:"remove",range:[l.startIndex,l.endIndex],text:""},{desc:"comment",range:[l.startIndex,l.endIndex],text:`<!--${o.toString()}-->`}],l})]}};rr=new WeakMap,$t=new WeakMap});var as,Nt,kn=b(()=>{"use strict";_();Q();F();P();ln();Tr();Mi();pn();Qi();ns();ss();os();as=(a,r)=>{let e=new Set(a);return e.delete(r),[...e]},Nt=class extends mt{get type(){return"ext"}constructor(r,e,t,n,i=f.getConfig(),s=!1,o=[]){var c;let l=r.toLowerCase(),p=new ze(!e||e.trimStart()!==e?e:` ${e}`,"ext-attrs",l,i,o),g={...i,ext:as(i.ext,l),excludes:[...(c=i.excludes)!=null?c:[]]},d;switch(g.inExt=!0,l){case"tab":g.ext=as(g.ext,"tabs");case"indicator":case"poem":case"ref":case"option":case"combooption":case"tabs":case"poll":case"seo":l==="poem"&&g.excludes.push("heading"),d=new y(t,g,o);break;case"pre":d=new yr(t,g,o);break;case"dynamicpagelist":d=new Tt(s,t,g,o);break;case"inputbox":g.excludes.push("heading"),d=new Cr(s,t,g,o);break;case"references":{let{NestedToken:h}=(Br(),Z(Pr));g.excludes.push("heading"),d=new h(t,s,["ref"],g,o);break}case"choose":{let{NestedToken:h}=(Br(),Z(Pr));d=new h(t,/<(option|choicetemplate)(\s[^>]*?)?(?:\/>|>(.*?)<\/(\1)>)/gsu,["option","choicetemplate"],g,o);break}case"combobox":{let{NestedToken:h}=(Br(),Z(Pr));d=new h(t,/<(combooption)(\s[^>]*?)?(?:\/>|>(.*?)<\/(combooption\s*)>)/gisu,["combooption"],g,o);break}case"gallery":d=new Er(t,g,o);break;case"imagemap":d=new Fr(t,g,o);break;default:d=new Rr(t,g,o)}d.setAttribute("name",l),d.type==="plain"&&(d.type="ext-inner"),super(r,p,d,n,i,o),this.seal("closed",!0)}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e),n=new E(this,r);return this.name!=="nowiki"&&this.closest("html-attrs,table-attrs")&&t.push(N(this,n,"parsing-order","extension tag in HTML tag attributes")),this.name==="ref"&&this.closest("heading-title")&&t.push(N(this,n,"var-anchor","variable anchor in a section header")),t}}});var ls,vn,da,nt,ds=b(()=>{"use strict";_();Xe();F();_e();ls=[ue(!1)];nt=class extends(da=re){constructor(e,t=!0,n,i){super(e,n,i);X(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=N(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;":""})}};vn=le(da),nt=ge(vn,0,"CommentToken",ls,nt),de(vn,1,nt)});var gs={};se(gs,{parseCommentAndExt:()=>Ke});var Ke,Qt=b(()=>{"use strict";wi();Oe();Ci();kn();ds();Ke=(a,r,e,t)=>{let n="<onlyinclude>",i="</onlyinclude>",{length:s}=n,o=()=>{let c=a.indexOf(n);return{i:c,j:a.indexOf(i,c+s)}};if(t){let{i:c,j:h}=o();if(c!==-1&&h!==-1){let m="",k=x=>{new U(x,r,e),m+=`\0${e.length-1}n\x7F`};for(;c!==-1&&h!==-1;){let x=`\0${e.length}e\x7F`;new fr(a.slice(c+s,h),r,e),c>0&&k(a.slice(0,c)),m+=x,a=a.slice(h+s+1),{i:c,j:h}=o()}return a&&k(a),m}}let l=r.ext.join("|"),p=t?"includeonly":"(?:no|only)include",g=t?"noinclude":"includeonly",d=new RegExp(String.raw`<!--.*?(?:-->|$)|<${p}(?:\s[^>]*)?/?>|</${p}\s*>|<(${l})(\s[^>]*?)?(?:/>|>(.*?)</(\1\s*)>)|<(${g})(\s[^>]*?)?(?:/>|>(.*?)(?:</(${g}\s*)>|$))`,"gisu");return a.replace(d,(c,h,m,k,x,A,S,$,w)=>{let L=e.length,B="n";if(h)B="e",new Nt(h,m,k,x,r,A,e);else if(c.startsWith("<!--")){B="c";let j=c.endsWith("-->");new nt(c.slice(4,j?-3:void 0),j,r,e)}else A?new Je(A,S,$,w,r,e):new U(c,r,e);return`\0${L}${B}\x7F`})}});var ga,pa,ua,Et,he,We,jr,ps=b(()=>{"use strict";_();J();Q();P();ga=new Set(["if","ifeq","ifexpr","ifexist","iferror","switch"]),pa=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"]),ua=new Set(["strike","big","center","font","tt"]),jr=class extends y{constructor(e,t,n,i,s,o){super(void 0,s,o);T(this,Et);T(this,he);T(this,We);this.insertAt(t),this.setAttribute("name",e.toLowerCase()),v(this,Et,n),v(this,he,i),v(this,We,e)}get type(){return"html"}get selfClosing(){return u(this,he)}get closing(){return u(this,Et)}toString(e){return`<${this.closing?"/":""}${u(this,We)}${super.toString(e)}${u(this,he)?"/":""}>`}text(){let{closing:e}=this,t=u(this,We)+(e?"":super.text());return`<${e?"/":""}${t}${u(this,he)?"/":""}>`}getAttribute(e){return e==="padding"?u(this,We).length+(this.closing?2:1):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){var s;let n=super.lint(e,t),i=new E(this,e);this.name==="h1"&&!this.closing&&n.push(N(this,i,"h1","<h1>")),this.closest("table-attrs")&&n.push(N(this,i,"parsing-order","HTML tag in table attributes"));try{this.findMatchingTag()}catch(o){if(o instanceof SyntaxError){let{message:l}=o,p=l.split(":")[0].toLowerCase(),g=N(this,i,"unmatched-tag",p);if(p==="unclosed tag"&&!this.closest("heading-title"))if(pa.has(this.name)){let d=(s=this.parentNode)==null?void 0:s.childNodes,c=d==null?void 0:d.indexOf(this);d!=null&&d.slice(0,c).some(({type:h,name:m})=>h==="html"&&m===this.name)||(g.severity="warning")}else g.severity="warning";else if(p==="unmatched closing tag"){let d=this.closest("magic-word");d&&ga.has(d.name)?g.severity="warning":g.suggestions=[{desc:"remove",range:[e,g.endIndex],text:""}]}else if(p==="tag that is both closing and self-closing"){let{html:[,,d]}=this.getAttribute("config");d.includes(this.name)&&(g.fix={range:[e+1,e+2],text:""})}n.push(g)}}return ua.has(this.name)&&n.push(N(this,i,"obsolete-tag","obsolete HTML tag","warning")),(this.name==="b"||this.name==="strong")&&this.closest("heading-title")&&n.push(N(this,i,"bold-header","bold in section header","warning")),n}findMatchingTag(){let{html:[e,t,n]}=this.getAttribute("config"),{name:i,parentNode:s,closing:o}=this,l=li(this.toString());if(o&&(u(this,he)||n.includes(i)))throw new SyntaxError(`Tag that is both closing and self-closing: ${l}`);if(n.includes(i)||u(this,he)&&t.includes(i))return this;if(u(this,he)&&e.includes(i))throw new SyntaxError(`Invalid self-closing tag: ${l}`);if(!s)return;let{childNodes:p}=s,g=p.indexOf(this),d=(o?p.slice(0,g).reverse():p.slice(g+1)).filter(h=>h.type==="html"&&h.name===i),c=o?-1:1;for(let h of d)if(u(h,Et)?c--:c++,c===0)return h;throw new SyntaxError(`${o?"Unmatched closing":"Unclosed"} tag: ${l}`)}print(){return super.print({pre:`&lt;${this.closing?"/":""}${u(this,We)}`,post:`${u(this,he)?"/":""}&gt;`})}json(){let e=super.json();return Object.assign(e,{closing:this.closing,selfClosing:u(this,he)}),e}};Et=new WeakMap,he=new WeakMap,We=new WeakMap});var us={};se(us,{parseHtml:()=>ca});var ca,cs=b(()=>{"use strict";Tr();ps();ca=(a,r,e)=>{let t=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,{html:n}=r,i=new Set([...n[0],...n[1],...n[2]]),s=a.split("<"),o=s.shift();for(let l of s){let p=t.exec(l),g=p==null?void 0:p[2],d=g==null?void 0:g.toLowerCase();if(!p||!i.has(d)){o+=`<${l}`;continue}let[,c,,h="",m,k]=p,{length:x}=e,A=new ze(h,"html-attrs",d,r,e),S=A.getAttr("itemprop");if(d==="meta"&&(S===void 0||A.getAttr("content")===void 0)||d==="link"&&(S===void 0||A.getAttr("href")===void 0)){o+=`<${l}`,e.length=x;continue}o+=`\0${e.length}x\x7F${k}`,new jr(g,A,c==="/",m==="/>",r,e)}return o}});var hs,fs=b(()=>{"use strict";be();hs=(a=0)=>(r,e)=>{var n,ms;class t extends r{constructor(){super(...arguments);T(this,n)}getAttr(l){return u(this,n,ms).getAttr(l)}}return n=new WeakSet,ms=function(){return this.childNodes[a]},hr(t,r),t}});var Lt,An=b(()=>{"use strict";fs();F();P();ut();Tr();Lt=class extends hs(1)(y){constructor(r,e,t,n,i=f.getConfig(),s=[],o){super(void 0,i,s,o),this.append(new ce(e,r,"table-syntax",i,s,{}),new ze(n,"table-attrs",t,i,s))}}});var me,nr,st,wn,xs,it,Sn=b(()=>{"use strict";_();Se();be();Q();F();P();An();it=class extends Lt{constructor(e,t,n=f.getConfig(),i=[]){var p;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,n,i);T(this,st);T(this,me,"");T(this,nr);s&&([dr(this,me)._]=s);let l=new y(t==null?void 0:t.slice(((p=s==null?void 0:s.index)!=null?p:NaN)+u(this,me).length),n,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 R(this,st,wn).call(this).subtype}afterBuild(){u(this,me).includes("\0")&&v(this,me,this.buildFromStr(u(this,me),0)),super.afterBuild()}toString(e){let{childNodes:[t,n,i]}=this;return t.toString(e)+n.toString(e)+u(this,me)+i.toString(e)}text(){let{childNodes:[e,t,n]}=this;return e.text()+t.text()+u(this,me)+n.text()}getGaps(e){return e===1?u(this,me).length:0}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),i=new E(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("||"),p=C(s,i,"pipe-like",'additional "|" in a table cell',l?"error":"warning");if(l){let g={caption:"|+",td:"|",th:"!"}[this.subtype];p.fix={range:[p.startIndex,p.endIndex],text:o.replace(/\|\|/gu,`
20
+ `)}getGaps(){return 1}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e),n=new E(this,r);return this.image?t.push(...this.childNodes.filter(i=>{let s=i.toString().trim();return i.type==="noinclude"&&s&&!s.startsWith("#")}).map(i=>$(i,n,"invalid-imagemap","invalid link in <imagemap>"))):t.push(N(this,n,"invalid-imagemap","<imagemap> without an image")),t}print(){return super.print({sep:`
21
+ `})}}});var Pr,as=b(()=>{"use strict";_();R();_e();Pr=class extends re{get type(){return"ext-inner"}lint(r=this.getAbsoluteIndex()){let{name:e,firstChild:{data:t}}=this;if((e==="templatestyles"||e==="section")&&t){let n=N(this,{start:r},"void-ext",f.msg("nothing should be in <$1>",e));return n.fix={range:[r,n.endIndex],text:""},[n]}return super.lint(r,new RegExp(String.raw`<\s*(?:/\s*)${e==="nowiki"?"":"?"}(${e})\b`,"giu"))}}});var Br={};se(Br,{NestedToken:()=>yn});var da,rr,Nt,yn,jr=b(()=>{"use strict";_();Q();Qt();Cr();R();P();kn();Oe();da=new Set(["comment","include","arg","template","magic-word"]),yn=class extends y{constructor(e,t,n,i=f.getConfig(),s=[]){if(typeof t=="boolean"){let o=Symbol("InputboxToken"),{length:l}=s;s.push(o),e&&(e=Ke(e,i,s,t)),e&&(e=Yt(e,i,s)),s.splice(l,1)}else e&&(e=e.replace(t,(o,l,p,g,d)=>{let c=`\0${s.length+1}e\x7F`;return new Et(l,p,g,d,i,!1,s),c}));e&&(e=e.replace(/(^|\0\d+.\x7F)([^\0]+)(?=$|\0\d+.\x7F)/gu,(o,l,p)=>(new U(p,i,s),`${l}\0${s.length}n\x7F`)));super(e,i,s);T(this,rr);T(this,Nt);v(this,rr,[...n]),v(this,Nt,t)}get type(){return"ext-inner"}lint(e=this.getAbsoluteIndex(),t){let n=new E(this,e),i=u(this,Nt)?"includeonly":"noinclude",s=typeof u(this,Nt)=="boolean"?new RegExp(String.raw`^(?:<${i}(?:\s[^>]*)?/?>|</${i}\s*>)$`,"iu"):/^<!--.*-->$/su;return[...super.lint(e,t),...this.childNodes.filter(o=>{if(o.type==="ext")return!u(this,rr).includes(o.name);if(da.has(o.type))return!1;let l=o.toString().trim();return l&&!s.test(l)}).map(o=>{let l=$(o,n,"no-ignored",f.msg("invalid content in <$1>",this.name));return l.suggestions=[{desc:"remove",range:[l.startIndex,l.endIndex],text:""},{desc:"comment",range:[l.startIndex,l.endIndex],text:`<!--${o.toString()}-->`}],l})]}};rr=new WeakMap,Nt=new WeakMap});var ls,Et,kn=b(()=>{"use strict";_();Q();R();P();ln();yr();Gi();pn();Zi();is();os();as();ls=(a,r)=>{let e=new Set(a);return e.delete(r),[...e]},Et=class extends ft{get type(){return"ext"}constructor(r,e,t,n,i=f.getConfig(),s=!1,o=[]){var c;let l=r.toLowerCase(),p=new ze(!e||e.trimStart()!==e?e:` ${e}`,"ext-attrs",l,i,o),g={...i,ext:ls(i.ext,l),excludes:[...(c=i.excludes)!=null?c:[]]},d;switch(g.inExt=!0,l){case"tab":g.ext=ls(g.ext,"tabs");case"indicator":case"poem":case"ref":case"option":case"combooption":case"tabs":case"poll":case"seo":l==="poem"&&g.excludes.push("heading"),d=new y(t,g,o);break;case"pre":d=new kr(t,g,o);break;case"dynamicpagelist":d=new yt(s,t,g,o);break;case"inputbox":g.excludes.push("heading"),d=new $r(s,t,g,o);break;case"references":{let{NestedToken:h}=(jr(),Z(Br));g.excludes.push("heading"),d=new h(t,s,["ref"],g,o);break}case"choose":{let{NestedToken:h}=(jr(),Z(Br));d=new h(t,/<(option|choicetemplate)(\s[^>]*?)?(?:\/>|>(.*?)<\/(\1)>)/gsu,["option","choicetemplate"],g,o);break}case"combobox":{let{NestedToken:h}=(jr(),Z(Br));d=new h(t,/<(combooption)(\s[^>]*?)?(?:\/>|>(.*?)<\/(combooption\s*)>)/gisu,["combooption"],g,o);break}case"gallery":d=new Lr(t,g,o);break;case"imagemap":d=new Rr(t,g,o);break;default:d=new Pr(t,g,o)}d.setAttribute("name",l),d.type==="plain"&&(d.type="ext-inner"),super(r,p,d,n,i,o),this.seal("closed",!0)}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e),n=new E(this,r);return this.name!=="nowiki"&&this.closest("html-attrs,table-attrs")&&t.push(N(this,n,"parsing-order","extension tag in HTML tag attributes")),this.name==="ref"&&this.closest("heading-title")&&t.push(N(this,n,"var-anchor","variable anchor in a section header")),t}}});var ds,vn,ga,nt,gs=b(()=>{"use strict";_();Xe();R();_e();ds=[ue(!1)];nt=class extends(ga=re){constructor(e,t=!0,n,i){super(e,n,i);X(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=N(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;":""})}};vn=le(ga),nt=ge(vn,0,"CommentToken",ds,nt),de(vn,1,nt)});var ps={};se(ps,{parseCommentAndExt:()=>Ke});var Ke,Qt=b(()=>{"use strict";Si();Oe();$i();kn();gs();Ke=(a,r,e,t)=>{let n="<onlyinclude>",i="</onlyinclude>",{length:s}=n,o=()=>{let c=a.indexOf(n);return{i:c,j:a.indexOf(i,c+s)}};if(t){let{i:c,j:h}=o();if(c!==-1&&h!==-1){let m="",k=x=>{new U(x,r,e),m+=`\0${e.length-1}n\x7F`};for(;c!==-1&&h!==-1;){let x=`\0${e.length}e\x7F`;new xr(a.slice(c+s,h),r,e),c>0&&k(a.slice(0,c)),m+=x,a=a.slice(h+s+1),{i:c,j:h}=o()}return a&&k(a),m}}let l=r.ext.join("|"),p=t?"includeonly":"(?:no|only)include",g=t?"noinclude":"includeonly",d=new RegExp(String.raw`<!--.*?(?:-->|$)|<${p}(?:\s[^>]*)?/?>|</${p}\s*>|<(${l})(\s[^>]*?)?(?:/>|>(.*?)</(\1\s*)>)|<(${g})(\s[^>]*?)?(?:/>|>(.*?)(?:</(${g}\s*)>|$))`,"gisu");return a.replace(d,(c,h,m,k,x,A,S,C,w)=>{let L=e.length,B="n";if(h)B="e",new Et(h,m,k,x,r,A,e);else if(c.startsWith("<!--")){B="c";let j=c.endsWith("-->");new nt(c.slice(4,j?-3:void 0),j,r,e)}else A?new Je(A,S,C,w,r,e):new U(c,r,e);return`\0${L}${B}\x7F`})}});var pa,ua,ca,Lt,he,We,qr,us=b(()=>{"use strict";_();J();Q();P();pa=new Set(["if","ifeq","ifexpr","ifexist","iferror","switch"]),ua=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"]),ca=new Set(["strike","big","center","font","tt"]),qr=class extends y{constructor(e,t,n,i,s,o){super(void 0,s,o);T(this,Lt);T(this,he);T(this,We);this.insertAt(t),this.setAttribute("name",e.toLowerCase()),v(this,Lt,n),v(this,he,i),v(this,We,e)}get type(){return"html"}get selfClosing(){return u(this,he)}get closing(){return u(this,Lt)}toString(e){return`<${this.closing?"/":""}${u(this,We)}${super.toString(e)}${u(this,he)?"/":""}>`}text(){let{closing:e}=this,t=u(this,We)+(e?"":super.text());return`<${e?"/":""}${t}${u(this,he)?"/":""}>`}getAttribute(e){return e==="padding"?u(this,We).length+(this.closing?2:1):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){var s;let n=super.lint(e,t),i=new E(this,e);this.name==="h1"&&!this.closing&&n.push(N(this,i,"h1","<h1>")),this.closest("table-attrs")&&n.push(N(this,i,"parsing-order","HTML tag in table attributes"));try{this.findMatchingTag()}catch(o){if(o instanceof SyntaxError){let{message:l}=o,p=l.split(":")[0].toLowerCase(),g=N(this,i,"unmatched-tag",p);if(p==="unclosed tag"&&!this.closest("heading-title"))if(ua.has(this.name)){let d=(s=this.parentNode)==null?void 0:s.childNodes,c=d==null?void 0:d.indexOf(this);d!=null&&d.slice(0,c).some(({type:h,name:m})=>h==="html"&&m===this.name)||(g.severity="warning")}else g.severity="warning";else if(p==="unmatched closing tag"){let d=this.closest("magic-word");d&&pa.has(d.name)?g.severity="warning":g.suggestions=[{desc:"remove",range:[e,g.endIndex],text:""}]}else if(p==="tag that is both closing and self-closing"){let{html:[,,d]}=this.getAttribute("config");d.includes(this.name)&&(g.fix={range:[e+1,e+2],text:""})}n.push(g)}}return ca.has(this.name)&&n.push(N(this,i,"obsolete-tag","obsolete HTML tag","warning")),(this.name==="b"||this.name==="strong")&&this.closest("heading-title")&&n.push(N(this,i,"bold-header","bold in section header","warning")),n}findMatchingTag(){let{html:[e,t,n]}=this.getAttribute("config"),{name:i,parentNode:s,closing:o}=this,l=di(this.toString());if(o&&(u(this,he)||n.includes(i)))throw new SyntaxError(`Tag that is both closing and self-closing: ${l}`);if(n.includes(i)||u(this,he)&&t.includes(i))return this;if(u(this,he)&&e.includes(i))throw new SyntaxError(`Invalid self-closing tag: ${l}`);if(!s)return;let{childNodes:p}=s,g=p.indexOf(this),d=(o?p.slice(0,g).reverse():p.slice(g+1)).filter(h=>h.type==="html"&&h.name===i),c=o?-1:1;for(let h of d)if(u(h,Lt)?c--:c++,c===0)return h;throw new SyntaxError(`${o?"Unmatched closing":"Unclosed"} tag: ${l}`)}print(){return super.print({pre:`&lt;${this.closing?"/":""}${u(this,We)}`,post:`${u(this,he)?"/":""}&gt;`})}json(){let e=super.json();return Object.assign(e,{closing:this.closing,selfClosing:u(this,he)}),e}};Lt=new WeakMap,he=new WeakMap,We=new WeakMap});var cs={};se(cs,{parseHtml:()=>ha});var ha,hs=b(()=>{"use strict";yr();us();ha=(a,r,e)=>{let t=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,{html:n}=r,i=new Set([...n[0],...n[1],...n[2]]),s=a.split("<"),o=s.shift();for(let l of s){let p=t.exec(l),g=p==null?void 0:p[2],d=g==null?void 0:g.toLowerCase();if(!p||!i.has(d)){o+=`<${l}`;continue}let[,c,,h="",m,k]=p,{length:x}=e,A=new ze(h,"html-attrs",d,r,e),S=A.getAttr("itemprop");if(d==="meta"&&(S===void 0||A.getAttr("content")===void 0)||d==="link"&&(S===void 0||A.getAttr("href")===void 0)){o+=`<${l}`,e.length=x;continue}o+=`\0${e.length}x\x7F${k}`,new qr(g,A,c==="/",m==="/>",r,e)}return o}});var ms,xs=b(()=>{"use strict";be();ms=(a=0)=>(r,e)=>{var n,fs;class t extends r{constructor(){super(...arguments);T(this,n)}getAttr(l){return u(this,n,fs).getAttr(l)}}return n=new WeakSet,fs=function(){return this.childNodes[a]},mr(t,r),t}});var It,An=b(()=>{"use strict";xs();R();P();ct();yr();It=class extends ms(1)(y){constructor(r,e,t,n,i=f.getConfig(),s=[],o){super(void 0,i,s,o),this.append(new ce(e,r,"table-syntax",i,s,{}),new ze(n,"table-attrs",t,i,s))}}});var me,nr,st,wn,bs,it,Sn=b(()=>{"use strict";_();Se();be();Q();R();P();An();it=class extends It{constructor(e,t,n=f.getConfig(),i=[]){var p;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,n,i);T(this,st);T(this,me,"");T(this,nr);s&&([dr(this,me)._]=s);let l=new y(t==null?void 0:t.slice(((p=s==null?void 0:s.index)!=null?p:NaN)+u(this,me).length),n,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 F(this,st,wn).call(this).subtype}afterBuild(){u(this,me).includes("\0")&&v(this,me,this.buildFromStr(u(this,me),0)),super.afterBuild()}toString(e){let{childNodes:[t,n,i]}=this;return t.toString(e)+n.toString(e)+u(this,me)+i.toString(e)}text(){let{childNodes:[e,t,n]}=this;return e.text()+t.text()+u(this,me)+n.text()}getGaps(e){return e===1?u(this,me).length:0}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),i=new E(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("||"),p=$(s,i,"pipe-like",'additional "|" in a table cell',l?"error":"warning");if(l){let g={caption:"|+",td:"|",th:"!"}[this.subtype];p.fix={range:[p.startIndex,p.endIndex],text:o.replace(/\|\|/gu,`
22
22
  ${g}`)}}else p.suggestions=[{desc:"escape",range:[p.startIndex,p.endIndex],text:o.replace(/\|/gu,"&#124;")}];n.push(p)}}return n}isIndependent(){return this.firstChild.text().startsWith(`
23
- `)}getAttr(e){let t=super.getAttr(e);return e==="rowspan"||e==="colspan"?parseInt(t)||1:t}print(){let{childNodes:[e,t,n]}=this;return`<span class="wpb-td">${e.print()}${t.print()}${u(this,me)}${n.print()}</span>`}json(){let e=super.json();return e.subtype=this.subtype,e}};me=new WeakMap,nr=new WeakMap,st=new WeakSet,wn=function(){var t;let{rev:e}=ye;return(t=u(this,nr))!=null||v(this,nr,[e,R(this,st,xs).call(this)]),u(this,nr)[1]},xs=function(){var o;let e=this.firstChild.text(),t=e.slice(-1),n="td";if(t==="!"?n="th":t==="+"&&(n="caption"),this.isIndependent())return{subtype:n};let{previousSibling:i}=this;return{...R(o=i,st,wn).call(o)}}});var It,Cn=b(()=>{"use strict";_();An();Sn();It=class extends Lt{lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e),n=this.childNodes.find(({type:l})=>l==="table-inter");if(!n)return t;let i=n.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=C(n,{start:r},"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(r=>r instanceof it&&r.isIndependent()&&!r.firstChild.text().endsWith("+")))}getNthCol(r,e){let t=0;for(let n of this.childNodes.slice(2))if(n instanceof it&&(n.isIndependent()&&(t=+(n.subtype!=="caption")),r-=t,r<0))return n}}});var ha,ma,$n,qr,bs=b(()=>{"use strict";_();be();Q();F();Cn();ut();ha=/^\n[^\S\n]*(?:\|\}|\{\{\s*!\s*\}\}\}|\{\{\s*!\)\s*\}\})$/u,ma=({type:a})=>a==="tr"||a==="table-syntax",$n=class extends Array{},qr=class extends It{get type(){return"table"}get closed(){return this.lastChild.type==="table-syntax"}constructor(r,e,t,n){super(/^(?:\{\||\{\{\{\s*!\s*\}\}|\{\{\s*\(!\s*\}\})$/u,r,"table",e,t,n,{})}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e),n=new E(this,r);this.closed||t.push(C(this.firstChild,n,"unclosed-table",f.msg("unclosed $1","table")));let i=this.getLayout(),{length:s}=i;if(s>1){let o=1,l=1/0,p=0;for(;p<s;p++){let g=i[p],d=g.length;if(d<o)break;d<l&&(l=d);let c=g.indexOf(g[d-1])+1;if(c>l)break;c>o&&(o=c)}if(p<s){let g=C(this.getNthRow(p),n,"table-layout","inconsistent table layout","warning");g.startIndex++,g.startLine++,g.startCol=0,t.push(g)}}return t}close(r=`
24
- |}`,e){let t=this.getAttribute("config"),n=this.getAttribute("accum"),i=e?[r]:f.parse(r,this.getAttribute("include"),2,t).childNodes;ye.run(()=>{let s=new ce(void 0,ha,"table-syntax",t,n,{});super.insertAt(s)}),this.lastChild.replaceChildren(...i)}getLayout(r){let e=this.getAllRows(),{length:t}=e,n=new $n(...Ts(t,()=>[]));for(let[i,s]of n.entries()){let o=0,l=0,p;for(let g of e[i].childNodes.slice(2))if(g.type==="td"){if(g.isIndependent()&&(p=g.subtype!=="caption"),p){let d={row:i,column:o},{rowspan:c,colspan:h}=g;for(o++;s[l];)l++;for(let m=i;m<Math.min(i+c,t);m++)for(let k=l;k<l+h;k++)n[m][k]=d;l+=h}}else if(ma(g))break}return n}getAllRows(){return[...super.getRowCount()?[this]:[],...this.childNodes.slice(1).filter(r=>r.type==="tr"&&r.getRowCount()>0)]}getNthCell(r){var t;let e=r;return e&&((t=this.getNthRow(e.row,!1,!1))==null?void 0:t.getNthCol(e.column))}getNthRow(r,e,t){let n=super.getRowCount();if(r===0&&n)return this;n&&r--;for(let i of this.childNodes.slice(2))if(i.type==="tr"&&i.getRowCount()&&(r--,r<0))return i}json(){let r=super.json();return r.closed=this.closed,r}}});var _r,ys=b(()=>{"use strict";Cn();_r=class extends It{get type(){return"tr"}constructor(r,e,t,n){super(/^\n[^\S\n]*(?:\|-+|\{\{\s*!\s*\}\}-+|\{\{\s*!-\s*\}\}-*)$/u,r,"tr",e,t,n,{})}}});var Ft,Nn=b(()=>{"use strict";_e();Ft=class extends re{}});var Rt,En=b(()=>{"use strict";Nn();Rt=class extends Ft{get type(){return"dd"}}});var ks={};se(ks,{parseTable:()=>xa});var fa,xa,vs=b(()=>{"use strict";P();bs();ys();Sn();En();fa=a=>a.lastChild.constructor!==y,xa=({firstChild:{data:a},type:r,name:e},t,n)=>{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,n]}=this;return`<span class="wpb-td">${e.print()}${t.print()}${u(this,me)}${n.print()}</span>`}json(){let e=super.json();return e.subtype=this.subtype,e}};me=new WeakMap,nr=new WeakMap,st=new WeakSet,wn=function(){var t;let{rev:e}=ye;return(t=u(this,nr))!=null||v(this,nr,[e,F(this,st,bs).call(this)]),u(this,nr)[1]},bs=function(){var o;let e=this.firstChild.text(),t=e.slice(-1),n="td";if(t==="!"?n="th":t==="+"&&(n="caption"),this.isIndependent())return{subtype:n};let{previousSibling:i}=this;return{...F(o=i,st,wn).call(o)}}});var Ft,Cn=b(()=>{"use strict";_();An();Sn();Ft=class extends It{lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e),n=this.childNodes.find(({type:l})=>l==="table-inter");if(!n)return t;let i=n.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=$(n,{start:r},"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(r=>r instanceof it&&r.isIndependent()&&!r.firstChild.text().endsWith("+")))}getNthCol(r,e){let t=0;for(let n of this.childNodes.slice(2))if(n instanceof it&&(n.isIndependent()&&(t=+(n.subtype!=="caption")),r-=t,r<0))return n}}});var ma,fa,$n,_r,Ts=b(()=>{"use strict";_();be();Q();R();Cn();ct();ma=/^\n[^\S\n]*(?:\|\}|\{\{\s*!\s*\}\}\}|\{\{\s*!\)\s*\}\})$/u,fa=({type:a})=>a==="tr"||a==="table-syntax",$n=class extends Array{},_r=class extends Ft{get type(){return"table"}get closed(){return this.lastChild.type==="table-syntax"}constructor(r,e,t,n){super(/^(?:\{\||\{\{\{\s*!\s*\}\}|\{\{\s*\(!\s*\}\})$/u,r,"table",e,t,n,{})}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e),n=new E(this,r);this.closed||t.push($(this.firstChild,n,"unclosed-table",f.msg("unclosed $1","table")));let i=this.getLayout(),{length:s}=i;if(s>1){let o=1,l=1/0,p=0;for(;p<s;p++){let g=i[p],d=g.length;if(d<o)break;d<l&&(l=d);let c=g.indexOf(g[d-1])+1;if(c>l)break;c>o&&(o=c)}if(p<s){let g=$(this.getNthRow(p),n,"table-layout","inconsistent table layout","warning");g.startIndex++,g.startLine++,g.startCol=0,t.push(g)}}return t}close(r=`
24
+ |}`,e){let t=this.getAttribute("config"),n=this.getAttribute("accum"),i=e?[r]:f.parse(r,this.getAttribute("include"),2,t).childNodes;ye.run(()=>{let s=new ce(void 0,ma,"table-syntax",t,n,{});super.insertAt(s)}),this.lastChild.replaceChildren(...i)}getLayout(r){let e=this.getAllRows(),{length:t}=e,n=new $n(...ys(t,()=>[]));for(let[i,s]of n.entries()){let o=0,l=0,p;for(let g of e[i].childNodes.slice(2))if(g.type==="td"){if(g.isIndependent()&&(p=g.subtype!=="caption"),p){let d={row:i,column:o},{rowspan:c,colspan:h}=g;for(o++;s[l];)l++;for(let m=i;m<Math.min(i+c,t);m++)for(let k=l;k<l+h;k++)n[m][k]=d;l+=h}}else if(fa(g))break}return n}getAllRows(){return[...super.getRowCount()?[this]:[],...this.childNodes.slice(1).filter(r=>r.type==="tr"&&r.getRowCount()>0)]}getNthCell(r){var t;let e=r;return e&&((t=this.getNthRow(e.row,!1,!1))==null?void 0:t.getNthCol(e.column))}getNthRow(r,e,t){let n=super.getRowCount();if(r===0&&n)return this;n&&r--;for(let i of this.childNodes.slice(2))if(i.type==="tr"&&i.getRowCount()&&(r--,r<0))return i}json(){let r=super.json();return r.closed=this.closed,r}}});var Or,ks=b(()=>{"use strict";Cn();Or=class extends Ft{get type(){return"tr"}constructor(r,e,t,n){super(/^\n[^\S\n]*(?:\|-+|\{\{\s*!\s*\}\}-+|\{\{\s*!-\s*\}\}-*)$/u,r,"tr",e,t,n,{})}}});var Rt,Nn=b(()=>{"use strict";_e();Rt=class extends re{}});var Pt,En=b(()=>{"use strict";Nn();Pt=class extends Rt{get type(){return"dd"}}});var vs={};se(vs,{parseTable:()=>ba});var xa,ba,As=b(()=>{"use strict";P();Ts();ks();Sn();En();xa=a=>a.lastChild.constructor!==y,ba=({firstChild:{data:a},type:r,name:e},t,n)=>{let i=[],s=a.split(`
25
25
  `),o=r==="root"||r==="parameter-value"||r==="ext-inner"&&e==="poem"?"":`
26
- ${s.shift()}`,l,p=(d,c)=>{if(!c){o+=d;return}let{lastChild:h}=c;if(fa(c)){let m=new y(d,t,n);m.type="table-inter",m.setAttribute("stage",3),c.insertAt(m)}else h.setText(h.toString()+d)},g=()=>l.type==="td"?i.pop():l;for(let d of s){l=i.pop();let[c]=/^(?:\s|\0\d+[cno]\x7F)*/u.exec(d),h=d.slice(c.length),m=/^(:*)((?:\s|\0\d+[cn]\x7F)*)(\{\||\{(?:\0\d+[cn]\x7F)*\0\d+!\x7F|\0\d+\{\x7F)(.*)$/u.exec(h);if(m){for(;l&&l.type!=="td";)l=i.pop();let[,w,L,B,j]=m;w&&new Rt(w,t,n),p(`
27
- ${c}${w&&`\0${n.length-1}d\x7F`}${L}\0${n.length}b\x7F`,l),i.push(...l?[l]:[],new qr(B,j,t,n));continue}else if(!l){o+=`
26
+ ${s.shift()}`,l,p=(d,c)=>{if(!c){o+=d;return}let{lastChild:h}=c;if(xa(c)){let m=new y(d,t,n);m.type="table-inter",m.setAttribute("stage",3),c.insertAt(m)}else h.setText(h.toString()+d)},g=()=>l.type==="td"?i.pop():l;for(let d of s){l=i.pop();let[c]=/^(?:\s|\0\d+[cno]\x7F)*/u.exec(d),h=d.slice(c.length),m=/^(:*)((?:\s|\0\d+[cn]\x7F)*)(\{\||\{(?:\0\d+[cn]\x7F)*\0\d+!\x7F|\0\d+\{\x7F)(.*)$/u.exec(h);if(m){for(;l&&l.type!=="td";)l=i.pop();let[,w,L,B,j]=m;w&&new Pt(w,t,n),p(`
27
+ ${c}${w&&`\0${n.length-1}d\x7F`}${L}\0${n.length}b\x7F`,l),i.push(...l?[l]:[],new _r(B,j,t,n));continue}else if(!l){o+=`
28
28
  ${d}`;continue}let k=/^(?:(\|\}|\0\d+!\x7F\}|\0\d+\}\x7F)|(\|-+|\0\d+!\x7F-+|\0\d+-\x7F-*)(?!-)|(!|(?:\||\0\d+!\x7F)\+?))(.*)$/u.exec(h);if(!k){p(`
29
- ${d}`,l),i.push(l);continue}let[,x,A,S,$]=k;if(x){for(;l.type!=="table";)l=i.pop();l.close(`
30
- ${c}${x}`,!0),p($,i[i.length-1])}else if(A){l=g(),l.type==="tr"&&(l=i.pop());let w=new _r(`
31
- ${c}${A}`,$,t,n);i.push(l,w),l.insertAt(w)}else{l=g();let w=S==="!"?/!!|(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu:/(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu,L=w.exec($),B=0,j=`
32
- ${c}${S}`,q=D=>{let H=new it(j,$.slice(B,L==null?void 0:L.index),t,n);return D.insertAt(H),H};for(;L;)q(l),{lastIndex:B}=w,[j]=L,L=w.exec($);i.push(l,q(l))}}return o.slice(1)}});var Or,As=b(()=>{"use strict";_e();Or=class extends re{get type(){return"hr"}}});var ws,Ln,ba,ot,Ss=b(()=>{"use strict";Xe();F();_e();ws=[ue()];ot=class extends(ba=re){get type(){return"double-underscore"}constructor(r,e,t=f.getConfig(),n){super(r,t,n)}getAttribute(r){return r==="padding"?2:super.getAttribute(r)}toString(){return`__${this.innerText}__`}print(){return super.print({pre:"__",post:"__"})}};Ln=le(ba),ot=ge(Ln,0,"DoubleUnderscoreToken",ws,ot),de(Ln,1,ot)});var Cs={};se(Cs,{parseHrAndDoubleUnderscore:()=>Ta});var Ta,$s=b(()=>{"use strict";As();Ss();un();Ta=({firstChild:{data:a},type:r,name:e},t,n)=>{var l;let{doubleUnderscore:i}=t,s=new Set(i[0]),o=new Set(i[1]);return(l=t.regexHrAndDoubleUnderscore)!=null||(t.regexHrAndDoubleUnderscore=new RegExp(`__(${[...s,...o].join("|")})__`,"giu")),r!=="root"&&(r!=="ext-inner"||e!=="poem")&&(a=`\0${a}`),a=a.replace(/^((?:\0\d+[cno]\x7F)*)(-{4,})/gmu,(p,g,d)=>(new Or(d,t,n),`${g}\0${n.length-1}r\x7F`)).replace(t.regexHrAndDoubleUnderscore,(p,g)=>{var m,k;let d=o.has(g),c=g.toLowerCase(),h=s.has(c);return d||h?(new ot(g,d,t,n),`\0${n.length-1}${h&&((k=(m=i[2])==null?void 0:m[c])!=null?k:c)==="toc"?"u":"n"}\x7F`):p}).replace(/^((?:\0\d+[cn]\x7F)*)(={1,6})(.+)\2((?:\s|\0\d+[cn]\x7F)*)$/gmu,(p,g,d,c,h)=>{let m=`${g}\0${n.length}h\x7F`;return new kt(d.length,[c,h],t,n),m}),r==="root"||r==="ext-inner"&&e==="poem"?a:a.slice(1)}});var Mr,Ns=b(()=>{"use strict";_();Q();F();_e();Mr=class extends re{get type(){return"quote"}get bold(){return this.innerText.length!==2}get italic(){return this.innerText.length!==3}text(){let{parentNode:r,innerText:e}=this;return(r==null?void 0:r.type)==="image-parameter"&&r.name!=="caption"?"":e}lint(r=this.getAbsoluteIndex()){let{previousSibling:e,nextSibling:t,bold:n}=this,i=f.msg('lonely "$1"',"'"),s=[],o=new E(this,r),l,p=(g,d,c)=>({desc:"escape",range:[g,d],text:"&apos;".repeat(c)});if((e==null?void 0:e.type)==="text"&&e.data.endsWith("'")){l=N(this,o,"lonely-apos",i);let{startIndex:g,startLine:d,startCol:c}=l,[,{length:h}]=/(?:^|[^'])('+)$/u.exec(e.data),m=r-h;s.push({...l,startIndex:m,endIndex:g,startCol:c-h,endLine:d,endCol:c,suggestions:[p(m,g,h)]})}if((t==null?void 0:t.type)==="text"&&t.data.startsWith("'")){l!=null||(l=N(this,o,"lonely-apos",i));let{endIndex:g,endLine:d,endCol:c}=l,[{length:h}]=/^'+/u.exec(t.data),m=g+h;s.push({...l,startIndex:g,endIndex:m,startLine:d,startCol:c,endCol:c+h,suggestions:[p(g,m,h)]})}return n&&this.closest("heading-title")&&s.push(N(this,o,"bold-header","bold in section header","warning")),s}json(){let r=super.json();return Object.assign(r,{bold:this.bold,italic:this.italic}),r}}});var Es={};se(Es,{parseQuotes:()=>In});var In,Fn=b(()=>{"use strict";Ns();In=(a,r,e)=>{var g;let t=a.split(/('{2,})/u),{length:n}=t;if(n===1)return a;let i=0,s=0,o,l,p;for(let d=1;d<n;d+=2){let c=t[d].length;switch(c){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&&p===void 0&&(p=d):t[d-1].slice(-2,-1)===" "?o=d:l!=null||(l=d);break;default:t[d-1]+="'".repeat(c-5),t[d]="'''''",s++,i++}}if(s%2===1&&i%2===1){let d=(g=o!=null?o:l)!=null?g:p;d!==void 0&&(t[d]="''",t[d-1]+="'")}for(let d=1;d<n;d+=2)new Mr(t[d],r,e),t[d]=`\0${e.length-1}q\x7F`;return t.join("")}});var Ls={};se(Ls,{parseExternalLinks:()=>Rn});var Rn,Pn=b(()=>{"use strict";J();Tn();Ir();Rn=(a,r,e,t)=>{var n;return(n=r.regexExternalLinks)!=null||(r.regexExternalLinks=new RegExp(String.raw`\[(\0\d+f\x7F|(?:(?:${r.protocol}|//)${Ae}|\0\d+m\x7F)${we}(?=[[\]<>"\t\p{Zs}]|\0\d))(\p{Zs}*(?!\p{Zs}))([^\]\x01-\x08\x0A-\x1F\uFFFD]*)\]`,"giu")),a.replace(r.regexExternalLinks,(i,s,o,l)=>{let{length:p}=e,g=/&[lg]t;/u.exec(s);return g&&(s=s.slice(0,g.index),o="",l=s.slice(g.index)+o+l),t?(new Le(s,"ext-link-url",r,e),`[\0${p}f\x7F${o}${l}]`):(new Ct(s,o,l,r,e),`\0${p}w\x7F`)})}});var Gr,Is=b(()=>{"use strict";Ht();Gr=class extends Ce{get type(){return"category"}}});var Rs={};se(Rs,{parseLinks:()=>Fs});var ya,Fs,Ps=b(()=>{"use strict";F();Fn();Pn();bn();fn();Is();ya=/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(\||\0\d+!\x7F)(.*)$/su,Fs=(a,r,e)=>{var s;(s=r.regexLinks)!=null||(r.regexLinks=new RegExp(String.raw`^\s*(?:${r.protocol}|//)`,"iu"));let t=r.inExt?/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(?:(\||\0\d+!\x7F)(.*?[^\]]))?\]\](.*)$/su:/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(?:(\||\0\d+!\x7F)(.*?[^\]])?)?\]\](.*)$/su,n=a.split("[["),i=n.shift();for(let o=0;o<n.length;o++){let l=!1,p,g,d,c,h=n[o],m=t.exec(h);if(m)[,p,g,d,c]=m,c.startsWith("]")&&(d!=null&&d.includes("["))&&(d+="]",c=c.slice(1));else{let L=ya.exec(h);L&&(l=!0,[,p,g,d]=L)}if(p===void 0||r.regexLinks.test(p)||/\0\d+[exhbru]\x7F/u.test(p)){i+=`[[${h}`;continue}let k=p.trim().startsWith(":");if(k&&l){i+=`[[${h}`;continue}let x=f.normalizeTitle(p,0,!1,r,!0,!0,!0),{ns:A,valid:S,interwiki:$}=x;if(S){if(l){if($||A!==6){i+=`[[${h}`;continue}let L=!1;for(o++;o<n.length;o++){let B=n[o],j=B.split("]]");if(j.length>2){L=!0,d+=`[[${j[0]}]]${j[1]}`,c=j.slice(2).join("]]");break}else if(j.length===2)d+=`[[${j[0]}]]${j[1]}`;else{d+=`[[${B}`;break}}if(d=Fs(d,r,e),!L){i+=`[[${p}${g}${d}`;continue}}}else{i+=`[[${h}`;continue}d&&(d=In(d,r,e));let w=St;k||(!$&&A===6?(d&&(d=Rn(d,r,e,!0)),w=At):!$&&A===14&&(w=Gr)),d===void 0&&g&&(d=""),i+=`\0${e.length}l\x7F${c}`,new w(p,d,r,e,g)}return i}});var _s={};se(_s,{parseMagicLinks:()=>va});var qs,Bs,js,ka,va,Os=b(()=>{"use strict";J();Ir();qs=String.raw`[\p{Zs}\t]|&nbsp;|&#0*160;|&#x0*a0;`,Bs=`(?:${qs})+`,js=`(?:${qs}|-)`,ka=String.raw`(?:RFC|PMID)${Bs}\d+\b|ISBN${Bs}(?:97[89]${js}?)?(?:\d${js}?){9}[\dx]\b`,va=(a,r,e)=>{var t;return(t=r.regexMagicLinks)!=null||(r.regexMagicLinks=new RegExp(String.raw`(^|[^\p{L}\d_])(?:(?:${r.protocol})(${Ae}${we})|${ka})`,"giu")),a.replace(r.regexMagicLinks,(n,i,s)=>{let o=i?n.slice(i.length):n;if(s){let l="",p=/&(?:lt|gt|nbsp|#x0*(?:3[ce]|a0)|#0*(?:6[02]|160));/iu.exec(o);p&&(l=o.slice(p.index),o=o.slice(0,p.index));let g=o.includes("(")?/[^,;\\.:!?][,;\\.:!?]+$/u:/[^,;\\.:!?)][,;\\.:!?)]+$/u,d=g.exec(o);if(d){let c=1;d[0][1]===";"&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(o.slice(0,d.index))&&(c=2),l=o.slice(d.index+c)+l,o=o.slice(0,d.index+c)}return l.length>=s.length?n:(new Le(o,void 0,r,e),`${i}\0${e.length-1}w\x7F${l}`)}else if(!/^(?:RFC|PMID|ISBN)/u.test(o))return n;return new Le(o,"magic-link",r,e),`${i}\0${e.length-1}i\x7F`})}});var Ms,Gs=b(()=>{"use strict";Ms=(a,r)=>a.startsWith(r)?r.length:[...r].findIndex((e,t)=>e!==a[t])});var zr,zs=b(()=>{"use strict";Nn();zr=class extends Ft{get type(){return"list"}}});var Ws={};se(Ws,{parseList:()=>Aa});var Aa,Us=b(()=>{"use strict";Gs();zs();En();Aa=(a,r,e,t)=>{let n=/^((?:\0\d+[cno]\x7F)*)([;:*#]+\s*)/u.exec(a);if(!n)return r.lastPrefix="",a;let[i,s,o]=n,l=o.replace(/;/gu,":"),p=Ms(l,r.lastPrefix),g=(p>1?o.slice(p-1):o).split(/(?=;)/u),d=g[0].startsWith(";"),c=g.length-(d?0:1);if(p>1){let q=o.slice(0,p-1);d?g.unshift(q):g[0]=q+g[0]}r.lastPrefix=l;let h=s+g.map((q,D)=>`\0${t.length+D}d\x7F`).join("")+a.slice(i.length);for(let q of g)new zr(q,e,t);if(!c)return h;let{html:[m]}=e,k=/:+|-\{|\0\d+[xq]\x7F/gu,x=k,A=x.exec(h),S=0,$=!1,w=!1,L=0,B=(q,D)=>(new Rt(q,e,t),`${h.slice(0,D)}\0${t.length-1}d\x7F${h.slice(D+q.length)}`),j=q=>{q?S&&S--:S++};for(;A&&c;){let{0:q,index:D}=A;if(q==="-{"){if(!L){let{lastIndex:H}=x;x=/-\{|\}-/gu,x.lastIndex=H}L++}else if(q==="}-"){if(L--,!L){let{lastIndex:H}=x;x=k,x.lastIndex=H}}else if(q.endsWith("x\x7F")){let{name:H,closing:ne,selfClosing:ee}=t[Number(q.slice(1,-2))];(!ee||m.includes(H))&&j(ne)}else if(q.endsWith("q\x7F")){let{bold:H,italic:ne}=t[Number(q.slice(1,-2))];H&&(j($),$=!$),ne&&(j(w),w=!w)}else if(S===0){if(q.length>=c)return B(q.slice(0,c),D);c-=q.length,x.lastIndex=D+4+String(t.length).length,h=B(q,D)}A=x.exec(h)}return h}});var Ds,Fe,Wr,Hs=b(()=>{"use strict";_();Q();F();P();Ee();Ds=new Set(["A","T","R","D","-","H","N"]),Wr=class extends y{constructor(e,t=f.getConfig(),n=[]){super(void 0,t,n,{});T(this,Fe);this.append(...e.map(i=>new G(i,"converter-flag",t,n)))}get type(){return"converter-flags"}afterBuild(){v(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(u(this,Fe).filter(e=>/\{{3}[^{}]+\}{3}/u.test(e)))}getVariantFlags(){let e=new Set(this.getAttribute("config").variants);return new Set(u(this,Fe).filter(t=>e.has(t)))}lint(e=this.getAbsoluteIndex(),t){let n=this.getVariantFlags(),i=this.getUnknownFlags(),s=new Set(u(this,Fe).filter(d=>Ds.has(d))),o=u(this,Fe).filter(d=>!d).length,l=u(this,Fe).length-i.size-o,p=super.lint(e,t);if(n.size===l||s.size===l)return p;let g=new E(this,e);for(let[d,c]of this.childNodes.entries()){let h=c.text().trim();if(h&&!n.has(h)&&!i.has(h)&&(n.size>0||!s.has(h))){let m=C(c,g,"no-ignored","invalid conversion flag");n.size===0&&Ds.has(h.toUpperCase())?m.fix={range:[m.startIndex,m.endIndex],text:h.toUpperCase()}:m.suggestions=[{desc:"remove",range:[m.startIndex-(d&&1),m.endIndex],text:""}],p.push(m)}}return p}print(){return super.print({sep:";"})}};Fe=new WeakMap});var Pt,Vs=b(()=>{"use strict";F();P();Ee();Pt=class extends y{get type(){return"converter-rule"}constructor(r,e=!0,t=f.getConfig(),n=[]){super(void 0,t,n);let i=r.indexOf(":"),s=r.slice(0,i).indexOf("=>"),o=s===-1?r.slice(0,i):r.slice(s+2,i);e&&t.variants.includes(o.trim())?(super.insertAt(new G(o,"converter-rule-variant",t,n)),super.insertAt(new G(r.slice(i+1),"converter-rule-to",t,n)),s!==-1&&super.insertAt(new G(r.slice(0,s),"converter-rule-from",t,n),0)):super.insertAt(new G(r,"converter-rule-to",t,n))}toString(r){let{childNodes:e,firstChild:t,lastChild:n}=this;return e.length===3?`${t.toString(r)}=>${e[1].toString(r)}:${n.toString(r)}`:super.toString(r,":")}text(){let{childNodes:r,firstChild:e,lastChild:t}=this;return r.length===3?`${e.text()}=>${r[1].text()}:${t.text()}`:super.text(":")}getGaps(r){return r===0&&this.length===3?2:1}print(){let{childNodes:r}=this;if(r.length===3){let[e,t,n]=r;return`<span class="wpb-converter-rule">${e.print()}=>${t.print()}:${n.print()}</span>`}return super.print({sep:":"})}}});var Ur,Xs=b(()=>{"use strict";J();F();P();Hs();Vs();Ur=class extends y{get type(){return"converter"}constructor(r,e,t=f.getConfig(),n=[]){super(void 0,t,n),this.append(new Wr(r,t,n));let[i]=e,s=i.includes(":"),o=new Pt(i,s,t,n);s&&o.length===1||!s&&e.length===2&&!te(e[1]).trim()?this.insertAt(new Pt(e.join(";"),!1,t,n)):this.append(o,...e.slice(1).map(l=>new Pt(l,!0,t,n)))}toString(r){let{childNodes:[e,...t]}=this;return`-{${e.toString(r)}${e.length>0?"|":""}${t.map(n=>n.toString(r)).join(";")}}-`}text(){let{childNodes:[r,...e]}=this;return`-{${r.text()}|${pe(e,";")}}-`}getAttribute(r){return r==="padding"?2:super.getAttribute(r)}getGaps(r){return r||this.firstChild.length>0?1:0}print(){let{childNodes:[r,...e]}=this;return`<span class="wpb-converter">-{${r.print()}${r.length>0?"|":""}${Ne(e,{sep:";"})}}-</span>`}}});var Qs={};se(Qs,{parseConverter:()=>wa});var wa,Zs=b(()=>{"use strict";Xs();wa=(a,r,e)=>{var l;(l=r.regexConverter)!=null||(r.regexConverter=new RegExp(String.raw`;(?=(?:[^;]*?=>)?\s*(?:${r.variants.join("|")})\s*:|(?:\s|\0\d+[cn]\x7F)*$)`,"u"));let t=/-\{/gu,n=/-\{|\}-/gu,i=[],s=t,o=s.exec(a);for(;o;){let{0:p,index:g}=o;if(p==="}-"){let d=i.pop(),{length:c}=e,h=a.slice(d.index+2,g),m=h.indexOf("|"),[k,x]=m===-1?[[],h]:[h.slice(0,m).split(";"),h.slice(m+1)],A=x.replace(/(&[#a-z\d]+);/giu,"$1"),S=A.split(r.regexConverter).map($=>$.replace(/\x01/gu,";"));new Ur(k,S,r,e),a=`${a.slice(0,d.index)}\0${c}v\x7F${a.slice(g+2)}`,i.length===0&&(s=t),s.lastIndex=d.index+3+String(c).length}else i.push(o),s=n,s.lastIndex=g+2;o=s.exec(a)}return a}});var Dr={};se(Dr,{Token:()=>y});var ir,fe,O,z,at,Bt,sr,M,Js,Ks,Ys,eo,to,ro,no,io,so,oo,ao,lo,Bn,y,P=b(()=>{"use strict";J();Se();be();_();F();hi();xi();Bn=class Bn extends ur{constructor(e,t=f.getConfig(),n=[],i){super();T(this,M);T(this,ir,"plain");T(this,fe,0);T(this,O);T(this,z);T(this,at);T(this,Bt,!1);T(this,sr);typeof e=="string"&&this.insertAt(e),v(this,O,t),v(this,z,n),n.push(this)}get type(){return u(this,ir)}set type(e){v(this,ir,e)}parseOnce(e=u(this,fe),t=!1){if(e<u(this,fe)||this.length===0||!this.getAttribute("plain"))return this;if(u(this,fe)>=11)return this;switch(e){case 0:if(this.type==="root"){u(this,z).pop();let n=R(this,M,Js).call(this);t&&(t=!n)}v(this,at,t),R(this,M,Ks).call(this,t);break;case 1:R(this,M,Ys).call(this);break;case 2:R(this,M,eo).call(this);break;case 3:R(this,M,to).call(this);break;case 4:R(this,M,ro).call(this);break;case 5:R(this,M,no).call(this);break;case 6:R(this,M,io).call(this);break;case 7:R(this,M,so).call(this);break;case 8:R(this,M,oo).call(this);break;case 9:R(this,M,ao).call(this);break;case 10:R(this,M,lo).call(this)}if(this.type==="root")for(let n of u(this,z))n==null||n.parseOnce(e,t);return dr(this,fe)._++,this}buildFromStr(e,t){let n=e.split(/[\0\x7F]/u).map((i,s)=>{if(s%2===0)return new Wt(i);if(isNaN(i.slice(-1)))return u(this,z)[Number(i.slice(0,-1))];throw new Error(`Failed to build! Unrecognized token: ${i}`)});return t===0?n.map(String).join(""):t===1?pe(n):n}build(){v(this,fe,11);let{length:e,firstChild:t}=this,n=t==null?void 0:t.toString();if(e===1&&t.type==="text"&&n.includes("\0")&&(this.replaceChildren(...this.buildFromStr(n)),this.normalize(),this.type==="root"))for(let i of u(this,z))i==null||i.build()}afterBuild(){if(this.type==="root")for(let e of u(this,z))e==null||e.afterBuild();v(this,Bt,!0)}parse(e=11,t){for(e=Math.min(e,11);u(this,fe)<e;)this.parseOnce(u(this,fe),t);return e&&(this.build(),this.afterBuild()),this}getAttribute(e){var t;switch(e){case"plain":return this.constructor===Bn;case"config":return u(this,O);case"include":return(t=u(this,at))!=null?t:!!u(this.getRootNode(),at);case"accum":return u(this,z);case"built":return u(this,Bt);default:return super.getAttribute(e)}}setAttribute(e,t){switch(e){case"stage":u(this,fe)===0&&this.type==="root"&&u(this,z).shift(),v(this,fe,t);break;default:super.setAttribute(e,t)}}insertAt(e,t=this.length){let n=typeof e=="string"?new Wt(e):e;return super.insertAt(n,t),n.type==="root"&&(n.type="plain"),n}normalizeTitle(e,t=0,n,i,s){return f.normalizeTitle(e,t,u(this,at),u(this,O),n,i,s)}lint(e=this.getAbsoluteIndex(),t){var i;let n=super.lint(e,t);if(this.type==="root"){let s={},o="category,html-attr#id,ext-attr#id,table-attr#id,ext-attr#name";for(let m of this.querySelectorAll(o)){let k;if(m.type==="category")k=m.name;else{let A=m.getValue();if(m.name==="id")k=`#${A===!0?"":A}`;else if(m.tag==="ref"&&A!==!0&&A&&m.parentNode.parentNode.innerText)k=`ref#${A}`;else continue}let x=s[k];x?x.add(m):s[k]=new Set([m])}for(let[m,k]of Object.entries(s))if(k.size>1&&!m.startsWith("#mw-customcollapsible-")){let x=!m.includes("#"),A=`duplicated ${x?"category":"id/name"}`,S=m.startsWith("#")?"warning":"error";n.push(...[...k].map($=>{let w=N($,{start:$.getAbsoluteIndex()},"no-duplicate",A,S);return x&&(w.suggestions=[{desc:"remove",range:[w.startIndex,w.endIndex],text:""}]),w}))}let l=/<!--\s*lint-(disable(?:(?:-next)?-line)?|enable)(\s[\sa-z,-]*)?-->/gu,p=this.toString(),g=[],d=l.exec(p),c=0,h=0;for(;d;){let{1:m,index:k}=d,x=(i=d[2])==null?void 0:i.trim();h+=p.slice(c,k).split(`
33
- `).length-1,c=k,g.push({line:h+(m==="disable-line"?0:1),from:m==="disable"?l.lastIndex:void 0,to:m==="enable"?l.lastIndex:void 0,rules:x?new Set(x.split(",").map(A=>A.trim())):void 0}),d=l.exec(p)}n=n.filter(({rule:m,startLine:k,startIndex:x})=>{let A={pos:0};for(let{line:S,from:$,to:w,rules:L}of g){if(S>k+1)break;if(L&&!L.has(m))continue;if(S===k&&$===void 0&&w===void 0)return!1;$<=x&&$>A.pos?(A.pos=$,A.type="from"):w<=x&&w>A.pos&&(A.pos=w,A.type="to")}return A.type!=="from"})}return n}toString(e,t){var s;let{rev:n}=ye,i=this.getRootNode();return!e&&i.type==="root"&&u(i,Bt)?((s=u(this,sr))!=null||v(this,sr,[n,super.toString(!1,t)]),u(this,sr)[1]):super.toString(e,t)}};ir=new WeakMap,fe=new WeakMap,O=new WeakMap,z=new WeakMap,at=new WeakMap,Bt=new WeakMap,sr=new WeakMap,M=new WeakSet,Js=function(){let{parseRedirect:e}=(Ai(),Z(vi)),t=this.firstChild.toString(),n=e(t,u(this,O),u(this,z));return n&&this.setText(n),!!n},Ks=function(e){let{parseCommentAndExt:t}=(Qt(),Z(gs));this.setText(t(this.firstChild.toString(),u(this,O),u(this,z),e))},Ys=function(){let{parseBraces:e}=(Sr(),Z(Xi)),t=this.type==="root"?this.firstChild.toString():`\0${this.firstChild.toString()}`,n=e(t,u(this,O),u(this,z));this.setText(this.type==="root"?n:n.slice(1))},eo=function(){var t;if((t=u(this,O).excludes)!=null&&t.includes("html"))return;let{parseHtml:e}=(cs(),Z(us));this.setText(e(this.firstChild.toString(),u(this,O),u(this,z)))},to=function(){var t;if((t=u(this,O).excludes)!=null&&t.includes("table"))return;let{parseTable:e}=(vs(),Z(ks));this.setText(e(this,u(this,O),u(this,z)))},ro=function(){var t;if((t=u(this,O).excludes)!=null&&t.includes("hr"))return;let{parseHrAndDoubleUnderscore:e}=($s(),Z(Cs));this.setText(e(this,u(this,O),u(this,z)))},no=function(){let{parseLinks:e}=(Ps(),Z(Rs));this.setText(e(this.firstChild.toString(),u(this,O),u(this,z)))},io=function(){var n;if((n=u(this,O).excludes)!=null&&n.includes("quote"))return;let{parseQuotes:e}=(Fn(),Z(Es)),t=this.firstChild.toString().split(`
29
+ ${d}`,l),i.push(l);continue}let[,x,A,S,C]=k;if(x){for(;l.type!=="table";)l=i.pop();l.close(`
30
+ ${c}${x}`,!0),p(C,i[i.length-1])}else if(A){l=g(),l.type==="tr"&&(l=i.pop());let w=new Or(`
31
+ ${c}${A}`,C,t,n);i.push(l,w),l.insertAt(w)}else{l=g();let w=S==="!"?/!!|(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu:/(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu,L=w.exec(C),B=0,j=`
32
+ ${c}${S}`,q=D=>{let H=new it(j,C.slice(B,L==null?void 0:L.index),t,n);return D.insertAt(H),H};for(;L;)q(l),{lastIndex:B}=w,[j]=L,L=w.exec(C);i.push(l,q(l))}}return o.slice(1)}});var Mr,ws=b(()=>{"use strict";_e();Mr=class extends re{get type(){return"hr"}}});var Ss,Ln,Ta,ot,Cs=b(()=>{"use strict";Xe();R();_e();Ss=[ue()];ot=class extends(Ta=re){get type(){return"double-underscore"}constructor(r,e,t=f.getConfig(),n){super(r,t,n)}getAttribute(r){return r==="padding"?2:super.getAttribute(r)}toString(){return`__${this.innerText}__`}print(){return super.print({pre:"__",post:"__"})}};Ln=le(Ta),ot=ge(Ln,0,"DoubleUnderscoreToken",Ss,ot),de(Ln,1,ot)});var $s={};se($s,{parseHrAndDoubleUnderscore:()=>ya});var ya,Ns=b(()=>{"use strict";ws();Cs();un();ya=({firstChild:{data:a},type:r,name:e},t,n)=>{var l;let{doubleUnderscore:i}=t,s=new Set(i[0]),o=new Set(i[1]);return(l=t.regexHrAndDoubleUnderscore)!=null||(t.regexHrAndDoubleUnderscore=new RegExp(`__(${[...s,...o].join("|")})__`,"giu")),r!=="root"&&(r!=="ext-inner"||e!=="poem")&&(a=`\0${a}`),a=a.replace(/^((?:\0\d+[cno]\x7F)*)(-{4,})/gmu,(p,g,d)=>(new Mr(d,t,n),`${g}\0${n.length-1}r\x7F`)).replace(t.regexHrAndDoubleUnderscore,(p,g)=>{var m,k;let d=o.has(g),c=g.toLowerCase(),h=s.has(c);return d||h?(new ot(g,d,t,n),`\0${n.length-1}${h&&((k=(m=i[2])==null?void 0:m[c])!=null?k:c)==="toc"?"u":"n"}\x7F`):p}).replace(/^((?:\0\d+[cn]\x7F)*)(={1,6})(.+)\2((?:\s|\0\d+[cn]\x7F)*)$/gmu,(p,g,d,c,h)=>{let m=`${g}\0${n.length}h\x7F`;return new vt(d.length,[c,h],t,n),m}),r==="root"||r==="ext-inner"&&e==="poem"?a:a.slice(1)}});var Gr,Es=b(()=>{"use strict";_();Q();R();_e();Gr=class extends re{get type(){return"quote"}get bold(){return this.innerText.length!==2}get italic(){return this.innerText.length!==3}text(){let{parentNode:r,innerText:e}=this;return(r==null?void 0:r.type)==="image-parameter"&&r.name!=="caption"?"":e}lint(r=this.getAbsoluteIndex()){let{previousSibling:e,nextSibling:t,bold:n}=this,i=f.msg('lonely "$1"',"'"),s=[],o=new E(this,r),l,p=(g,d,c)=>({desc:"escape",range:[g,d],text:"&apos;".repeat(c)});if((e==null?void 0:e.type)==="text"&&e.data.endsWith("'")){l=N(this,o,"lonely-apos",i);let{startIndex:g,startLine:d,startCol:c}=l,[,{length:h}]=/(?:^|[^'])('+)$/u.exec(e.data),m=r-h;s.push({...l,startIndex:m,endIndex:g,startCol:c-h,endLine:d,endCol:c,suggestions:[p(m,g,h)]})}if((t==null?void 0:t.type)==="text"&&t.data.startsWith("'")){l!=null||(l=N(this,o,"lonely-apos",i));let{endIndex:g,endLine:d,endCol:c}=l,[{length:h}]=/^'+/u.exec(t.data),m=g+h;s.push({...l,startIndex:g,endIndex:m,startLine:d,startCol:c,endCol:c+h,suggestions:[p(g,m,h)]})}return n&&this.closest("heading-title")&&s.push(N(this,o,"bold-header","bold in section header","warning")),s}json(){let r=super.json();return Object.assign(r,{bold:this.bold,italic:this.italic}),r}}});var Ls={};se(Ls,{parseQuotes:()=>In});var In,Fn=b(()=>{"use strict";Es();In=(a,r,e)=>{var g;let t=a.split(/('{2,})/u),{length:n}=t;if(n===1)return a;let i=0,s=0,o,l,p;for(let d=1;d<n;d+=2){let c=t[d].length;switch(c){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&&p===void 0&&(p=d):t[d-1].slice(-2,-1)===" "?o=d:l!=null||(l=d);break;default:t[d-1]+="'".repeat(c-5),t[d]="'''''",s++,i++}}if(s%2===1&&i%2===1){let d=(g=o!=null?o:l)!=null?g:p;d!==void 0&&(t[d]="''",t[d-1]+="'")}for(let d=1;d<n;d+=2)new Gr(t[d],r,e),t[d]=`\0${e.length-1}q\x7F`;return t.join("")}});var Is={};se(Is,{parseExternalLinks:()=>Rn});var Rn,Pn=b(()=>{"use strict";J();Tn();Fr();Rn=(a,r,e,t)=>{var n;return(n=r.regexExternalLinks)!=null||(r.regexExternalLinks=new RegExp(String.raw`\[(\0\d+f\x7F|(?:(?:${r.protocol}|//)${Ae}|\0\d+m\x7F)${we}(?=[[\]<>"\t\p{Zs}]|\0\d))(\p{Zs}*(?!\p{Zs}))([^\]\x01-\x08\x0A-\x1F\uFFFD]*)\]`,"giu")),a.replace(r.regexExternalLinks,(i,s,o,l)=>{let{length:p}=e,g=/&[lg]t;/u.exec(s);return g&&(s=s.slice(0,g.index),o="",l=s.slice(g.index)+o+l),t?(new Le(s,"ext-link-url",r,e),`[\0${p}f\x7F${o}${l}]`):(new $t(s,o,l,r,e),`\0${p}w\x7F`)})}});var zr,Fs=b(()=>{"use strict";Ht();zr=class extends Ce{get type(){return"category"}}});var Ps={};se(Ps,{parseLinks:()=>Rs});var ka,Rs,Bs=b(()=>{"use strict";R();Fn();Pn();bn();fn();Fs();ka=/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(\||\0\d+!\x7F)(.*)$/su,Rs=(a,r,e)=>{var s;(s=r.regexLinks)!=null||(r.regexLinks=new RegExp(String.raw`^\s*(?:${r.protocol}|//)`,"iu"));let t=r.inExt?/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(?:(\||\0\d+!\x7F)(.*?[^\]]))?\]\](.*)$/su:/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(?:(\||\0\d+!\x7F)(.*?[^\]])?)?\]\](.*)$/su,n=a.split("[["),i=n.shift();for(let o=0;o<n.length;o++){let l=!1,p,g,d,c,h=n[o],m=t.exec(h);if(m)[,p,g,d,c]=m,c.startsWith("]")&&(d!=null&&d.includes("["))&&(d+="]",c=c.slice(1));else{let L=ka.exec(h);L&&(l=!0,[,p,g,d]=L)}if(p===void 0||r.regexLinks.test(p)||/\0\d+[exhbru]\x7F/u.test(p)){i+=`[[${h}`;continue}let k=p.trim().startsWith(":");if(k&&l){i+=`[[${h}`;continue}let x=f.normalizeTitle(p,0,!1,r,!0,!0,!0),{ns:A,valid:S,interwiki:C}=x;if(S){if(l){if(C||A!==6){i+=`[[${h}`;continue}let L=!1;for(o++;o<n.length;o++){let B=n[o],j=B.split("]]");if(j.length>2){L=!0,d+=`[[${j[0]}]]${j[1]}`,c=j.slice(2).join("]]");break}else if(j.length===2)d+=`[[${j[0]}]]${j[1]}`;else{d+=`[[${B}`;break}}if(d=Rs(d,r,e),!L){i+=`[[${p}${g}${d}`;continue}}}else{i+=`[[${h}`;continue}d&&(d=In(d,r,e));let w=Ct;k||(!C&&A===6?(d&&(d=Rn(d,r,e,!0)),w=wt):!C&&A===14&&(w=zr)),d===void 0&&g&&(d=""),i+=`\0${e.length}l\x7F${c}`,new w(p,d,r,e,g)}return i}});var Os={};se(Os,{parseMagicLinks:()=>Aa});var _s,js,qs,va,Aa,Ms=b(()=>{"use strict";J();Fr();_s=String.raw`[\p{Zs}\t]|&nbsp;|&#0*160;|&#x0*a0;`,js=`(?:${_s})+`,qs=`(?:${_s}|-)`,va=String.raw`(?:RFC|PMID)${js}\d+\b|ISBN${js}(?:97[89]${qs}?)?(?:\d${qs}?){9}[\dx]\b`,Aa=(a,r,e)=>{var t;return(t=r.regexMagicLinks)!=null||(r.regexMagicLinks=new RegExp(String.raw`(^|[^\p{L}\d_])(?:(?:${r.protocol})(${Ae}${we})|${va})`,"giu")),a.replace(r.regexMagicLinks,(n,i,s)=>{let o=i?n.slice(i.length):n;if(s){let l="",p=/&(?:lt|gt|nbsp|#x0*(?:3[ce]|a0)|#0*(?:6[02]|160));/iu.exec(o);p&&(l=o.slice(p.index),o=o.slice(0,p.index));let g=o.includes("(")?/[^,;\\.:!?][,;\\.:!?]+$/u:/[^,;\\.:!?)][,;\\.:!?)]+$/u,d=g.exec(o);if(d){let c=1;d[0][1]===";"&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(o.slice(0,d.index))&&(c=2),l=o.slice(d.index+c)+l,o=o.slice(0,d.index+c)}return l.length>=s.length?n:(new Le(o,void 0,r,e),`${i}\0${e.length-1}w\x7F${l}`)}else if(!/^(?:RFC|PMID|ISBN)/u.test(o))return n;return new Le(o,"magic-link",r,e),`${i}\0${e.length-1}i\x7F`})}});var Gs,zs=b(()=>{"use strict";Gs=(a,r)=>a.startsWith(r)?r.length:[...r].findIndex((e,t)=>e!==a[t])});var Wr,Ws=b(()=>{"use strict";Nn();Wr=class extends Rt{get type(){return"list"}}});var Us={};se(Us,{parseList:()=>wa});var wa,Ds=b(()=>{"use strict";zs();Ws();En();wa=(a,r,e,t)=>{let n=/^((?:\0\d+[cno]\x7F)*)([;:*#]+\s*)/u.exec(a);if(!n)return r.lastPrefix="",a;let[i,s,o]=n,l=o.replace(/;/gu,":"),p=Gs(l,r.lastPrefix),g=(p>1?o.slice(p-1):o).split(/(?=;)/u),d=g[0].startsWith(";"),c=g.length-(d?0:1);if(p>1){let q=o.slice(0,p-1);d?g.unshift(q):g[0]=q+g[0]}r.lastPrefix=l;let h=s+g.map((q,D)=>`\0${t.length+D}d\x7F`).join("")+a.slice(i.length);for(let q of g)new Wr(q,e,t);if(!c)return h;let{html:[m]}=e,k=/:+|-\{|\0\d+[xq]\x7F/gu,x=k,A=x.exec(h),S=0,C=!1,w=!1,L=0,B=(q,D)=>(new Pt(q,e,t),`${h.slice(0,D)}\0${t.length-1}d\x7F${h.slice(D+q.length)}`),j=q=>{q?S&&S--:S++};for(;A&&c;){let{0:q,index:D}=A;if(q==="-{"){if(!L){let{lastIndex:H}=x;x=/-\{|\}-/gu,x.lastIndex=H}L++}else if(q==="}-"){if(L--,!L){let{lastIndex:H}=x;x=k,x.lastIndex=H}}else if(q.endsWith("x\x7F")){let{name:H,closing:ne,selfClosing:ee}=t[Number(q.slice(1,-2))];(!ee||m.includes(H))&&j(ne)}else if(q.endsWith("q\x7F")){let{bold:H,italic:ne}=t[Number(q.slice(1,-2))];H&&(j(C),C=!C),ne&&(j(w),w=!w)}else if(S===0){if(q.length>=c)return B(q.slice(0,c),D);c-=q.length,x.lastIndex=D+4+String(t.length).length,h=B(q,D)}A=x.exec(h)}return h}});var Hs,Fe,Ur,Vs=b(()=>{"use strict";_();Q();R();P();Ee();Hs=new Set(["A","T","R","D","-","H","N"]),Ur=class extends y{constructor(e,t=f.getConfig(),n=[]){super(void 0,t,n,{});T(this,Fe);this.append(...e.map(i=>new G(i,"converter-flag",t,n)))}get type(){return"converter-flags"}afterBuild(){v(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(u(this,Fe).filter(e=>/\{{3}[^{}]+\}{3}/u.test(e)))}getVariantFlags(){let e=new Set(this.getAttribute("config").variants);return new Set(u(this,Fe).filter(t=>e.has(t)))}lint(e=this.getAbsoluteIndex(),t){let n=this.getVariantFlags(),i=this.getUnknownFlags(),s=new Set(u(this,Fe).filter(d=>Hs.has(d))),o=u(this,Fe).filter(d=>!d).length,l=u(this,Fe).length-i.size-o,p=super.lint(e,t);if(n.size===l||s.size===l)return p;let g=new E(this,e);for(let[d,c]of this.childNodes.entries()){let h=c.text().trim();if(h&&!n.has(h)&&!i.has(h)&&(n.size>0||!s.has(h))){let m=$(c,g,"no-ignored","invalid conversion flag");n.size===0&&Hs.has(h.toUpperCase())?m.fix={range:[m.startIndex,m.endIndex],text:h.toUpperCase()}:m.suggestions=[{desc:"remove",range:[m.startIndex-(d&&1),m.endIndex],text:""}],p.push(m)}}return p}print(){return super.print({sep:";"})}};Fe=new WeakMap});var Bt,Xs=b(()=>{"use strict";R();P();Ee();Bt=class extends y{get type(){return"converter-rule"}constructor(r,e=!0,t=f.getConfig(),n=[]){super(void 0,t,n);let i=r.indexOf(":"),s=r.slice(0,i).indexOf("=>"),o=s===-1?r.slice(0,i):r.slice(s+2,i);e&&t.variants.includes(o.trim())?(super.insertAt(new G(o,"converter-rule-variant",t,n)),super.insertAt(new G(r.slice(i+1),"converter-rule-to",t,n)),s!==-1&&super.insertAt(new G(r.slice(0,s),"converter-rule-from",t,n),0)):super.insertAt(new G(r,"converter-rule-to",t,n))}toString(r){let{childNodes:e,firstChild:t,lastChild:n}=this;return e.length===3?`${t.toString(r)}=>${e[1].toString(r)}:${n.toString(r)}`:super.toString(r,":")}text(){let{childNodes:r,firstChild:e,lastChild:t}=this;return r.length===3?`${e.text()}=>${r[1].text()}:${t.text()}`:super.text(":")}getGaps(r){return r===0&&this.length===3?2:1}print(){let{childNodes:r}=this;if(r.length===3){let[e,t,n]=r;return`<span class="wpb-converter-rule">${e.print()}=>${t.print()}:${n.print()}</span>`}return super.print({sep:":"})}}});var Dr,Qs=b(()=>{"use strict";J();R();P();Vs();Xs();Dr=class extends y{get type(){return"converter"}constructor(r,e,t=f.getConfig(),n=[]){super(void 0,t,n),this.append(new Ur(r,t,n));let[i]=e,s=i.includes(":"),o=new Bt(i,s,t,n);s&&o.length===1||!s&&e.length===2&&!te(e[1]).trim()?this.insertAt(new Bt(e.join(";"),!1,t,n)):this.append(o,...e.slice(1).map(l=>new Bt(l,!0,t,n)))}toString(r){let{childNodes:[e,...t]}=this;return`-{${e.toString(r)}${e.length>0?"|":""}${t.map(n=>n.toString(r)).join(";")}}-`}text(){let{childNodes:[r,...e]}=this;return`-{${r.text()}|${pe(e,";")}}-`}getAttribute(r){return r==="padding"?2:super.getAttribute(r)}getGaps(r){return r||this.firstChild.length>0?1:0}print(){let{childNodes:[r,...e]}=this;return`<span class="wpb-converter">-{${r.print()}${r.length>0?"|":""}${Ne(e,{sep:";"})}}-</span>`}}});var Zs={};se(Zs,{parseConverter:()=>Sa});var Sa,Js=b(()=>{"use strict";Qs();Sa=(a,r,e)=>{var l;(l=r.regexConverter)!=null||(r.regexConverter=new RegExp(String.raw`;(?=(?:[^;]*?=>)?\s*(?:${r.variants.join("|")})\s*:|(?:\s|\0\d+[cn]\x7F)*$)`,"u"));let t=/-\{/gu,n=/-\{|\}-/gu,i=[],s=t,o=s.exec(a);for(;o;){let{0:p,index:g}=o;if(p==="}-"){let d=i.pop(),{length:c}=e,h=a.slice(d.index+2,g),m=h.indexOf("|"),[k,x]=m===-1?[[],h]:[h.slice(0,m).split(";"),h.slice(m+1)],A=x.replace(/(&[#a-z\d]+);/giu,"$1"),S=A.split(r.regexConverter).map(C=>C.replace(/\x01/gu,";"));new Dr(k,S,r,e),a=`${a.slice(0,d.index)}\0${c}v\x7F${a.slice(g+2)}`,i.length===0&&(s=t),s.lastIndex=d.index+3+String(c).length}else i.push(o),s=n,s.lastIndex=g+2;o=s.exec(a)}return a}});var Hr={};se(Hr,{Token:()=>y});var ir,fe,O,z,at,jt,sr,M,Ks,Ys,eo,to,ro,no,io,so,oo,ao,lo,go,Bn,y,P=b(()=>{"use strict";J();Se();be();_();R();mi();bi();Bn=class Bn extends cr{constructor(e,t=f.getConfig(),n=[],i){super();T(this,M);T(this,ir,"plain");T(this,fe,0);T(this,O);T(this,z);T(this,at);T(this,jt,!1);T(this,sr);typeof e=="string"&&this.insertAt(e),v(this,O,t),v(this,z,n),n.push(this)}get type(){return u(this,ir)}set type(e){v(this,ir,e)}parseOnce(e=u(this,fe),t=!1){if(e<u(this,fe)||this.length===0||!this.getAttribute("plain"))return this;if(u(this,fe)>=11)return this;switch(e){case 0:if(this.type==="root"){u(this,z).pop();let n=F(this,M,Ks).call(this);t&&(t=!n)}v(this,at,t),F(this,M,Ys).call(this,t);break;case 1:F(this,M,eo).call(this);break;case 2:F(this,M,to).call(this);break;case 3:F(this,M,ro).call(this);break;case 4:F(this,M,no).call(this);break;case 5:F(this,M,io).call(this);break;case 6:F(this,M,so).call(this);break;case 7:F(this,M,oo).call(this);break;case 8:F(this,M,ao).call(this);break;case 9:F(this,M,lo).call(this);break;case 10:F(this,M,go).call(this)}if(this.type==="root")for(let n of u(this,z))n==null||n.parseOnce(e,t);return dr(this,fe)._++,this}buildFromStr(e,t){let n=e.split(/[\0\x7F]/u).map((i,s)=>{if(s%2===0)return new Wt(i);if(isNaN(i.slice(-1)))return u(this,z)[Number(i.slice(0,-1))];throw new Error(`Failed to build! Unrecognized token: ${i}`)});return t===0?n.map(String).join(""):t===1?pe(n):n}build(){v(this,fe,11);let{length:e,firstChild:t}=this,n=t==null?void 0:t.toString();if(e===1&&t.type==="text"&&n.includes("\0")&&(this.replaceChildren(...this.buildFromStr(n)),this.normalize(),this.type==="root"))for(let i of u(this,z))i==null||i.build()}afterBuild(){if(this.type==="root")for(let e of u(this,z))e==null||e.afterBuild();v(this,jt,!0)}parse(e=11,t){for(e=Math.min(e,11);u(this,fe)<e;)this.parseOnce(u(this,fe),t);return e&&(this.build(),this.afterBuild()),this}getAttribute(e){var t;switch(e){case"plain":return this.constructor===Bn;case"config":return u(this,O);case"include":return(t=u(this,at))!=null?t:!!u(this.getRootNode(),at);case"accum":return u(this,z);case"built":return u(this,jt);default:return super.getAttribute(e)}}setAttribute(e,t){switch(e){case"stage":u(this,fe)===0&&this.type==="root"&&u(this,z).shift(),v(this,fe,t);break;default:super.setAttribute(e,t)}}insertAt(e,t=this.length){let n=typeof e=="string"?new Wt(e):e;return super.insertAt(n,t),n.type==="root"&&(n.type="plain"),n}normalizeTitle(e,t=0,n,i,s){return f.normalizeTitle(e,t,u(this,at),u(this,O),n,i,s)}lint(e=this.getAbsoluteIndex(),t){var i;let n=super.lint(e,t);if(this.type==="root"){let s=new Map,o="category,html-attr#id,ext-attr#id,table-attr#id,ext-attr#name";for(let m of this.querySelectorAll(o)){let k;if(m.type==="category")k=m.name;else{let A=m.getValue(),S=m.parentNode;if(m.name==="id")k=`#${A===!0?"":A}`;else if(m.tag==="ref"&&A!==!0&&A&&S.parentNode.innerText){let C=S.getAttr("group");k=`${typeof C=="string"&&C||" "}#${A}`}else continue}let x=s.get(k);x?x.add(m):s.set(k,new Set([m]))}for(let[m,k]of s)if(k.size>1&&!m.startsWith("#mw-customcollapsible-")){let x=!m.includes("#"),A=`duplicated ${x?"category":"id/name"}`,S=m.startsWith("#")?"warning":"error";n.push(...[...k].map(C=>{let w=N(C,{start:C.getAbsoluteIndex()},"no-duplicate",A,S);return x&&(w.suggestions=[{desc:"remove",range:[w.startIndex,w.endIndex],text:""}]),w}))}let l=/<!--\s*lint-(disable(?:(?:-next)?-line)?|enable)(\s[\sa-z,-]*)?-->/gu,p=this.toString(),g=[],d=l.exec(p),c=0,h=0;for(;d;){let{1:m,index:k}=d,x=(i=d[2])==null?void 0:i.trim();h+=p.slice(c,k).split(`
33
+ `).length-1,c=k,g.push({line:h+(m==="disable-line"?0:1),from:m==="disable"?l.lastIndex:void 0,to:m==="enable"?l.lastIndex:void 0,rules:x?new Set(x.split(",").map(A=>A.trim())):void 0}),d=l.exec(p)}n=n.filter(({rule:m,startLine:k,startIndex:x})=>{let A={pos:0};for(let{line:S,from:C,to:w,rules:L}of g){if(S>k+1)break;if(L&&!L.has(m))continue;if(S===k&&C===void 0&&w===void 0)return!1;C<=x&&C>A.pos?(A.pos=C,A.type="from"):w<=x&&w>A.pos&&(A.pos=w,A.type="to")}return A.type!=="from"})}return n}toString(e,t){var s;let{rev:n}=ye,i=this.getRootNode();return!e&&i.type==="root"&&u(i,jt)?((s=u(this,sr))!=null||v(this,sr,[n,super.toString(!1,t)]),u(this,sr)[1]):super.toString(e,t)}};ir=new WeakMap,fe=new WeakMap,O=new WeakMap,z=new WeakMap,at=new WeakMap,jt=new WeakMap,sr=new WeakMap,M=new WeakSet,Ks=function(){let{parseRedirect:e}=(wi(),Z(Ai)),t=this.firstChild.toString(),n=e(t,u(this,O),u(this,z));return n&&this.setText(n),!!n},Ys=function(e){let{parseCommentAndExt:t}=(Qt(),Z(ps));this.setText(t(this.firstChild.toString(),u(this,O),u(this,z),e))},eo=function(){let{parseBraces:e}=(Cr(),Z(Qi)),t=this.type==="root"?this.firstChild.toString():`\0${this.firstChild.toString()}`,n=e(t,u(this,O),u(this,z));this.setText(this.type==="root"?n:n.slice(1))},to=function(){var t;if((t=u(this,O).excludes)!=null&&t.includes("html"))return;let{parseHtml:e}=(hs(),Z(cs));this.setText(e(this.firstChild.toString(),u(this,O),u(this,z)))},ro=function(){var t;if((t=u(this,O).excludes)!=null&&t.includes("table"))return;let{parseTable:e}=(As(),Z(vs));this.setText(e(this,u(this,O),u(this,z)))},no=function(){var t;if((t=u(this,O).excludes)!=null&&t.includes("hr"))return;let{parseHrAndDoubleUnderscore:e}=(Ns(),Z($s));this.setText(e(this,u(this,O),u(this,z)))},io=function(){let{parseLinks:e}=(Bs(),Z(Ps));this.setText(e(this.firstChild.toString(),u(this,O),u(this,z)))},so=function(){var n;if((n=u(this,O).excludes)!=null&&n.includes("quote"))return;let{parseQuotes:e}=(Fn(),Z(Ls)),t=this.firstChild.toString().split(`
34
34
  `);for(let i=0;i<t.length;i++)t[i]=e(t[i],u(this,O),u(this,z));this.setText(t.join(`
35
- `))},so=function(){var t;if((t=u(this,O).excludes)!=null&&t.includes("extLink"))return;let{parseExternalLinks:e}=(Pn(),Z(Ls));this.setText(e(this.firstChild.toString(),u(this,O),u(this,z)))},oo=function(){var t;if((t=u(this,O).excludes)!=null&&t.includes("magicLink"))return;let{parseMagicLinks:e}=(Os(),Z(_s));this.setText(e(this.firstChild.toString(),u(this,O),u(this,z)))},ao=function(){var s;if((s=u(this,O).excludes)!=null&&s.includes("list"))return;let{parseList:e}=(Us(),Z(Ws)),t=this.firstChild.toString().split(`
35
+ `))},oo=function(){var t;if((t=u(this,O).excludes)!=null&&t.includes("extLink"))return;let{parseExternalLinks:e}=(Pn(),Z(Is));this.setText(e(this.firstChild.toString(),u(this,O),u(this,z)))},ao=function(){var t;if((t=u(this,O).excludes)!=null&&t.includes("magicLink"))return;let{parseMagicLinks:e}=(Ms(),Z(Os));this.setText(e(this.firstChild.toString(),u(this,O),u(this,z)))},lo=function(){var s;if((s=u(this,O).excludes)!=null&&s.includes("list"))return;let{parseList:e}=(Ds(),Z(Us)),t=this.firstChild.toString().split(`
36
36
  `),n={lastPrefix:""},i=this.type==="root"||this.type==="ext-inner"&&this.name==="poem"?0:1;for(;i<t.length;i++)t[i]=e(t[i],n,u(this,O),u(this,z));this.setText(t.join(`
37
- `))},lo=function(){if(u(this,O).variants.length>0){let{parseConverter:e}=(Zs(),Z(Qs));this.setText(e(this.firstChild.toString(),u(this,O),u(this,z)))}};y=Bn});var ye,vt,sn,Ts,hr,be=b(()=>{"use strict";ye={running:!1,run(a){let{running:r}=this;this.running=!0;try{let{Token:e}=(P(),Z(Dr)),t=a();return t instanceof e&&!t.getAttribute("built")&&t.afterBuild(),this.running=r,t}catch(e){throw this.running=r,e}},rev:0},vt=a=>r=>r.type===a,sn=(a,r,e,t=[])=>{let n=[...a.childNodes],i=n.splice(r,e,...t);a.setAttribute("childNodes",n);for(let s of t)s.setAttribute("parentNode",a);return i},Ts=(a,r)=>new Array(a).fill(void 0).map((e,t)=>r(t)),hr=(a,r)=>{Object.defineProperty(a,"name",{value:r.name})}});var go={};se(go,{Title:()=>jn});var or,ar,jt,Re,jn,po=b(()=>{"use strict";J();jn=class{constructor(r,e,t,n,i){T(this,or);T(this,ar);T(this,jt);T(this,Re);X(this,"interwiki","");X(this,"valid");X(this,"encoded",!1);let s=r.trim().startsWith("../");if(n&&r.includes("%"))try{let l=/%(?!21|3[ce]|5[bd]|7[b-d])[\da-f]{2}/iu.test(r);r=(0,gr.rawurldecode)(r),this.encoded=l}catch(l){}if(r=Mt(r).replace(/[_ ]+/gu," ").trim(),s)v(this,jt,0);else{let l=e;r.startsWith(":")&&(l=0,r=r.slice(1).trim());let p=r.split(":");if(p.length>1){let g=p[0].trim().toLowerCase(),d=Object.prototype.hasOwnProperty.call(t.nsid,g)&&t.nsid[g];d&&(l=d,r=p.slice(1).join(":").trim())}v(this,jt,l)}let o=r.indexOf("#");if(o!==-1){let l=r.slice(o+1).trimEnd();if(l.includes("%"))try{l=(0,gr.rawurldecode)(l)}catch(p){}v(this,Re,l.replace(/ /gu,"_")),r=r.slice(0,o).trim()}this.valid=!!(r||this.interwiki||i&&this.ns===0&&u(this,Re)!==void 0)&&Mt(r)===r&&!/^:|\0\d+[eh!+-]\x7F|[<>[\]{}|\n]|%[\da-f]{2}|(?:^|\/)\.{1,2}(?:$|\/)/iu.test(s?/^(?:\.\.\/)+(.*)/u.exec(r)[1]:r),this.main=r,Object.defineProperties(this,{encoded:{enumerable:!1,writable:!1}}),v(this,ar,t.namespaces)}get ns(){return u(this,jt)}get fragment(){return u(this,Re)}get main(){return u(this,or)}set main(r){r=r.replace(/_/gu," ").trim(),v(this,or,r&&r[0].toUpperCase()+r.slice(1))}get prefix(){let r=u(this,ar)[this.ns];return r+(r&&":")}get title(){return this.getRedirection()[1]}get extension(){let{main:r}=this,e=r.lastIndexOf(".");return e===-1?void 0:r.slice(e+1).toLowerCase()}toString(r){return`${r?this.title.replace(/_/gu," "):this.title}${u(this,Re)===void 0?"":`#${u(this,Re)}`}`}getRedirection(){return[!1,(this.interwiki+(this.interwiki&&":")+this.prefix+this.main).replace(/ /gu,"_")]}setFragment(r){v(this,Re,r)}};or=new WeakMap,ar=new WeakMap,jt=new WeakMap,Re=new WeakMap});var qt,uo,Sa,f,F=b(()=>{Qn();be();Se();J();qt={config:Yr,i18n:void 0,rules:Xn,getConfig(){let{doubleUnderscore:a}=this.config;return a.length>2&&a[0].length===0&&(a[0]=Object.keys(a[2])),{...Yr,...this.config,excludes:[]}},msg(a,r=""){var e,t;return a&&((t=(e=this.i18n)==null?void 0:e[a])!=null?t:a).replace("$1",this.msg(r))},normalizeTitle(a,r=0,e,t=qt.getConfig(),n,i=!1,s=!1){let{Title:o}=(po(),Z(go)),l;if(n)l=new o(a,r,t,i,s);else{let{Token:p}=(P(),Z(Dr));l=ye.run(()=>{let g=new p(a,t);g.type="root",g.parseOnce(0,e).parseOnce();let d=new o(g.toString(),r,t,i,s);for(let c of["main","fragment"]){let h=d[c];if(h!=null&&h.includes("\0")){let m=g.buildFromStr(h,1);c==="main"?d.main=m:d.setFragment(m)}}return d})}return l},parse(a,r,e=11,t=qt.getConfig()){if(a=si(a),typeof e!="number"){let s=Array.isArray(e)?e:[e];e=Math.max(...s.map(o=>Zr[o]||11))}let{Token:n}=(P(),Z(Dr));return ye.run(()=>{let s=new n(a,t);return s.type="root",s.parse(e,r)})}},uo={},Sa=new Set(["normalizeTitle","parse"]);for(let a in qt)Sa.has(a)||(uo[a]={enumerable:!1});Object.defineProperties(qt,uo);Object.assign(globalThis,{Parser:qt});f=qt});F();})();
37
+ `))},go=function(){if(u(this,O).variants.length>0){let{parseConverter:e}=(Js(),Z(Zs));this.setText(e(this.firstChild.toString(),u(this,O),u(this,z)))}};y=Bn});var ye,At,sn,ys,mr,be=b(()=>{"use strict";ye={running:!1,run(a){let{running:r}=this;this.running=!0;try{let{Token:e}=(P(),Z(Hr)),t=a();return t instanceof e&&!t.getAttribute("built")&&t.afterBuild(),this.running=r,t}catch(e){throw this.running=r,e}},rev:0},At=a=>r=>r.type===a,sn=(a,r,e,t=[])=>{let n=[...a.childNodes],i=n.splice(r,e,...t);a.setAttribute("childNodes",n);for(let s of t)s.setAttribute("parentNode",a);return i},ys=(a,r)=>new Array(a).fill(void 0).map((e,t)=>r(t)),mr=(a,r)=>{Object.defineProperty(a,"name",{value:r.name})}});var po={};se(po,{Title:()=>jn});var or,ar,qt,Re,jn,uo=b(()=>{"use strict";J();jn=class{constructor(r,e,t,n,i){T(this,or);T(this,ar);T(this,qt);T(this,Re);X(this,"interwiki","");X(this,"valid");X(this,"encoded",!1);let s=r.trim().startsWith("../");if(n&&r.includes("%"))try{let l=/%(?!21|3[ce]|5[bd]|7[b-d])[\da-f]{2}/iu.test(r);r=(0,gr.rawurldecode)(r),this.encoded=l}catch(l){}if(r=Gt(r).replace(/[_ ]+/gu," ").trim(),s)v(this,qt,0);else{let l=e;r.startsWith(":")&&(l=0,r=r.slice(1).trim());let p=r.split(":");if(p.length>1){let g=p[0].trim().toLowerCase(),d=Object.prototype.hasOwnProperty.call(t.nsid,g)&&t.nsid[g];d&&(l=d,r=p.slice(1).join(":").trim())}v(this,qt,l)}let o=r.indexOf("#");if(o!==-1){let l=r.slice(o+1).trimEnd();if(l.includes("%"))try{l=(0,gr.rawurldecode)(l)}catch(p){}v(this,Re,l.replace(/ /gu,"_")),r=r.slice(0,o).trim()}this.valid=!!(r||this.interwiki||i&&this.ns===0&&u(this,Re)!==void 0)&&Gt(r)===r&&!/^:|\0\d+[eh!+-]\x7F|[<>[\]{}|\n]|%[\da-f]{2}|(?:^|\/)\.{1,2}(?:$|\/)/iu.test(s?/^(?:\.\.\/)+(.*)/u.exec(r)[1]:r),this.main=r,Object.defineProperties(this,{encoded:{enumerable:!1,writable:!1}}),v(this,ar,t.namespaces)}get ns(){return u(this,qt)}get fragment(){return u(this,Re)}get main(){return u(this,or)}set main(r){r=r.replace(/_/gu," ").trim(),v(this,or,r&&r[0].toUpperCase()+r.slice(1))}get prefix(){let r=u(this,ar)[this.ns];return r+(r&&":")}get title(){return this.getRedirection()[1]}get extension(){let{main:r}=this,e=r.lastIndexOf(".");return e===-1?void 0:r.slice(e+1).toLowerCase()}toString(r){return`${r?this.title.replace(/_/gu," "):this.title}${u(this,Re)===void 0?"":`#${u(this,Re)}`}`}getRedirection(){return[!1,(this.interwiki+(this.interwiki&&":")+this.prefix+this.main).replace(/ /gu,"_")]}setFragment(r){v(this,Re,r)}};or=new WeakMap,ar=new WeakMap,qt=new WeakMap,Re=new WeakMap});var _t,co,Ca,f,R=b(()=>{Zn();be();Se();J();_t={config:en,i18n:void 0,rules:Qn,getConfig(){let{doubleUnderscore:a}=this.config;return a.length>2&&a[0].length===0&&(a[0]=Object.keys(a[2])),{...en,...this.config,excludes:[]}},msg(a,r=""){var e,t;return a&&((t=(e=this.i18n)==null?void 0:e[a])!=null?t:a).replace("$1",this.msg(r))},normalizeTitle(a,r=0,e,t=_t.getConfig(),n,i=!1,s=!1){let{Title:o}=(uo(),Z(po)),l;if(n)l=new o(a,r,t,i,s);else{let{Token:p}=(P(),Z(Hr));l=ye.run(()=>{let g=new p(a,t);g.type="root",g.parseOnce(0,e).parseOnce();let d=new o(g.toString(),r,t,i,s);for(let c of["main","fragment"]){let h=d[c];if(h!=null&&h.includes("\0")){let m=g.buildFromStr(h,1);c==="main"?d.main=m:d.setFragment(m)}}return d})}return l},parse(a,r,e=11,t=_t.getConfig()){if(a=oi(a),typeof e!="number"){let s=Array.isArray(e)?e:[e];e=Math.max(...s.map(o=>Jr[o]||11))}let{Token:n}=(P(),Z(Hr));return ye.run(()=>{let s=new n(a,t);return s.type="root",s.parse(e,r)})}},co={},Ca=new Set(["normalizeTitle","parse"]);for(let a in _t)Ca.has(a)||(co[a]={enumerable:!1});Object.defineProperties(_t,co);Object.assign(globalThis,{Parser:_t});f=_t});R();})();
38
38
  //# sourceMappingURL=bundle.min.js.map
@@ -94,9 +94,7 @@ transclude_1.TranscludeToken.prototype.fixDuplication =
94
94
  if (args.length <= 1) {
95
95
  continue;
96
96
  }
97
- const values =
98
- // @ts-expect-error ES2024
99
- Map.groupBy(args, (arg) => arg.getValue().trim());
97
+ const values = Map.groupBy(args, (arg) => arg.getValue().trim());
100
98
  let noMoreAnon = anonCount === 0 || !key.trim() || isNaN(key);
101
99
  const emptyArgs = values.get('') ?? [], duplicatedArgs = [...values].filter(([val, { length }]) => val && length > 1).flatMap(([, curArgs]) => {
102
100
  const anonIndex = noMoreAnon ? -1 : curArgs.findIndex(({ anon }) => anon);
package/dist/base.d.ts CHANGED
@@ -78,6 +78,7 @@ export interface AstNode {
78
78
  readonly childNodes: readonly AstNode[];
79
79
  /** 节点类型 */
80
80
  type: string;
81
+ toString(...args: unknown[]): string;
81
82
  /** Linter */
82
83
  lint(): LintError[];
83
84
  /** 以HTML格式打印 */
package/dist/index.js CHANGED
@@ -222,9 +222,9 @@ const Parser = {
222
222
  catch { }
223
223
  }
224
224
  for (const [name, filePath] of entries) {
225
- if (name in global) {
225
+ if (name in globalThis) {
226
226
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
227
- Object.assign(global, { [name]: require(filePath)[name] });
227
+ Object.assign(globalThis, { [name]: require(filePath)[name] });
228
228
  }
229
229
  }
230
230
  this.info('已重新加载Parser');
@@ -19,7 +19,7 @@ export declare abstract class AstNode implements AstNodeBase {
19
19
  data?: string | undefined;
20
20
  readonly childNodes: readonly AstNodes[];
21
21
  abstract get type(): TokenTypes | 'text';
22
- abstract set type(value: TokenTypes | 'text');
22
+ abstract set type(value: TokenTypes | "text");
23
23
  /** 可见部分 */
24
24
  text(): string;
25
25
  lint(): LintError[];
@@ -88,6 +88,8 @@ export declare abstract class AstNode implements AstNodeBase {
88
88
  getRelativeIndex(j?: number): number;
89
89
  /** 获取当前节点的绝对位置 */
90
90
  getAbsoluteIndex(): number;
91
+ /** 获取当前节点的行列位置和大小 */
92
+ getBoundingClientRect(): Dimension & Position;
91
93
  /**
92
94
  * 是否是某种类型的节点
93
95
  * @param type 节点类型
@@ -161,8 +163,6 @@ export declare abstract class AstNode implements AstNodeBase {
161
163
  * @throws `RangeError` 不在同一个语法树
162
164
  */
163
165
  compareDocumentPosition(other: AstNodes): number;
164
- /** 获取当前节点的行列位置和大小 */
165
- getBoundingClientRect(): Dimension & Position;
166
166
  /** 销毁 */
167
167
  destroy(): void;
168
168
  /**
package/dist/lib/node.js CHANGED
@@ -245,6 +245,10 @@ class AstNode {
245
245
  const { parentNode } = this;
246
246
  return parentNode ? parentNode.getAbsoluteIndex() + this.getRelativeIndex() : 0;
247
247
  }
248
+ /** 获取当前节点的行列位置和大小 */
249
+ getBoundingClientRect() {
250
+ return { ...this.#getDimension(), ...this.getRootNode().posFromIndex(this.getAbsoluteIndex()) };
251
+ }
248
252
  /** @private */
249
253
  seal(key, permanent) {
250
254
  /* NOT FOR BROWSER */
@@ -454,10 +458,6 @@ class AstNode {
454
458
  #getPosition() {
455
459
  return this.parentNode?.posFromIndex(this.getRelativeIndex()) ?? { top: 0, left: 0 };
456
460
  }
457
- /** 获取当前节点的行列位置和大小 */
458
- getBoundingClientRect() {
459
- return { ...this.#getDimension(), ...this.getRootNode().posFromIndex(this.getAbsoluteIndex()) };
460
- }
461
461
  /** 销毁 */
462
462
  destroy() {
463
463
  this.parentNode?.destroy();
package/dist/src/index.js CHANGED
@@ -446,34 +446,35 @@ class Token extends element_1.AstElement {
446
446
  index_1.default.viewOnly = true;
447
447
  let errors = super.lint(start, re);
448
448
  if (this.type === 'root') {
449
- const record = {}, selector = 'category,html-attr#id,ext-attr#id,table-attr#id,ext-attr#name';
449
+ const record = new Map(), selector = 'category,html-attr#id,ext-attr#id,table-attr#id,ext-attr#name';
450
450
  for (const cat of this.querySelectorAll(selector)) {
451
451
  let key;
452
452
  if (cat.type === 'category') {
453
453
  key = cat.name;
454
454
  }
455
455
  else {
456
- const value = cat.getValue();
456
+ const value = cat.getValue(), attrs = cat.parentNode;
457
457
  if (cat.name === 'id') {
458
458
  key = `#${value === true ? '' : value}`;
459
459
  }
460
460
  else if (cat.tag === 'ref' && value !== true && value
461
- && cat.parentNode.parentNode.innerText) {
462
- key = `ref#${value}`;
461
+ && attrs.parentNode.innerText) {
462
+ const group = attrs.getAttr('group');
463
+ key = `${typeof group === 'string' && group || ' '}#${value}`;
463
464
  }
464
465
  else {
465
466
  continue;
466
467
  }
467
468
  }
468
- const thisCat = record[key];
469
+ const thisCat = record.get(key);
469
470
  if (thisCat) {
470
471
  thisCat.add(cat);
471
472
  }
472
473
  else {
473
- record[key] = new Set([cat]);
474
+ record.set(key, new Set([cat]));
474
475
  }
475
476
  }
476
- for (const [key, value] of Object.entries(record)) {
477
+ for (const [key, value] of record) {
477
478
  if (value.size > 1 && !key.startsWith('#mw-customcollapsible-')) {
478
479
  const isCat = !key.includes('#'), msg = `duplicated ${isCat ? 'category' : 'id/name'}`, severity = key.startsWith('#') ? 'warning' : 'error';
479
480
  errors.push(...[...value].map(cat => {
@@ -59,8 +59,8 @@ class ParamTagToken extends index_2.Token {
59
59
  errors.push((0, lint_1.generateForChild)(child, rect, 'no-ignored', msg));
60
60
  }
61
61
  else {
62
- const i = grandChildren.findIndex(({ type }) => type !== 'text'), str = grandChildren.slice(0, i >= 0 ? i : undefined).map(String).join('');
63
- if (str && !(i >= 0 ? /^[a-z]+(?:\[\])?\s*(?:=|$)/iu : /^[a-z]+(?:\[\])?\s*=/iu).test(str)) {
62
+ const i = grandChildren.findIndex(({ type }) => type !== 'text'), str = grandChildren.slice(0, i === -1 ? undefined : i).map(String).join('');
63
+ if (str && !(i === -1 ? /^[a-z]+(?:\[\])?\s*=/iu : /^[a-z]+(?:\[\])?\s*(?:=|$)/iu).test(str)) {
64
64
  const e = (0, lint_1.generateForChild)(child, rect, 'no-ignored', msg);
65
65
  e.suggestions = [
66
66
  {
@@ -1,12 +1,12 @@
1
1
  (() => {
2
2
  var _a;
3
- const version = '1.13.6', src = (_a = document.currentScript) === null || _a === void 0 ? void 0 : _a.src, file = /\/extensions\/dist\/base\.(?:min\.)?js$/u, CDN = src && file.test(src)
3
+ const version = '1.13.7', src = (_a = document.currentScript) === null || _a === void 0 ? void 0 : _a.src, file = /\/extensions\/dist\/base\.(?:min\.)?js$/u, CDN = src && file.test(src)
4
4
  ? src.replace(file, '')
5
5
  : `https://testingcf.jsdelivr.net/npm/wikiparser-node@${version}`;
6
6
  const workerJS = () => {
7
7
  importScripts('$CDN/bundle/bundle.min.js');
8
8
  const entities = { '&': 'amp', '<': 'lt', '>': 'gt' };
9
- self.onmessage = ({ data }) => {
9
+ globalThis.onmessage = ({ data }) => {
10
10
  const [command, qid, wikitext, include, stage] = data;
11
11
  switch (command) {
12
12
  case 'setI18N':
@@ -162,5 +162,5 @@ const lineNumbers = (html, start = 1, paddingTop = '') => {
162
162
  }
163
163
  };
164
164
  const wikiparse = { version, CDN, id: 0, setI18N, setConfig, getConfig, print, lint, json, lineNumbers };
165
- Object.assign(window, { wikiparse });
165
+ Object.assign(globalThis, { wikiparse });
166
166
  })();
@@ -1,7 +1,7 @@
1
1
  (() => {
2
2
  const codejar = (async () => {
3
- const { CodeJar } = 'CodeJar' in window
4
- ? window
3
+ const { CodeJar } = 'CodeJar' in globalThis
4
+ ? globalThis
5
5
  : await import('https://testingcf.jsdelivr.net/npm/codejar-async');
6
6
  return (textbox, include, linenums) => {
7
7
  var _a;
@@ -88,10 +88,10 @@ _Printer_id = new WeakMap(), _Printer_preview = new WeakMap(), _Printer_textbox
88
88
  return __classPrivateFieldGet(this, _Printer_running, "f");
89
89
  }
90
90
  __classPrivateFieldSet(this, _Printer_viewportChanged, false, "f");
91
- const { include } = this, { value } = __classPrivateFieldGet(this, _Printer_textbox, "f"), { scrollHeight, offsetHeight: parentHeight, scrollTop, children: [rootNode] } = __classPrivateFieldGet(this, _Printer_preview, "f");
91
+ const { include } = this, { value } = __classPrivateFieldGet(this, _Printer_textbox, "f"), { scrollHeight, offsetHeight: parentHeight, scrollTop, children } = __classPrivateFieldGet(this, _Printer_preview, "f");
92
92
  let text = value, start = 0, end = __classPrivateFieldGet(this, _Printer_root, "f").length;
93
93
  if (scrollHeight > parentHeight) {
94
- const childNodes = [...rootNode.childNodes], headings = childNodes.filter(({ className }) => className === 'wpb-heading'), { length } = headings;
94
+ const childNodes = [...children[0].childNodes], headings = childNodes.filter(({ className }) => className === 'wpb-heading'), { length } = headings;
95
95
  if (length > 0) {
96
96
  let i = headings.findIndex(({ offsetTop, offsetHeight }) => offsetTop + offsetHeight > scrollTop);
97
97
  i = i === -1 ? length : i;
@@ -19,7 +19,7 @@ const highlight = async (ele, include, linenums, start) => {
19
19
  ele.addEventListener('keydown', e => {
20
20
  if ((e.metaKey || e.ctrlKey) && e.key === 'a') {
21
21
  e.preventDefault();
22
- const range = document.createRange(), selection = window.getSelection();
22
+ const range = document.createRange(), selection = getSelection();
23
23
  range.selectNodeContents(ele.firstChild);
24
24
  selection.removeAllRanges();
25
25
  selection.addRange(range);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wikiparser-node",
3
- "version": "1.13.6",
3
+ "version": "1.13.7",
4
4
  "description": "A Node.js parser for MediaWiki markup with AST",
5
5
  "keywords": [
6
6
  "mediawiki",
@@ -56,31 +56,31 @@
56
56
  "chalk": "^4.1.2"
57
57
  },
58
58
  "devDependencies": {
59
- "@bhsd/common": "^0.4.5",
60
- "@codemirror/lint": "^6.8.0",
61
- "@stylistic/eslint-plugin": "^2.3.0",
62
- "@stylistic/stylelint-plugin": "^2.0.0",
63
- "@types/node": "^22.9.0",
64
- "@typescript-eslint/eslint-plugin": "^7.15.0",
65
- "@typescript-eslint/parser": "^7.15.0",
59
+ "@bhsd/common": "^0.4.6",
60
+ "@codemirror/lint": "^6.8.4",
61
+ "@stylistic/eslint-plugin": "^2.11.0",
62
+ "@stylistic/stylelint-plugin": "^3.1.1",
63
+ "@types/node": "^22.10.1",
64
+ "@typescript-eslint/eslint-plugin": "^8.16.0",
65
+ "@typescript-eslint/parser": "^8.16.0",
66
66
  "codejar-async": "^4.2.5",
67
- "esbuild": "^0.21.4",
68
- "eslint": "^8.56.0",
69
- "eslint-plugin-es-x": "^8.0.0",
67
+ "esbuild": "^0.24.0",
68
+ "eslint": "^8.57.1",
69
+ "eslint-plugin-es-x": "^8.4.1",
70
70
  "eslint-plugin-eslint-comments": "^3.2.0",
71
- "eslint-plugin-jsdoc": "^48.5.2",
71
+ "eslint-plugin-jsdoc": "^50.6.0",
72
72
  "eslint-plugin-json-es": "^1.6.0",
73
- "eslint-plugin-markdown": "^4.0.1",
74
- "eslint-plugin-n": "^17.9.0",
75
- "eslint-plugin-promise": "^6.2.0",
73
+ "eslint-plugin-markdown": "4.0.1",
74
+ "eslint-plugin-n": "^17.14.0",
75
+ "eslint-plugin-promise": "^7.2.1",
76
76
  "eslint-plugin-regexp": "^2.6.0",
77
- "eslint-plugin-unicorn": "^54.0.0",
77
+ "eslint-plugin-unicorn": "^56.0.1",
78
78
  "http-server": "^14.1.0",
79
79
  "monaco-editor": "^0.52.0",
80
- "stylelint": "^16.6.1",
80
+ "stylelint": "^16.11.0",
81
81
  "stylelint-config-recommended": "^14.0.0",
82
- "typescript": "^5.5.3",
83
- "v8r": "^3.0.0"
82
+ "typescript": "^5.7.2",
83
+ "v8r": "^4.2.0"
84
84
  },
85
85
  "engines": {
86
86
  "node": ">=22.11.0"