wikiparser-node 1.16.6 → 1.17.0

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,34 +1,34 @@
1
- "use strict";(()=>{var Eo=Object.create;var ft=Object.defineProperty,Lo=Object.defineProperties,gi=Object.getOwnPropertyDescriptor,Fo=Object.getOwnPropertyDescriptors,Ro=Object.getOwnPropertyNames,li=Object.getOwnPropertySymbols;var pi=Object.prototype.hasOwnProperty,Po=Object.prototype.propertyIsEnumerable;var ui=(a,r)=>(r=Symbol[a])?r:Symbol.for("Symbol."+a),xt=a=>{throw TypeError(a)};var Cr=(a,r,e)=>r in a?ft(a,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[r]=e,Y=(a,r)=>{for(var e in r||(r={}))pi.call(r,e)&&Cr(a,e,r[e]);if(li)for(var e of li(r))Po.call(r,e)&&Cr(a,e,r[e]);return a},oe=(a,r)=>Lo(a,Fo(r)),di=(a,r)=>ft(a,"name",{value:r,configurable:!0});var y=(a,r)=>()=>(a&&(r=a(a=0)),r);var jo=(a,r)=>()=>(r||a((r={exports:{}}).exports,r),r.exports),ae=(a,r)=>{for(var e in r)ft(a,e,{get:r[e],enumerable:!0})},Bo=(a,r,e,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of Ro(r))!pi.call(a,n)&&n!==e&&ft(a,n,{get:()=>r[n],enumerable:!(t=gi(r,n))||t.enumerable});return a};var Q=a=>Bo(ft({},"__esModule",{value:!0}),a);var ee=a=>{var r;return[,,,Eo((r=a==null?void 0:a[ui("metadata")])!=null?r:null)]},ci=["class","method","getter","setter","accessor","field","value","get","set"],Yt=a=>a!==void 0&&typeof a!="function"?xt("Function expected"):a,qo=(a,r,e,t,n)=>({kind:ci[a],name:r,metadata:t,addInitializer:i=>e._?xt("Already initialized"):n.push(Yt(i||null))}),_o=(a,r)=>Cr(r,ui("metadata"),a[3]),te=(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},re=(a,r,e,t,n,i)=>{var s,o,l,u,g,d=r&7,p=!!(r&8),h=!!(r&16),m=d>3?a.length+1:d?p?1:2:0,f=ci[d+5],k=d>3&&(a[m-1]=[]),A=a[m]||(a[m]=[]),S=d&&(!h&&!p&&(n=n.prototype),d<5&&(d>3||!h)&&gi(d<4?n:{get[e](){return c(this,i)},set[e]($){return T(this,i,$)}},e));d?h&&d<4&&di(i,(d>2?"set ":d>1?"get ":"")+e):di(n,e);for(var w=t.length-1;w>=0;w--)u=qo(d,e,l={},a[3],A),d&&(u.static=p,u.private=h,g=u.access={has:h?$=>Oo(n,$):$=>e in $},d^3&&(g.get=h?$=>(d^1?c:N)($,n,d^4?i:S.get):$=>$[e]),d>2&&(g.set=h?($,F)=>T($,n,F,d^4?i:S.set):($,F)=>$[e]=F)),o=(0,t[w])(d?d<4?h?i:S[f]:d>4?void 0:{get:S.get,set:S.set}:n,u),l._=1,d^4||o===void 0?Yt(o)&&(d>4?k.unshift(o):d?h?i=o:S[f]=o:n=o):typeof o!="object"||o===null?xt("Object expected"):(Yt(s=o.get)&&(S.get=s),Yt(s=o.set)&&(S.set=s),Yt(s=o.init)&&k.unshift(s));return d||_o(a,n),S&&ft(n,e,S),h?d^4?i:S:n},ne=(a,r,e)=>Cr(a,typeof r!="symbol"?r+"":r,e),gn=(a,r,e)=>r.has(a)||xt("Cannot "+e),Oo=(a,r)=>Object(r)!==r?xt('Cannot use the "in" operator on this value'):a.has(r),c=(a,r,e)=>(gn(a,r,"read from private field"),e?e.call(a):r.get(a)),x=(a,r,e)=>r.has(a)?xt("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(a):r.set(a,e),T=(a,r,e,t)=>(gn(a,r,"write to private field"),t?t.call(a,e):r.set(a,e),e),N=(a,r,e)=>(gn(a,r,"access private method"),e);var $r=(a,r,e,t)=>({set _(n){T(a,r,n,e)},get _(){return c(a,r,t)}});var hi=(a,r,e)=>new Promise((t,n)=>{var i=l=>{try{o(e.next(l))}catch(u){n(u)}},s=l=>{try{o(e.throw(l))}catch(u){n(u)}},o=l=>l.done?t(l.value):Promise.resolve(l.value).then(i,s);o((e=e.apply(a,r)).next())});var mi,fi,xi=y(()=>{"use strict";mi=(()=>{let a={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};return Object.setPrototypeOf(a,null),a})(),fi=(()=>{let a=["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"];return Object.freeze(a),a})()});var Me,bi=y(()=>{"use strict";Me=a=>decodeURIComponent(a.replace(/%(?![\da-f]{2})/giu,"%25"))});var Se,Ti,Ie,Ee,Qe,pn,ie,yi,be,Mo,zo,Ke,ki,vi,Wo,Uo,bt,Le,H=y(()=>{"use strict";bi();Se=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,Ti=String.raw`[^[\]<>"\0-\x1F\x7F${Se}\uFFFD]`,Ie=String.raw`(?:\[[\da-f:.]+\]|${Ti})`,Ee=String.raw`(?:${Ti}|\0\d+[cn!~]\x7F)*`,Qe=(a,r)=>e=>e.replace(a,r),pn=Qe(/[\0\x7F]|\r$/gmu,""),ie=Qe(/\0\d+[cn]\x7F/gu,""),yi=Qe(/[\\{}()|.?*+^$[\]]/gu,String.raw`\$&`),be=(a,r="")=>a.map(e=>typeof e=="string"?e:e.text()).join(r),Mo={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},zo=Qe(/&(?:#(\d+|[Xx][\da-fA-F]+)|([lg]t|[LG]T|[lr]brac[ke]|nbsp|amp|AMP|quot|QUOT));/gu,(a,r,e)=>r?String.fromCodePoint(+((/^x/iu.test(r)?"0":"")+r)):Mo[e.toLowerCase()]),Ke=a=>zo(a),ki=Qe(/&#(\d+|x[\da-f]+);/giu,(a,r)=>String.fromCodePoint(+((/^x/iu.test(r)?"0":"")+r))),vi=Qe(/\n/gu,String.raw`\n`),Wo={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},Uo=a=>Qe(a,r=>`&${Wo[r]};`),bt=Uo(/[&<>]/gu),Le=(a,r={})=>{let{pre:e="",post:t="",sep:n=""}=r;return e+a.map(i=>i.print()).join(n)+t}});var Ai=jo((Ga,Go)=>{Go.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","14":"Category","828":"Module"},nsid:{"":0,file:6,template:10,category:14,module:828},variable:["!","=","pageid","articlepath","server","servername","scriptpath","stylepath"],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","#related":"related","#cscore":"cscore","#regex":"regex","#regex_var":"regex_var","#regexquote":"regexquote","#regexall":"regexall","#len":"len","#pos":"pos","#rpos":"rpos","#sub":"sub","#count":"count","#replace":"replace","#explode":"explode","#tab":"tab","#seo":"seo","#babel":"babel","#commaseparatedlist":"commaseparatedlist","#coordinates":"coordinates","#lst":"lst","#lsth":"lsth","#lstx":"lstx","#assessment":"assessment","#mentor":"mentor","#property":"property","#target":"target","#section":"section","#section-x":"section-x","#section-h":"section-h","#statements":"statements"},{"!":"!","=":"=","#FORMAL":"formal","#bcp47":"bcp47","#dir":"dir","#interwikilink":"interwikilink","#interlanguagelink":"interlanguagelink","#timef":"timef","#timefl":"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 un,Si=y(()=>{"use strict";un=Ai()});var Zt,Tt,er,tr,cn,R,K=y(()=>{"use strict";R=class{constructor(r,e){x(this,tr);x(this,Zt);x(this,Tt);x(this,er);T(this,Zt,r),T(this,Tt,e)}get start(){return c(this,Tt)}get top(){return N(this,tr,cn).call(this).top}get left(){return N(this,tr,cn).call(this).left}};Zt=new WeakMap,Tt=new WeakMap,er=new WeakMap,tr=new WeakSet,cn=function(){var r;return(r=c(this,er))!=null||T(this,er,c(this,Zt).getRootNode().posFromIndex(c(this,Tt))),c(this,er)}});var hn,wi,C,E,Fe,q=y(()=>{"use strict";we();K();P();hn=(a,r,e,t)=>({line:a+e-1,character:(e===1?r:0)+t}),wi=a=>(r,e,t,n,i="error")=>{let{start:s}=e,{top:o,left:l}=e instanceof R?e:new R(r,s),{offsetHeight:u,offsetWidth:g}=r,{startIndex:d,startLine:p,startCol:h}=a(r,s,o,l),{line:m,character:f}=hn(p,h,u,g);return{rule:t,message:b.msg(n),severity:i,startIndex:d,endIndex:d+r.toString().length,startLine:p,endLine:m,startCol:h,endCol:f}},C=wi((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}}),E=wi((a,r,e,t)=>({startIndex:r,startLine:e,startCol:t})),Fe=(a,r,e)=>{if(a)return a[1];let t=r();return e([le.rev,t]),t}});var Do,Nr,Ci=y(()=>{"use strict";Do=(a,r,e)=>{let[t,...n]=a.split("#");return(!t||t===r)&&n.every(i=>i===e)},Nr=(a,r,e)=>({type:t,name:n})=>a.split(",").some(i=>Do(i.trim(),t,n))});var rr,yt,kt,nr,ir,vt,At,sr,mn,St,fn=y(()=>{"use strict";q();we();St=class{constructor(){x(this,sr);ne(this,"childNodes",[]);x(this,rr);x(this,yt);x(this,kt);x(this,nr);x(this,ir);x(this,vt);x(this,At,{})}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get parentNode(){return c(this,rr)}get nextSibling(){return c(this,yt)}get previousSibling(){return c(this,kt)}get offsetHeight(){return N(this,sr,mn).call(this).height}get offsetWidth(){return N(this,sr,mn).call(this).width}getChildNodes(){let{childNodes:r}=this;return Object.isFrozen(r)?[...r]:r}getAttribute(r){return r==="padding"?0:this[r]}setAttribute(r,e){switch(r){case"parentNode":T(this,rr,e),e||(T(this,yt,void 0),T(this,kt,void 0));break;case"nextSibling":T(this,yt,e);break;case"previousSibling":T(this,kt,e);break;case"aIndex":T(this,vt,[le.rev,e]);break;default:this[r]=e}}getRootNode(){return Fe(c(this,ir),()=>{var r,e;return(e=(r=this.parentNode)==null?void 0:r.getRootNode())!=null?e:this},r=>{let[,e]=r;e.type==="root"&&T(this,ir,r)})}indexFromPos(r,e){}posFromIndex(r){let{length:e}=String(this);if(r+=r<0?e:0,r>=0&&r<=e){let t=this.getLines(),n=t.findIndex(([,,i])=>r<=i);return{top:n,left:r-t[n][1]}}}getGaps(r){return 0}getRelativeIndex(r){if(r===void 0){let{parentNode:e}=this;return e?e.getRelativeIndex(e.childNodes.indexOf(this)):0}return Fe(c(this,At)[r],()=>{let{childNodes:e}=this,t=r+(r<0?e.length:0),n=this.getAttribute("padding");for(let i=0;i<t;i++)c(this,At)[i]=[le.rev,n],n+=e[i].toString().length+this.getGaps(i);return n},e=>{c(this,At)[r]=e})}getAbsoluteIndex(){return Fe(c(this,vt),()=>{let{parentNode:r}=this;return r?r.getAbsoluteIndex()+this.getRelativeIndex():0},r=>{T(this,vt,r)})}getBoundingClientRect(){}seal(r,e){Object.defineProperty(this,r,{enumerable:!e&&!!this[r],configurable:!0})}is(r){return this.type===r}getLines(){return Fe(c(this,nr),()=>{let r=[],e=0;for(let t of String(this).split(`
2
- `)){let n=e+t.length;r.push([t,e,n]),e=n+1}return r},r=>{T(this,nr,r)})}};rr=new WeakMap,yt=new WeakMap,kt=new WeakMap,nr=new WeakMap,ir=new WeakMap,vt=new WeakMap,At=new WeakMap,sr=new WeakSet,mn=function(){let r=this.getLines(),e=r[r.length-1];return{height:r.length,width:e[2]-e[1]}}});var ze,xn,bn,Ir,$i=y(()=>{"use strict";H();we();Ci();fn();Ir=class extends St{constructor(){super(...arguments);x(this,ze)}get length(){return this.childNodes.length}text(e){return be(this.childNodes,e)}normalize(){let e=this.getChildNodes(),t=n=>{var i,s;e.splice(n,1),(i=e[n-1])==null||i.setAttribute("nextSibling",e[n]),(s=e[n])==null||s.setAttribute("previousSibling",e[n-1])};for(let n=e.length-1;n>=0;n--){let{type:i,data:s}=e[n];i!=="text"||e.length===1||this.getGaps(n-(n&&1))||s===""&&t(n)}this.setAttribute("childNodes",e)}removeAt(e){return Tn(this,e,1)[0]}insertAt(e,t=this.length){return Tn(this,t,0,[e]),e}closest(e){let t=Nr(e,this),{parentNode:n}=this;for(;n;){if(t(n))return n;({parentNode:n}=n)}}querySelector(e){let t=Nr(e,this);return N(this,ze,xn).call(this,t)}querySelectorAll(e){let t=Nr(e,this);return N(this,ze,bn).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)}caretPositionFromIndex(e){}elementFromIndex(e){}elementFromPoint(e,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];o.setAttribute("aIndex",s),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}">`)+Le(this.childNodes,e)+(t===""?"":"</span>"):""}json(e,t=this.getAbsoluteIndex()){let n=oe(Y({},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();o.setAttribute("aIndex",s),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}};ze=new WeakSet,xn=function(e){var t;for(let n of this.childNodes){if(n.type==="text")continue;if(e(n))return n;let i=N(t=n,ze,xn).call(t,e);if(i)return i}},bn=function(e){var n;let t=[];for(let i of this.childNodes)i.type!=="text"&&(e(i)&&t.push(i),t.push(...N(n=i,ze,bn).call(n,e)));return t}});var yn,Ni,Ho,Vo,Xo,Qo,Ko,Jo,kn,Er,Ii,or,Ei=y(()=>{"use strict";H();q();P();fn();yn=String.raw`[${Se}\t]*`,Ni=String.raw`<\s*(?:/\s*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+|(?:rfc|pmid)(?=[-::]?${yn}\d)|isbn(?=[-::]?${yn}(?:\d(?:${yn}|-)){6})`,Ho=new RegExp(String.raw`${Ni}|https?[:/]/+`,"giu"),Vo=new RegExp(Ni,"giu"),Xo=new Set(["attr-value","ext-link-text","link-text"]),Qo={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},Ko={"<":"tag-like","[":"lonely-bracket","{":"lonely-bracket","]":"lonely-bracket","}":"lonely-bracket",h:"lonely-http",r:"lonely-http",p:"lonely-http",i:"lonely-http"},Jo=["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"];try{kn=new RegExp(String.raw`[\p{L}\d_]`,"u")}catch(a){kn=/\w/u}or=class extends St{constructor(e){super();x(this,Er);ne(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"))?ie(this.data):this.data}text(){return this.data}lint(e=this.getAbsoluteIndex(),t){var _,L,X;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:u,parentNode:g}=i,d=!1;if(l==="attr-value"){let{type:J,name:he,tag:me}=g;if(J!=="ext-attr")d=!0;else if(me==="choose"&&(he==="before"||he==="after"))return[]}if(t!=null||(t=l==="free-ext-link"||l==="ext-link-url"||l==="ext-link-text"||l==="image-parameter"&&u==="link"||d?Vo:Ho),n.search(t)===-1)return[];t.lastIndex=0;let p=[],h=s==null?void 0:s.type,m=s==null?void 0:s.name,f=o==null?void 0:o.type,k=this.getRootNode(),A=k.toString(),{ext:S,html:w}=k.getAttribute("config"),{top:$,left:F}=k.posFromIndex(e),B=new Set(["onlyinclude","noinclude","includeonly",...S,...w[0],...w[1],...w[2],...Jo]);for(let J=t.exec(n);J;J=t.exec(n)){let[,he,me]=J,{index:D}=J,W=J[0].toLowerCase();if(me&&me!=="]"){let{length:ue}=me;D+=ue,W=W.slice(ue)}let{0:I,length:ge}=W,Oe=I==="r"||I==="p"||I==="i";if(I==="<"&&!B.has(he.toLowerCase())||I==="["&&l==="ext-link-text"&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(n.slice(D+1))||s!=null&&s.is("ext")&&m==="nowiki"&&((_=s.innerText)!=null&&_.includes("]")))||Oe&&(!i.getAttribute("plain")||Xo.has(l)))continue;I==="]"&&(D||ge>1)&&t.lastIndex--;let fe=e+D,pe=fe+ge,xe=A[pe],ht=A[fe-1],an=ge>1&&!(I==="<"&&!/[\s/>]/u.test(xe!=null?xe:"")||d&&(I==="["||I==="]")||Oe&&l==="parameter-value")||I==="{"&&(xe===I||ht==="-")||I==="}"&&(ht===I||xe==="-")||I==="["&&(xe===I||l==="ext-link-text"||h==="free-ext-link"&&!n.slice(D+1).trim())||I==="]"&&(ht===I||f==="free-ext-link"&&!n.slice(0,D).includes("]"))?"error":"warning",ln=I==="{"||I==="[";if(an==="warning"&&(ln||(I==="]"||I==="}"))){let ue=Qo[I],dn=ln?n.slice(D+1):n.slice(0,D);if(I==="{"&&((L=ue.exec(dn))==null?void 0:L[0])==="}"||I==="}"&&((X=ue.exec(dn))==null?void 0:X[0])==="{")continue;if(!dn.includes(I)){let ai=ln?"nextSibling":"previousSibling",Xe=this[ai];for(;Xe&&(Xe.type!=="text"||!ue.test(Xe.data));)Xe=Xe[ai];if(Xe&&ue.exec(Xe.data)[0]!==I)continue}}Oe&&(W=W.toUpperCase());let ii=this.posFromIndex(D),{line:si,character:oi}=hn($,F,ii.top+1,ii.left),mt={rule:Ko[I],message:b.msg('lonely "$1"',Oe||I==="h"?W:I),severity:an,startIndex:fe,endIndex:pe,startLine:si,endLine:si,startCol:oi,endCol:oi+ge};if(I==="<")mt.suggestions=[{desc:"escape",range:[fe,fe+1],text:"&lt;"}];else if(I==="h"&&l!=="link-text"&&kn.test(ht||""))mt.suggestions=[{desc:"whitespace",range:[fe,fe],text:" "}];else if(I==="["&&l==="ext-link-text"){let ue=i.getAbsoluteIndex()+i.toString().length;mt.suggestions=[{desc:"escape",range:[ue,ue+1],text:"&#93;"}]}else if(I==="]"&&f==="free-ext-link"&&an==="error"){let ue=e-o.toString().length;mt.fix={range:[ue,ue],text:"[",desc:"left bracket"}}else Oe&&(mt.suggestions=[...J[0]===W?[]:[{desc:"uppercase",range:[fe,pe],text:W}],...xe===":"||xe==="\uFF1A"?[{desc:"whitespace",range:[pe,pe+1],text:" "}]:[]]);p.push(mt)}return p}replaceData(e){N(this,Er,Ii).call(this,e)}print(){return bt(this.data)}};Er=new WeakSet,Ii=function(e){this.setAttribute("data",e)}});var Te,Je=y(()=>{"use strict";we();Te=(a=!0,r=!0)=>(e,t)=>{class n extends e{text(){return""}lint(s){return a?[]:super.lint(s)}}return Lr(n,e),n}});var ar,ye,wt=y(()=>{"use strict";j();ye=class extends v{constructor(e,t,n,i,s,o){super(e,i,s,o);x(this,ar);T(this,ar,n)}get type(){return c(this,ar)}lint(e=this.getAbsoluteIndex()){return super.lint(e,!1)}};ar=new WeakMap});var Ct,z,Re=y(()=>{"use strict";j();z=class extends v{constructor(e,t,n,i,s){super(e,n,i,s);x(this,Ct);T(this,Ct,t)}get type(){return c(this,Ct)}set type(e){T(this,Ct,e)}};Ct=new WeakMap});var Yo,Ye,Ce,Pe,$e,lr=y(()=>{"use strict";q();H();K();P();j();Re();Yo=a=>a==="redirect-target"||a==="link",$e=class extends v{constructor(e,t,n=b.getConfig(),i=[],s="|"){super(void 0,n,i,{});x(this,Ye,!0);x(this,Ce);x(this,Pe);if(this.insertAt(new z(e,"link-target",n,i,{})),t!==void 0){let o=new v(t,n,i,{});o.type="link-text",o.setAttribute("stage",10),this.insertAt(o)}T(this,Ce,s)}get link(){}get fragment(){return c(this,Pe).fragment}afterBuild(){T(this,Pe,this.getTitle()),c(this,Ce).includes("\0")&&T(this,Ce,this.buildFromStr(c(this,Ce),0)),this.setAttribute("name",c(this,Pe).title),super.afterBuild()}setAttribute(e,t){e==="bracket"?T(this,Ye,t):e==="title"?T(this,Pe,t):super.setAttribute(e,t)}toString(e){let t=super.toString(e,c(this,Ce));return c(this,Ye)?`[[${t}]]`:t}text(){let e=super.text("|");return c(this,Ye)?`[[${e}]]`:e}getAttribute(e){return e==="title"?c(this,Pe):e==="padding"?2:super.getAttribute(e)}getGaps(e){return e===0?c(this,Ce).length:1}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),{childNodes:[i,s],type:o}=this,{encoded:l,fragment:u}=c(this,Pe),g=new R(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){let d=C(i,g,"url-encoding","unnecessary URL encoding in an internal link");d.suggestions=[{desc:"decode",range:[d.startIndex,d.endIndex],text:Me(i.text())}],n.push(d)}if(o==="link"||o==="category"){let d=s==null?void 0:s.childNodes.findIndex(h=>h.type==="text"&&h.data.includes("|")),p=s==null?void 0:s.childNodes[d];if(p){let h=C(s,g,"pipe-like",'additional "|" in the link text',"warning"),m=h.startIndex+s.getRelativeIndex(d);h.suggestions=[{desc:"escape",range:[m,m+p.data.length],text:p.data.replace(/\|/gu,"&#124;")}],n.push(h)}}if(u!==void 0&&!Yo(o)){let d=C(i,g,"no-ignored","useless fragment"),p=i.childNodes.findIndex(m=>m.type==="text"&&m.data.includes("#")),h=i.childNodes[p];h&&(d.fix={range:[d.startIndex+i.getRelativeIndex(p)+h.data.indexOf("#"),d.endIndex],text:"",desc:"remove"}),n.push(d)}return n}getTitle(e,t){return this.normalizeTitle(this.firstChild.toString(!0),0,e,t,!0,!0)}print(){return super.print(c(this,Ye)?{pre:"[[",post:"]]",sep:c(this,Ce)}:{sep:c(this,Ce)})}json(e,t=this.getAbsoluteIndex()){let n=super.json(void 0,t),{type:i,fragment:s}=this;return s!==void 0&&(i==="link"||i==="redirect-target")&&(n.fragment=s),n}};Ye=new WeakMap,Ce=new WeakMap,Pe=new WeakMap});var se,We=y(()=>{"use strict";j();se=class extends v{get innerText(){return this.firstChild.data}constructor(r="",e,t){super(r,e,t)}}});var Li,vn,Zo,G,Ue=y(()=>{"use strict";Je();We();Li=[Te()];G=class extends(Zo=se){get type(){return"noinclude"}toString(r){return r?"":super.toString()}};vn=ee(Zo),G=re(vn,0,"NoincludeToken",Li,G),te(vn,1,G)});var Fr,Fi=y(()=>{"use strict";q();lr();Ue();Fr=class extends $e{get type(){return"redirect-target"}constructor(r,e,t,n){super(r,void 0,t,n),e!==void 0&&this.insertAt(new G(e,t,n))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,!1,!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:"",desc:"remove"},e.push(t)}return e}}});var Ri,Ge,$t,An,ea,Ze,Pi=y(()=>{"use strict";Je();P();j();wt();Fi();Ri=[Te(!1,!1)];Ze=class extends(ea=v){constructor(e,t,n,i,s,o=b.getConfig(),l=[]){super(void 0,o,l);x(this,Ge);x(this,$t);T(this,Ge,e),T(this,$t,s);let u=new RegExp(String.raw`^(?:${o.redirection.join("|")})\s*(?::\s*)?$`,"iu");this.append(new ye(t,u,"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"?c(this,Ge).length:super.getAttribute(e)}toString(e){return c(this,Ge)+super.toString(e)+c(this,$t)}lint(e=this.getAbsoluteIndex()){return this.lastChild.lint(e+c(this,Ge).length+this.firstChild.toString().length)}print(){return super.print({pre:c(this,Ge),post:c(this,$t)})}};An=ee(ea),Ge=new WeakMap,$t=new WeakMap,Ze=re(An,0,"RedirectToken",Ri,Ze),te(An,1,Ze)});var ji={};ae(ji,{parseRedirect:()=>ta});var ta,Bi=y(()=>{"use strict";P();Pi();ta=(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&&b.normalizeTitle(t[3],0,!1,r,!0,!0,!0).valid?(a=`\0${e.length}o\x7F${a.slice(t[0].length)}`,new Ze(...t.slice(1),r,e),a):!1}});var Rr,qi=y(()=>{"use strict";j();Rr=class extends v{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 De,Nt,Sn=y(()=>{"use strict";j();Nt=class extends v{constructor(e,t,n,i,s,o=[]){super(void 0,s);x(this,De);ne(this,"closed");ne(this,"selfClosing");this.setAttribute("name",e.toLowerCase()),T(this,De,[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]=c(this,De);return t?`<${s}${n.toString(e)}/>`:`<${s}${n.toString(e)}>${i.toString(e)}${this.closed?`</${o}>`:""}`}text(){let[e,t]=c(this,De);return this.selfClosing?`<${e}${this.firstChild.text()}/>`:`<${e}${super.text(">")}${this.closed?`</${t}>`:""}`}getAttribute(e){return e==="padding"?c(this,De)[0].length+1:super.getAttribute(e)}getGaps(){return 1}print(){let[e,t]=c(this,De);return super.print(this.selfClosing?{pre:`&lt;${e}`,post:"/&gt;"}:{pre:`&lt;${e}`,sep:"&gt;",post:this.closed?`&lt;/${t}&gt;`:""})}};De=new WeakMap});var _i,wn,ra,et,Oi=y(()=>{"use strict";q();K();Je();P();Sn();_i=[Te(!1)];et=class extends(ra=Nt){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 R(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=E(this,s,"unclosed-comment",b.msg("unclosed $1",`<${i}>`));o.suggestions=[{desc:"close",range:[o.endIndex,o.endIndex],text:`</${i}>`}],e.push(o)}return e}};wn=ee(ra),et=re(wn,0,"IncludeToken",_i,et),te(wn,1,et)});var It,Pr=y(()=>{"use strict";we();It=(a=0)=>(r,e)=>{var n,Mi;class t extends r{constructor(){super(...arguments);x(this,n)}getAttr(l){return N(this,n,Mi).call(this).getAttr(l)}}return n=new WeakSet,Mi=function(){return this.childNodes[a]},Lr(t,r),t}});var V,zi,Wi,Br,Cn,Ui,Et,Gi,Di,Hi,jr,Vi,Xi,Qi,Ki,Ji=y(()=>{"use strict";V=new Set(["align"]),zi=new Set(["cite"]),Wi=new Set(["cite","datetime"]),Br=new Set(["width"]),Cn=new Set(["axis","align","bgcolor","height","width","valign"]),Ui=new Set([...Cn,"abbr","headers","scope","rowspan","colspan"]),Et=new Set(["type"]),Gi=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),Di=new Set(["clear"]),Hi=new Set(["bgcolor","align","valign"]),jr=new Set,Vi=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"]),Xi={div:V,h1:V,h2:V,h3:V,h4:V,h5:V,h6:V,blockquote:zi,q:zi,p:V,br:Di,pre:Br,ins:Wi,del:Wi,ul:Et,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...Gi,"border"]),caption:V,tr:Hi,td:Ui,th:Ui,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:Et,poem:V,categorytree:V,combooption:V},Qi={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:jr,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:jr,inputbox:jr,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:jr,poll:new Set(["id","show-results-before-voting"]),sm2:Et,flashmp3:Et,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"])},Ki={table:Gi,td:new Set([...Cn,"scope"]),th:Cn,br:Di,caption:V,div:V,hr:Br,h1:V,h2:V,h3:V,h4:V,h5:V,h6:V,li:Et,p:V,pre:Br,tr:Hi,ul:Et}});var na,dr,Lt,Z,Ne,Ft,Yi=y(()=>{"use strict";q();H();Ji();K();P();j();Re();na=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,Ft=class extends v{constructor(e,t,n,i="",s,o=[],l=b.getConfig(),u=[]){let g=new z(n,"attr-key",l,u),d;if(n==="title"||t==="img"&&n==="alt")d=new v(s,l,u,{}),d.type="attr-value",d.setAttribute("stage",10);else if(t==="gallery"&&n==="caption"||t==="choose"&&(n==="before"||n==="after")){let p=oe(Y({},l),{excludes:[...l.excludes,"heading","html","table","hr","list"]});d=new v(s,p,u,{}),d.type="attr-value",d.setAttribute("stage",1)}else d=new z(s,"attr-value",l,u,{});super(void 0,l,u);x(this,dr);x(this,Lt);x(this,Z);x(this,Ne);T(this,dr,e),this.append(g,d),T(this,Z,i),T(this,Ne,[...o]),T(this,Lt,t),this.setAttribute("name",ie(n).trim().toLowerCase())}get type(){return c(this,dr)}get tag(){return c(this,Lt)}get balanced(){return!c(this,Z)||c(this,Ne)[0]===c(this,Ne)[1]}afterBuild(){c(this,Z).includes("\0")&&T(this,Z,this.buildFromStr(c(this,Z),0)),this.parentNode&&T(this,Lt,this.parentNode.name),this.setAttribute("name",this.firstChild.toString(!0).trim().toLowerCase()),super.afterBuild()}toString(e){let[t="",n=""]=c(this,Ne);return c(this,Z)?super.toString(e,c(this,Z)+t)+n:this.firstChild.toString(e)}text(){return c(this,Z)?`${super.text(`${c(this,Z).trim()}"`)}"`:this.firstChild.text()}getGaps(){var e,t;return c(this,Z)?c(this,Z).length+((t=(e=c(this,Ne)[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:u,tag:g}=this,d=this.getValue(),p=new R(this,e);if(!i){let A=C(o,p,"unclosed-quote",b.msg("unclosed $1","quotes"),"warning");A.startIndex--,A.startCol--,A.suggestions=[{range:[A.endIndex,A.endIndex],text:c(this,Ne)[0],desc:"close"}],n.push(A)}let h=Qi[g],m=Xi[g],{length:f}=this.toString();if(!(h!=null&&h.has(u))&&!(m!=null&&m.has(u))&&(l==="ext-attr"?h||m:!/\{\{[^{]+\}\}/u.test(u))&&(l==="ext-attr"&&!m||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(u)&&(g==="meta"||g==="link"||!Vi.has(u)))){let A=C(s,p,"illegal-attr","illegal attribute name");A.suggestions=[{desc:"remove",range:[e,e+f],text:""}],n.push(A)}else if((k=Ki[g])!=null&&k.has(u))n.push(C(s,p,"obsolete-attr","obsolete attribute","warning"));else if(u==="style"&&typeof d=="string"&&na.test(d))n.push(C(o,p,"insecure-style","insecure style"));else if(u==="tabindex"&&typeof d=="string"&&d!=="0"){let A=C(o,p,"illegal-attr","nonzero tabindex");A.suggestions=[{desc:"remove",range:[e,e+f],text:""},{desc:"0 tabindex",range:[A.startIndex,A.endIndex],text:"0"}],n.push(A)}return n}getValue(){return c(this,Z)?this.lastChild.text().trim():this.type==="ext-attr"||""}print(){let[e="",t=""]=c(this,Ne);return c(this,Z)?super.print({sep:bt(c(this,Z))+e,post:t}):super.print()}};dr=new WeakMap,Lt=new WeakMap,Z=new WeakMap,Ne=new WeakMap});var Zi,ia,$n,gr,He,qr=y(()=>{"use strict";q();H();K();P();j();Re();Yi();Zi=a=>a.slice(0,-1),ia=a=>`${Zi(a)}-dirty`;try{$n=new RegExp(String.raw`[\p{L}\d]`,"u")}catch(a){$n=/[^\W_]/u}He=class extends v{constructor(e,t,n,i=b.getConfig(),s=[]){super(void 0,i,s,{});x(this,gr);if(T(this,gr,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)*)(?:(["'])([\s\S]*?)(\3|$)|(\S*)))?/gu,l="",u=o.exec(e),g=0,d=()=>{l&&(super.insertAt(new z(l,ia(t),i,s,{})),l="")};for(;u;){let{index:p,0:h,1:m,2:f,3:k,4:A,5:S,6:w}=u;if(l+=e.slice(g,p),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(ie(m).trim())){let $=A!=null?A:w,F=[k,S],B=new Ft(Zi(t),n,m,f,$,F,i,s);d(),super.insertAt(B)}else l+=h;({lastIndex:g}=o),u=o.exec(e)}l+=e.slice(g),d()}}get type(){return c(this,gr)}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 Ft&&(!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,u=new R(this,e);if((i==null?void 0:i.type)==="html"&&i.closing&&this.text().trim()){let g=E(this,u,"no-ignored","attributes of a closing tag"),d=i.getAbsoluteIndex();g.suggestions=[{desc:"remove",range:[e,g.endIndex],text:""},{desc:"open",range:[d+1,d+2],text:""}],n.push(g)}for(let g of s)if(g instanceof Ft){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 p=C(g,u,"no-ignored","containing invalid attribute",$n.test(d)?"error":"warning");p.suggestions=[{desc:"remove",range:[p.startIndex,p.endIndex],text:" "}],n.push(p)}}if(l.size>0)for(let g of l){let d=o.get(g).map(p=>{let h=p.getValue();return[p,h===!0?"":h]});n.push(...d.map(([p,h],m)=>{let f=C(p,u,"no-duplicate",b.msg("duplicated $1 attribute",g)),k={desc:"remove",range:[f.startIndex,f.endIndex],text:""};return!h||d.slice(0,m).some(([,A])=>A===h)?f.fix=k:f.suggestions=[k],f}))}return n}print(){return this.toString()?`<span class="wpb-${this.type}">${this.childNodes.map(e=>e.print(e instanceof z?{class:e.toString().trim()&&"attr-dirty"}:void 0)).join("")}</span>`:""}};gr=new WeakMap});var _r,es=y(()=>{"use strict";P();j();Ue();_r=class extends v{get type(){return"ext-inner"}constructor(r,e=b.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),u=0,g="";for(;o&&l;)new G(o[0],e,t),new G(l[0],e,t),g+=`${r.slice(u,o.index)}\0${t.length-1}n\x7F${r.slice(o.index+s,l.index)}\0${t.length}n\x7F`,u=l.index+s+1,n.lastIndex=u,o=n.exec(r),o&&(i.lastIndex=o.index+s),l=i.exec(r);r=g+r.slice(u)}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 Rt,Nn=y(()=>{"use strict";q();K();pr();P();j();Re();Rt=class extends v{get type(){return"ext-inner"}constructor(r,e,t=b.getConfig(),n=[],i){if(super(void 0,t,n,{}),e){let s=z;this.append(...e.split(`
3
- `).map(o=>i?o:tt(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,`
1
+ "use strict";(()=>{var Eo=Object.create;var xt=Object.defineProperty,Lo=Object.defineProperties,pi=Object.getOwnPropertyDescriptor,Fo=Object.getOwnPropertyDescriptors,Ro=Object.getOwnPropertyNames,di=Object.getOwnPropertySymbols;var ui=Object.prototype.hasOwnProperty,Po=Object.prototype.propertyIsEnumerable;var ci=(a,r)=>(r=Symbol[a])?r:Symbol.for("Symbol."+a),bt=a=>{throw TypeError(a)};var $r=(a,r,e)=>r in a?xt(a,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[r]=e,Y=(a,r)=>{for(var e in r||(r={}))ui.call(r,e)&&$r(a,e,r[e]);if(di)for(var e of di(r))Po.call(r,e)&&$r(a,e,r[e]);return a},ae=(a,r)=>Lo(a,Fo(r)),gi=(a,r)=>xt(a,"name",{value:r,configurable:!0});var y=(a,r)=>()=>(a&&(r=a(a=0)),r);var jo=(a,r)=>()=>(r||a((r={exports:{}}).exports,r),r.exports),le=(a,r)=>{for(var e in r)xt(a,e,{get:r[e],enumerable:!0})},Bo=(a,r,e,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of Ro(r))!ui.call(a,n)&&n!==e&&xt(a,n,{get:()=>r[n],enumerable:!(t=pi(r,n))||t.enumerable});return a};var X=a=>Bo(xt({},"__esModule",{value:!0}),a);var te=a=>{var r;return[,,,Eo((r=a==null?void 0:a[ci("metadata")])!=null?r:null)]},hi=["class","method","getter","setter","accessor","field","value","get","set"],Zt=a=>a!==void 0&&typeof a!="function"?bt("Function expected"):a,qo=(a,r,e,t,n)=>({kind:hi[a],name:r,metadata:t,addInitializer:i=>e._?bt("Already initialized"):n.push(Zt(i||null))}),_o=(a,r)=>$r(r,ci("metadata"),a[3]),re=(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},ne=(a,r,e,t,n,i)=>{var s,o,l,g,u,d=r&7,p=!!(r&8),h=!!(r&16),f=d>3?a.length+1:d?p?1:2:0,m=hi[d+5],x=d>3&&(a[f-1]=[]),v=a[f]||(a[f]=[]),S=d&&(!h&&!p&&(n=n.prototype),d<5&&(d>3||!h)&&pi(d<4?n:{get[e](){return c(this,i)},set[e]($){return b(this,i,$)}},e));d?h&&d<4&&gi(i,(d>2?"set ":d>1?"get ":"")+e):gi(n,e);for(var w=t.length-1;w>=0;w--)g=qo(d,e,l={},a[3],v),d&&(g.static=p,g.private=h,u=g.access={has:h?$=>Oo(n,$):$=>e in $},d^3&&(u.get=h?$=>(d^1?c:N)($,n,d^4?i:S.get):$=>$[e]),d>2&&(u.set=h?($,F)=>b($,n,F,d^4?i:S.set):($,F)=>$[e]=F)),o=(0,t[w])(d?d<4?h?i:S[m]:d>4?void 0:{get:S.get,set:S.set}:n,g),l._=1,d^4||o===void 0?Zt(o)&&(d>4?x.unshift(o):d?h?i=o:S[m]=o:n=o):typeof o!="object"||o===null?bt("Object expected"):(Zt(s=o.get)&&(S.get=s),Zt(s=o.set)&&(S.set=s),Zt(s=o.init)&&x.unshift(s));return d||_o(a,n),S&&xt(n,e,S),h?d^4?i:S:n},ie=(a,r,e)=>$r(a,typeof r!="symbol"?r+"":r,e),pn=(a,r,e)=>r.has(a)||bt("Cannot "+e),Oo=(a,r)=>Object(r)!==r?bt('Cannot use the "in" operator on this value'):a.has(r),c=(a,r,e)=>(pn(a,r,"read from private field"),e?e.call(a):r.get(a)),T=(a,r,e)=>r.has(a)?bt("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(a):r.set(a,e),b=(a,r,e,t)=>(pn(a,r,"write to private field"),t?t.call(a,e):r.set(a,e),e),N=(a,r,e)=>(pn(a,r,"access private method"),e);var Nr=(a,r,e,t)=>({set _(n){b(a,r,n,e)},get _(){return c(a,r,t)}});var mi=(a,r,e)=>new Promise((t,n)=>{var i=l=>{try{o(e.next(l))}catch(g){n(g)}},s=l=>{try{o(e.throw(l))}catch(g){n(g)}},o=l=>l.done?t(l.value):Promise.resolve(l.value).then(i,s);o((e=e.apply(a,r)).next())});var fi,xi,bi=y(()=>{"use strict";fi=(()=>{let a={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};return Object.setPrototypeOf(a,null),a})(),xi=(()=>{let a=["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"];return Object.freeze(a),a})()});var ze,Ti=y(()=>{"use strict";ze=a=>decodeURIComponent(a.replace(/%(?![\da-f]{2})/giu,"%25"))});var Se,yi,Ee,Le,Ke,un,se,ki,be,Mo,zo,Je,vi,Wa,Wo,Uo,Tt,Fe,Q=y(()=>{"use strict";Ti();Se=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,yi=String.raw`[^[\]<>"\0-\x1F\x7F${Se}\uFFFD]`,Ee=String.raw`(?:\[[\da-f:.]+\]|${yi})`,Le=String.raw`(?:${yi}|\0\d+[cn!~]\x7F)*`,Ke=(a,r)=>e=>e.replace(a,r),un=Ke(/[\0\x7F]|\r$/gmu,""),se=Ke(/\0\d+[cn]\x7F/gu,""),ki=Ke(/[\\{}()|.?*+^$[\]]/gu,String.raw`\$&`),be=(a,r="")=>a.map(e=>typeof e=="string"?e:e.text()).join(r),Mo={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},zo=Ke(/&(?:#(\d+|[Xx][\da-fA-F]+)|([lg]t|[LG]T|[lr]brac[ke]|nbsp|amp|AMP|quot|QUOT));/gu,(a,r,e)=>r?String.fromCodePoint(+((/^x/iu.test(r)?"0":"")+r)):Mo[e.toLowerCase()]),Je=a=>zo(a),vi=Ke(/&#(\d+|x[\da-f]+);/giu,(a,r)=>String.fromCodePoint(+((/^x/iu.test(r)?"0":"")+r))),Wa=Ke(/\n/gu,String.raw`\n`),Wo={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},Uo=a=>Ke(a,r=>`&${Wo[r]};`),Tt=Uo(/[&<>]/gu),Fe=(a,r={})=>{let{pre:e="",post:t="",sep:n=""}=r;return e+a.map(i=>i.print()).join(n)+t}});var Ai=jo((Da,Go)=>{Go.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","14":"Category","828":"Module"},nsid:{"":0,file:6,template:10,category:14,module:828},variable:["!","=","pageid","articlepath","server","servername","scriptpath","stylepath"],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","#related":"related","#cscore":"cscore","#regex":"regex","#regex_var":"regex_var","#regexquote":"regexquote","#regexall":"regexall","#len":"len","#pos":"pos","#rpos":"rpos","#sub":"sub","#count":"count","#replace":"replace","#explode":"explode","#tab":"tab","#seo":"seo","#babel":"babel","#commaseparatedlist":"commaseparatedlist","#coordinates":"coordinates","#lst":"lst","#lsth":"lsth","#lstx":"lstx","#assessment":"assessment","#mentor":"mentor","#property":"property","#target":"target","#section":"section","#section-x":"section-x","#section-h":"section-h","#statements":"statements"},{"!":"!","=":"=","#FORMAL":"formal","#bcp47":"bcp47","#dir":"dir","#interwikilink":"interwikilink","#interlanguagelink":"interlanguagelink","#timef":"timef","#timefl":"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 cn,Si=y(()=>{"use strict";cn=Ai()});var er,yt,tr,rr,hn,R,K=y(()=>{"use strict";R=class{constructor(r,e){T(this,rr);T(this,er);T(this,yt);T(this,tr);b(this,er,r),b(this,yt,e)}get start(){return c(this,yt)}get top(){return N(this,rr,hn).call(this).top}get left(){return N(this,rr,hn).call(this).left}};er=new WeakMap,yt=new WeakMap,tr=new WeakMap,rr=new WeakSet,hn=function(){var r;return(r=c(this,tr))!=null||b(this,tr,c(this,er).getRootNode().posFromIndex(c(this,yt))),c(this,tr)}});var mn,wi,C,I,we,B=y(()=>{"use strict";Te();K();q();mn=(a,r,e,t)=>({line:a+e-1,character:(e===1?r:0)+t}),wi=a=>(r,e,t,n,i="error")=>{let{start:s}=e,{top:o,left:l}=e instanceof R?e:new R(r,s),{offsetHeight:g,offsetWidth:u}=r,{startIndex:d,startLine:p,startCol:h}=a(r,s,o,l),{line:f,character:m}=mn(p,h,g,u);return{rule:t,message:A.msg(n),severity:i,startIndex:d,endIndex:d+r.toString().length,startLine:p,endLine:f,startCol:h,endCol:m}},C=wi((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}}),I=wi((a,r,e,t)=>({startIndex:r,startLine:e,startCol:t})),we=(a,r,e)=>{if(a)return a[1];let t=r();return e([Z.rev,t]),t}});var Do,Ir,Ci=y(()=>{"use strict";Do=(a,r,e)=>{let[t,...n]=a.split("#");return(!t||t===r)&&n.every(i=>i===e)},Ir=(a,r,e)=>({type:t,name:n})=>a.split(",").some(i=>Do(i.trim(),t,n))});var nr,kt,vt,ir,sr,At,St,or,fn,wt,xn=y(()=>{"use strict";B();Te();wt=class{constructor(){T(this,or);ie(this,"childNodes",[]);T(this,nr);T(this,kt);T(this,vt);T(this,ir);T(this,sr);T(this,At);T(this,St,{})}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get parentNode(){return c(this,nr)}get nextSibling(){return c(this,kt)}get previousSibling(){return c(this,vt)}get offsetHeight(){return N(this,or,fn).call(this).height}get offsetWidth(){return N(this,or,fn).call(this).width}getChildNodes(){let{childNodes:r}=this;return Object.isFrozen(r)?[...r]:r}getAttribute(r){return r==="padding"?0:this[r]}setAttribute(r,e){switch(r){case"parentNode":b(this,nr,e),e||(b(this,kt,void 0),b(this,vt,void 0));break;case"nextSibling":b(this,kt,e);break;case"previousSibling":b(this,vt,e);break;case"aIndex":b(this,At,[Z.rev,e]);break;default:this[r]=e}}getRootNode(){return we(c(this,sr),()=>{var r,e;return(e=(r=this.parentNode)==null?void 0:r.getRootNode())!=null?e:this},r=>{let[,e]=r;e.type==="root"&&b(this,sr,r)})}indexFromPos(r,e){}posFromIndex(r){let{length:e}=String(this);if(r+=r<0?e:0,r>=0&&r<=e){let t=this.getLines(),n=t.findIndex(([,,i])=>r<=i);return{top:n,left:r-t[n][1]}}}getGaps(r){return 0}getRelativeIndex(r){if(r===void 0){let{parentNode:e}=this;return e?e.getRelativeIndex(e.childNodes.indexOf(this)):0}return we(c(this,St)[r],()=>{let{childNodes:e}=this,t=r+(r<0?e.length:0),n=this.getAttribute("padding");for(let i=0;i<t;i++)c(this,St)[i]=[Z.rev,n],n+=e[i].toString().length+this.getGaps(i);return n},e=>{c(this,St)[r]=e})}getAbsoluteIndex(){return we(c(this,At),()=>{let{parentNode:r}=this;return r?r.getAbsoluteIndex()+this.getRelativeIndex():0},r=>{b(this,At,r)})}getBoundingClientRect(){}seal(r,e){Object.defineProperty(this,r,{enumerable:!e&&!!this[r],configurable:!0})}is(r){return this.type===r}getLines(){return we(c(this,ir),()=>{let r=[],e=0;for(let t of String(this).split(`
2
+ `)){let n=e+t.length;r.push([t,e,n]),e=n+1}return r},r=>{b(this,ir,r)})}};nr=new WeakMap,kt=new WeakMap,vt=new WeakMap,ir=new WeakMap,sr=new WeakMap,At=new WeakMap,St=new WeakMap,or=new WeakSet,fn=function(){let r=this.getLines(),e=r[r.length-1];return{height:r.length,width:e[2]-e[1]}}});var We,bn,Tn,Er,$i=y(()=>{"use strict";Q();Te();Ci();xn();Er=class extends wt{constructor(){super(...arguments);T(this,We)}get length(){return this.childNodes.length}text(e){return be(this.childNodes,e)}normalize(){let e=this.getChildNodes(),t=n=>{var i,s;e.splice(n,1),(i=e[n-1])==null||i.setAttribute("nextSibling",e[n]),(s=e[n])==null||s.setAttribute("previousSibling",e[n-1])};for(let n=e.length-1;n>=0;n--){let{type:i,data:s}=e[n];i!=="text"||e.length===1||this.getGaps(n-(n&&1))||s===""&&t(n)}this.setAttribute("childNodes",e)}removeAt(e){return yn(this,e,1)[0]}insertAt(e,t=this.length){return yn(this,t,0,[e]),e}closest(e){let t=Ir(e,this),{parentNode:n}=this;for(;n;){if(t(n))return n;({parentNode:n}=n)}}querySelector(e){let t=Ir(e,this);return N(this,We,bn).call(this,t)}querySelectorAll(e){let t=Ir(e,this);return N(this,We,Tn).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)}caretPositionFromIndex(e){}elementFromIndex(e){}elementFromPoint(e,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];o.setAttribute("aIndex",s),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}">`)+Fe(this.childNodes,e)+(t===""?"":"</span>"):""}json(e,t=this.getAbsoluteIndex()){let n=ae(Y({},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();o.setAttribute("aIndex",s),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}};We=new WeakSet,bn=function(e){var t;for(let n of this.childNodes){if(n.type==="text")continue;if(e(n))return n;let i=N(t=n,We,bn).call(t,e);if(i)return i}},Tn=function(e){var n;let t=[];for(let i of this.childNodes)i.type!=="text"&&(e(i)&&t.push(i),t.push(...N(n=i,We,Tn).call(n,e)));return t}});var kn,Ni,Ho,Vo,Xo,Qo,Ko,Jo,vn,Lr,Ii,ar,Ei=y(()=>{"use strict";Q();B();q();xn();kn=String.raw`[${Se}\t]*`,Ni=String.raw`<\s*(?:/\s*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+|(?:rfc|pmid)(?=[-::]?${kn}\d)|isbn(?=[-::]?${kn}(?:\d(?:${kn}|-)){6})`,Ho=new RegExp(String.raw`${Ni}|https?[:/]/+`,"giu"),Vo=new RegExp(Ni,"giu"),Xo=new Set(["attr-value","ext-link-text","link-text"]),Qo={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},Ko={"<":"tag-like","[":"lonely-bracket","{":"lonely-bracket","]":"lonely-bracket","}":"lonely-bracket",h:"lonely-http",r:"lonely-http",p:"lonely-http",i:"lonely-http"},Jo=["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"];try{vn=new RegExp(String.raw`[\p{L}\d_]`,"u")}catch(a){vn=/\w/u}ar=class extends wt{constructor(e){super();T(this,Lr);ie(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"))?se(this.data):this.data}text(){return this.data}lint(e=this.getAbsoluteIndex(),t){var _,L,V;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:g,parentNode:u}=i,d=!1;if(l==="attr-value"){let{type:J,name:he,tag:me}=u;if(J!=="ext-attr")d=!0;else if(me==="choose"&&(he==="before"||he==="after"))return[]}if(t!=null||(t=l==="free-ext-link"||l==="ext-link-url"||l==="ext-link-text"||l==="image-parameter"&&g==="link"||d?Vo:Ho),n.search(t)===-1)return[];t.lastIndex=0;let p=[],h=s==null?void 0:s.type,f=s==null?void 0:s.name,m=o==null?void 0:o.type,x=this.getRootNode(),v=x.toString(),{ext:S,html:w}=x.getAttribute("config"),{top:$,left:F}=x.posFromIndex(e),j=new Set(["onlyinclude","noinclude","includeonly",...S,...w[0],...w[1],...w[2],...Jo]);for(let J=t.exec(n);J;J=t.exec(n)){let[,he,me]=J,{index:D}=J,W=J[0].toLowerCase();if(me&&me!=="]"){let{length:ue}=me;D+=ue,W=W.slice(ue)}let{0:E,length:ge}=W,Me=E==="r"||E==="p"||E==="i";if(E==="<"&&!j.has(he.toLowerCase())||E==="["&&l==="ext-link-text"&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(n.slice(D+1))||s!=null&&s.is("ext")&&f==="nowiki"&&((_=s.innerText)!=null&&_.includes("]")))||Me&&(!i.getAttribute("plain")||Xo.has(l)))continue;E==="]"&&(D||ge>1)&&t.lastIndex--;let fe=e+D,pe=fe+ge,xe=v[pe],mt=v[fe-1],ln=ge>1&&!(E==="<"&&!/[\s/>]/u.test(xe!=null?xe:"")||d&&(E==="["||E==="]")||Me&&l==="parameter-value")||E==="{"&&(xe===E||mt==="-")||E==="}"&&(mt===E||xe==="-")||E==="["&&(xe===E||l==="ext-link-text"||h==="free-ext-link"&&!n.slice(D+1).trim())||E==="]"&&(mt===E||m==="free-ext-link"&&!n.slice(0,D).includes("]"))?"error":"warning",dn=E==="{"||E==="[";if(ln==="warning"&&(dn||(E==="]"||E==="}"))){let ue=Qo[E],gn=dn?n.slice(D+1):n.slice(0,D);if(E==="{"&&((L=ue.exec(gn))==null?void 0:L[0])==="}"||E==="}"&&((V=ue.exec(gn))==null?void 0:V[0])==="{")continue;if(!gn.includes(E)){let li=dn?"nextSibling":"previousSibling",Qe=this[li];for(;Qe&&(Qe.type!=="text"||!ue.test(Qe.data));)Qe=Qe[li];if(Qe&&ue.exec(Qe.data)[0]!==E)continue}}Me&&(W=W.toUpperCase());let si=this.posFromIndex(D),{line:oi,character:ai}=mn($,F,si.top+1,si.left),ft={rule:Ko[E],message:A.msg('lonely "$1"',Me||E==="h"?W:E),severity:ln,startIndex:fe,endIndex:pe,startLine:oi,endLine:oi,startCol:ai,endCol:ai+ge};if(E==="<")ft.suggestions=[{desc:"escape",range:[fe,fe+1],text:"&lt;"}];else if(E==="h"&&l!=="link-text"&&vn.test(mt||""))ft.suggestions=[{desc:"whitespace",range:[fe,fe],text:" "}];else if(E==="["&&l==="ext-link-text"){let ue=i.getAbsoluteIndex()+i.toString().length;ft.suggestions=[{desc:"escape",range:[ue,ue+1],text:"&#93;"}]}else if(E==="]"&&m==="free-ext-link"&&ln==="error"){let ue=e-o.toString().length;ft.fix={range:[ue,ue],text:"[",desc:"left bracket"}}else Me&&(ft.suggestions=[...J[0]===W?[]:[{desc:"uppercase",range:[fe,pe],text:W}],...xe===":"||xe==="\uFF1A"?[{desc:"whitespace",range:[pe,pe+1],text:" "}]:[]]);p.push(ft)}return p}replaceData(e){N(this,Lr,Ii).call(this,e)}print(){return Tt(this.data)}};Lr=new WeakSet,Ii=function(e){this.setAttribute("data",e)}});var ye,Ye=y(()=>{"use strict";Te();ye=(a=!0,r=!0)=>(e,t)=>{class n extends e{text(){return""}lint(s){return a?[]:super.lint(s)}}return Fr(n,e),n}});var lr,ke,Ct=y(()=>{"use strict";P();ke=class extends k{constructor(e,t,n,i,s,o){super(e,i,s,o);T(this,lr);b(this,lr,n)}get type(){return c(this,lr)}lint(e=this.getAbsoluteIndex()){return super.lint(e,!1)}};lr=new WeakMap});var $t,z,Re=y(()=>{"use strict";P();z=class extends k{constructor(e,t,n,i,s){super(e,n,i,s);T(this,$t);b(this,$t,t)}get type(){return c(this,$t)}set type(e){b(this,$t,e)}};$t=new WeakMap});var Yo,Ze,Ce,Pe,$e,dr=y(()=>{"use strict";B();Q();K();q();P();Re();Yo=a=>a==="redirect-target"||a==="link",$e=class extends k{constructor(e,t,n=A.getConfig(),i=[],s="|"){super(void 0,n,i,{});T(this,Ze,!0);T(this,Ce);T(this,Pe);if(this.insertAt(new z(e,"link-target",n,i,{})),t!==void 0){let o=new k(t,n,i,{});o.type="link-text",o.setAttribute("stage",10),this.insertAt(o)}b(this,Ce,s)}get link(){}get fragment(){return c(this,Pe).fragment}afterBuild(){b(this,Pe,this.getTitle()),c(this,Ce).includes("\0")&&b(this,Ce,this.buildFromStr(c(this,Ce),0)),this.setAttribute("name",c(this,Pe).title),super.afterBuild()}setAttribute(e,t){e==="bracket"?b(this,Ze,t):e==="title"?b(this,Pe,t):super.setAttribute(e,t)}toString(e){let t=super.toString(e,c(this,Ce));return c(this,Ze)?`[[${t}]]`:t}text(){let e=super.text("|");return c(this,Ze)?`[[${e}]]`:e}getAttribute(e){return e==="title"?c(this,Pe):e==="padding"?2:super.getAttribute(e)}getGaps(e){return e===0?c(this,Ce).length:1}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),{childNodes:[i,s],type:o}=this,{encoded:l,fragment:g}=c(this,Pe),u=new R(this,e);if(i.childNodes.some(({type:d})=>d==="template")&&n.push(C(i,u,"unknown-page","template in an internal link target","warning")),l){let d=C(i,u,"url-encoding","unnecessary URL encoding in an internal link");d.suggestions=[{desc:"decode",range:[d.startIndex,d.endIndex],text:ze(i.text())}],n.push(d)}if(o==="link"||o==="category"){let d=s==null?void 0:s.childNodes.findIndex(h=>h.type==="text"&&h.data.includes("|")),p=s==null?void 0:s.childNodes[d];if(p){let h=C(s,u,"pipe-like",'additional "|" in the link text',"warning"),f=h.startIndex+s.getRelativeIndex(d);h.suggestions=[{desc:"escape",range:[f,f+p.data.length],text:p.data.replace(/\|/gu,"&#124;")}],n.push(h)}}if(g!==void 0&&!Yo(o)){let d=C(i,u,"no-ignored","useless fragment"),p=i.childNodes.findIndex(f=>f.type==="text"&&f.data.includes("#")),h=i.childNodes[p];h&&(d.fix={range:[d.startIndex+i.getRelativeIndex(p)+h.data.indexOf("#"),d.endIndex],text:"",desc:"remove"}),n.push(d)}return n}getTitle(e,t){return this.normalizeTitle(this.firstChild.toString(!0),0,e,t,!0,!0)}print(){return super.print(c(this,Ze)?{pre:"[[",post:"]]",sep:c(this,Ce)}:{sep:c(this,Ce)})}json(e,t=this.getAbsoluteIndex()){let n=super.json(void 0,t),{type:i,fragment:s}=this;return s!==void 0&&(i==="link"||i==="redirect-target")&&(n.fragment=s),n}};Ze=new WeakMap,Ce=new WeakMap,Pe=new WeakMap});var oe,Ue=y(()=>{"use strict";P();oe=class extends k{get innerText(){return this.firstChild.data}constructor(r="",e,t){super(r,e,t)}}});var Li,An,Zo,G,Ge=y(()=>{"use strict";Ye();Ue();Li=[ye()];G=class extends(Zo=oe){get type(){return"noinclude"}toString(r){return r?"":super.toString()}};An=te(Zo),G=ne(An,0,"NoincludeToken",Li,G),re(An,1,G)});var Rr,Fi=y(()=>{"use strict";B();dr();Ge();Rr=class extends $e{get type(){return"redirect-target"}constructor(r,e,t,n){super(r,void 0,t,n),e!==void 0&&this.insertAt(new G(e,t,n))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,!1,!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:"",desc:"remove"},e.push(t)}return e}}});var Ri,De,Nt,Sn,ea,et,Pi=y(()=>{"use strict";Ye();P();Ct();Fi();Ri=[ye(!1,!1)];et=class extends(ea=k){constructor(e,t,n,i,s,o,l=[]){super(void 0,o,l);T(this,De);T(this,Nt);b(this,De,e),b(this,Nt,s);let g=new RegExp(String.raw`^(?:${o.redirection.join("|")})\s*(?::\s*)?$`,"iu");this.append(new ke(t,g,"redirect-syntax",o,l,{}),new Rr(n,i==null?void 0:i.slice(1),o,l))}get type(){return"redirect"}getAttribute(e){return e==="padding"?c(this,De).length:super.getAttribute(e)}toString(e){return c(this,De)+super.toString(e)+c(this,Nt)}lint(e=this.getAbsoluteIndex()){return this.lastChild.lint(e+c(this,De).length+this.firstChild.toString().length)}print(){return super.print({pre:c(this,De),post:c(this,Nt)})}};Sn=te(ea),De=new WeakMap,Nt=new WeakMap,et=ne(Sn,0,"RedirectToken",Ri,et),re(Sn,1,et)});var ji={};le(ji,{parseRedirect:()=>ta});var ta,Bi=y(()=>{"use strict";q();Pi();ta=(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&&A.normalizeTitle(t[3],0,!1,r,!0,!0,!0).valid?(a=`\0${e.length}o\x7F${a.slice(t[0].length)}`,new et(...t.slice(1),r,e),a):!1}});var Pr,qi=y(()=>{"use strict";P();Pr=class extends k{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 He,It,wn=y(()=>{"use strict";P();It=class extends k{constructor(e,t,n,i,s,o=[]){super(void 0,s);T(this,He);ie(this,"closed");ie(this,"selfClosing");this.setAttribute("name",e.toLowerCase()),b(this,He,[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]=c(this,He);return t?`<${s}${n.toString(e)}/>`:`<${s}${n.toString(e)}>${i.toString(e)}${this.closed?`</${o}>`:""}`}text(){let[e,t]=c(this,He);return this.selfClosing?`<${e}${this.firstChild.text()}/>`:`<${e}${super.text(">")}${this.closed?`</${t}>`:""}`}getAttribute(e){return e==="padding"?c(this,He)[0].length+1:super.getAttribute(e)}getGaps(){return 1}print(){let[e,t]=c(this,He);return super.print(this.selfClosing?{pre:`&lt;${e}`,post:"/&gt;"}:{pre:`&lt;${e}`,sep:"&gt;",post:this.closed?`&lt;/${t}&gt;`:""})}};He=new WeakMap});var _i,Cn,ra,tt,Oi=y(()=>{"use strict";B();K();Ye();q();wn();_i=[ye(!1)];tt=class extends(ra=It){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 R(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=I(this,s,"unclosed-comment",A.msg("unclosed $1",`<${i}>`));o.suggestions=[{desc:"close",range:[o.endIndex,o.endIndex],text:`</${i}>`}],e.push(o)}return e}};Cn=te(ra),tt=ne(Cn,0,"IncludeToken",_i,tt),re(Cn,1,tt)});var Et,jr=y(()=>{"use strict";Te();Et=(a=0)=>(r,e)=>{var n,Mi;class t extends r{constructor(){super(...arguments);T(this,n)}getAttr(l){return N(this,n,Mi).call(this).getAttr(l)}}return n=new WeakSet,Mi=function(){return this.childNodes[a]},Fr(t,r),t}});var H,zi,Wi,qr,$n,Ui,Lt,Gi,Di,Hi,Br,Vi,Xi,Qi,Ki,Ji=y(()=>{"use strict";H=new Set(["align"]),zi=new Set(["cite"]),Wi=new Set(["cite","datetime"]),qr=new Set(["width"]),$n=new Set(["axis","align","bgcolor","height","width","valign"]),Ui=new Set([...$n,"abbr","headers","scope","rowspan","colspan"]),Lt=new Set(["type"]),Gi=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),Di=new Set(["clear"]),Hi=new Set(["bgcolor","align","valign"]),Br=new Set,Vi=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"]),Xi={div:H,h1:H,h2:H,h3:H,h4:H,h5:H,h6:H,blockquote:zi,q:zi,p:H,br:Di,pre:qr,ins:Wi,del:Wi,ul:Lt,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...Gi,"border"]),caption:H,tr:Hi,td:Ui,th:Ui,img:new Set(["alt","src","width","height","srcset"]),font:new Set(["size","color","face"]),hr:qr,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:Lt,poem:H,categorytree:H,combooption:H},Qi={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:Lt,flashmp3:Lt,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"])},Ki={table:Gi,td:new Set([...$n,"scope"]),th:$n,br:Di,caption:H,div:H,hr:qr,h1:H,h2:H,h3:H,h4:H,h5:H,h6:H,li:Lt,p:H,pre:qr,tr:Hi,ul:Lt}});var na,gr,Ft,ee,Ne,Rt,Yi=y(()=>{"use strict";B();Q();Ji();K();q();P();Re();na=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,Rt=class extends k{constructor(e,t,n,i="",s,o=[],l=A.getConfig(),g=[]){let u=new z(n,"attr-key",l,g),d;if(n==="title"||t==="img"&&n==="alt")d=new k(s,l,g,{}),d.type="attr-value",d.setAttribute("stage",10);else if(t==="gallery"&&n==="caption"||t==="choose"&&(n==="before"||n==="after")){let p=ae(Y({},l),{excludes:[...l.excludes,"heading","html","table","hr","list"]});d=new k(s,p,g,{}),d.type="attr-value",d.setAttribute("stage",1)}else d=new z(s,"attr-value",l,g,{});super(void 0,l,g);T(this,gr);T(this,Ft);T(this,ee);T(this,Ne);b(this,gr,e),this.append(u,d),b(this,ee,i),b(this,Ne,[...o]),b(this,Ft,t),this.setAttribute("name",se(n).trim().toLowerCase())}get type(){return c(this,gr)}get tag(){return c(this,Ft)}get balanced(){return!c(this,ee)||c(this,Ne)[0]===c(this,Ne)[1]}afterBuild(){c(this,ee).includes("\0")&&b(this,ee,this.buildFromStr(c(this,ee),0)),this.parentNode&&b(this,Ft,this.parentNode.name),this.setAttribute("name",this.firstChild.toString(!0).trim().toLowerCase()),super.afterBuild()}toString(e){let[t="",n=""]=c(this,Ne);return c(this,ee)?super.toString(e,c(this,ee)+t)+n:this.firstChild.toString(e)}text(){return c(this,ee)?`${super.text(`${c(this,ee).trim()}"`)}"`:this.firstChild.text()}getGaps(){var e,t;return c(this,ee)?c(this,ee).length+((t=(e=c(this,Ne)[0])==null?void 0:e.length)!=null?t:0):0}lint(e=this.getAbsoluteIndex(),t){var x;let n=super.lint(e,t),{balanced:i,firstChild:s,lastChild:o,type:l,name:g,tag:u}=this,d=this.getValue(),p=new R(this,e);if(!i){let v=C(o,p,"unclosed-quote",A.msg("unclosed $1","quotes"),"warning");v.startIndex--,v.startCol--,v.suggestions=[{range:[v.endIndex,v.endIndex],text:c(this,Ne)[0],desc:"close"}],n.push(v)}let h=Qi[u],f=Xi[u],{length:m}=this.toString();if(!(h!=null&&h.has(g))&&!(f!=null&&f.has(g))&&(l==="ext-attr"?h||f:!/\{\{[^{]+\}\}/u.test(g))&&(l==="ext-attr"&&!f||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(g)&&(u==="meta"||u==="link"||!Vi.has(g)))){let v=C(s,p,"illegal-attr","illegal attribute name");v.suggestions=[{desc:"remove",range:[e,e+m],text:""}],n.push(v)}else if((x=Ki[u])!=null&&x.has(g))n.push(C(s,p,"obsolete-attr","obsolete attribute","warning"));else if(g==="style"&&typeof d=="string"&&na.test(d))n.push(C(o,p,"insecure-style","insecure style"));else if(g==="tabindex"&&typeof d=="string"&&d!=="0"){let v=C(o,p,"illegal-attr","nonzero tabindex");v.suggestions=[{desc:"remove",range:[e,e+m],text:""},{desc:"0 tabindex",range:[v.startIndex,v.endIndex],text:"0"}],n.push(v)}return n}getValue(){return c(this,ee)?this.lastChild.text().trim():this.type==="ext-attr"||""}print(){let[e="",t=""]=c(this,Ne);return c(this,ee)?super.print({sep:Tt(c(this,ee))+e,post:t}):super.print()}};gr=new WeakMap,Ft=new WeakMap,ee=new WeakMap,Ne=new WeakMap});var Zi,ia,Nn,pr,Ve,_r=y(()=>{"use strict";B();Q();K();q();P();Re();Yi();Zi=a=>a.slice(0,-1),ia=a=>`${Zi(a)}-dirty`;try{Nn=new RegExp(String.raw`[\p{L}\d]`,"u")}catch(a){Nn=/[^\W_]/u}Ve=class extends k{constructor(e,t,n,i,s=[]){super(void 0,i,s,{});T(this,pr);if(b(this,pr,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)*)(?:(["'])([\s\S]*?)(\3|$)|(\S*)))?/gu,l="",g=o.exec(e),u=0,d=()=>{l&&(super.insertAt(new z(l,ia(t),i,s,{})),l="")};for(;g;){let{index:p,0:h,1:f,2:m,3:x,4:v,5:S,6:w}=g;if(l+=e.slice(u,p),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(se(f).trim())){let $=v!=null?v:w,F=[x,S],j=new Rt(Zi(t),n,f,m,$,F,i,s);d(),super.insertAt(j)}else l+=h;({lastIndex:u}=o),g=o.exec(e)}l+=e.slice(u),d()}}get type(){return c(this,pr)}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 Rt&&(!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,g=new R(this,e);if((i==null?void 0:i.type)==="html"&&i.closing&&this.text().trim()){let u=I(this,g,"no-ignored","attributes of a closing tag"),d=i.getAbsoluteIndex();u.suggestions=[{desc:"remove",range:[e,u.endIndex],text:""},{desc:"open",range:[d+1,d+2],text:""}],n.push(u)}for(let u of s)if(u instanceof Rt){let{name:d}=u;o.has(d)?(l.add(d),o.get(d).push(u)):o.set(d,[u])}else{let d=u.text().trim();if(d){let p=C(u,g,"no-ignored","containing invalid attribute",Nn.test(d)?"error":"warning");p.suggestions=[{desc:"remove",range:[p.startIndex,p.endIndex],text:" "}],n.push(p)}}if(l.size>0)for(let u of l){let d=o.get(u).map(p=>{let h=p.getValue();return[p,h===!0?"":h]});n.push(...d.map(([p,h],f)=>{let m=C(p,g,"no-duplicate",A.msg("duplicated $1 attribute",u)),x={desc:"remove",range:[m.startIndex,m.endIndex],text:""};return!h||d.slice(0,f).some(([,v])=>v===h)?m.fix=x:m.suggestions=[x],m}))}return n}print(){return this.toString()?`<span class="wpb-${this.type}">${this.childNodes.map(e=>e.print(e instanceof z?{class:e.toString().trim()&&"attr-dirty"}:void 0)).join("")}</span>`:""}};pr=new WeakMap});var Or,es=y(()=>{"use strict";q();P();Ge();Or=class extends k{get type(){return"ext-inner"}constructor(r,e=A.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),g=0,u="";for(;o&&l;)new G(o[0],e,t),new G(l[0],e,t),u+=`${r.slice(g,o.index)}\0${t.length-1}n\x7F${r.slice(o.index+s,l.index)}\0${t.length}n\x7F`,g=l.index+s+1,n.lastIndex=g,o=n.exec(r),o&&(i.lastIndex=o.index+s),l=i.exec(r);r=u+r.slice(g)}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 Pt,In=y(()=>{"use strict";B();K();ur();q();P();Re();Pt=class extends k{get type(){return"ext-inner"}constructor(r,e,t=A.getConfig(),n=[],i){if(super(void 0,t,n,{}),e){let s=z;this.append(...e.split(`
3
+ `).map(o=>i?o:rt(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,`
4
4
  `)}text(){return super.text(`
5
- `)}getGaps(){return 1}lint(r=this.getAbsoluteIndex()){let e=new R(this,r),t=b.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:u})=>u!=="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 u=C(i,e,"no-ignored",t);u.suggestions=[{desc:"remove",range:[u.startIndex,u.endIndex],text:""}],n.push(u)}else n.push(...i.lint(r,!1))}r+=i.toString().length+1}return n}print(){return super.print({sep:`
6
- `})}}});var ur,Pt,Or,jt,In=y(()=>{"use strict";q();we();K();P();j();wt();jt=class extends v{constructor(e,t,n=b.getConfig(),i=[]){super(void 0,n,i);x(this,Pt);x(this,ur);T(this,ur,e);let s=new v(t[0],n,i);s.type="heading-title",s.setAttribute("stage",2);let o=new ye(t[1],/^\s*$/u,"heading-trail",n,i,{});this.append(s,o)}get type(){return"heading"}get level(){return c(this,ur)}toString(e){let t=N(this,Pt,Or).call(this);return t+this.firstChild.toString(e)+t+this.lastChild.toString(e)}text(){let e=N(this,Pt,Or).call(this);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=o.startsWith("="),u=l||o.endsWith("="),g=i.childNodes.filter(Bt("quote")),d=g.filter(({bold:f})=>f),p=g.filter(({italic:f})=>f),h=new R(this,e);if(this.level===1){let f=C(i,h,"h1","<h1>");u||(f.suggestions=[{desc:"h2",range:[f.startIndex,f.endIndex],text:`=${o}=`}]),n.push(f)}if(u){let f=C(i,h,"unbalanced-header",b.msg("unbalanced $1 in a section header",'"="'));if(o!=="=")if(l){let[k]=/^=+/u.exec(o);f.suggestions=[{desc:`h${s}`,range:[f.startIndex,f.startIndex+k.length],text:""},{desc:`h${s+k.length}`,range:[f.endIndex,f.endIndex],text:k}]}else{let k=/[^=](=+)$/u.exec(o)[1];f.suggestions=[{desc:`h${s}`,range:[f.endIndex-k.length,f.endIndex],text:""},{desc:`h${s+k.length}`,range:[f.startIndex,f.startIndex],text:k}]}n.push(f)}this.closest("html-attrs,table-attrs")&&n.push(E(this,h,"parsing-order","section header in an HTML tag"));let m=this.getRootNode().toString();if(d.length%2){let f=C(d[d.length-1],oe(Y({},h),{start:e+s,left:h.left+s}),"format-leakage",b.msg("unbalanced $1 in a section header","bold apostrophes")),k=e+s+o.length;m.slice(f.endIndex,k).trim()?f.suggestions=[{desc:"close",range:[k,k],text:"'''"}]:f.fix={desc:"remove",range:[f.startIndex,f.endIndex],text:""},n.push(f)}if(p.length%2){let f=C(p[p.length-1],{start:e+s},"format-leakage",b.msg("unbalanced $1 in a section header","italic apostrophes")),k=e+s+o.length;f.fix=m.slice(f.endIndex,k).trim()?{desc:"close",range:[k,k],text:"''"}:{desc:"remove",range:[f.startIndex,f.endIndex],text:""},n.push(f)}return n}print(){let e=N(this,Pt,Or).call(this);return super.print({pre:e,sep:e})}json(e,t=this.getAbsoluteIndex()){let n=super.json(void 0,t);return n.level=this.level,n}};ur=new WeakMap,Pt=new WeakSet,Or=function(){return"=".repeat(this.level)}});var sa,Mr,ts=y(()=>{"use strict";H();q();P();j();sa=new RegExp(`https?://${Ie}${Ee}$`,"iu"),Mr=class extends v{get type(){return"parameter"}get anon(){return this.firstChild.length===0}get duplicated(){var r;try{return!!((r=this.parentNode)!=null&&r.getDuplicatedArgs().some(([e])=>e===this.name))}catch(e){return!1}}constructor(r,e,t=b.getConfig(),n=[]){super(void 0,t,n);let i=new v(typeof r=="number"?void 0:r,t,n,{}),s=new v(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=sa.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:"{{=}}",desc:"escape"},t.push(o)}return t}print(){return super.print({sep:this.anon?"":"="})}json(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return Object.assign(t,{anon:this.anon,duplicated:this.duplicated}),t}}});var hr,rt,nt,qt,it,En,rs,cr,ns=y(()=>{"use strict";H();q();we();K();P();j();ts();Re();wt();cr=class extends v{constructor(e,t,n=b.getConfig(),i=[]){var f,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,{});x(this,it);ne(this,"modifier","");x(this,hr,"template");x(this,rt,!1);x(this,nt,new Map);x(this,qt);let{parserFunction:[l,u],variable:g}=n,d=(f=/^(?:\s|\0\d+[cn]\x7F)*\0\d+s\x7F/u.exec(e))==null?void 0:f[0];if(d)this.setAttribute("modifier",d),e=e.slice(d.length);else if(e.includes(":")){let[A,...S]=e.split(":"),[w]=/^(?:\s|\0\d+[cn]\x7F)*/u.exec((k=S[0])!=null?k:"");this.setModifier(`${A}:${w}`)&&(e=S.join(":").slice(w.length))}let p=e.includes(":");if(p||t.length===0&&!c(this,rt)){let A=e.indexOf(":"),S=A===-1?e:e.slice(0,A),w=A===-1?void 0:e.slice(A+1),$=ie(S),F=$[w===void 0?"trim":"trimStart"](),B=F.toLowerCase(),_=Array.isArray(u),L=_?u.includes(F):Object.prototype.hasOwnProperty.call(u,F),X=!_&&L?u[F]:Object.prototype.hasOwnProperty.call(l,B)&&l[B];if(_&&L||g.includes(X)||p&&X){this.setAttribute("name",X||B.replace(/^#/u,"")),T(this,hr,"magic-word");let he=new RegExp(String.raw`^\s*${F}\s*$`,L?"u":"iu"),me=new ye(S,he,"magic-word-name",n,i,{});if(super.insertAt(me),w!==void 0&&t.unshift([w]),this.name==="invoke")for(let D=0;D<2;D++){let W=t.shift();if(!W)break;let I=new z(W.join("="),`invoke-${D?"function":"module"}`,n,i);super.insertAt(I)}}}if(this.type==="template"){let A=ie(e).trim();if(!this.normalizeTitle(A,10,!0,!0).valid)throw i.pop(),new SyntaxError("Invalid template name");let S=new z(e,"template-name",n,i,{});super.insertAt(S)}typeof s=="number"&&(i[s]=void 0);let h=this.isTemplate(),m=1;for(let[A,S]of t.entries())h||this.name==="switch"&&A>0||this.name==="tag"&&A>1||(S[0]=S.join("="),S.length=1),S.length===1&&(S.unshift(m),m++),this.insertAt(new Mr(...S,n,i));this.seal("modifier")}get type(){return c(this,hr)}setModifier(e){let{parserFunction:[,,t,n]}=this.getAttribute("config"),i=ie(e).trim();if(e&&!i.endsWith(":"))return!1;let s=i.slice(0,-1).toLowerCase(),o=t.includes(s),l=n.includes(s);return c(this,rt)&&o||!c(this,rt)&&(l||e==="")||(le.running||this.length>1)&&(o||l||e==="")?(this.setAttribute("modifier",e),T(this,rt,o),!!e):!1}isTemplate(){return this.type==="template"||this.name==="invoke"}getModule(){}afterBuild(){this.modifier.includes("\0")&&this.setAttribute("modifier",this.buildFromStr(this.modifier,0)),super.afterBuild(),this.isTemplate()&&this.type==="template"&&(T(this,qt,N(this,it,En).call(this)),this.setAttribute("name",c(this,qt).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?"":":")+be(e.slice(1),"|"):super.text("|")}}}`}getAttribute(e){switch(e){case"padding":return this.modifier.length+2;case"title":return c(this,qt);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 R(this,e),u=i==="magic-word";if(u&&!N(this,it,En).call(this).valid)n.push(C(s[1],l,"invalid-invoke","illegal module name"));else{let d=s[u?1:0],p=d.childNodes.findIndex(m=>m.type==="text"&&Ke(m.data).includes("#")),h=d.childNodes[p];if(h){let m=C(d,l,"no-ignored","useless fragment");m.fix={range:[m.startIndex+d.getRelativeIndex(p)+h.data.indexOf("#"),m.endIndex],text:"",desc:"remove"},n.push(m)}}if(u&&o===2)return n.push(E(this,l,"invalid-invoke","missing module function")),n;let g=this.getDuplicatedArgs().filter(([,d])=>!d[0].querySelector("ext"));if(g.length>0)for(let[,d]of g)n.push(...d.map(p=>{let h=C(p,l,"no-duplicate","duplicated parameter");return h.suggestions=[{desc:"remove",range:[h.startIndex-1,h.endIndex],text:""}],h}));return n}insertAt(e,t=this.length){return super.insertAt(e,t),e.anon?N(this,it,rs).call(this,e):e.name&&this.getArgs(e.name,!1,!1).add(e),e}getAllArgs(){return this.childNodes.filter(Bt("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 c(this,nt).has(i)?s=c(this,nt).get(i):(s=new Set(this.getAllArgs().filter(({name:o})=>i===o)),c(this,nt).set(i,s)),s}getDuplicatedArgs(){return[...c(this,nt)].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:u}=s[o].childNodes.filter(g=>g.text().trim());if(l===0)s.splice(o,1);else if(l>1||u.type!=="magic-word")o++;else try{let g=u.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}">{{${bt(i)}${s==="magic-word"?n.print()+(t===1?"":":")+Le(e.slice(1),{sep:"|"}):Le(e,{sep:"|"})}}}</span>`}};hr=new WeakMap,rt=new WeakMap,nt=new WeakMap,qt=new WeakMap,it=new WeakSet,En=function(){let e=this.type==="template";return this.normalizeTitle(this.childNodes[e?0:1].toString(!0),e?10:828,!0)},rs=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 is,Ln,oa,st,ss=y(()=>{"use strict";Je();j();is=[Te()];st=class extends(oa=v){get type(){return"hidden"}};Ln=ee(oa),st=re(Ln,0,"HiddenToken",is,st),te(Ln,1,st)});var Fn,aa,zr,os=y(()=>{"use strict";H();q();K();P();j();Re();ss();zr=class extends v{constructor(e,t=b.getConfig(),n=[]){super(void 0,t,n,{});x(this,Fn);for(let[i,s]of e.entries())if(i===0){let o=new z(s,"arg-name",t,n,{});super.insertAt(o)}else if(i>1){let o=new st(s,t,n);super.insertAt(o)}else{let o=new v(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`{{{${be(this.childNodes.slice(0,2),"|")}}}}`}getAttribute(e){return e==="padding"?3:super.getAttribute(e)}getGaps(){return 1}afterBuild(){super.afterBuild()}lint(e=this.getAbsoluteIndex(),t){let{childNodes:[n,i,...s]}=this;if(!this.getAttribute("include")){let l=E(this,{start:e},"no-arg","unexpected template argument");return i&&(l.suggestions=[{range:[e,l.endIndex],text:i.text(),desc:"expand"}]),[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 R(this,e);o.push(...s.map(u=>{let g=C(u,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:"|"})}json(e,t=this.getAbsoluteIndex()){let n=super.json(void 0,t);return n.default=this.default,n}};Fn=new WeakSet,aa=function(){}});var gs={};ae(gs,{parseBraces:()=>mr});var la,as,ls,ds,mr,Wr=y(()=>{"use strict";H();In();ns();os();la={"=":String.raw`\n(?!(?:[^\S\n]|\0\d+[cn]\x7F)*\n)`,"{":String.raw`\}{2,}|\|`,"-":String.raw`\}-`,"[":String.raw`\]\]`},as=String.raw`|\{{2,}`,ls=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"],["server","m"]]),ds=a=>{let r=ie(a).trim().toLowerCase();return ls.has(r)?ls.get(r):/^(?:filepath|(?:full|canonical)urle?):./u.test(r)?"m":/^#vardefine:./u.test(r)?"n":"t"},mr=(a,r,e)=>{var h,m,f,k,A,S;let t=String.raw`${(h=r.excludes)!=null&&h.includes("heading")?"":String.raw`^((?:\0\d+[cno]\x7F)*)={1,6}|`}\[\[|-\{(?!\{)`,{parserFunction:[,,,n]}=r,i=[],s=[],o=w=>w.replace(/\0(\d+)\x7F/gu,($,F)=>s[F]);a=a.replace(/\{\{([^\n{}[]*)\}\}(?!\})|\[\[[^\n[\]{]*\]\]/gu,(w,$)=>{if($!==void 0)try{let{length:F}=e,B=$.split("|");return new cr(B[0],B.slice(1).map(_=>{let L=_.indexOf("=");return L===-1?[_]:[_.slice(0,L),_.slice(L+1)]}),r,e),`\0${F}${ds(B[0])}\x7F`}catch(F){if(!(F instanceof SyntaxError)||F.message!=="Invalid template name")throw F}return s.push(w),`\0${s.length-1}\x7F`});let l=a.lastIndexOf("}}")-a.length,u=l+a.length!==-1,g=new RegExp(t+(u?as:""),"gmu"),d=g.exec(a),p;for(;d||p!==void 0&&p<=a.length&&((f=(m=i[i.length-1])==null?void 0:m[0])!=null&&f.startsWith("="));){if(d!=null&&d[1]){let[,{length:W}]=d;d[0]=d[0].slice(W),d.index+=W}let{0:w,index:$}=d!=null?d:{0:`
7
- `,index:a.length},F=(k=i.pop())!=null?k:{},{0:B,index:_,parts:L,findEqual:X,pos:J}=F,he=w==="="&&X,me=W=>{L[L.length-1].push(o(W.slice(J,$)))};if(w==="]]"||w==="}-")p=$+2;else if(w===`
8
- `){p=$+1;let{pos:W,findEqual:I}=(A=i[i.length-1])!=null?A:{};if(W===void 0||I||ie(a.slice(W,_))!==""){let ge=/^(={1,6})(.+)\1((?:\s|\0\d+[cn]\x7F)*)$/u.exec(a.slice(_,$));ge&&(a=`${a.slice(0,_)}\0${e.length}h\x7F${a.slice($)}`,p=_+4+String(e.length).length,ge[2]=o(ge[2]),new jt(ge[1].length,ge.slice(2),r,e))}}else if(w==="|"||he)p=$+1,me(a),w==="|"&&L.push([]),F.pos=p,F.findEqual=w==="|",i.push(F);else if(w.startsWith("}}")){let W=w.slice(0,Math.min(B.length,3)),I=B.length-W.length,{length:ge}=e;p=$+W.length,me(a);let Oe=!1,fe="t";if(W.length===3){let pe=L.map(ht=>ht.join("=")),xe=pe.length>1&&ie(pe[1]).trim();new zr(pe,r,e),xe&&xe.endsWith(":")&&n.includes(xe.slice(0,-1).toLowerCase())&&(fe="s")}else try{new cr(L[0][0],L.slice(1),r,e),fe=ds(L[0][0])}catch(pe){if(pe instanceof SyntaxError&&pe.message==="Invalid template name")Oe=!0;else throw pe}Oe||(a=`${a.slice(0,_+I)}\0${ge}${fe}\x7F${a.slice(p)}`,p=_+I+3+String(ge).length,I>1?i.push({0:B.slice(0,I),index:_,pos:_+I,parts:[[]]}):I===1&&a[_-1]==="-"&&i.push({0:"-{",index:_-1,pos:_+1,parts:[[]]}))}else p=$+w.length,w.startsWith("{")&&(d.pos=p,d.parts=[[]]),i.push(..."0"in F?[F]:[],d);let D=i[i.length-1];if(u&&l+a.length<p)for(u=!1;(S=D==null?void 0:D[0])!=null&&S.startsWith("{");)i.pop(),D=i[i.length-1];g=new RegExp(t+(u?as:"")+(D?`|${la[D[0][0]]}${D.findEqual?"|=":""}`:""),"gmu"),g.lastIndex=p,d=g.exec(a)}return o(a)}});var Ur,ps=y(()=>{"use strict";pr();Wr();P();Nn();Ur=class extends Rt{constructor(r,e,t=b.getConfig(),n=[]){let i=Symbol("InputboxToken"),{length:s}=n;n.push(i),e&&(e=tt(e,t,n,r)),e&&(e=mr(e,t,n)),n.splice(s,1),super(r,e,t,n,{})}}});function us(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}|//)${Ie}|\0\d+m\x7F)${Ee}$`,"iu");if(s.test(i))return o.test(i)&&r;i.startsWith("[[")&&i.endsWith("]]")&&(i=i.slice(2,-2));let l=b.normalizeTitle(i,0,!1,e,!1,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 da,de,Dr,cs,Gr,hs=y(()=>{"use strict";H();q();P();j();da=new Set(["alt","link","lang","page","caption"]);Gr=class extends v{constructor(e,t,n=b.getConfig(),i){var r=(..._g)=>(super(..._g),x(this,Dr),x(this,de,""),this);var u;let s,o=Object.entries(n.img).map(([g,d])=>{let p=new RegExp(String.raw`^(\s*(?!\s))${g.replace("$1","(.*)")}${g.endsWith("$1")?`(?=$|
9
- )`:""}(\s*)$`,"u");return[g,d,p]}),l=o.find(([,g,d])=>(s=d.exec(e),s&&(s.length!==4||us(g,s[2],n,!0,t)!==!1)));if(l&&s){s.length===3?(r(void 0,n,i),T(this,de,e)):(r(s[2],n,i,{}),T(this,de,s[1]+l[0]+s[3])),this.setAttribute("name",l[1]);return}r(e,oe(Y({},n),{excludes:[...(u=n.excludes)!=null?u:[],"list"]}),i),this.setAttribute("name","caption"),this.setAttribute("stage",7)}get type(){return"image-parameter"}get link(){return this.name==="link"?us("link",super.text(),this.getAttribute("config")):void 0}afterBuild(){var e;((e=this.parentNode)==null?void 0:e.type)==="gallery-image"&&!da.has(this.name)&&this.setAttribute("name","invalid"),super.afterBuild()}toString(e){return c(this,de)?c(this,de).replace("$1",super.toString(e)):super.toString(e)}text(){return c(this,de)?c(this,de).replace("$1",super.text()).trim():super.text().trim()}getAttribute(e){return e==="plain"?this.name==="caption":e==="padding"?Math.max(0,c(this,de).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=E(this,{start:e},"invalid-gallery","invalid image parameter");o.fix={range:[e-1,o.endIndex],text:"",desc:"remove"},n.push(o)}else if(typeof i=="object"&&i.encoded){let o=E(this,{start:e},"url-encoding","unnecessary URL encoding in an internal link");o.suggestions=[{desc:"decode",range:[e,o.endIndex],text:Me(this.text())}],n.push(o)}return n}getValue(){return this.name==="invalid"?this.text():N(this,Dr,cs).call(this)||super.text()}print(){return c(this,de)?`<span class="wpb-image-parameter">${c(this,de).replace("$1",`<span class="wpb-image-caption">${Le(this.childNodes)}</span>`)}</span>`:super.print({class:"image-caption"})}};de=new WeakMap,Dr=new WeakSet,cs=function(){return c(this,de)&&!c(this,de).includes("$1")}});var ms,fs,xs,ga,_t,Rn=y(()=>{"use strict";H();q();K();P();lr();hs();ms=new Map([["manualthumb","Thumb"],["frameless","Frameless"],["framed","Frame"],["thumbnail","Thumb"]]),fs=new Set(["left","right","center","none"]),xs=new Set(["baseline","sub","super","top","text-top","middle","bottom","text-bottom"]),ga=(a,r,e,t)=>{if(t===void 0)return[];let n=new RegExp(`${[a,r,e].map(yi).join("|")}`,"gu"),i=[],s=n.exec(t),o=0,l=0;for(;s;){let{0:u,index:g}=s;u!==e?o+=u===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},_t=class extends $e{get type(){return"file"}get extension(){return this.getAttribute("title").extension}constructor(r,e,t=b.getConfig(),n=[],i="|"){super(r,void 0,t,n,i);let{extension:s}=this.getTitle(!0,!0);this.append(...ga("-{","}-","|",e).map(o=>new Gr(o,s,t,n)))}lint(r=this.getAbsoluteIndex(),e){var h;let t=super.lint(r,e),n=this.getAllArgs().filter(({childNodes:m})=>{let f=m.filter(k=>k.text().trim());return f.length!==1||f[0].type!=="arg"}),i=[...new Set(n.map(({name:m})=>m))],s=i.filter(m=>ms.has(m)),o=i.filter(m=>fs.has(m)),l=i.filter(m=>xs.has(m)),[u]=s,g=u==="framed"||u==="manualthumb",d=new R(this,r);if(this.closest("ext-link-text")&&((h=this.getValue("link"))==null?void 0:h.trim())!==""&&t.push(E(this,d,"nested-link","internal link in an external link")),g)for(let m of n.filter(({name:f})=>f==="width")){let f=C(m,d,"invalid-gallery","invalid image parameter");f.fix={range:[f.startIndex-1,f.endIndex],text:"",desc:"remove"},t.push(f)}if(n.length===i.length&&s.length<2&&o.length<2&&l.length<2)return t;let p=(m,f)=>k=>{let A=C(k,d,"no-duplicate",b.msg(`${m} image $1 parameter`,f));return A.suggestions=[{desc:"remove",range:[A.startIndex-1,A.endIndex],text:""}],A};for(let m of i){if(m==="invalid"||m==="width"&&g)continue;let f=n.filter(({name:k})=>k===m);m==="caption"&&(f=[...f.slice(0,-1).filter(k=>k.text()),...f.slice(-1)]),f.length>1&&t.push(...f.map(p("duplicated",m)))}return s.length>1&&t.push(...n.filter(({name:m})=>ms.has(m)).map(p("conflicting","frame"))),o.length>1&&t.push(...n.filter(({name:m})=>fs.has(m)).map(p("conflicting","horizontal-alignment"))),l.length>1&&t.push(...n.filter(({name:m})=>xs.has(m)).map(p("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()}json(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e),{extension:n}=this;return n&&(t.extension=n),t}}});var Ot,Pn=y(()=>{"use strict";q();P();j();Rn();Ot=class extends _t{constructor(e,t,n,i=b.getConfig(),s=[]){let o;if(n!==void 0){let{length:l}=s;o=new v(n,i,s);for(let u=1;u<11;u++)o.parseOnce();s.splice(l,1)}super(t,o==null?void 0:o.toString(),i,s);ne(this,"privateType","imagemap-image");this.setAttribute("bracket",!1),this.privateType=`${e}-image`,this.seal("privateType",!0)}get type(){return this.privateType}getTitle(e){let t=this.type==="imagemap-image";return this.normalizeTitle(this.firstChild.toString(),t?0:6,e,!0,!t)}getAttribute(e){return e==="padding"?0:super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),{ns:i}=this.getAttribute("title");if(i!==6){let s=E(this,{start:e},"invalid-gallery","invalid gallery image");s.suggestions=[{desc:"prefix",range:[e,e],text:"File:"}],n.push(s)}return n}}});var ot,bs,jn,Hr,Ts=y(()=>{"use strict";P();j();Pn();Ue();Hr=class extends v{constructor(e,t=b.getConfig(),n=[]){var i;super(void 0,t,n,{});x(this,ot);for(let s of(i=e==null?void 0:e.split(`
10
- `))!=null?i:[]){let o=/^([^|]+)(?:\|(.*))?/u.exec(s);if(!o){super.insertAt(s.trim()?new G(s,t,n):s);continue}let[,l,u]=o;N(this,ot,bs).call(this,l)?super.insertAt(new Ot("gallery",l,u,t,n)):super.insertAt(new G(s,t,n))}}get type(){return"ext-inner"}get widths(){return N(this,ot,jn).call(this,"widths")}get heights(){return N(this,ot,jn).call(this,"heights")}toString(e){return super.toString(e,`
5
+ `)}getGaps(){return 1}lint(r=this.getAbsoluteIndex()){let e=new R(this,r),t=A.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:g})=>g!=="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 g=C(i,e,"no-ignored",t);g.suggestions=[{desc:"remove",range:[g.startIndex,g.endIndex],text:""}],n.push(g)}else n.push(...i.lint(r,!1))}r+=i.toString().length+1}return n}print(){return super.print({sep:`
6
+ `})}}});var cr,jt,Mr,Bt,En=y(()=>{"use strict";B();Te();K();q();P();Ct();Bt=class extends k{constructor(e,t,n,i=[]){super(void 0,n,i);T(this,jt);T(this,cr);b(this,cr,e);let s=new k(t[0],n,i);s.type="heading-title",s.setAttribute("stage",2);let o=new ke(t[1],/^\s*$/u,"heading-trail",n,i,{});this.append(s,o)}get type(){return"heading"}get level(){return c(this,cr)}toString(e){let t=N(this,jt,Mr).call(this);return t+this.firstChild.toString(e)+t+this.lastChild.toString(e)}text(){let e=N(this,jt,Mr).call(this);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=o.startsWith("="),g=l||o.endsWith("="),u=i.childNodes.filter(qt("quote")),d=u.filter(({bold:m})=>m),p=u.filter(({italic:m})=>m),h=new R(this,e);if(this.level===1){let m=C(i,h,"h1","<h1>");g||(m.suggestions=[{desc:"h2",range:[m.startIndex,m.endIndex],text:`=${o}=`}]),n.push(m)}if(g){let m=C(i,h,"unbalanced-header",A.msg("unbalanced $1 in a section header",'"="'));if(o!=="=")if(l){let[x]=/^=+/u.exec(o);m.suggestions=[{desc:`h${s}`,range:[m.startIndex,m.startIndex+x.length],text:""},{desc:`h${s+x.length}`,range:[m.endIndex,m.endIndex],text:x}]}else{let x=/[^=](=+)$/u.exec(o)[1];m.suggestions=[{desc:`h${s}`,range:[m.endIndex-x.length,m.endIndex],text:""},{desc:`h${s+x.length}`,range:[m.startIndex,m.startIndex],text:x}]}n.push(m)}this.closest("html-attrs,table-attrs")&&n.push(I(this,h,"parsing-order","section header in an HTML tag"));let f=this.getRootNode().toString();if(d.length%2){let m=C(d[d.length-1],ae(Y({},h),{start:e+s,left:h.left+s}),"format-leakage",A.msg("unbalanced $1 in a section header","bold apostrophes")),x=e+s+o.length;f.slice(m.endIndex,x).trim()?m.suggestions=[{desc:"close",range:[x,x],text:"'''"}]:m.fix={desc:"remove",range:[m.startIndex,m.endIndex],text:""},n.push(m)}if(p.length%2){let m=C(p[p.length-1],{start:e+s},"format-leakage",A.msg("unbalanced $1 in a section header","italic apostrophes")),x=e+s+o.length;m.fix=f.slice(m.endIndex,x).trim()?{desc:"close",range:[x,x],text:"''"}:{desc:"remove",range:[m.startIndex,m.endIndex],text:""},n.push(m)}return n}print(){let e=N(this,jt,Mr).call(this);return super.print({pre:e,sep:e})}json(e,t=this.getAbsoluteIndex()){let n=super.json(void 0,t);return n.level=this.level,n}};cr=new WeakMap,jt=new WeakSet,Mr=function(){return"=".repeat(this.level)}});var sa,zr,ts=y(()=>{"use strict";Q();B();q();P();sa=new RegExp(`https?://${Ee}${Le}$`,"iu"),zr=class extends k{get type(){return"parameter"}get anon(){return this.firstChild.length===0}get duplicated(){var r;try{return!!((r=this.parentNode)!=null&&r.getDuplicatedArgs().some(([e])=>e===this.name))}catch(e){return!1}}constructor(r,e,t=A.getConfig(),n=[]){super(void 0,t,n);let i=new k(typeof r=="number"?void 0:r,t,n,{}),s=new k(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=sa.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:"{{=}}",desc:"escape"},t.push(o)}return t}print(){return super.print({sep:this.anon?"":"="})}json(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return Object.assign(t,{anon:this.anon,duplicated:this.duplicated}),t}}});var mr,nt,it,_t,st,Ln,rs,hr,ns=y(()=>{"use strict";Q();B();Te();K();P();ts();Re();Ct();hr=class extends k{constructor(e,t,n,i=[]){var m,x;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,st);ie(this,"modifier","");T(this,mr,"template");T(this,nt,!1);T(this,it,new Map);T(this,_t);let{parserFunction:[l,g],variable:u}=n,d=(m=/^(?:\s|\0\d+[cn]\x7F)*\0\d+s\x7F/u.exec(e))==null?void 0:m[0];if(d)this.setAttribute("modifier",d),e=e.slice(d.length);else if(e.includes(":")){let[v,...S]=e.split(":"),[w]=/^(?:\s|\0\d+[cn]\x7F)*/u.exec((x=S[0])!=null?x:"");this.setModifier(`${v}:${w}`)&&(e=S.join(":").slice(w.length))}let p=e.includes(":");if(p||t.length===0&&!c(this,nt)){let v=e.indexOf(":"),S=v===-1?e:e.slice(0,v),w=v===-1?void 0:e.slice(v+1),$=se(S),F=$[w===void 0?"trim":"trimStart"](),j=F.toLowerCase(),_=Array.isArray(g),L=_?g.includes(F):Object.prototype.hasOwnProperty.call(g,F),V=!_&&L?g[F]:Object.prototype.hasOwnProperty.call(l,j)&&l[j];if(_&&L||u.includes(V)||p&&V){this.setAttribute("name",V||j.replace(/^#/u,"")),b(this,mr,"magic-word");let he=new RegExp(String.raw`^\s*${F}\s*$`,L?"u":"iu"),me=new ke(S,he,"magic-word-name",n,i,{});if(super.insertAt(me),w!==void 0&&t.unshift([w]),this.name==="invoke")for(let D=0;D<2;D++){let W=t.shift();if(!W)break;let E=new z(W.join("="),`invoke-${D?"function":"module"}`,n,i);super.insertAt(E)}}}if(this.type==="template"){let v=se(e).trim();if(!this.normalizeTitle(v,10,!0,!0).valid)throw i.pop(),new SyntaxError("Invalid template name");let S=new z(e,"template-name",n,i,{});super.insertAt(S)}typeof s=="number"&&(i[s]=void 0);let h=this.isTemplate(),f=1;for(let[v,S]of t.entries())h||this.name==="switch"&&v>0||this.name==="tag"&&v>1||(S[0]=S.join("="),S.length=1),S.length===1&&(S.unshift(f),f++),this.insertAt(new zr(...S,n,i));this.seal("modifier")}get type(){return c(this,mr)}setModifier(e){let{parserFunction:[,,t,n]}=this.getAttribute("config"),i=se(e).trim();if(e&&!i.endsWith(":"))return!1;let s=i.slice(0,-1).toLowerCase(),o=t.includes(s),l=n.includes(s);return c(this,nt)&&o||!c(this,nt)&&(l||e==="")||(Z.running||this.length>1)&&(o||l||e==="")?(this.setAttribute("modifier",e),b(this,nt,o),!!e):!1}isTemplate(){return this.type==="template"||this.name==="invoke"}getModule(){}afterBuild(){this.modifier.includes("\0")&&this.setAttribute("modifier",this.buildFromStr(this.modifier,0)),super.afterBuild(),this.isTemplate()&&this.type==="template"&&(b(this,_t,N(this,st,Ln).call(this)),this.setAttribute("name",c(this,_t).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?"":":")+be(e.slice(1),"|"):super.text("|")}}}`}getAttribute(e){switch(e){case"padding":return this.modifier.length+2;case"title":return c(this,_t);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 R(this,e),g=i==="magic-word";if(g&&!N(this,st,Ln).call(this).valid)n.push(C(s[1],l,"invalid-invoke","illegal module name"));else{let d=s[g?1:0],p=d.childNodes.findIndex(f=>f.type==="text"&&Je(f.data).includes("#")),h=d.childNodes[p];if(h){let f=C(d,l,"no-ignored","useless fragment");f.fix={range:[f.startIndex+d.getRelativeIndex(p)+h.data.indexOf("#"),f.endIndex],text:"",desc:"remove"},n.push(f)}}if(g&&o===2)return n.push(I(this,l,"invalid-invoke","missing module function")),n;let u=this.getDuplicatedArgs().filter(([,d])=>!d[0].querySelector("ext"));if(u.length>0)for(let[,d]of u)n.push(...d.map(p=>{let h=C(p,l,"no-duplicate","duplicated parameter");return h.suggestions=[{desc:"remove",range:[h.startIndex-1,h.endIndex],text:""}],h}));return n}insertAt(e,t=this.length){return super.insertAt(e,t),e.anon?N(this,st,rs).call(this,e):e.name&&this.getArgs(e.name,!1,!1).add(e),e}getAllArgs(){return this.childNodes.filter(qt("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 c(this,it).has(i)?s=c(this,it).get(i):(s=new Set(this.getAllArgs().filter(({name:o})=>i===o)),c(this,it).set(i,s)),s}getDuplicatedArgs(){return[...c(this,it)].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:g}=s[o].childNodes.filter(u=>u.text().trim());if(l===0)s.splice(o,1);else if(l>1||g.type!=="magic-word")o++;else try{let u=g.getPossibleValues();s.splice(o,1,...u),o+=u.length}catch(u){o++}}return s}print(){let{childNodes:e,length:t,firstChild:n,modifier:i,type:s}=this;return`<span class="wpb-${s}">{{${Tt(i)}${s==="magic-word"?n.print()+(t===1?"":":")+Fe(e.slice(1),{sep:"|"}):Fe(e,{sep:"|"})}}}</span>`}};mr=new WeakMap,nt=new WeakMap,it=new WeakMap,_t=new WeakMap,st=new WeakSet,Ln=function(){let e=this.type==="template";return this.normalizeTitle(this.childNodes[e?0:1].toString(!0),e?10:828,!0)},rs=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 is,Fn,oa,ot,ss=y(()=>{"use strict";Ye();P();is=[ye()];ot=class extends(oa=k){get type(){return"hidden"}};Fn=te(oa),ot=ne(Fn,0,"HiddenToken",is,ot),re(Fn,1,ot)});var Rn,aa,Wr,os=y(()=>{"use strict";Q();B();K();P();Re();ss();Wr=class extends k{constructor(e,t,n=[]){super(void 0,t,n,{});T(this,Rn);for(let[i,s]of e.entries())if(i===0){let o=new z(s,"arg-name",t,n,{});super.insertAt(o)}else if(i>1){let o=new ot(s,t,n);super.insertAt(o)}else{let o=new k(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`{{{${be(this.childNodes.slice(0,2),"|")}}}}`}getAttribute(e){return e==="padding"?3:super.getAttribute(e)}getGaps(){return 1}afterBuild(){super.afterBuild()}lint(e=this.getAbsoluteIndex(),t){let{childNodes:[n,i,...s]}=this;if(!this.getAttribute("include")){let l=I(this,{start:e},"no-arg","unexpected template argument");return i&&(l.suggestions=[{range:[e,l.endIndex],text:i.text(),desc:"expand"}]),[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 R(this,e);o.push(...s.map(g=>{let u=C(g,l,"no-ignored","invisible content inside triple braces");return u.startIndex--,u.startCol--,u.suggestions=[{desc:"remove",range:[u.startIndex,u.endIndex],text:""},{desc:"escape",range:[u.startIndex,u.startIndex+1],text:"{{!}}"}],u}))}return o}print(){return super.print({pre:"{{{",post:"}}}",sep:"|"})}json(e,t=this.getAbsoluteIndex()){let n=super.json(void 0,t);return n.default=this.default,n}};Rn=new WeakSet,aa=function(){}});var gs={};le(gs,{parseBraces:()=>fr});var la,as,ls,ds,fr,Ur=y(()=>{"use strict";Q();En();ns();os();la={"=":String.raw`\n(?!(?:[^\S\n]|\0\d+[cn]\x7F)*\n)`,"{":String.raw`\}{2,}|\|`,"-":String.raw`\}-`,"[":String.raw`\]\]`},as=String.raw`|\{{2,}`,ls=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"],["server","m"]]),ds=a=>{let r=se(a).trim().toLowerCase();return ls.has(r)?ls.get(r):/^(?:filepath|(?:full|canonical)urle?):./u.test(r)?"m":/^#vardefine:./u.test(r)?"n":"t"},fr=(a,r,e)=>{var h,f,m,x,v,S;let t=String.raw`${(h=r.excludes)!=null&&h.includes("heading")?"":String.raw`^((?:\0\d+[cno]\x7F)*)={1,6}|`}\[\[|-\{(?!\{)`,{parserFunction:[,,,n]}=r,i=[],s=[],o=w=>w.replace(/\0(\d+)\x7F/gu,($,F)=>s[F]);a=a.replace(/\{\{([^\n{}[]*)\}\}(?!\})|\[\[[^\n[\]{]*\]\]/gu,(w,$)=>{if($!==void 0)try{let{length:F}=e,j=$.split("|");return new hr(j[0],j.slice(1).map(_=>{let L=_.indexOf("=");return L===-1?[_]:[_.slice(0,L),_.slice(L+1)]}),r,e),`\0${F}${ds(j[0])}\x7F`}catch(F){if(!(F instanceof SyntaxError)||F.message!=="Invalid template name")throw F}return s.push(w),`\0${s.length-1}\x7F`});let l=a.lastIndexOf("}}")-a.length,g=l+a.length!==-1,u=new RegExp(t+(g?as:""),"gmu"),d=u.exec(a),p;for(;d||p!==void 0&&p<=a.length&&((m=(f=i[i.length-1])==null?void 0:f[0])!=null&&m.startsWith("="));){if(d!=null&&d[1]){let[,{length:W}]=d;d[0]=d[0].slice(W),d.index+=W}let{0:w,index:$}=d!=null?d:{0:`
7
+ `,index:a.length},F=(x=i.pop())!=null?x:{},{0:j,index:_,parts:L,findEqual:V,pos:J}=F,he=w==="="&&V,me=W=>{L[L.length-1].push(o(W.slice(J,$)))};if(w==="]]"||w==="}-")p=$+2;else if(w===`
8
+ `){p=$+1;let{pos:W,findEqual:E}=(v=i[i.length-1])!=null?v:{};if(W===void 0||E||se(a.slice(W,_))!==""){let ge=/^(={1,6})(.+)\1((?:\s|\0\d+[cn]\x7F)*)$/u.exec(a.slice(_,$));ge&&(a=`${a.slice(0,_)}\0${e.length}h\x7F${a.slice($)}`,p=_+4+String(e.length).length,ge[2]=o(ge[2]),new Bt(ge[1].length,ge.slice(2),r,e))}}else if(w==="|"||he)p=$+1,me(a),w==="|"&&L.push([]),F.pos=p,F.findEqual=w==="|",i.push(F);else if(w.startsWith("}}")){let W=w.slice(0,Math.min(j.length,3)),E=j.length-W.length,{length:ge}=e;p=$+W.length,me(a);let Me=!1,fe="t";if(W.length===3){let pe=L.map(mt=>mt.join("=")),xe=pe.length>1&&se(pe[1]).trim();new Wr(pe,r,e),xe&&xe.endsWith(":")&&n.includes(xe.slice(0,-1).toLowerCase())&&(fe="s")}else try{new hr(L[0][0],L.slice(1),r,e),fe=ds(L[0][0])}catch(pe){if(pe instanceof SyntaxError&&pe.message==="Invalid template name")Me=!0;else throw pe}Me||(a=`${a.slice(0,_+E)}\0${ge}${fe}\x7F${a.slice(p)}`,p=_+E+3+String(ge).length,E>1?i.push({0:j.slice(0,E),index:_,pos:_+E,parts:[[]]}):E===1&&a[_-1]==="-"&&i.push({0:"-{",index:_-1,pos:_+1,parts:[[]]}))}else p=$+w.length,w.startsWith("{")&&(d.pos=p,d.parts=[[]]),i.push(..."0"in F?[F]:[],d);let D=i[i.length-1];if(g&&l+a.length<p)for(g=!1;(S=D==null?void 0:D[0])!=null&&S.startsWith("{");)i.pop(),D=i[i.length-1];u=new RegExp(t+(g?as:"")+(D?`|${la[D[0][0]]}${D.findEqual?"|=":""}`:""),"gmu"),u.lastIndex=p,d=u.exec(a)}return o(a)}});var Gr,ps=y(()=>{"use strict";ur();Ur();q();In();Gr=class extends Pt{constructor(r,e,t=A.getConfig(),n=[]){let i=Symbol("InputboxToken"),{length:s}=n;n.push(i),e&&(e=rt(e,t,n,r)),e&&(e=fr(e,t,n)),n.splice(s,1),super(r,e,t,n,{})}}});function us(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}|//)${Ee}|\0\d+m\x7F)${Le}$`,"iu");if(s.test(i))return o.test(i)&&r;i.startsWith("[[")&&i.endsWith("]]")&&(i=i.slice(2,-2));let l=A.normalizeTitle(i,0,!1,e,!1,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 da,de,Hr,cs,Dr,hs=y(()=>{"use strict";Q();B();q();P();da=new Set(["alt","link","lang","page","caption"]);Dr=class extends k{constructor(e,t,n,i){var r=(...Bg)=>(super(...Bg),T(this,Hr),T(this,de,""),this);var g;let s,o=Object.entries(n.img).map(([u,d])=>{let p=new RegExp(String.raw`^(\s*(?!\s))${u.replace("$1","(.*)")}${u.endsWith("$1")?`(?=$|
9
+ )`:""}(\s*)$`,"u");return[u,d,p]}),l=o.find(([,u,d])=>(s=d.exec(e),s&&(s.length!==4||us(u,s[2],n,!0,t)!==!1)));if(l&&s){s.length===3?(r(void 0,n,i),b(this,de,e)):(r(s[2],n,i,{}),b(this,de,s[1]+l[0]+s[3])),this.setAttribute("name",l[1]);return}r(e,ae(Y({},n),{excludes:[...(g=n.excludes)!=null?g:[],"list"]}),i),this.setAttribute("name","caption"),this.setAttribute("stage",7)}get type(){return"image-parameter"}get link(){return this.name==="link"?us("link",super.text(),this.getAttribute("config")):void 0}afterBuild(){var e;((e=this.parentNode)==null?void 0:e.type)==="gallery-image"&&!da.has(this.name)&&this.setAttribute("name","invalid"),super.afterBuild()}toString(e){return c(this,de)?c(this,de).replace("$1",super.toString(e)):super.toString(e)}text(){return c(this,de)?c(this,de).replace("$1",super.text()).trim():super.text().trim()}getAttribute(e){return e==="plain"?this.name==="caption":e==="padding"?Math.max(0,c(this,de).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=I(this,{start:e},"invalid-gallery","invalid image parameter");o.fix={range:[e-1,o.endIndex],text:"",desc:"remove"},n.push(o)}else if(typeof i=="object"&&i.encoded){let o=I(this,{start:e},"url-encoding","unnecessary URL encoding in an internal link");o.suggestions=[{desc:"decode",range:[e,o.endIndex],text:ze(this.text())}],n.push(o)}return n}getValue(){return this.name==="invalid"?this.text():N(this,Hr,cs).call(this)||super.text()}print(){return c(this,de)?`<span class="wpb-image-parameter">${c(this,de).replace("$1",`<span class="wpb-image-caption">${Fe(this.childNodes)}</span>`)}</span>`:super.print({class:"image-caption"})}};de=new WeakMap,Hr=new WeakSet,cs=function(){return c(this,de)&&!c(this,de).includes("$1")}});var ms,fs,xs,ga,Ot,Pn=y(()=>{"use strict";Q();B();K();q();dr();hs();ms=new Map([["manualthumb","Thumb"],["frameless","Frameless"],["framed","Frame"],["thumbnail","Thumb"]]),fs=new Set(["left","right","center","none"]),xs=new Set(["baseline","sub","super","top","text-top","middle","bottom","text-bottom"]),ga=(a,r,e,t)=>{if(t===void 0)return[];let n=new RegExp(`${[a,r,e].map(ki).join("|")}`,"gu"),i=[],s=n.exec(t),o=0,l=0;for(;s;){let{0:g,index:u}=s;g!==e?o+=g===a?1:-1:o===0&&(i.push(t.slice(l,u)),{lastIndex:l}=n),s=n.exec(t)}return i.push(t.slice(l)),i},Ot=class extends $e{get type(){return"file"}get extension(){return this.getAttribute("title").extension}constructor(r,e,t=A.getConfig(),n=[],i="|"){super(r,void 0,t,n,i);let{extension:s}=this.getTitle(!0,!0);this.append(...ga("-{","}-","|",e).map(o=>new Dr(o,s,t,n)))}lint(r=this.getAbsoluteIndex(),e){var h;let t=super.lint(r,e),n=this.getAllArgs().filter(({childNodes:f})=>{let m=f.filter(x=>x.text().trim());return m.length!==1||m[0].type!=="arg"}),i=[...new Set(n.map(({name:f})=>f))],s=i.filter(f=>ms.has(f)),o=i.filter(f=>fs.has(f)),l=i.filter(f=>xs.has(f)),[g]=s,u=g==="framed"||g==="manualthumb",d=new R(this,r);if(this.closest("ext-link-text")&&((h=this.getValue("link"))==null?void 0:h.trim())!==""&&t.push(I(this,d,"nested-link","internal link in an external link")),u)for(let f of n.filter(({name:m})=>m==="width")){let m=C(f,d,"invalid-gallery","invalid image parameter");m.fix={range:[m.startIndex-1,m.endIndex],text:"",desc:"remove"},t.push(m)}if(n.length===i.length&&s.length<2&&o.length<2&&l.length<2)return t;let p=(f,m)=>x=>{let v=C(x,d,"no-duplicate",A.msg(`${f} image $1 parameter`,m));return v.suggestions=[{desc:"remove",range:[v.startIndex-1,v.endIndex],text:""}],v};for(let f of i){if(f==="invalid"||f==="width"&&u)continue;let m=n.filter(({name:x})=>x===f);f==="caption"&&(m=[...m.slice(0,-1).filter(x=>x.text()),...m.slice(-1)]),m.length>1&&t.push(...m.map(p("duplicated",f)))}return s.length>1&&t.push(...n.filter(({name:f})=>ms.has(f)).map(p("conflicting","frame"))),o.length>1&&t.push(...n.filter(({name:f})=>fs.has(f)).map(p("conflicting","horizontal-alignment"))),l.length>1&&t.push(...n.filter(({name:f})=>xs.has(f)).map(p("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()}json(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e),{extension:n}=this;return n&&(t.extension=n),t}}});var Mt,jn=y(()=>{"use strict";B();q();P();Pn();Mt=class extends Ot{constructor(e,t,n,i=A.getConfig(),s=[]){let o;if(n!==void 0){let{length:l}=s;o=new k(n,i,s);for(let g=1;g<11;g++)o.parseOnce();s.splice(l,1)}super(t,o==null?void 0:o.toString(),i,s);ie(this,"privateType","imagemap-image");this.setAttribute("bracket",!1),this.privateType=`${e}-image`,this.seal("privateType",!0)}get type(){return this.privateType}getTitle(e){let t=this.type==="imagemap-image";return this.normalizeTitle(this.firstChild.toString(),t?0:6,e,!0,!t)}getAttribute(e){return e==="padding"?0:super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),{ns:i}=this.getAttribute("title");if(i!==6){let s=I(this,{start:e},"invalid-gallery","invalid gallery image");s.suggestions=[{desc:"prefix",range:[e,e],text:"File:"}],n.push(s)}return n}}});var at,bs,Bn,Vr,Ts=y(()=>{"use strict";q();P();jn();Ge();Vr=class extends k{constructor(e,t=A.getConfig(),n=[]){var i;super(void 0,t,n,{});T(this,at);for(let s of(i=e==null?void 0:e.split(`
10
+ `))!=null?i:[]){let o=/^([^|]+)(?:\|(.*))?/u.exec(s);if(!o){super.insertAt(s.trim()?new G(s,t,n):s);continue}let[,l,g]=o;N(this,at,bs).call(this,l)?super.insertAt(new Mt("gallery",l,g,t,n)):super.insertAt(new G(s,t,n))}}get type(){return"ext-inner"}get widths(){return N(this,at,Bn).call(this,"widths")}get heights(){return N(this,at,Bn).call(this,"heights")}toString(e){return super.toString(e,`
11
11
  `)}text(){return super.text(`
12
12
  `).replace(/\n\s*\n/gu,`
13
- `)}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 u=l.toString(),{length:g}=u,d=u.trim(),{type:p}=l,h=n+o,m=o?0:i;if(p==="noinclude"&&d&&!/^<!--.*-->$/u.test(d)){let f=e+g;s.push({rule:"no-ignored",message:b.msg("invalid content in <$1>","gallery"),severity:d.startsWith("|")?"warning":"error",startIndex:e,endIndex:f,startLine:h,endLine:h,startCol:m,endCol:m+g,suggestions:[{desc:"remove",range:[e,f],text:""},{desc:"comment",range:[e,f],text:`<!--${u}-->`}]})}else p!=="noinclude"&&p!=="text"&&s.push(...l.lint(e,t));e+=g+1}return s}print(){return super.print({sep:`
14
- `})}json(e,t=this.getAbsoluteIndex()){let n=super.json(void 0,t);return Object.assign(n,{widths:this.widths,heights:this.heights}),n}};ot=new WeakSet,bs=function(e){return this.normalizeTitle(e,6,!0,!0,!0).valid},jn=function(e){var i,s;let t=(i=this.parentNode)==null?void 0:i.getAttr(e),n=typeof t=="string"&&((s=/^(\d+)\s*(?:px)?$/u.exec(t))==null?void 0:s[1]);return n&&Number(n)||120}});var Mt,Bn=y(()=>{"use strict";q();lr();Mt=class extends $e{get type(){return"link"}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e);return this.closest("ext-link-text")&&t.push(E(this,{start:r},"nested-link","internal link in an external link")),t}}});var pa,ua,fr,je,Vr=y(()=>{"use strict";q();H();K();P();j();pa=String.raw`(?:[${Se}\t]|&nbsp;|&#0*160;|&#[xX]0*[aA]0;)`,ua=new RegExp(`${pa}+`,"gu"),je=class extends v{constructor(e,t="free-ext-link",n=b.getConfig(),i){super(e,n,i,{});x(this,fr);T(this,fr,t)}get type(){return c(this,fr)}get innerText(){let e=new Map([["!","|"],["=","="]]),t=be(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(ua," ")),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:ki(e)}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),i=new R(this,e),{type:s,childNodes:o}=this;if(s==="magic-link"){let{link:d}=this;if(d.startsWith("ISBN")){let p=[...d.slice(5)].map(h=>h==="X"?10:Number(h));(p.length===10&&p.reduce((h,m,f)=>h+m*(10-f),0)%11||p.length===13&&(p[12]===10||p.reduce((h,m,f)=>h+m*(f%2?3:1),0)%10))&&n.push(E(this,i,"invalid-isbn","invalid ISBN"))}return n}let l=s==="ext-link-url",u=l?/\|/u:/[,;。:!?()]+/u,g=o.find(d=>d.type==="text"&&u.test(d.data));if(g){let{data:d}=g,p=C(g,i,"unterminated-url",b.msg("$1 in URL",l?'"|"':"full-width punctuation"),"warning"),{index:h,0:m}=u.exec(d),f=p.startIndex+h;p.suggestions=l?[{desc:"whitespace",range:[f,f+1],text:" "}]:[{desc:"whitespace",range:[f,f],text:" "},{desc:"escape",range:[f,f+m.length],text:encodeURI(m)}],n.push(p)}return n}getUrl(e){}};fr=new WeakMap});var Be,zt,qn=y(()=>{"use strict";q();P();j();Vr();zt=class extends v{constructor(e,t="",n="",i=b.getConfig(),s=[]){super(void 0,i,s,{});x(this,Be);let o=e&&/^\0\d+f\x7F$/u.test(e)?s[Number(e.slice(1,-2))]:new je(e,"ext-link-url",i,s);if(this.insertAt(o),T(this,Be,t),n){let l=new v(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)}${c(this,Be)}]`:`[${super.toString(e,c(this,Be))}]`}text(){return`[${super.text(" ")}]`}getAttribute(e){return e==="padding"?1:super.getAttribute(e)}getGaps(){return c(this,Be).length}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t);return this.length===1&&this.closest("heading-title")&&n.push(E(this,{start:e},"var-anchor","variable anchor in a section header")),n}print(){return super.print(this.length===1?{pre:"[",post:`${c(this,Be)}]`}:{pre:"[",sep:c(this,Be),post:"]"})}};Be=new WeakMap});var xr,ys=y(()=>{"use strict";P();j();Ue();Bn();qn();xr=class extends v{get type(){return"imagemap-link"}constructor(r,e,t,n=b.getConfig(),i=[]){super(void 0,n,i),this.append(r,e.length===2?new Mt(...e,n,i):new zt(...e,n,i),new G(t,n,i))}}});var Xr,ks=y(()=>{"use strict";q();we();K();P();j();Ue();Pn();ys();Xr=class extends v{get type(){return"ext-inner"}get image(){return this.childNodes.find(Bt("imagemap-image"))}constructor(r,e=b.getConfig(),t=[]){if(super(void 0,e,t,{}),!r)return;let n=r.split(`
15
- `),i=new Set(e.protocol.split("|")),s=G,o=!0,l=!1;for(let u of n){let g=u.trim();if(!(l||!g||g.startsWith("#"))){if(o){let d=u.indexOf("|"),p=d===-1?u:u.slice(0,d),{valid:h,ns:m}=this.normalizeTitle(p,0,!0,!0);if(h&&m===6){let f=new Ot("imagemap",p,d===-1?void 0:u.slice(d+1),e,t);super.insertAt(f),o=!1;continue}else l=!0}else if(u.trim().split(/[\t ]/u,1)[0]==="desc"){super.insertAt(u);continue}else if(u.includes("[")){let d=u.indexOf("["),p=u.slice(d),h=/^\[\[([^|]+)(?:\|([^\]]+))?\]\][\w\s]*$/u.exec(p);if(h){if(this.normalizeTitle(h[1],0,!0,!0,!1,!0).valid){super.insertAt(new xr(u.slice(0,d),h.slice(1),p.slice(p.indexOf("]]")+2),e,t));continue}}else if(i.has(p.slice(1,p.indexOf(":")+1))||i.has(p.slice(1,p.indexOf("//")+2))){let m=/^\[([^\]\s]+)(?:(\s+(?!\s))([^\]]*))?\][\w\s]*$/u.exec(p);if(m){super.insertAt(new xr(u.slice(0,d),m.slice(1),p.slice(p.indexOf("]")+1),e,t));continue}}}}super.insertAt(new s(u,e,t))}}toString(r){return super.toString(r,`
13
+ `)}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 g=l.toString(),{length:u}=g,d=g.trim(),{type:p}=l,h=n+o,f=o?0:i;if(p==="noinclude"&&d&&!/^<!--.*-->$/u.test(d)){let m=e+u;s.push({rule:"no-ignored",message:A.msg("invalid content in <$1>","gallery"),severity:d.startsWith("|")?"warning":"error",startIndex:e,endIndex:m,startLine:h,endLine:h,startCol:f,endCol:f+u,suggestions:[{desc:"remove",range:[e,m],text:""},{desc:"comment",range:[e,m],text:`<!--${g}-->`}]})}else p!=="noinclude"&&p!=="text"&&s.push(...l.lint(e,t));e+=u+1}return s}print(){return super.print({sep:`
14
+ `})}json(e,t=this.getAbsoluteIndex()){let n=super.json(void 0,t);return Object.assign(n,{widths:this.widths,heights:this.heights}),n}};at=new WeakSet,bs=function(e){return this.normalizeTitle(e,6,!0,!0,!0).valid},Bn=function(e){var i,s;let t=(i=this.parentNode)==null?void 0:i.getAttr(e),n=typeof t=="string"&&((s=/^(\d+)\s*(?:px)?$/u.exec(t))==null?void 0:s[1]);return n&&Number(n)||120}});var zt,qn=y(()=>{"use strict";B();dr();zt=class extends $e{get type(){return"link"}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e);return this.closest("ext-link-text")&&t.push(I(this,{start:r},"nested-link","internal link in an external link")),t}}});var pa,ua,xr,je,Xr=y(()=>{"use strict";B();Q();K();q();P();pa=String.raw`(?:[${Se}\t]|&nbsp;|&#0*160;|&#[xX]0*[aA]0;)`,ua=new RegExp(`${pa}+`,"gu"),je=class extends k{constructor(e,t="free-ext-link",n=A.getConfig(),i){super(e,n,i,{});T(this,xr);b(this,xr,t)}get type(){return c(this,xr)}get innerText(){let e=new Map([["!","|"],["=","="]]),t=be(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(ua," ")),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:vi(e)}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),i=new R(this,e),{type:s,childNodes:o}=this;if(s==="magic-link"){let{link:d}=this;if(d.startsWith("ISBN")){let p=[...d.slice(5)].map(h=>h==="X"?10:Number(h));(p.length===10&&p.reduce((h,f,m)=>h+f*(10-m),0)%11||p.length===13&&(p[12]===10||p.reduce((h,f,m)=>h+f*(m%2?3:1),0)%10))&&n.push(I(this,i,"invalid-isbn","invalid ISBN"))}return n}let l=s==="ext-link-url",g=l?/\|/u:/[,;。:!?()]+/u,u=o.find(d=>d.type==="text"&&g.test(d.data));if(u){let{data:d}=u,p=C(u,i,"unterminated-url",A.msg("$1 in URL",l?'"|"':"full-width punctuation"),"warning"),{index:h,0:f}=g.exec(d),m=p.startIndex+h;p.suggestions=l?[{desc:"whitespace",range:[m,m+1],text:" "}]:[{desc:"whitespace",range:[m,m],text:" "},{desc:"escape",range:[m,m+f.length],text:encodeURI(f)}],n.push(p)}return n}getUrl(e){}};xr=new WeakMap});var Be,Wt,_n=y(()=>{"use strict";B();q();P();Xr();Wt=class extends k{constructor(e,t="",n="",i=A.getConfig(),s=[]){super(void 0,i,s,{});T(this,Be);let o=e&&/^\0\d+f\x7F$/u.test(e)?s[Number(e.slice(1,-2))]:new je(e,"ext-link-url",i,s);if(this.insertAt(o),b(this,Be,t),n){let l=new k(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)}${c(this,Be)}]`:`[${super.toString(e,c(this,Be))}]`}text(){return`[${super.text(" ")}]`}getAttribute(e){return e==="padding"?1:super.getAttribute(e)}getGaps(){return c(this,Be).length}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t);return this.length===1&&this.closest("heading-title")&&n.push(I(this,{start:e},"var-anchor","variable anchor in a section header")),n}print(){return super.print(this.length===1?{pre:"[",post:`${c(this,Be)}]`}:{pre:"[",sep:c(this,Be),post:"]"})}};Be=new WeakMap});var br,ys=y(()=>{"use strict";P();Ge();qn();_n();br=class extends k{get type(){return"imagemap-link"}constructor(r,e,t,n,i=[]){super(void 0,n,i),this.append(r,e.length===2?new zt(...e,n,i):new Wt(...e,n,i),new G(t,n,i))}}});var Qr,ks=y(()=>{"use strict";B();Te();K();q();P();Ge();jn();ys();Qr=class extends k{get type(){return"ext-inner"}get image(){return this.childNodes.find(qt("imagemap-image"))}constructor(r,e=A.getConfig(),t=[]){if(super(void 0,e,t,{}),!r)return;let n=r.split(`
15
+ `),i=new Set(e.protocol.split("|")),s=G,o=!0,l=!1;for(let g of n){let u=g.trim();if(!(l||!u||u.startsWith("#"))){if(o){let d=g.indexOf("|"),p=d===-1?g:g.slice(0,d),{valid:h,ns:f}=this.normalizeTitle(p,0,!0,!0);if(h&&f===6){let m=new Mt("imagemap",p,d===-1?void 0:g.slice(d+1),e,t);super.insertAt(m),o=!1;continue}else l=!0}else if(g.trim().split(/[\t ]/u,1)[0]==="desc"){super.insertAt(g);continue}else if(g.includes("[")){let d=g.indexOf("["),p=g.slice(d),h=/^\[\[([^|]+)(?:\|([^\]]+))?\]\][\w\s]*$/u.exec(p);if(h){if(this.normalizeTitle(h[1],0,!0,!0,!1,!0).valid){super.insertAt(new br(g.slice(0,d),h.slice(1),p.slice(p.indexOf("]]")+2),e,t));continue}}else if(i.has(p.slice(1,p.indexOf(":")+1))||i.has(p.slice(1,p.indexOf("//")+2))){let f=/^\[([^\]\s]+)(?:(\s+(?!\s))([^\]]*))?\][\w\s]*$/u.exec(p);if(f){super.insertAt(new br(g.slice(0,d),f.slice(1),p.slice(p.indexOf("]")+1),e,t));continue}}}}super.insertAt(new s(g,e,t))}}toString(r){return super.toString(r,`
16
16
  `)}text(){return super.text(`
17
17
  `).replace(/\n{2,}/gu,`
18
- `)}getGaps(){return 1}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e),n=new R(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=>{let s=C(i,n,"invalid-imagemap","invalid link in <imagemap>");return s.suggestions=[{desc:"remove",range:[s.startIndex-1,s.endIndex],text:""},{desc:"comment",range:[s.startIndex,s.startIndex],text:"# "}],s})):t.push(E(this,n,"invalid-imagemap","<imagemap> without an image")),t}print(){return super.print({sep:`
19
- `})}}});var Qr,vs=y(()=>{"use strict";q();P();We();Qr=class extends se{get type(){return"ext-inner"}lint(r=this.getAbsoluteIndex()){let{name:e,firstChild:{data:t}}=this;if((e==="templatestyles"||e==="section")&&t){let i=E(this,{start:r},"void-ext",b.msg("nothing should be in <$1>",e));return i.fix={range:[r,i.endIndex],text:"",desc:"empty"},[i]}let n=new RegExp(String.raw`<\s*(?:/\s*)${e==="nowiki"?"":"?"}(${e})\b`,"giu");return super.lint(r,n)}}});var Kr={};ae(Kr,{NestedToken:()=>_n});var ca,br,Wt,_n,Jr=y(()=>{"use strict";q();K();pr();Wr();P();j();On();Ue();ca=new Set(["comment","include","arg","template","magic-word"]),_n=class extends v{constructor(e,t,n,i=b.getConfig(),s=[]){if(typeof t=="boolean"){let o=Symbol("InputboxToken"),{length:l}=s;s.push(o),e&&(e=tt(e,i,s,t)),e&&(e=mr(e,i,s)),s.splice(l,1)}else e&&(e=e.replace(t,(o,l,u,g,d)=>{let p=`\0${s.length+1}e\x7F`;return new qe(l,u,g,d,i,!1,s),p}));e&&(e=e.replace(/(^|\0\d+.\x7F)([^\0]+)(?=$|\0\d+.\x7F)/gu,(o,l,u)=>(new G(u,i,s),`${l}\0${s.length}n\x7F`)));super(e,i,s);x(this,br);x(this,Wt);T(this,br,[...n]),T(this,Wt,t)}get type(){return"ext-inner"}lint(e=this.getAbsoluteIndex(),t){let n=new R(this,e),i=c(this,Wt)?"includeonly":"noinclude",s=typeof c(this,Wt)=="boolean"?new RegExp(String.raw`^(?:<${i}(?:\s[^>]*)?/?>|</${i}\s*>)$`,"iu"):/^<!--[\s\S]*-->$/u;return[...super.lint(e,t),...this.childNodes.filter(o=>{let{type:l,name:u}=o;if(l==="ext")return!c(this,br).includes(u);if(ca.has(l))return!1;let g=o.toString().trim();return g&&!s.test(g)}).map(o=>{let l=C(o,n,"no-ignored",b.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})]}};br=new WeakMap,Wt=new WeakMap});var As,Ss,Mn,ha,qe,On=y(()=>{"use strict";q();K();P();Pr();j();Sn();qr();es();Nn();ps();Ts();ks();vs();As=(a,r)=>{let e=new Set(a);return e.delete(r),[...e]};Ss=[It()];qe=class extends(ha=Nt){get type(){return"ext"}constructor(r,e,t,n,i=b.getConfig(),s=!1,o=[]){var p;let l=r.toLowerCase(),u=new He(!e||/^\s/u.test(e)?e:` ${e}`,"ext-attrs",l,i,o),g=oe(Y({},i),{ext:As(i.ext,l),excludes:[...(p=i.excludes)!=null?p:[]]}),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 v(t,g,o);break;case"pre":d=new _r(t,g,o);break;case"dynamicpagelist":d=new Rt(s,t,g,o);break;case"inputbox":g.excludes.push("heading"),d=new Ur(s,t,g,o);break;case"references":{let{NestedToken:h}=(Jr(),Q(Kr));g.excludes.push("heading"),d=new h(t,s,["ref"],g,o);break}case"choose":{let{NestedToken:h}=(Jr(),Q(Kr));d=new h(t,/<(option|choicetemplate)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(\1)>)/gu,["option","choicetemplate"],g,o);break}case"combobox":{let{NestedToken:h}=(Jr(),Q(Kr));d=new h(t,/<(combooption)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(combooption\s*)>)/giu,["combooption"],g,o);break}case"gallery":d=new Hr(t,g,o);break;case"imagemap":d=new Xr(t,g,o);break;default:d=new Qr(t,g,o)}d.setAttribute("name",l),d.type==="plain"&&(d.type="ext-inner"),super(r,u,d,n,i,o),this.seal("closed",!0)}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e),n=new R(this,r);return this.name!=="nowiki"&&this.closest("html-attrs,table-attrs")&&t.push(E(this,n,"parsing-order","extension tag in HTML tag attributes")),this.name==="ref"&&this.closest("heading-title")&&t.push(E(this,n,"var-anchor","variable anchor in a section header")),t}};Mn=ee(ha),qe=re(Mn,0,"ExtToken",Ss,qe),te(Mn,1,qe)});var ws,zn,ma,at,Cs=y(()=>{"use strict";q();Je();P();We();ws=[Te(!1)];at=class extends(ma=se){constructor(e,t,n,i){super(e,n,i);ne(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=E(this,{start:e},"unclosed-comment",b.msg("unclosed $1","HTML comment"));return t.suggestions=[{range:[t.endIndex,t.endIndex],text:"-->",desc:"close"}],[t]}toString(e){return e?"":`<!--${this.innerText}${this.closed?"-->":""}`}print(){return super.print({pre:"&lt;!--",post:this.closed?"--&gt;":""})}};zn=ee(ma),at=re(zn,0,"CommentToken",ws,at),te(zn,1,at)});var Is={};ae(Is,{parseCommentAndExt:()=>tt});var Ns,fa,Wn,xa,ba,Ta,$s,tt,pr=y(()=>{"use strict";qi();Ue();Oi();On();Cs();Ns="<onlyinclude>",fa="</onlyinclude>",{length:Wn}=Ns,xa=new WeakMap,ba=new WeakMap,Ta=(a,r)=>{let e=r?xa:ba;if(e.has(a))return e.get(a);let t=r?"includeonly":"(?:no|only)include",n=r?"noinclude":"includeonly",i=new RegExp(String.raw`<!--[\s\S]*?(?:-->|$)|<${t}(?:\s[^>]*)?/?>|</${t}\s*>|<(${a.join("|")})(\s[^>]*?)?(?:/>|>([\s\S]*?)</(\1\s*)>)|<(${n})(\s[^>]*?)?(?:/>|>([\s\S]*?)(?:</(${n}\s*)>|$))`,"giu");return e.set(a,i),i},$s=a=>{let r=a.indexOf(Ns);return{i:r,j:a.indexOf(fa,r+Wn)}},tt=(a,r,e,t)=>{if(t){let{i:n,j:i}=$s(a);if(n!==-1&&i!==-1){let s="",o=l=>{new G(l,r,e),s+=`\0${e.length-1}n\x7F`};for(;n!==-1&&i!==-1;){let l=`\0${e.length}e\x7F`;new Rr(a.slice(n+Wn,i),r,e),n>0&&o(a.slice(0,n)),s+=l,a=a.slice(i+Wn+1),{i:n,j:i}=$s(a)}return a&&o(a),s}}return a.replace(Ta(r.ext,t),(n,i,s,o,l,u,g,d,p)=>{let h=e.length,m="n";if(i)m="e",new qe(i,s,o,l,r,u,e);else if(n.startsWith("<!--")){m="c";let f=n.endsWith("-->");new at(n.slice(4,f?-3:void 0),f,r,e)}else u?new et(u,g,d,p,r,e):new G(n,r,e);return`\0${h}${m}\x7F`})}});var ya,ka,va,Es,Ut,ke,Ve,Un,Aa,lt,Ls=y(()=>{"use strict";q();H();K();Pr();j();ya=new Set(["if","ifeq","ifexpr","ifexist","iferror","switch"]),ka=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"]),va=new Set(["strike","big","center","font","tt"]);Es=[It()];lt=class extends(Aa=v){constructor(e,t,n,i,s,o){super(void 0,s,o);x(this,Ut);x(this,ke);x(this,Ve);this.insertAt(t),this.setAttribute("name",e.toLowerCase()),T(this,Ut,n),T(this,ke,i),T(this,Ve,e)}get type(){return"html"}get selfClosing(){return c(this,ke)}get closing(){return c(this,Ut)}toString(e){return`<${this.closing?"/":""}${c(this,Ve)}${super.toString(e)}${c(this,ke)?"/":""}>`}text(){let{closing:e}=this,t=c(this,Ve)+(e?"":super.text());return`<${e?"/":""}${t}${c(this,ke)?"/":""}>`}getAttribute(e){return e==="padding"?c(this,Ve).length+(this.closing?2:1):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){var s;let n=super.lint(e,t),i=new R(this,e);if(this.name==="h1"&&!this.closing){let o=E(this,i,"h1","<h1>");o.suggestions=[{desc:"h2",range:[e+2,e+3],text:"2"}],n.push(o)}if(this.closest("table-attrs")){let o=E(this,i,"parsing-order","HTML tag in table attributes");o.fix={desc:"remove",range:[e,o.endIndex],text:""},n.push(o)}try{this.findMatchingTag()}catch(o){if(o instanceof SyntaxError){let{message:l}=o,u=l.split(":",1)[0].toLowerCase(),g=E(this,i,"unmatched-tag",u),d={desc:"no self-closing",range:[g.endIndex-2,g.endIndex-1],text:""};switch(u){case"unclosed tag":{let p=(s=this.parentNode)==null?void 0:s.childNodes;ka.has(this.name)&&(p!=null&&p.slice(0,p.indexOf(this)).some(({type:h,name:m})=>h==="html"&&m===this.name))?g.suggestions=[{desc:"close",range:[e+1,e+1],text:"/"}]:this.closest("heading-title")||(g.severity="warning");break}case"unmatched closing tag":{let p=this.closest("magic-word");p&&ya.has(p.name)?g.severity="warning":g.suggestions=[{desc:"remove",range:[e,g.endIndex],text:""}];break}case"tag that is both closing and self-closing":{let{html:[p,,h]}=this.getAttribute("config"),m={desc:"open",range:[e+1,e+2],text:""};h.includes(this.name)?g.fix=m:p.includes(this.name)?g.fix=d:g.suggestions=[m,d];break}case"invalid self-closing tag":g.suggestions=[d,{desc:"close",range:[g.endIndex-2,g.endIndex],text:`></${this.name}>`}]}n.push(g)}}return va.has(this.name)&&n.push(E(this,i,"obsolete-tag","obsolete HTML tag","warning")),(this.name==="b"||this.name==="strong")&&this.closest("heading-title")&&n.push(E(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=vi(this.toString());if(o&&(c(this,ke)||n.includes(i)))throw new SyntaxError(`Tag that is both closing and self-closing: ${l}`);if(n.includes(i)||c(this,ke)&&t.includes(i))return this;if(c(this,ke)&&e.includes(i))throw new SyntaxError(`Invalid self-closing tag: ${l}`);if(!s)return;let{childNodes:u}=s,g=u.indexOf(this),d=o?u.slice(0,g).reverse():u.slice(g+1),p=o?-1:1;for(let h of d)if(!(!h.is("html")||h.name!==i)&&(c(h,Ut)?p--:p++,p===0))return h;throw new SyntaxError(`${o?"Unmatched closing":"Unclosed"} tag: ${l}`)}print(){return super.print({pre:`&lt;${this.closing?"/":""}${c(this,Ve)}`,post:`${c(this,ke)?"/":""}&gt;`})}json(e,t=this.getAbsoluteIndex()){let n=super.json(void 0,t);return Object.assign(n,{closing:this.closing,selfClosing:c(this,ke)}),n}};Un=ee(Aa),Ut=new WeakMap,ke=new WeakMap,Ve=new WeakMap,lt=re(Un,0,"HtmlToken",Es,lt),te(Un,1,lt)});var Fs={};ae(Fs,{parseHtml:()=>wa});var Sa,wa,Rs=y(()=>{"use strict";qr();Ls();Sa=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,wa=(a,r,e)=>{var s;let{html:t}=r;(s=r.htmlElements)!=null||(r.htmlElements=new Set([...t[0],...t[1],...t[2]]));let n=a.split("<"),i=n.shift();for(let o of n){let l=Sa.exec(o),u=l==null?void 0:l[2],g=u==null?void 0:u.toLowerCase();if(!l||!r.htmlElements.has(g)){i+=`<${o}`;continue}let[,d,,p="",h,m]=l,{length:f}=e,k=new He(p,"html-attrs",g,r,e),A=k.getAttr("itemprop");if(g==="meta"&&(A===void 0||k.getAttr("content")===void 0)||g==="link"&&(A===void 0||k.getAttr("href")===void 0)){i+=`<${o}`,e.length=f;continue}i+=`\0${e.length}x\x7F${m}`,new lt(u,k,d==="/",h==="/>",r,e)}return i}});var Gt,Gn=y(()=>{"use strict";Pr();P();j();wt();qr();Gt=class extends It(1)(v){constructor(r,e,t,n,i=b.getConfig(),s=[],o){super(void 0,i,s,o),this.append(new ye(e,r,"table-syntax",i,s,{}),new He(n,"table-attrs",t,i,s))}}});var ve,Tr,yr,Dn,Dt,Hn=y(()=>{"use strict";q();K();P();j();Gn();Dt=class extends Gt{constructor(e,t,n=b.getConfig(),i=[]){var u;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);x(this,yr);x(this,ve,"");x(this,Tr);s&&([$r(this,ve)._]=s);let l=new v(t==null?void 0:t.slice(((u=s==null?void 0:s.index)!=null?u:NaN)+c(this,ve).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 N(this,yr,Dn).call(this).subtype}afterBuild(){c(this,ve).includes("\0")&&T(this,ve,this.buildFromStr(c(this,ve),0)),super.afterBuild()}toString(e){let{childNodes:[t,n,i]}=this;return t.toString(e)+n.toString(e)+c(this,ve)+i.toString(e)}text(){let{childNodes:[e,t,n]}=this;return e.text()+t.text()+c(this,ve)+n.text()}getGaps(e){return e===1?c(this,ve).length:0}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),i=new R(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("||"),u=C(s,i,"pipe-like",'additional "|" in a table cell',l?"error":"warning");if(l){let g={caption:"|+",td:"|",th:"!"}[this.subtype];u.fix={range:[u.startIndex,u.endIndex],text:o.replace(/\|\|/gu,`
20
- ${g}`),desc:"newline"}}else u.suggestions=[{desc:"escape",range:[u.startIndex,u.endIndex],text:o.replace(/\|/gu,"&#124;")}];n.push(u)}}return n}isIndependent(){return this.firstChild.text().startsWith(`
21
- `)}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()}${c(this,ve)}${n.print()}</span>`}json(e,t=this.getAbsoluteIndex()){let n=super.json(void 0,t);return Object.assign(n,{subtype:this.subtype,rowspan:this.rowspan,colspan:this.colspan}),n}};ve=new WeakMap,Tr=new WeakMap,yr=new WeakSet,Dn=function(){return Fe(c(this,Tr),()=>{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 Y({},N(o=i,yr,Dn).call(o))},e=>{T(this,Tr,e)})}});var Ht,Vn=y(()=>{"use strict";q();Gn();Hn();Ht=class extends Gt{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 Dt&&r.isIndependent()&&!r.firstChild.text().endsWith("+")))}}});var Ca,$a,Na,Xn,Yr,Ps=y(()=>{"use strict";q();we();K();P();Vn();wt();Ca=/^\n[^\S\n]*(?:\|\}|\{\{\s*!\s*\}\}\}|\{\{\s*!\)\s*\}\})$/u,$a=(a,r)=>new Array(a).fill(void 0).map((e,t)=>r(t)),Na=({type:a})=>a==="tr"||a==="table-syntax",Xn=class extends Array{},Yr=class extends Ht{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 R(this,r);this.closed||t.push(C(this.firstChild,n,"unclosed-table",b.msg("unclosed $1","table")));let i=this.getLayout(),{length:s}=i;if(s>1){let o=1,l=1/0,u=0;for(;u<s;u++){let g=i[u],d=g.length;if(d<o)break;d<l&&(l=d);let p=g.indexOf(g[d-1])+1;if(p>l)break;p>o&&(o=p)}if(u<s){let g=C(this.getNthRow(u),n,"table-layout","inconsistent table layout","warning");g.startIndex++,g.startLine++,g.startCol=0,t.push(g)}}return t}close(r=`
22
- |}`,e){let t=this.getAttribute("config"),n=this.getAttribute("accum"),i=e?[r]:b.parse(r,this.getAttribute("include"),2,t).childNodes;le.run(()=>{let s=new ye(void 0,Ca,"table-syntax",t,n);super.insertAt(s)}),this.lastChild.replaceChildren(...i)}getLayout(r){let e=this.getAllRows(),{length:t}=e,n=new Xn(...$a(t,()=>[]));for(let[i,s]of n.entries()){let o=0,l=0,u;for(let g of e[i].childNodes.slice(2))if(g.type==="td"){if(g.isIndependent()&&(u=g.subtype!=="caption"),u){let d={row:i,column:o},{rowspan:p,colspan:h}=g;for(o++;s[l];)l++;for(let m=i;m<Math.min(i+p,t);m++)for(let f=l;f<l+h;f++)n[m][f]=d;l+=h}}else if(Na(g))break}return n}getAllRows(){return[...super.getRowCount()?[this]:[],...this.childNodes.slice(1).filter(r=>r.type==="tr"&&r.getRowCount()>0)]}getNthRow(r,e,t){let n=super.getRowCount();if(r===0&&n)return this;n&&r--;for(let i of this.childNodes.slice(2)){let{type:s}=i;if(s==="tr"&&i.getRowCount()&&(r--,r<0))return i}}json(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return t.closed=this.closed,t}}});var Zr,js=y(()=>{"use strict";Vn();Zr=class extends Ht{get type(){return"tr"}constructor(r,e,t,n){super(/^\n[^\S\n]*(?:\|-+|\{\{\s*!\s*\}\}-+|\{\{\s*!-\s*\}\}-*)$/u,r,"tr",e,t,n)}}});var Vt,Qn=y(()=>{"use strict";We();Vt=class extends se{get indent(){return this.innerText.split(":").length-1}json(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e),{indent:n}=this;return n&&(t.indent=n),t}}});var Xt,Kn=y(()=>{"use strict";Qn();Xt=class extends Vt{get type(){return"dd"}}});var qs={};ae(qs,{parseTable:()=>Ea});var Ia,Bs,Ea,_s=y(()=>{"use strict";j();Ps();js();Hn();Kn();Ia=a=>a.lastChild.constructor!==v,Bs=(a,r)=>a.type==="td"?r.pop():a,Ea=({firstChild:{data:a},type:r,name:e},t,n)=>{let i=[],s=a.split(`
18
+ `)}getGaps(){return 1}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e),n=new R(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=>{let s=C(i,n,"invalid-imagemap","invalid link in <imagemap>");return s.suggestions=[{desc:"remove",range:[s.startIndex-1,s.endIndex],text:""},{desc:"comment",range:[s.startIndex,s.startIndex],text:"# "}],s})):t.push(I(this,n,"invalid-imagemap","<imagemap> without an image")),t}print(){return super.print({sep:`
19
+ `})}}});var Kr,vs=y(()=>{"use strict";B();q();Ue();Kr=class extends oe{get type(){return"ext-inner"}lint(r=this.getAbsoluteIndex()){let{name:e,firstChild:{data:t}}=this;if((e==="templatestyles"||e==="section")&&t){let i=I(this,{start:r},"void-ext",A.msg("nothing should be in <$1>",e));return i.fix={range:[r,i.endIndex],text:"",desc:"empty"},[i]}let n=new RegExp(String.raw`<\s*(?:/\s*)${e==="nowiki"?"":"?"}(${e})\b`,"giu");return super.lint(r,n)}}});var Jr={};le(Jr,{NestedToken:()=>On});var ca,Tr,Ut,On,Yr=y(()=>{"use strict";B();K();ur();Ur();q();P();Mn();Ge();ca=new Set(["comment","include","arg","template","magic-word"]),On=class extends k{constructor(e,t,n,i,s=[]){if(typeof t=="boolean"){let o=Symbol("InputboxToken"),{length:l}=s;s.push(o),e&&(e=rt(e,i,s,t)),e&&(e=fr(e,i,s)),s.splice(l,1)}else e&&(e=e.replace(t,(o,l,g,u,d)=>{let p=`\0${s.length+1}e\x7F`;return new qe(l,g,u,d,i,!1,s),p}));e&&(e=e.replace(/(^|\0\d+.\x7F)([^\0]+)(?=$|\0\d+.\x7F)/gu,(o,l,g)=>(new G(g,i,s),`${l}\0${s.length}n\x7F`)));super(e,i,s);T(this,Tr);T(this,Ut);b(this,Tr,[...n]),b(this,Ut,t)}get type(){return"ext-inner"}lint(e=this.getAbsoluteIndex(),t){let n=new R(this,e),i=c(this,Ut)?"includeonly":"noinclude",s=typeof c(this,Ut)=="boolean"?new RegExp(String.raw`^(?:<${i}(?:\s[^>]*)?/?>|</${i}\s*>)$`,"iu"):/^<!--[\s\S]*-->$/u;return[...super.lint(e,t),...this.childNodes.filter(o=>{let{type:l,name:g}=o;if(l==="ext")return!c(this,Tr).includes(g);if(ca.has(l))return!1;let u=o.toString().trim();return u&&!s.test(u)}).map(o=>{let l=C(o,n,"no-ignored",A.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})]}};Tr=new WeakMap,Ut=new WeakMap});var As,Ss,zn,ha,qe,Mn=y(()=>{"use strict";B();K();q();jr();P();wn();_r();es();In();ps();Ts();ks();vs();As=(a,r)=>{let e=new Set(a);return e.delete(r),[...e]};Ss=[Et()];qe=class extends(ha=It){get type(){return"ext"}constructor(r,e,t,n,i=A.getConfig(),s=!1,o=[]){var p;let l=r.toLowerCase(),g=new Ve(!e||/^\s/u.test(e)?e:` ${e}`,"ext-attrs",l,i,o),u=ae(Y({},i),{ext:As(i.ext,l),excludes:[...(p=i.excludes)!=null?p:[]]}),d;switch(u.inExt=!0,l){case"tab":u.ext=As(u.ext,"tabs");case"indicator":case"poem":case"ref":case"option":case"combooption":case"tabs":case"poll":case"seo":l==="poem"&&u.excludes.push("heading"),d=new k(t,u,o);break;case"pre":d=new Or(t,u,o);break;case"dynamicpagelist":d=new Pt(s,t,u,o);break;case"inputbox":u.excludes.push("heading"),d=new Gr(s,t,u,o);break;case"references":{let{NestedToken:h}=(Yr(),X(Jr));u.excludes.push("heading"),d=new h(t,s,["ref"],u,o);break}case"choose":{let{NestedToken:h}=(Yr(),X(Jr));d=new h(t,/<(option|choicetemplate)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(\1)>)/gu,["option","choicetemplate"],u,o);break}case"combobox":{let{NestedToken:h}=(Yr(),X(Jr));d=new h(t,/<(combooption)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(combooption\s*)>)/giu,["combooption"],u,o);break}case"gallery":d=new Vr(t,u,o);break;case"imagemap":d=new Qr(t,u,o);break;default:d=new Kr(t,u,o)}d.setAttribute("name",l),d.type==="plain"&&(d.type="ext-inner"),super(r,g,d,n,i,o),this.seal("closed",!0)}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e),n=new R(this,r);return this.name!=="nowiki"&&this.closest("html-attrs,table-attrs")&&t.push(I(this,n,"parsing-order","extension tag in HTML tag attributes")),this.name==="ref"&&this.closest("heading-title")&&t.push(I(this,n,"var-anchor","variable anchor in a section header")),t}};zn=te(ha),qe=ne(zn,0,"ExtToken",Ss,qe),re(zn,1,qe)});var ws,Wn,ma,lt,Cs=y(()=>{"use strict";B();Ye();q();Ue();ws=[ye(!1)];lt=class extends(ma=oe){constructor(e,t,n,i){super(e,n,i);ie(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=I(this,{start:e},"unclosed-comment",A.msg("unclosed $1","HTML comment"));return t.suggestions=[{range:[t.endIndex,t.endIndex],text:"-->",desc:"close"}],[t]}toString(e){return e?"":`<!--${this.innerText}${this.closed?"-->":""}`}print(){return super.print({pre:"&lt;!--",post:this.closed?"--&gt;":""})}};Wn=te(ma),lt=ne(Wn,0,"CommentToken",ws,lt),re(Wn,1,lt)});var Is={};le(Is,{parseCommentAndExt:()=>rt});var Ns,fa,Un,xa,ba,Ta,$s,rt,ur=y(()=>{"use strict";qi();Ge();Oi();Mn();Cs();Ns="<onlyinclude>",fa="</onlyinclude>",{length:Un}=Ns,xa=new WeakMap,ba=new WeakMap,Ta=(a,r)=>{let e=r?xa:ba;if(e.has(a))return e.get(a);let t=r?"includeonly":"(?:no|only)include",n=r?"noinclude":"includeonly",i=new RegExp(String.raw`<!--[\s\S]*?(?:-->|$)|<${t}(?:\s[^>]*)?/?>|</${t}\s*>|<(${a.join("|")})(\s[^>]*?)?(?:/>|>([\s\S]*?)</(\1\s*)>)|<(${n})(\s[^>]*?)?(?:/>|>([\s\S]*?)(?:</(${n}\s*)>|$))`,"giu");return e.set(a,i),i},$s=a=>{let r=a.indexOf(Ns);return{i:r,j:a.indexOf(fa,r+Un)}},rt=(a,r,e,t)=>{if(t){let{i:n,j:i}=$s(a);if(n!==-1&&i!==-1){let s="",o=l=>{new G(l,r,e),s+=`\0${e.length-1}n\x7F`};for(;n!==-1&&i!==-1;){let l=`\0${e.length}e\x7F`;new Pr(a.slice(n+Un,i),r,e),n>0&&o(a.slice(0,n)),s+=l,a=a.slice(i+Un+1),{i:n,j:i}=$s(a)}return a&&o(a),s}}return a.replace(Ta(r.ext,t),(n,i,s,o,l,g,u,d,p)=>{let h=e.length,f="n";if(i)f="e",new qe(i,s,o,l,r,g,e);else if(n.startsWith("<!--")){f="c";let m=n.endsWith("-->");new lt(n.slice(4,m?-3:void 0),m,r,e)}else g?new tt(g,u,d,p,r,e):new G(n,r,e);return`\0${h}${f}\x7F`})}});var ya,ka,va,Es,Gt,Ie,Xe,_e,Gn,Aa,dt,Ls=y(()=>{"use strict";B();Te();K();jr();P();ya=new Set(["if","ifeq","ifexpr","ifexist","iferror","switch"]),ka=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"]),va=new Set(["strike","big","center","font","tt"]);Es=[Et()];dt=class extends(Aa=k){constructor(e,t,n,i,s,o){super(void 0,s,o);T(this,Gt);T(this,Ie);T(this,Xe);T(this,_e);this.insertAt(t),this.setAttribute("name",e.toLowerCase()),b(this,Gt,n),b(this,Ie,i),b(this,Xe,e)}get type(){return"html"}get selfClosing(){return c(this,Ie)}get closing(){return c(this,Gt)}toString(e){return`<${this.closing?"/":""}${c(this,Xe)}${super.toString(e)}${c(this,Ie)?"/":""}>`}text(){let{closing:e}=this,t=c(this,Xe)+(e?"":super.text());return`<${e?"/":""}${t}${c(this,Ie)?"/":""}>`}getAttribute(e){return e==="padding"?c(this,Xe).length+(this.closing?2:1):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),{name:i,parentNode:s,closing:o,selfClosing:l}=this,g=new R(this,e);if(i==="h1"&&!o){let m=I(this,g,"h1","<h1>");m.suggestions=[{desc:"h2",range:[e+2,e+3],text:"2"}],n.push(m)}if(this.closest("table-attrs")){let m=I(this,g,"parsing-order","HTML tag in table attributes");m.fix={desc:"remove",range:[e,m.endIndex],text:""},n.push(m)}va.has(i)&&n.push(I(this,g,"obsolete-tag","obsolete HTML tag","warning")),(i==="b"||i==="strong")&&this.closest("heading-title")&&n.push(I(this,g,"bold-header","bold in section header","warning"));let{html:[,u,d]}=this.getAttribute("config"),p=d.includes(i),h=u.includes(i);if(o&&(l||p)||l&&(!p&&!h)){let m=I(this,g,"unmatched-tag",o?"tag that is both closing and self-closing":"invalid self-closing tag"),x={desc:"open",range:[e+1,e+2],text:""},v={desc:"no self-closing",range:[m.endIndex-2,m.endIndex-1],text:""};h?m.suggestions=[x,v]:o?m.fix=p?x:v:m.suggestions=[v,{desc:"close",range:[m.endIndex-2,m.endIndex],text:`></${i}>`}],n.push(m)}else if(!this.findMatchingTag()){let m=I(this,g,"unmatched-tag",o?"unmatched closing tag":"unclosed tag");if(o){let x=this.closest("magic-word");x&&ya.has(x.name)?m.severity="warning":m.suggestions=[{desc:"remove",range:[e,m.endIndex],text:""}]}else{let x=s==null?void 0:s.childNodes;ka.has(i)&&(x!=null&&x.slice(0,x.indexOf(this)).some(({type:v,name:S})=>v==="html"&&S===i))?m.suggestions=[{desc:"close",range:[e+1,e+1],text:"/"}]:this.closest("heading-title")||(m.severity="warning")}n.push(m)}return n}findMatchingTag(){return we(c(this,_e),()=>{let{name:e,parentNode:t,closing:n,selfClosing:i}=this,{html:[,s,o]}=this.getAttribute("config"),l=o.includes(e),g=s.includes(e);if(l||g&&i)return this;if(!t)return;let{childNodes:u}=t,d=u.indexOf(this),p=n?u.slice(0,d).reverse():u.slice(d+1),h=[this],{rev:f}=Z;for(let m of p)if(!(!m.is("html")||m.name!==e||g&&c(m,Ie)))if(c(m,Gt)===n)h.push(m);else{let x=h.pop();if(x===this)return m;b(x,_e,[f,m]),b(m,_e,[f,x])}for(let m of h)b(m,_e,[f,void 0])},e=>{b(this,_e,e),e[1]&&e[1]!==this&&b(e[1],_e,[Z.rev,this])})}print(){return super.print({pre:`&lt;${this.closing?"/":""}${c(this,Xe)}`,post:`${c(this,Ie)?"/":""}&gt;`})}json(e,t=this.getAbsoluteIndex()){let n=super.json(void 0,t);return Object.assign(n,{closing:this.closing,selfClosing:c(this,Ie)}),n}};Gn=te(Aa),Gt=new WeakMap,Ie=new WeakMap,Xe=new WeakMap,_e=new WeakMap,dt=ne(Gn,0,"HtmlToken",Es,dt),re(Gn,1,dt)});var Fs={};le(Fs,{parseHtml:()=>wa});var Sa,wa,Rs=y(()=>{"use strict";_r();Ls();Sa=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,wa=(a,r,e)=>{var s;let{html:t}=r;(s=r.htmlElements)!=null||(r.htmlElements=new Set([...t[0],...t[1],...t[2]]));let n=a.split("<"),i=n.shift();for(let o of n){let l=Sa.exec(o),g=l==null?void 0:l[2],u=g==null?void 0:g.toLowerCase();if(!l||!r.htmlElements.has(u)){i+=`<${o}`;continue}let[,d,,p="",h,f]=l,{length:m}=e,x=new Ve(p,"html-attrs",u,r,e),v=x.getAttr("itemprop");if(u==="meta"&&(v===void 0||x.getAttr("content")===void 0)||u==="link"&&(v===void 0||x.getAttr("href")===void 0)){i+=`<${o}`,e.length=m;continue}i+=`\0${e.length}x\x7F${f}`,new dt(g,x,d==="/",h==="/>",r,e)}return i}});var Dt,Dn=y(()=>{"use strict";jr();q();P();Ct();_r();Dt=class extends Et(1)(k){constructor(r,e,t,n,i=A.getConfig(),s=[],o){super(void 0,i,s,o),this.append(new ke(e,r,"table-syntax",i,s,{}),new Ve(n,"table-attrs",t,i,s))}}});var ve,yr,kr,Hn,Ht,Vn=y(()=>{"use strict";B();K();q();P();Dn();Ht=class extends Dt{constructor(e,t,n=A.getConfig(),i=[]){var g;let s=/\||\0\d+!\x7F/u.exec(t!=null?t:""),o=s?t.slice(0,s.index):"";/\[\[|-\{/u.test(o)&&(s=null,o="");super(/^(?:\n[^\S\n]*(?:[|!]|\|\+|\{\{\s*!\s*\}\}\+?)|(?:\||\{\{\s*!\s*\}\}){2}|!!|\{\{\s*!!\s*\}\})$/u,e,"td",o,n,i);T(this,kr);T(this,ve,"");T(this,yr);s&&([Nr(this,ve)._]=s);let l=new k(t==null?void 0:t.slice(((g=s==null?void 0:s.index)!=null?g:NaN)+c(this,ve).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 N(this,kr,Hn).call(this).subtype}afterBuild(){c(this,ve).includes("\0")&&b(this,ve,this.buildFromStr(c(this,ve),0)),super.afterBuild()}toString(e){let{childNodes:[t,n,i]}=this;return t.toString(e)+n.toString(e)+c(this,ve)+i.toString(e)}text(){let{childNodes:[e,t,n]}=this;return e.text()+t.text()+c(this,ve)+n.text()}getGaps(e){return e===1?c(this,ve).length:0}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),i=new R(this,e+this.getRelativeIndex(this.length-1));for(let s of this.lastChild.childNodes)if(s.type==="text"){let{data:o}=s;if(o.includes("|")){let l=o.includes("||"),g=C(s,i,"pipe-like",'additional "|" in a table cell',l?"error":"warning");if(l){let u={caption:"|+",td:"|",th:"!"}[this.subtype];g.fix={range:[g.startIndex,g.endIndex],text:o.replace(/\|\|/gu,`
20
+ ${u}`),desc:"newline"}}else g.suggestions=[{desc:"escape",range:[g.startIndex,g.endIndex],text:o.replace(/\|/gu,"&#124;")}];n.push(g)}}return n}isIndependent(){return this.firstChild.text().startsWith(`
21
+ `)}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()}${c(this,ve)}${n.print()}</span>`}json(e,t=this.getAbsoluteIndex()){let n=super.json(void 0,t);return Object.assign(n,{subtype:this.subtype,rowspan:this.rowspan,colspan:this.colspan}),n}};ve=new WeakMap,yr=new WeakMap,kr=new WeakSet,Hn=function(){return we(c(this,yr),()=>{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 Y({},N(o=i,kr,Hn).call(o))},e=>{b(this,yr,e)})}});var Vt,Xn=y(()=>{"use strict";B();Dn();Vn();Vt=class extends Dt{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 Ht&&r.isIndependent()&&!r.firstChild.text().endsWith("+")))}}});var Ca,$a,Na,Qn,Zr,Ps=y(()=>{"use strict";B();Te();K();q();Xn();Ct();Ca=/^\n[^\S\n]*(?:\|\}|\{\{\s*!\s*\}\}\}|\{\{\s*!\)\s*\}\})$/u,$a=(a,r)=>new Array(a).fill(void 0).map((e,t)=>r(t)),Na=({type:a})=>a==="tr"||a==="table-syntax",Qn=class extends Array{},Zr=class extends Vt{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 R(this,r);this.closed||t.push(C(this.firstChild,n,"unclosed-table",A.msg("unclosed $1","table")));let i=this.getLayout(),{length:s}=i;if(s>1){let o=1,l=1/0,g=0;for(;g<s;g++){let u=i[g],d=u.length;if(d<o)break;d<l&&(l=d);let p=u.indexOf(u[d-1])+1;if(p>l)break;p>o&&(o=p)}if(g<s){let u=C(this.getNthRow(g),n,"table-layout","inconsistent table layout","warning");u.startIndex++,u.startLine++,u.startCol=0,t.push(u)}}return t}close(r=`
22
+ |}`,e){let t=this.getAttribute("config"),n=this.getAttribute("accum"),i=e?[r]:A.parse(r,this.getAttribute("include"),2,t).childNodes;Z.run(()=>{let s=new ke(void 0,Ca,"table-syntax",t,n);super.insertAt(s)}),this.lastChild.replaceChildren(...i)}getLayout(r){let e=this.getAllRows(),{length:t}=e,n=new Qn(...$a(t,()=>[]));for(let[i,s]of n.entries()){let o=0,l=0,g;for(let u of e[i].childNodes.slice(2))if(u.type==="td"){if(u.isIndependent()&&(g=u.subtype!=="caption"),g){let d={row:i,column:o},{rowspan:p,colspan:h}=u;for(o++;s[l];)l++;for(let f=i;f<Math.min(i+p,t);f++)for(let m=l;m<l+h;m++)n[f][m]=d;l+=h}}else if(Na(u))break}return n}getAllRows(){return[...super.getRowCount()?[this]:[],...this.childNodes.slice(1).filter(r=>r.type==="tr"&&r.getRowCount()>0)]}getNthRow(r,e,t){let n=super.getRowCount();if(r===0&&n)return this;n&&r--;for(let i of this.childNodes.slice(2)){let{type:s}=i;if(s==="tr"&&i.getRowCount()&&(r--,r<0))return i}}json(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return t.closed=this.closed,t}}});var en,js=y(()=>{"use strict";Xn();en=class extends Vt{get type(){return"tr"}constructor(r,e,t,n){super(/^\n[^\S\n]*(?:\|-+|\{\{\s*!\s*\}\}-+|\{\{\s*!-\s*\}\}-*)$/u,r,"tr",e,t,n)}}});var Xt,Kn=y(()=>{"use strict";Ue();Xt=class extends oe{get indent(){return this.innerText.split(":").length-1}json(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e),{indent:n}=this;return n&&(t.indent=n),t}}});var Qt,Jn=y(()=>{"use strict";Kn();Qt=class extends Xt{get type(){return"dd"}}});var qs={};le(qs,{parseTable:()=>Ea});var Ia,Bs,Ea,_s=y(()=>{"use strict";P();Ps();js();Vn();Jn();Ia=a=>a.lastChild.constructor!==k,Bs=(a,r)=>a.type==="td"?r.pop():a,Ea=({firstChild:{data:a},type:r,name:e},t,n)=>{let i=[],s=a.split(`
23
23
  `),o=r==="root"||r==="parameter-value"||r==="ext-inner"&&e==="poem"?"":`
24
- ${s.shift()}`,l,u=(g,d)=>{if(!d){o+=g;return}let{lastChild:p}=d;if(Ia(d)){let h=new v(g,t,n);h.type="table-inter",h.setAttribute("stage",3),d.insertAt(h)}else p.setText(p.toString()+g)};for(let g of s){l=i.pop();let[d]=/^(?:\s|\0\d+[cno]\x7F)*/u.exec(g),p=g.slice(d.length),h=/^(:*)((?:\s|\0\d+[cn]\x7F)*)(\{\||\{(?:\0\d+[cn]\x7F)*\0\d+!\x7F|\0\d+\{\x7F)(.*)$/u.exec(p);if(h){for(;l&&l.type!=="td";)l=i.pop();let[,w,$,F,B]=h;w&&new Xt(w,t,n),u(`
25
- ${d}${w&&`\0${n.length-1}d\x7F`}${$}\0${n.length}b\x7F`,l),i.push(...l?[l]:[],new Yr(F,B,t,n));continue}else if(!l){o+=`
26
- ${g}`;continue}let m=/^(?:(\|\}|\0\d+!\x7F\}|\0\d+\}\x7F)|(\|-+|\0\d+!\x7F-+|\0\d+-\x7F-*)(?!-)|(!|(?:\||\0\d+!\x7F)\+?))(.*)$/u.exec(p);if(!m){u(`
27
- ${g}`,l),i.push(l);continue}let[,f,k,A,S]=m;if(f){for(;l.type!=="table";)l=i.pop();l.close(`
28
- ${d}${f}`,!0),u(S,i[i.length-1])}else if(k){l=Bs(l,i),l.type==="tr"&&(l=i.pop());let w=new Zr(`
29
- ${d}${k}`,S,t,n);i.push(l,w),l.insertAt(w)}else{l=Bs(l,i);let w=A==="!"?/!!|(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu:/(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu,$=w.exec(S),F=0,B=`
30
- ${d}${A}`,_=L=>{let X=new Dt(B,S.slice(F,$==null?void 0:$.index),t,n);return L.insertAt(X),X};for(;$;)_(l),{lastIndex:F}=w,[B]=$,$=w.exec(S);i.push(l,_(l))}}return o.slice(1)}});var en,Os=y(()=>{"use strict";We();en=class extends se{get type(){return"hr"}}});var Ms,Jn,La,dt,zs=y(()=>{"use strict";Je();P();We();Ms=[Te()];dt=class extends(La=se){get type(){return"double-underscore"}constructor(r,e,t=b.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:"__"})}};Jn=ee(La),dt=re(Jn,0,"DoubleUnderscoreToken",Ms,dt),te(Jn,1,dt)});var Ws={};ae(Ws,{parseHrAndDoubleUnderscore:()=>Fa});var Fa,Us=y(()=>{"use strict";Os();zs();In();Fa=({firstChild:{data:a},type:r,name:e},t,n)=>{var l,u,g;let{doubleUnderscore:[i,s,o]}=t;return(l=t.insensitiveDoubleUnderscore)!=null||(t.insensitiveDoubleUnderscore=new Set(i)),(u=t.sensitiveDoubleUnderscore)!=null||(t.sensitiveDoubleUnderscore=new Set(s)),(g=t.regexHrAndDoubleUnderscore)!=null||(t.regexHrAndDoubleUnderscore=new RegExp(`__(${[...i,...s].join("|")})__`,"giu")),r!=="root"&&(r!=="ext-inner"||e!=="poem")&&(a=`\0${a}`),a=a.replace(/^((?:\0\d+[cno]\x7F)*)(-{4,})/gmu,(d,p,h)=>(new en(h,t,n),`${p}\0${n.length-1}r\x7F`)).replace(t.regexHrAndDoubleUnderscore,(d,p)=>{var k;let h=t.sensitiveDoubleUnderscore.has(p),m=p.toLowerCase(),f=t.insensitiveDoubleUnderscore.has(m);return h||f?(new dt(p,h,t,n),`\0${n.length-1}${f&&((k=o==null?void 0:o[m])!=null?k:m)==="toc"?"u":"n"}\x7F`):d}).replace(/^((?:\0\d+[cn]\x7F)*)(={1,6})(.+)\2((?:\s|\0\d+[cn]\x7F)*)$/gmu,(d,p,h,m,f)=>{let k=`${p}\0${n.length}h\x7F`;return new jt(h.length,[m,f],t,n),k}),r==="root"||r==="ext-inner"&&e==="poem"?a:a.slice(1)}});var tn,Gs=y(()=>{"use strict";q();K();P();We();tn=class extends se{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=b.msg('lonely "$1"',"'"),s=[],o=new R(this,r),l=(u,g,d)=>[{desc:"escape",range:[u,g],text:"&apos;".repeat(d)},{desc:"remove",range:[u,g],text:""}];if((e==null?void 0:e.type)==="text"&&e.data.endsWith("'")){let u=E(this,o,"lonely-apos",i),{startIndex:g,startLine:d,startCol:p}=u,[,{length:h}]=/(?:^|[^'])('+)$/u.exec(e.data),m=r-h;s.push(oe(Y({},u),{startIndex:m,endIndex:g,endLine:d,startCol:p-h,endCol:p,suggestions:l(m,g,h)}))}if((t==null?void 0:t.type)==="text"&&t.data.startsWith("'")){let u=E(this,o,"lonely-apos",i),{endIndex:g,endLine:d,endCol:p}=u,[{length:h}]=/^'+/u.exec(t.data),m=g+h;s.push(oe(Y({},u),{startIndex:g,endIndex:m,startLine:d,startCol:p,endCol:p+h,suggestions:l(g,m,h)}))}if(n&&this.closest("heading-title")){let u=E(this,o,"bold-header","bold in section header","warning");u.suggestions=[{desc:"remove",range:[r,r+3],text:""}],s.push(u)}return s}json(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return Object.assign(t,{bold:this.bold,italic:this.italic}),t}}});var Ds={};ae(Ds,{parseQuotes:()=>Yn});var Yn,Zn=y(()=>{"use strict";Gs();Yn=(a,r,e,t)=>{var d;let n=a.split(/('{2,})/u),{length:i}=n;if(i===1)return a;let s=0,o=0,l,u,g;for(let p=1;p<i;p+=2){let h=n[p].length;switch(h){case 2:o++;break;case 4:n[p-1]+="'",n[p]="'''";case 3:if(s++,l!==void 0)break;n[p-1].endsWith(" ")?u===void 0&&g===void 0&&(g=p):n[p-1].slice(-2,-1)===" "?l=p:u!=null||(u=p);break;default:n[p-1]+="'".repeat(h-5),n[p]="'''''",o++,s++}}if(o%2===1&&s%2===1){let p=(d=l!=null?l:u)!=null?d:g;p!==void 0&&(n[p]="''",n[p-1]+="'")}for(let p=1;p<i;p+=2)new tn(n[p],r,e),n[p]=`\0${e.length-1}q\x7F`;return n.join("")}});var Hs={};ae(Hs,{parseExternalLinks:()=>ei});var ei,ti=y(()=>{"use strict";H();qn();Vr();ei=(a,r,e,t)=>{var n;return(n=r.regexExternalLinks)!=null||(r.regexExternalLinks=new RegExp(String.raw`\[(\0\d+f\x7F|(?:(?:${r.protocol}|//)${Ie}|\0\d+m\x7F)${Ee}(?=[[\]<>"\t${Se}]|\0\d))([${Se}]*(?![${Se}]))([^\]\x01-\x08\x0A-\x1F\uFFFD]*)\]`,"giu")),a.replace(r.regexExternalLinks,(i,s,o,l)=>{let{length:u}=e,g=/&[lg]t;/u.exec(s);return g&&(o="",l=s.slice(g.index)+o+l,s=s.slice(0,g.index)),t?(new je(s,"ext-link-url",r,e),`[\0${u}f\x7F${o}${l}]`):(new zt(s,o,l,r,e),`\0${u}w\x7F`)})}});var rn,Vs=y(()=>{"use strict";H();lr();rn=class extends $e{get type(){return"category"}get sortkey(){let{childNodes:[,r]}=this;return r&&Ke(r.text())}json(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e),{sortkey:n}=this;return n&&(t.sortkey=n),t}}});var Qs={};ae(Qs,{parseLinks:()=>Xs});var Ra,Xs,Ks=y(()=>{"use strict";P();Zn();ti();Bn();Rn();Vs();Ra=/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(\||\0\d+!\x7F)([\s\S]*)$/u,Xs=(a,r,e,t)=>{var o;(o=r.regexLinks)!=null||(r.regexLinks=new RegExp(String.raw`^\s*(?:${r.protocol}|//)`,"iu"));let n=r.inExt?/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(?:(\||\0\d+!\x7F)([\s\S]*?[^\]]))?\]\]([\s\S]*)$/u:/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(?:(\||\0\d+!\x7F)([\s\S]*?[^\]])?)?\]\]([\s\S]*)$/u,i=a.split("[["),s=i.shift();for(let l=0;l<i.length;l++){let u=!1,g,d,p,h,m=i[l],f=n.exec(m);if(f)[,g,d,p,h]=f,h.startsWith("]")&&(p!=null&&p.includes("["))&&(p+="]",h=h.slice(1));else{let $=Ra.exec(m);$&&(u=!0,[,g,d,p]=$)}if(g===void 0||r.regexLinks.test(g)||/\0\d+[exhbru]\x7F/u.test(g)){s+=`[[${m}`;continue}let k=g.trim().startsWith(":");if(k&&u){s+=`[[${m}`;continue}let{ns:A,valid:S}=b.normalizeTitle(g,0,!1,r,!0,!0,!0,!0);if(S){if(u){if(A!==6){s+=`[[${m}`;continue}let $=!1;for(l++;l<i.length;l++){let F=i[l],B=F.split("]]");if(B.length>2){$=!0,p+=`[[${B[0]}]]${B[1]}`,h=B.slice(2).join("]]");break}else if(B.length===2)p+=`[[${B[0]}]]${B[1]}`;else{p+=`[[${F}`;break}}if(p=Xs(p,r,e,t),!$){s+=`[[${g}${d}${p}`;continue}}}else{s+=`[[${m}`;continue}p&&(p=Yn(p,r,e,t));let w=Mt;k||(A===6?(p&&(p=ei(p,r,e,!0)),w=_t):A===14&&(w=rn)),p===void 0&&d&&(p=""),s+=`\0${e.length}l\x7F${h}`,new w(g,p,r,e,d)}return s}});var to={};ae(to,{parseMagicLinks:()=>Pa});var eo,Js,Ys,Zs,Pa,ro=y(()=>{"use strict";H();Vr();eo=String.raw`[${Se}\t]|&nbsp;|&#0*160;|&#x0*a0;`,Js=`(?:${eo})+`,Ys=`(?:${eo}|-)`,Zs=String.raw`(?:RFC|PMID)${Js}\d+\b|ISBN${Js}(?:97[89]${Ys}?)?(?:\d${Ys}?){9}[\dx]\b`,Pa=(a,r,e)=>{if(!r.regexMagicLinks)try{r.regexMagicLinks=new RegExp(String.raw`(^|[^\p{L}\d_])(?:(?:${r.protocol})(${Ie}${Ee})|${Zs})`,"giu")}catch(t){r.regexMagicLinks=new RegExp(String.raw`(^|\W)(?:(?:${r.protocol})(${Ie}${Ee})|${Zs})`,"giu")}return a.replace(r.regexMagicLinks,(t,n,i)=>{let s=n?t.slice(n.length):t;if(i){let o="",l=/&(?:lt|gt|nbsp|#x0*(?:3[ce]|a0)|#0*(?:6[02]|160));/iu.exec(s);l&&(o=s.slice(l.index),s=s.slice(0,l.index));let u=s.includes("(")?/[^,;\\.:!?][,;\\.:!?]+$/u:/[^,;\\.:!?)][,;\\.:!?)]+$/u,g=u.exec(s);if(g){let d=1;g[0][1]===";"&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(s.slice(0,g.index))&&(d=2),o=s.slice(g.index+d)+o,s=s.slice(0,g.index+d)}return o.length>=i.length?t:(new je(s,void 0,r,e),`${n}\0${e.length-1}w\x7F${o}`)}else if(!/^(?:RFC|PMID|ISBN)/u.test(s))return t;return new je(s,"magic-link",r,e),`${n}\0${e.length-1}i\x7F`})}});var no,io=y(()=>{"use strict";no=(a,r)=>a.startsWith(r)?r.length:[...r].findIndex((e,t)=>e!==a[t])});var nn,so=y(()=>{"use strict";Qn();nn=class extends Vt{get type(){return"list"}}});var oo={};ae(oo,{parseList:()=>ja});var ja,ao=y(()=>{"use strict";io();so();Kn();ja=(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,":"),u=no(l,r.lastPrefix),g=(u>1?o.slice(u-1):o).split(/(?=;)/u),d=g[0].startsWith(";"),p=g.length-(d?0:1);if(u>1){let L=o.slice(0,u-1);d?g.unshift(L):g[0]=L+g[0]}r.lastPrefix=l;let h=s+g.map((L,X)=>`\0${t.length+X}d\x7F`).join("")+a.slice(i.length);for(let L of g)new nn(L,e,t);if(!p)return h;let{html:[m]}=e,f=/:+|-\{|\0\d+[xq]\x7F/gu,k=f,A=k.exec(h),S=0,w=!1,$=!1,F=0,B=(L,X)=>(new Xt(L,e,t),`${h.slice(0,X)}\0${t.length-1}d\x7F${h.slice(X+L.length)}`),_=L=>{L?S&&S--:S++};for(;A&&p;){let{0:L,index:X}=A;if(L==="-{"){if(!F){let{lastIndex:J}=k;k=/-\{|\}-/gu,k.lastIndex=J}F++}else if(L==="}-"){if(F--,!F){let{lastIndex:J}=k;k=f,k.lastIndex=J}}else if(L.endsWith("x\x7F")){let{name:J,closing:he,selfClosing:me}=t[Number(L.slice(1,-2))];(!me||m.includes(J))&&_(he)}else if(L.endsWith("q\x7F")){let{bold:J,italic:he}=t[Number(L.slice(1,-2))];J&&(_(w),w=!w),he&&(_($),$=!$)}else if(S===0){if(L.length>=p)return B(L.slice(0,p),X);p-=L.length,k.lastIndex=X+4+String(t.length).length,h=B(L,X)}A=k.exec(h)}return h}});var lo,_e,sn,go=y(()=>{"use strict";q();K();P();j();Re();lo=new Set(["A","T","R","D","-","H","N"]),sn=class extends v{constructor(e,t=b.getConfig(),n=[]){super(void 0,t,n,{});x(this,_e);this.append(...e.map(i=>new z(i,"converter-flag",t,n)))}get type(){return"converter-flags"}afterBuild(){T(this,_e,this.childNodes.map(e=>e.text().trim())),super.afterBuild()}toString(e){return super.toString(e,";")}text(){return super.text(";")}getGaps(){return 1}getUnknownFlags(){return new Set(c(this,_e).filter(e=>/\{{3}[^{}]+\}{3}/u.test(e)))}getVariantFlags(){let e=new Set(this.getAttribute("config").variants);return new Set(c(this,_e).filter(t=>e.has(t)))}lint(e=this.getAbsoluteIndex(),t){let n=this.getVariantFlags(),i=this.getUnknownFlags(),s=new Set(c(this,_e).filter(d=>lo.has(d))),o=c(this,_e).filter(d=>!d).length,l=c(this,_e).length-i.size-o,u=super.lint(e,t);if(n.size===l||s.size===l)return u;let g=new R(this,e);for(let[d,p]of this.childNodes.entries()){let h=p.text().trim();if(h&&!n.has(h)&&!i.has(h)&&(n.size>0||!s.has(h))){let m=C(p,g,"no-ignored","invalid conversion flag");n.size===0&&lo.has(h.toUpperCase())?m.fix={range:[m.startIndex,m.endIndex],text:h.toUpperCase(),desc:"uppercase"}:m.suggestions=[{desc:"remove",range:[m.startIndex-(d&&1),m.endIndex],text:""}],u.push(m)}}return u}print(){return super.print({sep:";"})}};_e=new WeakMap});var Qt,po=y(()=>{"use strict";P();j();Re();Qt=class extends v{get type(){return"converter-rule"}get variant(){var r,e;return(e=(r=this.childNodes[this.length-2])==null?void 0:r.text().trim())!=null?e:""}constructor(r,e=!0,t=b.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 z(o,"converter-rule-variant",t,n)),super.insertAt(new z(r.slice(i+1),"converter-rule-to",t,n)),s!==-1&&super.insertAt(new z(r.slice(0,s),"converter-rule-from",t,n),0)):super.insertAt(new z(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:":"})}json(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return t.variant=this.variant,t}}});var on,uo=y(()=>{"use strict";H();P();j();go();po();on=class extends v{get type(){return"converter"}constructor(r,e,t=b.getConfig(),n=[]){super(void 0,t,n),this.append(new sn(r,t,n));let[i]=e,s=i.includes(":"),o=new Qt(i,s,t,n);s&&o.length===1||!s&&e.length===2&&!ie(e[1]).trim()?this.insertAt(new Qt(e.join(";"),!1,t,n)):this.append(o,...e.slice(1).map(l=>new Qt(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()}|${be(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?"|":""}${Le(e,{sep:";"})}}-</span>`}}});var co={};ae(co,{parseConverter:()=>Ba});var Ba,ho=y(()=>{"use strict";uo();Ba=(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:u,index:g}=o;if(u==="}-"){let d=i.pop(),{length:p}=e,h=a.slice(d.index+2,g),m=h.indexOf("|"),[f,k]=m===-1?[[],h]:[h.slice(0,m).split(";"),h.slice(m+1)],A=k.replace(/(&[#a-z\d]+);/giu,"$1"),S=A.split(r.regexConverter).map(w=>w.replace(/\x01/gu,";"));new on(f,S,r,e),a=`${a.slice(0,d.index)}\0${p}v\x7F${a.slice(g+2)}`,i.length===0&&(s=t),s.lastIndex=d.index+3+String(p).length}else i.push(o),s=n,s.lastIndex=g+2;o=s.exec(a)}return a}});var Ar={};ae(Ar,{Token:()=>v});var kr,Ae,O,U,gt,Kt,vr,M,mo,fo,xo,bo,To,yo,ko,vo,Ao,So,wo,Co,ri,v,j=y(()=>{"use strict";H();q();P();$i();Ei();ri=class ri extends Ir{constructor(e,t=b.getConfig(),n=[],i){super();x(this,M);x(this,kr,"plain");x(this,Ae,0);x(this,O);x(this,U);x(this,gt);x(this,Kt,!1);x(this,vr);typeof e=="string"&&this.insertAt(e),T(this,O,t),T(this,U,n),n.push(this)}get type(){return c(this,kr)}set type(e){T(this,kr,e)}parseOnce(e=c(this,Ae),t=!1,n){if(e<c(this,Ae)||this.length===0||!this.getAttribute("plain"))return this;if(c(this,Ae)>=11)return this;switch(e){case 0:if(this.type==="root"){c(this,U).pop();let i=N(this,M,mo).call(this);t&&(t=!i)}T(this,gt,t),N(this,M,fo).call(this,t);break;case 1:N(this,M,xo).call(this);break;case 2:N(this,M,bo).call(this);break;case 3:N(this,M,To).call(this);break;case 4:N(this,M,yo).call(this);break;case 5:N(this,M,ko).call(this,n);break;case 6:N(this,M,vo).call(this,n);break;case 7:N(this,M,Ao).call(this);break;case 8:N(this,M,So).call(this);break;case 9:N(this,M,wo).call(this);break;case 10:N(this,M,Co).call(this)}if(this.type==="root")for(let i of c(this,U))i==null||i.parseOnce(e,t,n);return $r(this,Ae)._++,this}buildFromStr(e,t){let n=e.split(/[\0\x7F]/u).map((i,s)=>{if(s%2===0)return new or(i);if(isNaN(i.slice(-1)))return c(this,U)[Number(i.slice(0,-1))];throw new Error(`Failed to build! Unrecognized token: ${i}`)});return t===0?n.map(String).join(""):t===1?be(n):n}build(){T(this,Ae,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 c(this,U))i==null||i.build()}afterBuild(){if(this.type==="root")for(let e of c(this,U))e==null||e.afterBuild();T(this,Kt,!0)}parse(e=11,t,n){for(e=Math.min(e,11);c(this,Ae)<e;)this.parseOnce(c(this,Ae),t,n);return e&&(this.build(),this.afterBuild()),this}getAttribute(e){var t;switch(e){case"plain":return this.constructor===ri;case"config":return c(this,O);case"include":return(t=c(this,gt))!=null?t:!!c(this.getRootNode(),gt);case"accum":return c(this,U);case"built":return c(this,Kt);default:return super.getAttribute(e)}}setAttribute(e,t){switch(e){case"stage":c(this,Ae)===0&&this.type==="root"&&c(this,U).shift(),T(this,Ae,t);break;default:super.setAttribute(e,t)}}insertAt(e,t=this.length){let n=typeof e=="string"?new or(e):e;super.insertAt(n,t);let{type:i}=n;return i==="root"&&(n.type="plain"),n}normalizeTitle(e,t=0,n,i,s,o){return b.normalizeTitle(e,t,c(this,gt),c(this,O),n,i,s,o)}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";for(let p of this.querySelectorAll(o)){let h;if(p.type==="category")h=p.name;else{let m=p.getValue();m&&m!==!0&&(h=`#${m}`)}if(h){let m=s.get(h);m?m.add(p):s.set(h,new Set([p]))}}for(let[p,h]of s)if(h.size>1&&!p.startsWith("#mw-customcollapsible-")){let m=!p.startsWith("#"),f=`duplicated ${m?"category":"id"}`,k=m?"error":"warning";n.push(...[...h].map(A=>{let S=E(A,{start:A.getAbsoluteIndex()},"no-duplicate",f,k);return m&&(S.suggestions=[{desc:"remove",range:[S.startIndex,S.endIndex],text:""}]),S}))}let l=/<!--\s*lint-(disable(?:(?:-next)?-line)?|enable)(\s[\sa-z,-]*)?-->/gu,u=this.toString(),g=[],d=l.exec(u);for(;d;){let{1:p,index:h}=d,m=(i=d[2])==null?void 0:i.trim();g.push({line:this.posFromIndex(h).top+(p==="disable-line"?0:1),from:p==="disable"?l.lastIndex:void 0,to:p==="enable"?l.lastIndex:void 0,rules:m?new Set(m.split(",").map(f=>f.trim())):void 0}),d=l.exec(u)}n=n.filter(({rule:p,startLine:h,startIndex:m})=>{let f={pos:0};for(let{line:k,from:A,to:S,rules:w}of g){if(k>h+1)break;if(w&&!w.has(p))continue;if(k===h&&A===void 0&&S===void 0)return!1;A<=m&&A>f.pos?(f.pos=A,f.type="from"):S<=m&&S>f.pos&&(f.pos=S,f.type="to")}return f.type!=="from"})}return n}toString(e,t){return e?super.toString(!0,t):Fe(c(this,vr),()=>super.toString(!1,t),n=>{let i=this.getRootNode();i.type==="root"&&c(i,Kt)&&T(this,vr,n)})}};kr=new WeakMap,Ae=new WeakMap,O=new WeakMap,U=new WeakMap,gt=new WeakMap,Kt=new WeakMap,vr=new WeakMap,M=new WeakSet,mo=function(){let{parseRedirect:e}=(Bi(),Q(ji)),t=this.firstChild.toString(),n=e(t,c(this,O),c(this,U));return n&&this.setText(n),!!n},fo=function(e){let{parseCommentAndExt:t}=(pr(),Q(Is));this.setText(t(this.firstChild.toString(),c(this,O),c(this,U),e))},xo=function(){let{parseBraces:e}=(Wr(),Q(gs)),t=this.type==="root"?this.firstChild.toString():`\0${this.firstChild.toString()}`,n=e(t,c(this,O),c(this,U));this.setText(this.type==="root"?n:n.slice(1))},bo=function(){var t;if((t=c(this,O).excludes)!=null&&t.includes("html"))return;let{parseHtml:e}=(Rs(),Q(Fs));this.setText(e(this.firstChild.toString(),c(this,O),c(this,U)))},To=function(){var t;if((t=c(this,O).excludes)!=null&&t.includes("table"))return;let{parseTable:e}=(_s(),Q(qs));this.setText(e(this,c(this,O),c(this,U)))},yo=function(){var t;if((t=c(this,O).excludes)!=null&&t.includes("hr"))return;let{parseHrAndDoubleUnderscore:e}=(Us(),Q(Ws));this.setText(e(this,c(this,O),c(this,U)))},ko=function(e){let{parseLinks:t}=(Ks(),Q(Qs));this.setText(t(this.firstChild.toString(),c(this,O),c(this,U),e))},vo=function(e){var i;if((i=c(this,O).excludes)!=null&&i.includes("quote"))return;let{parseQuotes:t}=(Zn(),Q(Ds)),n=this.firstChild.toString().split(`
24
+ ${s.shift()}`,l,g=(u,d)=>{if(!d){o+=u;return}let{lastChild:p}=d;if(Ia(d)){let h=new k(u,t,n);h.type="table-inter",h.setAttribute("stage",3),d.insertAt(h)}else p.setText(p.toString()+u)};for(let u of s){l=i.pop();let[d]=/^(?:\s|\0\d+[cno]\x7F)*/u.exec(u),p=u.slice(d.length),h=/^(:*)((?:\s|\0\d+[cn]\x7F)*)(\{\||\{(?:\0\d+[cn]\x7F)*\0\d+!\x7F|\0\d+\{\x7F)(.*)$/u.exec(p);if(h){for(;l&&l.type!=="td";)l=i.pop();let[,w,$,F,j]=h;w&&new Qt(w,t,n),g(`
25
+ ${d}${w&&`\0${n.length-1}d\x7F`}${$}\0${n.length}b\x7F`,l),i.push(...l?[l]:[],new Zr(F,j,t,n));continue}else if(!l){o+=`
26
+ ${u}`;continue}let f=/^(?:(\|\}|\0\d+!\x7F\}|\0\d+\}\x7F)|(\|-+|\0\d+!\x7F-+|\0\d+-\x7F-*)(?!-)|(!|(?:\||\0\d+!\x7F)\+?))(.*)$/u.exec(p);if(!f){g(`
27
+ ${u}`,l),i.push(l);continue}let[,m,x,v,S]=f;if(m){for(;l.type!=="table";)l=i.pop();l.close(`
28
+ ${d}${m}`,!0),g(S,i[i.length-1])}else if(x){l=Bs(l,i),l.type==="tr"&&(l=i.pop());let w=new en(`
29
+ ${d}${x}`,S,t,n);i.push(l,w),l.insertAt(w)}else{l=Bs(l,i);let w=v==="!"?/!!|(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu:/(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu,$=w.exec(S),F=0,j=`
30
+ ${d}${v}`,_=L=>{let V=new Ht(j,S.slice(F,$==null?void 0:$.index),t,n);return L.insertAt(V),V};for(;$;)_(l),{lastIndex:F}=w,[j]=$,$=w.exec(S);i.push(l,_(l))}}return o.slice(1)}});var tn,Os=y(()=>{"use strict";Ue();tn=class extends oe{get type(){return"hr"}}});var Ms,Yn,La,gt,zs=y(()=>{"use strict";Ye();Ue();Ms=[ye()];gt=class extends(La=oe){get type(){return"double-underscore"}constructor(r,e,t,n){super(r,t,n)}getAttribute(r){return r==="padding"?2:super.getAttribute(r)}toString(){return`__${this.innerText}__`}print(){return super.print({pre:"__",post:"__"})}};Yn=te(La),gt=ne(Yn,0,"DoubleUnderscoreToken",Ms,gt),re(Yn,1,gt)});var Ws={};le(Ws,{parseHrAndDoubleUnderscore:()=>Fa});var Fa,Us=y(()=>{"use strict";Os();zs();En();Fa=({firstChild:{data:a},type:r,name:e},t,n)=>{var l,g,u;let{doubleUnderscore:[i,s,o]}=t;return(l=t.insensitiveDoubleUnderscore)!=null||(t.insensitiveDoubleUnderscore=new Set(i)),(g=t.sensitiveDoubleUnderscore)!=null||(t.sensitiveDoubleUnderscore=new Set(s)),(u=t.regexHrAndDoubleUnderscore)!=null||(t.regexHrAndDoubleUnderscore=new RegExp(`__(${[...i,...s].join("|")})__`,"giu")),r!=="root"&&(r!=="ext-inner"||e!=="poem")&&(a=`\0${a}`),a=a.replace(/^((?:\0\d+[cno]\x7F)*)(-{4,})/gmu,(d,p,h)=>(new tn(h,t,n),`${p}\0${n.length-1}r\x7F`)).replace(t.regexHrAndDoubleUnderscore,(d,p)=>{var x;let h=t.sensitiveDoubleUnderscore.has(p),f=p.toLowerCase(),m=t.insensitiveDoubleUnderscore.has(f);return h||m?(new gt(p,h,t,n),`\0${n.length-1}${m&&((x=o==null?void 0:o[f])!=null?x:f)==="toc"?"u":"n"}\x7F`):d}).replace(/^((?:\0\d+[cn]\x7F)*)(={1,6})(.+)\2((?:\s|\0\d+[cn]\x7F)*)$/gmu,(d,p,h,f,m)=>{let x=`${p}\0${n.length}h\x7F`;return new Bt(h.length,[f,m],t,n),x}),r==="root"||r==="ext-inner"&&e==="poem"?a:a.slice(1)}});var rn,Gs=y(()=>{"use strict";B();K();q();Ue();rn=class extends oe{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=A.msg('lonely "$1"',"'"),s=[],o=new R(this,r),l=(g,u,d)=>[{desc:"escape",range:[g,u],text:"&apos;".repeat(d)},{desc:"remove",range:[g,u],text:""}];if((e==null?void 0:e.type)==="text"&&e.data.endsWith("'")){let g=I(this,o,"lonely-apos",i),{startIndex:u,startLine:d,startCol:p}=g,[,{length:h}]=/(?:^|[^'])('+)$/u.exec(e.data),f=r-h;s.push(ae(Y({},g),{startIndex:f,endIndex:u,endLine:d,startCol:p-h,endCol:p,suggestions:l(f,u,h)}))}if((t==null?void 0:t.type)==="text"&&t.data.startsWith("'")){let g=I(this,o,"lonely-apos",i),{endIndex:u,endLine:d,endCol:p}=g,[{length:h}]=/^'+/u.exec(t.data),f=u+h;s.push(ae(Y({},g),{startIndex:u,endIndex:f,startLine:d,startCol:p,endCol:p+h,suggestions:l(u,f,h)}))}if(n&&this.closest("heading-title")){let g=I(this,o,"bold-header","bold in section header","warning");g.suggestions=[{desc:"remove",range:[r,r+3],text:""}],s.push(g)}return s}json(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return Object.assign(t,{bold:this.bold,italic:this.italic}),t}}});var Ds={};le(Ds,{parseQuotes:()=>Zn});var Zn,ei=y(()=>{"use strict";Gs();Zn=(a,r,e,t)=>{var d;let n=a.split(/('{2,})/u),{length:i}=n;if(i===1)return a;let s=0,o=0,l,g,u;for(let p=1;p<i;p+=2){let h=n[p].length;switch(h){case 2:o++;break;case 4:n[p-1]+="'",n[p]="'''";case 3:if(s++,l!==void 0)break;n[p-1].endsWith(" ")?g===void 0&&u===void 0&&(u=p):n[p-1].slice(-2,-1)===" "?l=p:g!=null||(g=p);break;default:n[p-1]+="'".repeat(h-5),n[p]="'''''",o++,s++}}if(o%2===1&&s%2===1){let p=(d=l!=null?l:g)!=null?d:u;p!==void 0&&(n[p]="''",n[p-1]+="'")}for(let p=1;p<i;p+=2)new rn(n[p],r,e),n[p]=`\0${e.length-1}q\x7F`;return n.join("")}});var Hs={};le(Hs,{parseExternalLinks:()=>ti});var ti,ri=y(()=>{"use strict";Q();_n();Xr();ti=(a,r,e,t)=>{var n;return(n=r.regexExternalLinks)!=null||(r.regexExternalLinks=new RegExp(String.raw`\[(\0\d+f\x7F|(?:(?:${r.protocol}|//)${Ee}|\0\d+m\x7F)${Le}(?=[[\]<>"\t${Se}]|\0\d))([${Se}]*(?![${Se}]))([^\]\x01-\x08\x0A-\x1F\uFFFD]*)\]`,"giu")),a.replace(r.regexExternalLinks,(i,s,o,l)=>{let{length:g}=e,u=/&[lg]t;/u.exec(s);return u&&(o="",l=s.slice(u.index)+o+l,s=s.slice(0,u.index)),t?(new je(s,"ext-link-url",r,e),`[\0${g}f\x7F${o}${l}]`):(new Wt(s,o,l,r,e),`\0${g}w\x7F`)})}});var nn,Vs=y(()=>{"use strict";Q();dr();nn=class extends $e{get type(){return"category"}get sortkey(){let{childNodes:[,r]}=this;return r&&Je(r.text())}json(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e),{sortkey:n}=this;return n&&(t.sortkey=n),t}}});var Qs={};le(Qs,{parseLinks:()=>Xs});var Ra,Xs,Ks=y(()=>{"use strict";q();ei();ri();qn();Pn();Vs();Ra=/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(\||\0\d+!\x7F)([\s\S]*)$/u,Xs=(a,r,e,t)=>{var o;(o=r.regexLinks)!=null||(r.regexLinks=new RegExp(String.raw`^\s*(?:${r.protocol}|//)`,"iu"));let n=r.inExt?/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(?:(\||\0\d+!\x7F)([\s\S]*?[^\]]))?\]\]([\s\S]*)$/u:/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(?:(\||\0\d+!\x7F)([\s\S]*?[^\]])?)?\]\]([\s\S]*)$/u,i=a.split("[["),s=i.shift();for(let l=0;l<i.length;l++){let g=!1,u,d,p,h,f=i[l],m=n.exec(f);if(m)[,u,d,p,h]=m,h.startsWith("]")&&(p!=null&&p.includes("["))&&(p+="]",h=h.slice(1));else{let $=Ra.exec(f);$&&(g=!0,[,u,d,p]=$)}if(u===void 0||r.regexLinks.test(u)||/\0\d+[exhbru]\x7F/u.test(u)){s+=`[[${f}`;continue}let x=u.trim().startsWith(":");if(x&&g){s+=`[[${f}`;continue}let{ns:v,valid:S}=A.normalizeTitle(u,0,!1,r,!0,!0,!0,!0);if(S){if(g){if(v!==6){s+=`[[${f}`;continue}let $=!1;for(l++;l<i.length;l++){let F=i[l],j=F.split("]]");if(j.length>2){$=!0,p+=`[[${j[0]}]]${j[1]}`,h=j.slice(2).join("]]");break}else if(j.length===2)p+=`[[${j[0]}]]${j[1]}`;else{p+=`[[${F}`;break}}if(p=Xs(p,r,e,t),!$){s+=`[[${u}${d}${p}`;continue}}}else{s+=`[[${f}`;continue}p&&(p=Zn(p,r,e,t));let w=zt;x||(v===6?(p&&(p=ti(p,r,e,!0)),w=Ot):v===14&&(w=nn)),p===void 0&&d&&(p=""),s+=`\0${e.length}l\x7F${h}`,new w(u,p,r,e,d)}return s}});var to={};le(to,{parseMagicLinks:()=>Pa});var eo,Js,Ys,Zs,Pa,ro=y(()=>{"use strict";Q();Xr();eo=String.raw`[${Se}\t]|&nbsp;|&#0*160;|&#x0*a0;`,Js=`(?:${eo})+`,Ys=`(?:${eo}|-)`,Zs=String.raw`(?:RFC|PMID)${Js}\d+\b|ISBN${Js}(?:97[89]${Ys}?)?(?:\d${Ys}?){9}[\dx]\b`,Pa=(a,r,e)=>{if(!r.regexMagicLinks)try{r.regexMagicLinks=new RegExp(String.raw`(^|[^\p{L}\d_])(?:(?:${r.protocol})(${Ee}${Le})|${Zs})`,"giu")}catch(t){r.regexMagicLinks=new RegExp(String.raw`(^|\W)(?:(?:${r.protocol})(${Ee}${Le})|${Zs})`,"giu")}return a.replace(r.regexMagicLinks,(t,n,i)=>{let s=n?t.slice(n.length):t;if(i){let o="",l=/&(?:lt|gt|nbsp|#x0*(?:3[ce]|a0)|#0*(?:6[02]|160));/iu.exec(s);l&&(o=s.slice(l.index),s=s.slice(0,l.index));let g=s.includes("(")?/[^,;\\.:!?][,;\\.:!?]+$/u:/[^,;\\.:!?)][,;\\.:!?)]+$/u,u=g.exec(s);if(u){let d=1;u[0][1]===";"&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(s.slice(0,u.index))&&(d=2),o=s.slice(u.index+d)+o,s=s.slice(0,u.index+d)}return o.length>=i.length?t:(new je(s,void 0,r,e),`${n}\0${e.length-1}w\x7F${o}`)}else if(!/^(?:RFC|PMID|ISBN)/u.test(s))return t;return new je(s,"magic-link",r,e),`${n}\0${e.length-1}i\x7F`})}});var no,io=y(()=>{"use strict";no=(a,r)=>a.startsWith(r)?r.length:[...r].findIndex((e,t)=>e!==a[t])});var sn,so=y(()=>{"use strict";Kn();sn=class extends Xt{get type(){return"list"}}});var oo={};le(oo,{parseList:()=>ja});var ja,ao=y(()=>{"use strict";io();so();Jn();ja=(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,":"),g=no(l,r.lastPrefix),u=(g>1?o.slice(g-1):o).split(/(?=;)/u),d=u[0].startsWith(";"),p=u.length-(d?0:1);if(g>1){let L=o.slice(0,g-1);d?u.unshift(L):u[0]=L+u[0]}r.lastPrefix=l;let h=s+u.map((L,V)=>`\0${t.length+V}d\x7F`).join("")+a.slice(i.length);for(let L of u)new sn(L,e,t);if(!p)return h;let{html:[f]}=e,m=/:+|-\{|\0\d+[xq]\x7F/gu,x=m,v=x.exec(h),S=0,w=!1,$=!1,F=0,j=(L,V)=>(new Qt(L,e,t),`${h.slice(0,V)}\0${t.length-1}d\x7F${h.slice(V+L.length)}`),_=L=>{L?S&&S--:S++};for(;v&&p;){let{0:L,index:V}=v;if(L==="-{"){if(!F){let{lastIndex:J}=x;x=/-\{|\}-/gu,x.lastIndex=J}F++}else if(L==="}-"){if(F--,!F){let{lastIndex:J}=x;x=m,x.lastIndex=J}}else if(L.endsWith("x\x7F")){let{name:J,closing:he,selfClosing:me}=t[Number(L.slice(1,-2))];(!me||f.includes(J))&&_(he)}else if(L.endsWith("q\x7F")){let{bold:J,italic:he}=t[Number(L.slice(1,-2))];J&&(_(w),w=!w),he&&(_($),$=!$)}else if(S===0){if(L.length>=p)return j(L.slice(0,p),V);p-=L.length,x.lastIndex=V+4+String(t.length).length,h=j(L,V)}v=x.exec(h)}return h}});var lo,Oe,on,go=y(()=>{"use strict";B();K();P();Re();lo=new Set(["A","T","R","D","-","H","N"]),on=class extends k{constructor(e,t,n=[]){super(void 0,t,n,{});T(this,Oe);this.append(...e.map(i=>new z(i,"converter-flag",t,n)))}get type(){return"converter-flags"}afterBuild(){b(this,Oe,this.childNodes.map(e=>e.text().trim())),super.afterBuild()}toString(e){return super.toString(e,";")}text(){return super.text(";")}getGaps(){return 1}getUnknownFlags(){return new Set(c(this,Oe).filter(e=>/\{{3}[^{}]+\}{3}/u.test(e)))}getVariantFlags(){let e=new Set(this.getAttribute("config").variants);return new Set(c(this,Oe).filter(t=>e.has(t)))}lint(e=this.getAbsoluteIndex(),t){let n=this.getVariantFlags(),i=this.getUnknownFlags(),s=new Set(c(this,Oe).filter(d=>lo.has(d))),o=c(this,Oe).filter(d=>!d).length,l=c(this,Oe).length-i.size-o,g=super.lint(e,t);if(n.size===l||s.size===l)return g;let u=new R(this,e);for(let[d,p]of this.childNodes.entries()){let h=p.text().trim();if(h&&!n.has(h)&&!i.has(h)&&(n.size>0||!s.has(h))){let f=C(p,u,"no-ignored","invalid conversion flag");n.size===0&&lo.has(h.toUpperCase())?f.fix={range:[f.startIndex,f.endIndex],text:h.toUpperCase(),desc:"uppercase"}:f.suggestions=[{desc:"remove",range:[f.startIndex-(d&&1),f.endIndex],text:""}],g.push(f)}}return g}print(){return super.print({sep:";"})}};Oe=new WeakMap});var Kt,po=y(()=>{"use strict";q();P();Re();Kt=class extends k{get type(){return"converter-rule"}get variant(){var r,e;return(e=(r=this.childNodes[this.length-2])==null?void 0:r.text().trim())!=null?e:""}constructor(r,e=!0,t=A.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 z(o,"converter-rule-variant",t,n)),super.insertAt(new z(r.slice(i+1),"converter-rule-to",t,n)),s!==-1&&super.insertAt(new z(r.slice(0,s),"converter-rule-from",t,n),0)):super.insertAt(new z(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:":"})}json(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return t.variant=this.variant,t}}});var an,uo=y(()=>{"use strict";Q();P();go();po();an=class extends k{get type(){return"converter"}constructor(r,e,t,n=[]){super(void 0,t,n),this.append(new on(r,t,n));let[i]=e,s=i.includes(":"),o=new Kt(i,s,t,n);s&&o.length===1||!s&&e.length===2&&!se(e[1]).trim()?this.insertAt(new Kt(e.join(";"),!1,t,n)):this.append(o,...e.slice(1).map(l=>new Kt(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()}|${be(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?"|":""}${Fe(e,{sep:";"})}}-</span>`}}});var co={};le(co,{parseConverter:()=>Ba});var Ba,ho=y(()=>{"use strict";uo();Ba=(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:g,index:u}=o;if(g==="}-"){let d=i.pop(),{length:p}=e,h=a.slice(d.index+2,u),f=h.indexOf("|"),[m,x]=f===-1?[[],h]:[h.slice(0,f).split(";"),h.slice(f+1)],v=x.replace(/(&[#a-z\d]+);/giu,"$1"),S=v.split(r.regexConverter).map(w=>w.replace(/\x01/gu,";"));new an(m,S,r,e),a=`${a.slice(0,d.index)}\0${p}v\x7F${a.slice(u+2)}`,i.length===0&&(s=t),s.lastIndex=d.index+3+String(p).length}else i.push(o),s=n,s.lastIndex=u+2;o=s.exec(a)}return a}});var Sr={};le(Sr,{Token:()=>k});var vr,Ae,O,U,pt,Jt,Ar,M,mo,fo,xo,bo,To,yo,ko,vo,Ao,So,wo,Co,ni,k,P=y(()=>{"use strict";Q();B();q();$i();Ei();ni=class ni extends Er{constructor(e,t=A.getConfig(),n=[],i){super();T(this,M);T(this,vr,"plain");T(this,Ae,0);T(this,O);T(this,U);T(this,pt);T(this,Jt,!1);T(this,Ar);typeof e=="string"&&this.insertAt(e),b(this,O,t),b(this,U,n),n.push(this)}get type(){return c(this,vr)}set type(e){b(this,vr,e)}parseOnce(e=c(this,Ae),t=!1,n){if(e<c(this,Ae)||this.length===0||!this.getAttribute("plain"))return this;if(c(this,Ae)>=11)return this;switch(e){case 0:if(this.type==="root"){c(this,U).pop();let i=N(this,M,mo).call(this);t&&(t=!i)}b(this,pt,t),N(this,M,fo).call(this,t);break;case 1:N(this,M,xo).call(this);break;case 2:N(this,M,bo).call(this);break;case 3:N(this,M,To).call(this);break;case 4:N(this,M,yo).call(this);break;case 5:N(this,M,ko).call(this,n);break;case 6:N(this,M,vo).call(this,n);break;case 7:N(this,M,Ao).call(this);break;case 8:N(this,M,So).call(this);break;case 9:N(this,M,wo).call(this);break;case 10:N(this,M,Co).call(this)}if(this.type==="root")for(let i of c(this,U))i==null||i.parseOnce(e,t,n);return Nr(this,Ae)._++,this}buildFromStr(e,t){let n=e.split(/[\0\x7F]/u).map((i,s)=>{if(s%2===0)return new ar(i);if(isNaN(i.slice(-1)))return c(this,U)[Number(i.slice(0,-1))];throw new Error(`Failed to build! Unrecognized token: ${i}`)});return t===0?n.map(String).join(""):t===1?be(n):n}build(){b(this,Ae,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 c(this,U))i==null||i.build()}afterBuild(){if(this.type==="root")for(let e of c(this,U))e==null||e.afterBuild();b(this,Jt,!0)}parse(e=11,t,n){for(e=Math.min(e,11);c(this,Ae)<e;)this.parseOnce(c(this,Ae),t,n);return e&&(this.build(),this.afterBuild()),this}getAttribute(e){var t;switch(e){case"plain":return this.constructor===ni;case"config":return c(this,O);case"include":return(t=c(this,pt))!=null?t:!!c(this.getRootNode(),pt);case"accum":return c(this,U);case"built":return c(this,Jt);default:return super.getAttribute(e)}}setAttribute(e,t){switch(e){case"stage":c(this,Ae)===0&&this.type==="root"&&c(this,U).shift(),b(this,Ae,t);break;default:super.setAttribute(e,t)}}insertAt(e,t=this.length){let n=typeof e=="string"?new ar(e):e;super.insertAt(n,t);let{type:i}=n;return i==="root"&&(n.type="plain"),n}normalizeTitle(e,t=0,n,i,s,o){return A.normalizeTitle(e,t,c(this,pt),c(this,O),n,i,s,o)}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";for(let p of this.querySelectorAll(o)){let h;if(p.type==="category")h=p.name;else{let f=p.getValue();f&&f!==!0&&(h=`#${f}`)}if(h){let f=s.get(h);f?f.add(p):s.set(h,new Set([p]))}}for(let[p,h]of s)if(h.size>1&&!p.startsWith("#mw-customcollapsible-")){let f=!p.startsWith("#"),m=`duplicated ${f?"category":"id"}`,x=f?"error":"warning";n.push(...[...h].map(v=>{let S=I(v,{start:v.getAbsoluteIndex()},"no-duplicate",m,x);return f&&(S.suggestions=[{desc:"remove",range:[S.startIndex,S.endIndex],text:""}]),S}))}let l=/<!--\s*lint-(disable(?:(?:-next)?-line)?|enable)(\s[\sa-z,-]*)?-->/gu,g=this.toString(),u=[],d=l.exec(g);for(;d;){let{1:p,index:h}=d,f=(i=d[2])==null?void 0:i.trim();u.push({line:this.posFromIndex(h).top+(p==="disable-line"?0:1),from:p==="disable"?l.lastIndex:void 0,to:p==="enable"?l.lastIndex:void 0,rules:f?new Set(f.split(",").map(m=>m.trim())):void 0}),d=l.exec(g)}n=n.filter(({rule:p,startLine:h,startIndex:f})=>{let m={pos:0};for(let{line:x,from:v,to:S,rules:w}of u){if(x>h+1)break;if(w&&!w.has(p))continue;if(x===h&&v===void 0&&S===void 0)return!1;v<=f&&v>m.pos?(m.pos=v,m.type="from"):S<=f&&S>m.pos&&(m.pos=S,m.type="to")}return m.type!=="from"})}return n}toString(e,t){return e?super.toString(!0,t):we(c(this,Ar),()=>super.toString(!1,t),n=>{let i=this.getRootNode();i.type==="root"&&c(i,Jt)&&b(this,Ar,n)})}};vr=new WeakMap,Ae=new WeakMap,O=new WeakMap,U=new WeakMap,pt=new WeakMap,Jt=new WeakMap,Ar=new WeakMap,M=new WeakSet,mo=function(){let{parseRedirect:e}=(Bi(),X(ji)),t=this.firstChild.toString(),n=e(t,c(this,O),c(this,U));return n&&this.setText(n),!!n},fo=function(e){let{parseCommentAndExt:t}=(ur(),X(Is));this.setText(t(this.firstChild.toString(),c(this,O),c(this,U),e))},xo=function(){let{parseBraces:e}=(Ur(),X(gs)),t=this.type==="root"?this.firstChild.toString():`\0${this.firstChild.toString()}`,n=e(t,c(this,O),c(this,U));this.setText(this.type==="root"?n:n.slice(1))},bo=function(){var t;if((t=c(this,O).excludes)!=null&&t.includes("html"))return;let{parseHtml:e}=(Rs(),X(Fs));this.setText(e(this.firstChild.toString(),c(this,O),c(this,U)))},To=function(){var t;if((t=c(this,O).excludes)!=null&&t.includes("table"))return;let{parseTable:e}=(_s(),X(qs));this.setText(e(this,c(this,O),c(this,U)))},yo=function(){var t;if((t=c(this,O).excludes)!=null&&t.includes("hr"))return;let{parseHrAndDoubleUnderscore:e}=(Us(),X(Ws));this.setText(e(this,c(this,O),c(this,U)))},ko=function(e){let{parseLinks:t}=(Ks(),X(Qs));this.setText(t(this.firstChild.toString(),c(this,O),c(this,U),e))},vo=function(e){var i;if((i=c(this,O).excludes)!=null&&i.includes("quote"))return;let{parseQuotes:t}=(ei(),X(Ds)),n=this.firstChild.toString().split(`
31
31
  `);for(let s=0;s<n.length;s++)n[s]=t(n[s],c(this,O),c(this,U),e);this.setText(n.join(`
32
- `))},Ao=function(){var t;if((t=c(this,O).excludes)!=null&&t.includes("extLink"))return;let{parseExternalLinks:e}=(ti(),Q(Hs));this.setText(e(this.firstChild.toString(),c(this,O),c(this,U)))},So=function(){var t;if((t=c(this,O).excludes)!=null&&t.includes("magicLink"))return;let{parseMagicLinks:e}=(ro(),Q(to));this.setText(e(this.firstChild.toString(),c(this,O),c(this,U)))},wo=function(){var u;if((u=c(this,O).excludes)!=null&&u.includes("list"))return;let{parseList:e}=(ao(),Q(oo)),{firstChild:t,type:n,name:i}=this,s=t.toString().split(`
32
+ `))},Ao=function(){var t;if((t=c(this,O).excludes)!=null&&t.includes("extLink"))return;let{parseExternalLinks:e}=(ri(),X(Hs));this.setText(e(this.firstChild.toString(),c(this,O),c(this,U)))},So=function(){var t;if((t=c(this,O).excludes)!=null&&t.includes("magicLink"))return;let{parseMagicLinks:e}=(ro(),X(to));this.setText(e(this.firstChild.toString(),c(this,O),c(this,U)))},wo=function(){var g;if((g=c(this,O).excludes)!=null&&g.includes("list"))return;let{parseList:e}=(ao(),X(oo)),{firstChild:t,type:n,name:i}=this,s=t.toString().split(`
33
33
  `),o={lastPrefix:""},l=n==="root"||n==="ext-inner"&&i==="poem"?0:1;for(;l<s.length;l++)s[l]=e(s[l],o,c(this,O),c(this,U));this.setText(s.join(`
34
- `))},Co=function(){if(c(this,O).variants.length>0){let{parseConverter:e}=(ho(),Q(co));this.setText(e(this.firstChild.toString(),c(this,O),c(this,U)))}};v=ri});var le,Bt,Tn,Lr,we=y(()=>{"use strict";le={running:!1,run(a){let{running:r}=this;this.running=!0;try{let{Token:e}=(j(),Q(Ar)),t=a();return t instanceof e&&!t.getAttribute("built")&&t.afterBuild(),this.running=r,t}catch(e){throw this.running=r,e}},rev:0},Bt=a=>r=>r.type===a,Tn=(a,r,e,t=[])=>{var s,o;let n=a.getChildNodes(),i=n.splice(r,e,...t);for(let l=0;l<t.length;l++){let u=t[l];u.setAttribute("parentNode",a),u.setAttribute("nextSibling",n[r+l+1]),u.setAttribute("previousSibling",n[r+l-1])}return(s=n[r-1])==null||s.setAttribute("nextSibling",n[r]),(o=n[r+t.length])==null||o.setAttribute("previousSibling",n[r+t.length-1]),i},Lr=(a,r)=>{Object.defineProperty(a,"name",{value:r.name})}});var $o={};ae($o,{Title:()=>ni});var Sr,wr,pt,Jt,ut,ni,No=y(()=>{"use strict";H();ni=class{constructor(r,e,t,n,i,s){x(this,Sr);x(this,wr);x(this,pt);x(this,Jt);x(this,ut);ne(this,"valid");ne(this,"encoded",!1);let o=r.trim().startsWith("../");if(i&&r.includes("%"))try{let u=/%(?!21|3[ce]|5[bd]|7[b-d])[\da-f]{2}/iu.test(r);r=Me(r),this.encoded=u}catch(u){}if(r=Ke(r).replace(/[_ ]+/gu," ").trim(),o)T(this,Jt,0);else{let u=e;r.startsWith(":")&&(u=0,r=r.slice(1).trim());let g=r.split(":");if(g.length>1){let d=g[0].trim().toLowerCase(),p=Object.prototype.hasOwnProperty.call(t.nsid,d)&&t.nsid[d];p&&(u=p,r=g.slice(1).join(":").trim())}T(this,Jt,u)}let l=r.indexOf("#");if(l!==-1){let u=r.slice(l).trim().slice(1);if(u.includes("%"))try{u=Me(u)}catch(g){}T(this,ut,u.replace(/ /gu,"_")),r=r.slice(0,l).trim()}this.valid=!!(r||s&&this.ns===0&&c(this,ut)!==void 0)&&Ke(r)===r&&!/^:|\0\d+[eh!+-]\x7F|[<>[\]{}|\n]|%[\da-f]{2}|(?:^|\/)\.{1,2}(?:$|\/)/iu.test(o?/^(?:\.\.\/)+(.*)/u.exec(r)[1]:r),this.main=r,T(this,wr,t.namespaces),T(this,pt,t.articlePath||"/wiki/$1"),c(this,pt).includes("$1")||T(this,pt,c(this,pt)+`${c(this,pt).endsWith("/")?"":"/"}$1`),n||Object.defineProperties(this,{encoded:{enumerable:!1,writable:!1}})}get ns(){return c(this,Jt)}get fragment(){return c(this,ut)}get main(){return c(this,Sr)}set main(r){r=r.replace(/_/gu," ").trim(),T(this,Sr,r&&r[0].toUpperCase()+r.slice(1))}get prefix(){let r=c(this,wr)[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()}getRedirection(){return[!1,(this.prefix+this.main).replace(/ /gu,"_")]}setFragment(r){T(this,ut,r)}getUrl(r){}};Sr=new WeakMap,wr=new WeakMap,pt=new WeakMap,Jt=new WeakMap,ut=new WeakMap});var ct,Io,qa,b,P=y(()=>{xi();we();Si();H();ct={config:un,i18n:void 0,rules:fi,getConfig(){let{doubleUnderscore:a}=this.config;for(let r=0;r<2;r++)a.length>r+2&&a[r].length===0&&(a[r]=Object.keys(a[r+2]));return oe(Y(Y({},un),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=ct.getConfig(),n=!1,i,s=!1,o=!1){let{Title:l}=(No(),Q($o)),u;if(i)u=new l(a,r,t,n,s,o);else{let{Token:g}=(j(),Q(Ar));u=le.run(()=>{let d=new g(a,t);d.type="root",d.parseOnce(0,e).parseOnce();let p=new l(d.toString(),r,t,n,s,o);for(let h of["main","fragment"]){let m=p[h];if(m!=null&&m.includes("\0")){let f=d.buildFromStr(m,1);h==="main"?p.main=f:p.setFragment(f)}}return p})}return u},parse(a,r,e=11,t=ct.getConfig()){if(a=pn(a),typeof e!="number"){let s=Array.isArray(e)?e:[e];e=Math.max(...s.map(o=>mi[o]||11))}let{Token:n}=(j(),Q(Ar));return le.run(()=>{let s=new n(a,t);return s.type="root",s.parse(e,r)})},partialParse(n,i,s){return hi(this,arguments,function*(a,r,e,t=ct.getConfig()){let{Token:o}=(j(),Q(Ar)),l=typeof setImmediate=="function"?setImmediate:setTimeout,{running:u}=le;le.running=!0;let g=new o(pn(a),t);g.type="root";let d=0;return yield new Promise(p=>{let h=()=>{r()===a?(d++,l(m,0)):p()},m=()=>{d===12?(g.afterBuild(),p()):(g[d===11?"build":"parseOnce"](d,e),h())};l(m,0)}),le.running=u,g})},createLanguageService(a){}},Io={},qa=new Set(["normalizeTitle","parse","createLanguageService"]);for(let a in ct)qa.has(a)||(Io[a]={enumerable:!1});Object.defineProperties(ct,Io);Object.assign(typeof globalThis=="object"?globalThis:self,{Parser:ct});b=ct});P();})();
34
+ `))},Co=function(){if(c(this,O).variants.length>0){let{parseConverter:e}=(ho(),X(co));this.setText(e(this.firstChild.toString(),c(this,O),c(this,U)))}};k=ni});var Z,qt,yn,Fr,Te=y(()=>{"use strict";Z={running:!1,run(a){let{running:r}=this;this.running=!0;try{let{Token:e}=(P(),X(Sr)),t=a();return t instanceof e&&!t.getAttribute("built")&&t.afterBuild(),this.running=r,t}catch(e){throw this.running=r,e}},rev:0},qt=a=>r=>r.type===a,yn=(a,r,e,t=[])=>{var s,o;let n=a.getChildNodes(),i=n.splice(r,e,...t);for(let l=0;l<t.length;l++){let g=t[l];g.setAttribute("parentNode",a),g.setAttribute("nextSibling",n[r+l+1]),g.setAttribute("previousSibling",n[r+l-1])}return(s=n[r-1])==null||s.setAttribute("nextSibling",n[r]),(o=n[r+t.length])==null||o.setAttribute("previousSibling",n[r+t.length-1]),i},Fr=(a,r)=>{Object.defineProperty(a,"name",{value:r.name})}});var $o={};le($o,{Title:()=>ii});var wr,Cr,ut,Yt,ct,ii,No=y(()=>{"use strict";Q();ii=class{constructor(r,e,t,n,i,s){T(this,wr);T(this,Cr);T(this,ut);T(this,Yt);T(this,ct);ie(this,"valid");ie(this,"encoded",!1);let o=r.trim().startsWith("../");if(i&&r.includes("%"))try{let g=/%(?!21|3[ce]|5[bd]|7[b-d])[\da-f]{2}/iu.test(r);r=ze(r),this.encoded=g}catch(g){}if(r=Je(r).replace(/[_ ]+/gu," ").trim(),o)b(this,Yt,0);else{let g=e;r.startsWith(":")&&(g=0,r=r.slice(1).trim());let u=r.split(":");if(u.length>1){let d=u[0].trim().toLowerCase(),p=Object.prototype.hasOwnProperty.call(t.nsid,d)&&t.nsid[d];p&&(g=p,r=u.slice(1).join(":").trim())}b(this,Yt,g)}let l=r.indexOf("#");if(l!==-1){let g=r.slice(l).trim().slice(1);if(g.includes("%"))try{g=ze(g)}catch(u){}b(this,ct,g.replace(/ /gu,"_")),r=r.slice(0,l).trim()}this.valid=!!(r||s&&this.ns===0&&c(this,ct)!==void 0)&&Je(r)===r&&!/^:|\0\d+[eh!+-]\x7F|[<>[\]{}|\n]|%[\da-f]{2}|(?:^|\/)\.{1,2}(?:$|\/)/iu.test(o?/^(?:\.\.\/)+(.*)/u.exec(r)[1]:r),this.main=r,b(this,Cr,t.namespaces),b(this,ut,t.articlePath||"/wiki/$1"),c(this,ut).includes("$1")||b(this,ut,c(this,ut)+`${c(this,ut).endsWith("/")?"":"/"}$1`),n||Object.defineProperties(this,{encoded:{enumerable:!1,writable:!1}})}get ns(){return c(this,Yt)}get fragment(){return c(this,ct)}get main(){return c(this,wr)}set main(r){r=r.replace(/_/gu," ").trim(),b(this,wr,r&&r[0].toUpperCase()+r.slice(1))}get prefix(){let r=c(this,Cr)[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()}getRedirection(){return[!1,(this.prefix+this.main).replace(/ /gu,"_")]}setFragment(r){b(this,ct,r)}getUrl(r){}};wr=new WeakMap,Cr=new WeakMap,ut=new WeakMap,Yt=new WeakMap,ct=new WeakMap});var ht,Io,qa,A,q=y(()=>{bi();Te();Si();Q();ht={config:cn,i18n:void 0,rules:xi,getConfig(){let{doubleUnderscore:a}=this.config;for(let r=0;r<2;r++)a.length>r+2&&a[r].length===0&&(a[r]=Object.keys(a[r+2]));return ae(Y(Y({},cn),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=ht.getConfig(),n=!1,i,s=!1,o=!1){let{Title:l}=(No(),X($o)),g;if(i)g=new l(a,r,t,n,s,o);else{let{Token:u}=(P(),X(Sr));g=Z.run(()=>{let d=new u(a,t);d.type="root",d.parseOnce(0,e).parseOnce();let p=new l(d.toString(),r,t,n,s,o);for(let h of["main","fragment"]){let f=p[h];if(f!=null&&f.includes("\0")){let m=d.buildFromStr(f,1);h==="main"?p.main=m:p.setFragment(m)}}return p})}return g},parse(a,r,e=11,t=ht.getConfig()){if(a=un(a),typeof e!="number"){let s=Array.isArray(e)?e:[e];e=Math.max(...s.map(o=>fi[o]||11))}let{Token:n}=(P(),X(Sr));return Z.run(()=>{let s=new n(a,t);return s.type="root",s.parse(e,r)})},partialParse(n,i,s){return mi(this,arguments,function*(a,r,e,t=ht.getConfig()){let{Token:o}=(P(),X(Sr)),l=typeof setImmediate=="function"?setImmediate:setTimeout,{running:g}=Z;Z.running=!0;let u=new o(un(a),t);u.type="root";let d=0;return yield new Promise(p=>{let h=()=>{r()===a?(d++,l(f,0)):p()},f=()=>{d===12?(u.afterBuild(),p()):(u[d===11?"build":"parseOnce"](d,e),h())};l(f,0)}),Z.running=g,u})},createLanguageService(a){}},Io={},qa=new Set(["normalizeTitle","parse","createLanguageService"]);for(let a in ht)qa.has(a)||(Io[a]={enumerable:!1});Object.defineProperties(ht,Io);Object.assign(typeof globalThis=="object"?globalThis:self,{Parser:ht});A=ht});q();})();