wikiparser-node 1.20.1 → 1.20.2

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,29 +1,29 @@
1
- "use strict";(()=>{var Ca=Object.create;var Rt=Object.defineProperty;var qi=Object.getOwnPropertyDescriptor;var $a=Object.getOwnPropertyNames;var Na=Object.prototype.hasOwnProperty;var Oi=(a,n)=>(n=Symbol[a])?n:Symbol.for("Symbol."+a),Pt=a=>{throw TypeError(a)};var _i=(a,n,e)=>n in a?Rt(a,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[n]=e;var Bi=(a,n)=>Rt(a,"name",{value:n,configurable:!0});var k=(a,n)=>()=>(a&&(n=a(a=0)),n);var Ia=(a,n)=>()=>(n||a((n={exports:{}}).exports,n),n.exports),J=(a,n)=>{for(var e in n)Rt(a,e,{get:n[e],enumerable:!0})},Ea=(a,n,e,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of $a(n))!Na.call(a,r)&&r!==e&&Rt(a,r,{get:()=>n[r],enumerable:!(t=qi(n,r))||t.enumerable});return a};var U=a=>Ea(Rt({},"__esModule",{value:!0}),a);var P=a=>{var n;return[,,,Ca((n=a==null?void 0:a[Oi("metadata")])!=null?n:null)]},Mi=["class","method","getter","setter","accessor","field","value","get","set"],mr=a=>a!==void 0&&typeof a!="function"?Pt("Function expected"):a,La=(a,n,e,t,r)=>({kind:Mi[a],name:n,metadata:t,addInitializer:i=>e._?Pt("Already initialized"):r.push(mr(i||null))}),Fa=(a,n)=>_i(n,Oi("metadata"),a[3]),j=(a,n,e,t)=>{for(var r=0,i=a[n>>1],s=i&&i.length;r<s;r++)n&1?i[r].call(e):t=i[r].call(e,t);return t},B=(a,n,e,t,r,i)=>{var s,o,l,g,u,d=n&7,p=!!(n&8),m=!!(n&16),f=d>3?a.length+1:d?p?1:2:0,h=Mi[d+5],x=d>3&&(a[f-1]=[]),b=a[f]||(a[f]=[]),S=d&&(!m&&!p&&(r=r.prototype),d<5&&(d>3||!m)&&qi(d<4?r:{get[e](){return c(this,i)},set[e](A){return y(this,i,A)}},e));d?m&&d<4&&Bi(i,(d>2?"set ":d>1?"get ":"")+e):Bi(r,e);for(var w=t.length-1;w>=0;w--)g=La(d,e,l={},a[3],b),d&&(g.static=p,g.private=m,u=g.access={has:m?A=>Ra(r,A):A=>e in A},d^3&&(u.get=m?A=>(d^1?c:N)(A,r,d^4?i:S.get):A=>A[e]),d>2&&(u.set=m?(A,I)=>y(A,r,I,d^4?i:S.set):(A,I)=>A[e]=I)),o=(0,t[w])(d?d<4?m?i:S[h]:d>4?void 0:{get:S.get,set:S.set}:r,g),l._=1,d^4||o===void 0?mr(o)&&(d>4?x.unshift(o):d?m?i=o:S[h]=o:r=o):typeof o!="object"||o===null?Pt("Object expected"):(mr(s=o.get)&&(S.get=s),mr(s=o.set)&&(S.set=s),mr(s=o.init)&&x.unshift(s));return d||Fa(a,r),S&&Rt(r,e,S),m?d^4?i:S:r},ae=(a,n,e)=>_i(a,typeof n!="symbol"?n+"":n,e),kn=(a,n,e)=>n.has(a)||Pt("Cannot "+e),Ra=(a,n)=>Object(n)!==n?Pt('Cannot use the "in" operator on this value'):a.has(n),c=(a,n,e)=>(kn(a,n,"read from private field"),e?e.call(a):n.get(a)),T=(a,n,e)=>n.has(a)?Pt("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(a):n.set(a,e),y=(a,n,e,t)=>(kn(a,n,"write to private field"),t?t.call(a,e):n.set(a,e),e),N=(a,n,e)=>(kn(a,n,"access private method"),e);var Wr=(a,n,e,t)=>({set _(r){y(a,n,r,e)},get _(){return c(a,n,t)}});var zi,Ui,Wi=k(()=>{"use strict";zi=(()=>{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,"list-range":11};return Object.setPrototypeOf(a,null),a})(),Ui=(()=>{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})()});function $e(a){return n=>{let e=new(typeof n=="string"?Map:WeakMap);if(e.has(n)){let r=e.get(n);return r.lastIndex=0,r}let t=a(n);return e.set(n,t),t}}var Je,jt=k(()=>{"use strict";Je=a=>decodeURIComponent(a.replace(/%(?![\da-f]{2})/giu,"%25"))});var ke,Di,je,Be,qe,Ne,dt,Hi,ie,ed,xe,Pa,ja,gt,Gi,td,Ba,qa,Bt,Oe,ee=k(()=>{"use strict";jt();ke=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,Di=String.raw`[^[\]<>"\0-\x1F\x7F${ke}\uFFFD]`,je=String.raw`(?:\[[\da-f:.]+\]|${Di})`,Be=String.raw`(?:${Di}|\0\d+[cn!~]\x7F)*`,qe=a=>a.trim().toLowerCase(),Ne=(a,n)=>a.replace(/\0(\d+)\x7F/gu,(e,t)=>n[t]),dt=(a,n)=>e=>e.replace(a,n),Hi=dt(/[\0\x7F]|\r$/gmu,""),ie=dt(/\0\d+[cn]\x7F/gu,""),ed=dt(/[\\{}()|.?*+^$[\]]/gu,String.raw`\$&`),xe=(a,n="")=>a.map(e=>typeof e=="string"?e:e.text()).join(n),Pa={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},ja=dt(/&(?:#(\d+|[Xx][\da-fA-F]+)|([lg]t|[LG]T|[lr]brac[ke]|nbsp|amp|AMP|quot|QUOT));/gu,(a,n,e)=>n?String.fromCodePoint(+((/^x/iu.test(n)?"0":"")+n)):Pa[e.toLowerCase()]),gt=a=>ja(a),Gi=dt(/&#(\d+|x[\da-f]+);/giu,(a,n)=>String.fromCodePoint(+((/^x/iu.test(n)?"0":"")+n))),td=dt(/\n/gu,String.raw`\n`),Ba={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},qa=a=>dt(a,n=>`&${Ba[n]};`),Bt=qa(/[&<>]/gu),Oe=(a,n={})=>{let{pre:e="",post:t="",sep:r=""}=n;return e+a.map(i=>i.print()).join(r)+t}});var Vi=Ia((id,Oa)=>{Oa.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},functionHook:["msgnw"],variable:["!","=","pageid","articlepath","server","servername","scriptpath","stylepath"],parserFunction:[{msgnw:"msgnw",pageid:"pageid",articlepath:"articlepath",server:"server",servername:"servername",scriptpath:"scriptpath",stylepath:"stylepath","#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","#rmatch":"rmatch","#rreplace":"rreplace","#replace":"replace","#rsplit":"rsplit","#explode":"explode","#tab":"tab","#seo":"seo","#babel":"babel","#translation":"translation","#commaseparatedlist":"commaseparatedlist","#coordinates":"coordinates","#lst":"lst","#lsth":"lsth","#lstx":"lstx","#assessment":"assessment","#mentor":"mentor","#property":"property","#target":"target","#section":"lst","#section-x":"lstx","#section-h":"lsth","#statements":"statements","#useliquidthreads":"useliquidthreads","#lqtpagelimit":"lqtpagelimit","#chart":"chart"},{"!":"!","=":"=","#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 vn,Xi=k(()=>{"use strict";vn=Vi()});var fr,qt,xr,br,An,R,te=k(()=>{"use strict";R=class{constructor(n,e){T(this,br);T(this,fr);T(this,qt);T(this,xr);y(this,fr,n),y(this,qt,e)}get start(){return c(this,qt)}get top(){return N(this,br,An).call(this).top}get left(){return N(this,br,An).call(this).left}};fr=new WeakMap,qt=new WeakMap,xr=new WeakMap,br=new WeakSet,An=function(){var n;return(n=c(this,xr))!=null||y(this,xr,c(this,fr).getRootNode().posFromIndex(c(this,qt))),c(this,xr)}});var Sn,Qi,C,L,ve,Ki,_=k(()=>{"use strict";le();te();V();Sn=(a,n,e,t)=>({line:a+e-1,character:(e===1?n:0)+t}),Qi=a=>(n,e,t,r,i="error")=>{let{start:s}=e,{top:o,left:l}=e instanceof R?e:new R(n,s),{offsetHeight:g,offsetWidth:u}=n,{startIndex:d,startLine:p,startCol:m}=a(n,s,o,l),{line:f,character:h}=Sn(p,m,g,u);return{rule:t,message:$.msg(r),severity:i,startIndex:d,endIndex:d+n.toString().length,startLine:p,endLine:f,startCol:m,endCol:h}},C=Qi((a,n,e,t)=>{let r=a.getRelativeIndex(),{top:i,left:s}=a.parentNode.posFromIndex(r);return{startIndex:n+r,startLine:e+i,startCol:i?s:t+s}}),L=Qi((a,n,e,t)=>({startIndex:n,startLine:e,startCol:t})),ve=(a,n,e)=>{if(a)return a[1];let t=n();return e([pe.rev,t]),t},Ki=(a,n)=>a==="ol"&&n==="type"?["1","a","A","i","I"]:a==="th"&&n==="scope"?["row","col","rowgroup","colgroup"]:n==="dir"?["ltr","rtl","auto"]:n==="aria-hidden"?["true","false"]:[]});var _a,Dr,Ji=k(()=>{"use strict";_a=(a,n,e)=>{if(a.includes("#")){let[t,...r]=a.split("#");return(!t||t===n)&&r.every(i=>i===e)}return!a||a===n},Dr=(a,n,e)=>({type:t,name:r})=>a.split(",").some(i=>_a(i.trim(),t,r))});var Tr,Ot,_t,yr,kr,Mt,zt,vr,wn,Ut,Cn=k(()=>{"use strict";_();le();Ut=class{constructor(){T(this,vr);ae(this,"childNodes",[]);T(this,Tr);T(this,Ot);T(this,_t);T(this,yr);T(this,kr);T(this,Mt);T(this,zt,{})}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get parentNode(){return c(this,Tr)}get nextSibling(){return c(this,Ot)}get previousSibling(){return c(this,_t)}get offsetHeight(){return N(this,vr,wn).call(this).height}get offsetWidth(){return N(this,vr,wn).call(this).width}getChildNodes(){let{childNodes:n}=this;return Object.isFrozen(n)?[...n]:n}getAttribute(n){return n==="padding"?0:this[n]}setAttribute(n,e){switch(n){case"parentNode":y(this,Tr,e),e||(y(this,Ot,void 0),y(this,_t,void 0));break;case"nextSibling":y(this,Ot,e);break;case"previousSibling":y(this,_t,e);break;case"aIndex":y(this,Mt,[pe.rev,e]);break;default:this[n]=e}}getRootNode(){return ve(c(this,kr),()=>{var n,e;return(e=(n=this.parentNode)==null?void 0:n.getRootNode())!=null?e:this},n=>{let[,e]=n;e.type==="root"&&y(this,kr,n)})}indexFromPos(n,e){}posFromIndex(n){let{length:e}=String(this);if(n+=n<0?e:0,n>=0&&n<=e){let t=this.getLines(),r=t.findIndex(([,,i])=>n<=i);return{top:r,left:n-t[r][1]}}}getGaps(n){return 0}getRelativeIndex(n){if(n===void 0){let{parentNode:e}=this;return e?e.getRelativeIndex(e.childNodes.indexOf(this)):0}return ve(c(this,zt)[n],()=>{let{childNodes:e}=this,t=n+(n<0?e.length:0),r=this.getAttribute("padding");for(let i=0;i<t;i++)c(this,zt)[i]=[pe.rev,r],r+=e[i].toString().length+this.getGaps(i);return r},e=>{c(this,zt)[n]=e})}getAbsoluteIndex(){return ve(c(this,Mt),()=>{let{parentNode:n}=this;return n?n.getAbsoluteIndex()+this.getRelativeIndex():0},n=>{y(this,Mt,n)})}getBoundingClientRect(){}is(n){return this.type===n}getLines(){return ve(c(this,yr),()=>{let n=[],e=0;for(let t of String(this).split(`
2
- `)){let r=e+t.length;n.push([t,e,r]),e=r+1}return n},n=>{y(this,yr,n)})}seal(n,e){Object.defineProperty(this,n,{enumerable:!e&&!!this[n],configurable:!0})}};Tr=new WeakMap,Ot=new WeakMap,_t=new WeakMap,yr=new WeakMap,kr=new WeakMap,Mt=new WeakMap,zt=new WeakMap,vr=new WeakSet,wn=function(){let n=this.getLines(),e=n[n.length-1];return{height:n.length,width:e[2]-e[1]}}});var Ye,$n,Nn,Hr,Yi=k(()=>{"use strict";ee();le();Ji();Cn();Hr=class extends Ut{constructor(){super(...arguments);T(this,Ye)}get length(){return this.childNodes.length}text(e){return xe(this.childNodes,e)}normalize(){let e=this.getChildNodes(),t=r=>{var i,s;e.splice(r,1),(i=e[r-1])==null||i.setAttribute("nextSibling",e[r]),(s=e[r])==null||s.setAttribute("previousSibling",e[r-1])};for(let r=e.length-1;r>=0;r--){let{type:i,data:s}=e[r];i!=="text"||e.length===1||this.getGaps(r-(r&&1))||s===""&&t(r)}this.setAttribute("childNodes",e)}removeAt(e){return Ar(this,e,1)[0]}insertAt(e,t=this.length){return Ar(this,t,0,[e]),e}closest(e){let t=Dr(e,this),{parentNode:r}=this;for(;r;){if(t(r))return r;({parentNode:r}=r)}}querySelector(e){let t=Dr(e,this);return N(this,Ye,$n).call(this,t)}querySelectorAll(e){let t=Dr(e,this);return N(this,Ye,Nn).call(this,t)}append(...e){this.safeAppend(e)}safeAppend(e){for(let t of e)this.insertAt(t)}replaceChildren(...e){this.safeReplaceChildren(e)}safeReplaceChildren(e){for(let t=this.length-1;t>=0;t--)this.removeAt(t);this.safeAppend(e)}setText(e,t=0){t+=t<0?this.length:0;let r=this.childNodes[t],{data:i}=r;return r.replaceData(e),i}toString(e,t=""){return this.childNodes.map(r=>r.toString(e)).join(t)}caretPositionFromIndex(e){}elementFromIndex(e){}elementFromPoint(e,t){}lint(e=this.getAbsoluteIndex(),t){let r=[];for(let i=0,s=e+this.getAttribute("padding");i<this.length;i++){let o=this.childNodes[i];o.setAttribute("aIndex",s);let l=o.lint(s,t);l.length>0&&r.push(...l),s+=o.toString().length+this.getGaps(i)}return r}print(e={}){let t=e.class;return this.toString()?(t===""?"":`<span class="wpb-${t!=null?t:this.type}">`)+Oe(this.childNodes,e)+(t===""?"":"</span>"):""}json(e,t=this.getAbsoluteIndex()){let r={...this,type:this.type,range:[t,t+this.toString().length],childNodes:[]};for(let i=0,s=t+this.getAttribute("padding");i<this.length;i++){let o=this.childNodes[i],{length:l}=o.toString();o.setAttribute("aIndex",s),r.childNodes.push(o.type==="text"?{data:o.data,range:[s,s+l]}:o.json(void 0,s)),s+=l+this.getGaps(i)}return r}};Ye=new WeakSet,$n=function(e){var t;for(let r of this.childNodes){if(r.type==="text")continue;if(e(r))return r;let i=N(t=r,Ye,$n).call(t,e);if(i)return i}},Nn=function(e){var r;let t=[];for(let i of this.childNodes)i.type!=="text"&&(e(i)&&t.push(i),t=[...t,...N(r=i,Ye,Nn).call(r,e)]);return t}});var In,es,Ma,za,Ua,Wa,Da,Zi,En,Gr,ts,Sr,rs=k(()=>{"use strict";ee();_();V();Cn();In=String.raw`[${ke}\t]*`,es=String.raw`<\s*(?:/\s*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+|(?:rfc|pmid)(?=[-::]?${In}\d)|isbn(?=[-::]?${In}(?:\d(?:${In}|-)){6})`,Ma=new RegExp(String.raw`${es}|https?[:/]/+`,"giu"),za=new RegExp(es,"giu"),Ua=new Set(["attr-value","ext-link-text","link-text"]),Wa={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},Da={"<":"tag-like","[":"lonely-bracket","{":"lonely-bracket","]":"lonely-bracket","}":"lonely-bracket",h:"lonely-http",r:"lonely-http",p:"lonely-http",i:"lonely-http"},Zi=new Set(["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{En=new RegExp(String.raw`[\p{L}\p{N}_]`,"u")}catch{En=/\w/u}Sr=class extends Ut{constructor(e){super();T(this,Gr);ae(this,"data","");this.data=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 M,F,H;if(t===!1)return[];let{data:r,parentNode:i,nextSibling:s,previousSibling:o}=this;if(!i)throw new Error("An isolated text node cannot be linted!");let{type:l,name:g,parentNode:u}=i,d=!1;if(l==="attr-value"){let{type:G,name:re,tag:ne}=u;if(G!=="ext-attr")d=!0;else if(ne==="ref"&&(re==="name"||re==="extends"||re==="follow")||ne==="choose"&&(re==="before"||re==="after"))return[]}if(t!=null||(t=l==="free-ext-link"||l==="ext-link-url"||l==="ext-link-text"||l==="image-parameter"&&g==="link"||d?za:Ma),r.search(t)===-1)return[];t.lastIndex=0;let p=[],m=s==null?void 0:s.type,f=s==null?void 0:s.name,h=o==null?void 0:o.type,x=this.getRootNode(),b=x.toString(),{ext:S,html:w}=x.getAttribute("config"),{top:A,left:I}=x.posFromIndex(e),q=new Set(["onlyinclude","noinclude","includeonly",...S,...w[0],...w[1],...w[2],...Zi]);for(let G=t.exec(r);G;G=t.exec(r)){let[,re,ne]=G,{index:Y,0:Q}=G;if(ne&&ne!=="]"){let{length:he}=ne;Y+=he,Q=Q.slice(he)}Q=Q.toLowerCase();let{0:E,length:Ce}=Q,ye=E==="r"||E==="p"||E==="i";if(E==="<"&&!q.has(re.toLowerCase())||E==="["&&l==="ext-link-text"&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(r.slice(Y+1))||s!=null&&s.is("ext")&&f==="nowiki"&&((M=s.innerText)!=null&&M.includes("]")))||ye&&(!i.isPlain()||Ua.has(l)))continue;E==="]"&&(Y||Ce>1)&&t.lastIndex--;let oe=e+Y,Re=oe+Ce,Pe=b[Re],xn=b[oe-1],bn=Ce>1&&!(E==="<"&&(/^<\s/u.test(Q)||!/[\s/>]/u.test(Pe!=null?Pe:"")||Zi.has(re))||d&&(E==="["||E==="]")||ye&&l==="parameter-value"||/^(?:rfc|pmid|isbn)$/iu.test(Q))||E==="{"&&(Pe===E||xn==="-")||E==="}"&&(xn===E||Pe==="-")||E==="["&&(l==="ext-link-text"||m==="free-ext-link"&&!r.slice(Y+1).trim())||E==="]"&&h==="free-ext-link"&&!r.slice(0,Y).includes("]")?"error":"warning",Tn=E==="{"||E==="[";if(bn==="warning"&&(Tn||(E==="]"||E==="}"))){let he=Wa[E],yn=Tn?r.slice(Y+1):r.slice(0,Y);if(E==="{"&&((F=he.exec(yn))==null?void 0:F[0])==="}"||E==="}"&&((H=he.exec(yn))==null?void 0:H[0])==="{")continue;if(!yn.includes(E)){let ji=Tn?"nextSibling":"previousSibling",lt=this[ji];for(;lt&&(lt.type!=="text"||!he.test(lt.data));)lt=lt[ji];if(lt&&he.exec(lt.data)[0]!==E)continue}}ye&&(Q=Q.toUpperCase());let Fi=this.posFromIndex(Y),{line:Ri,character:Pi}=Sn(A,I,Fi.top+1,Fi.left),Ft={rule:Da[E],message:$.msg('lonely "$1"',ye||E==="h"?Q:E),severity:bn,startIndex:oe,endIndex:Re,startLine:Ri,endLine:Ri,startCol:Pi,endCol:Pi+Ce};if(E==="<")Ft.suggestions=[{desc:"escape",range:[oe,oe+1],text:"&lt;"}];else if(E==="h"&&l!=="link-text"&&En.test(xn||""))Ft.suggestions=[{desc:"whitespace",range:[oe,oe],text:" "}];else if(E==="["&&l==="ext-link-text"){let he=i.getAbsoluteIndex()+i.toString().length;Ft.suggestions=[{desc:"escape",range:[he,he+1],text:"&#93;"}]}else if(E==="]"&&h==="free-ext-link"&&bn==="error"){let he=e-o.toString().length;Ft.fix={range:[he,he],text:"[",desc:"left bracket"}}else ye&&(Ft.suggestions=[...G[0]===Q?[]:[{desc:"uppercase",range:[oe,Re],text:Q}],...Pe===":"||Pe===":"?[{desc:"whitespace",range:[Re,Re+1],text:" "}]:[]]);p.push(Ft)}return p}replaceData(e){N(this,Gr,ts).call(this,e)}print(){return Bt(this.data)}};Gr=new WeakSet,ts=function(e){this.setAttribute("data",e)}});var be,pt=k(()=>{"use strict";le();be=(a=!0,n=!0)=>e=>{class t extends e{text(){return""}lint(i){return a?[]:super.lint(i)}}return Ie(t,e),t}});var wr,ue,ut=k(()=>{"use strict";O();ue=class extends v{constructor(e,t,r,i,s){super(e,r,i,s);T(this,wr);y(this,wr,t)}get type(){return c(this,wr)}lint(e=this.getAbsoluteIndex()){return super.lint(e,!1)}};wr=new WeakMap});var de,_e=k(()=>{"use strict";le();de=({length:a})=>n=>{class e extends n{getAttribute(r){return r==="padding"?a:super.getAttribute(r)}}return Ie(e,n),e}});var Wt,X,Me=k(()=>{"use strict";O();X=class extends v{constructor(e,t,r,i,s){super(e,r,i,s);T(this,Wt);y(this,Wt,t)}get type(){return c(this,Wt)}set type(e){y(this,Wt,e)}};Wt=new WeakMap});var Ha,ns,ct,Ae,ze,Ln,Ga,me,Cr=k(()=>{"use strict";_();ee();te();_e();O();Me();Ha=a=>a==="redirect-target"||a==="link";ns=[de("[[")];me=class extends(Ga=v){constructor(e,t,r,i=[],s="|"){super(void 0,r,i,{});T(this,ct,!0);T(this,Ae);T(this,ze);if(this.insertAt(new X(e,"link-target",r,i,{})),t!==void 0){let o=new v(t,r,i,{});o.type="link-text",o.setAttribute("stage",10),this.insertAt(o)}y(this,Ae,s)}get link(){}get fragment(){return c(this,ze).fragment}afterBuild(){y(this,ze,this.getTitle()),c(this,Ae).includes("\0")&&y(this,Ae,this.buildFromStr(c(this,Ae),0)),this.setAttribute("name",c(this,ze).title),super.afterBuild()}setAttribute(e,t){e==="bracket"?y(this,ct,t):e==="title"?y(this,ze,t):super.setAttribute(e,t)}toString(e){let t=super.toString(e,c(this,Ae));return c(this,ct)?`[[${t}]]`:t}text(){let e=super.text("|");return c(this,ct)?`[[${e}]]`:e}getAttribute(e){return e==="title"?c(this,ze):super.getAttribute(e)}getGaps(e){return e===0?c(this,Ae).length:1}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{childNodes:[i,s],type:o}=this,{encoded:l,fragment:g}=c(this,ze),u=new R(this,e);if(i.childNodes.some(({type:d})=>d==="template")&&r.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:Je(i.text())}],r.push(d)}if(o==="link"||o==="category"){let d=s==null?void 0:s.childNodes.findIndex(m=>m.type==="text"&&m.data.includes("|")),p=s==null?void 0:s.childNodes[d];if(p){let m=C(s,u,"pipe-like",'additional "|" in the link text',"warning"),f=m.startIndex+s.getRelativeIndex(d);m.suggestions=[{desc:"escape",range:[f,f+p.data.length],text:p.data.replace(/\|/gu,"&#124;")}],r.push(m)}}if(g!==void 0&&!Ha(o)){let d=C(i,u,"no-ignored","useless fragment"),p=i.childNodes.findIndex(f=>f.type==="text"&&f.data.includes("#")),m=i.childNodes[p];m&&(d.fix={range:[d.startIndex+i.getRelativeIndex(p)+m.data.indexOf("#"),d.endIndex],text:"",desc:"remove"}),r.push(d)}return r}getTitle(e,t){return this.normalizeTitle(this.firstChild.text(),0,{halfParsed:t,temporary:e,decode:!0,selfLink:!0})}print(){return super.print(c(this,ct)?{pre:"[[",post:"]]",sep:c(this,Ae)}:{sep:c(this,Ae)})}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t),{type:i,fragment:s}=this;return s!==void 0&&(i==="link"||i==="redirect-target")&&(r.fragment=s),r}};Ln=P(Ga),ct=new WeakMap,Ae=new WeakMap,ze=new WeakMap,me=B(Ln,0,"LinkBaseToken",ns,me),j(Ln,1,me)});var ge,Ze=k(()=>{"use strict";O();ge=class extends v{get innerText(){return this.firstChild.data}constructor(n="",e,t){super(n,e,t)}}});var is,Fn,Va,z,Ue=k(()=>{"use strict";pt();Ze();is=[be()];z=class extends(Va=ge){get type(){return"noinclude"}toString(n){return n?"":super.toString()}};Fn=P(Va),z=B(Fn,0,"NoincludeToken",is,z),j(Fn,1,z)});var Vr,ss=k(()=>{"use strict";_();Cr();Ue();Vr=class extends me{get type(){return"redirect-target"}constructor(n,e,t,r){super(n,void 0,t,r),e!==void 0&&this.insertAt(new z(e,t,r))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,{halfParsed:!0,decode:!0})}lint(n=this.getAbsoluteIndex()){let e=super.lint(n,!1);if(this.length===2){let t=C(this.lastChild,{start:n},"no-ignored","useless link text","warning");t.startIndex--,t.startCol--,t.fix={range:[t.startIndex,t.endIndex],text:"",desc:"remove"},e.push(t)}return e}}});var os,et,Dt,Rn,Xa,ht,as=k(()=>{"use strict";pt();O();ut();ss();os=[be(!1,!1)];ht=class extends(Xa=v){constructor(e,t,r,i,s,o,l=[]){super(void 0,o,l);T(this,et);T(this,Dt);y(this,et,e),y(this,Dt,s),this.append(new ue(t,"redirect-syntax",o,l),new Vr(r,i==null?void 0:i.slice(1),o,l))}get type(){return"redirect"}getAttribute(e){return e==="padding"?c(this,et).length:super.getAttribute(e)}toString(e){return c(this,et)+super.toString(e)+c(this,Dt)}lint(e=this.getAbsoluteIndex()){let t=e+c(this,et).length+this.firstChild.toString().length;return this.lastChild.setAttribute("aIndex",t),this.lastChild.lint(t)}print(){return super.print({pre:c(this,et),post:c(this,Dt)})}};Rn=P(Xa),et=new WeakMap,Dt=new WeakMap,ht=B(Rn,0,"RedirectToken",os,ht),j(Rn,1,ht)});var ls={};J(ls,{parseRedirect:()=>Qa});var Qa,ds=k(()=>{"use strict";V();as();Qa=(a,n,e)=>{var r;(r=n.regexRedirect)!=null||(n.regexRedirect=new RegExp(String.raw`^(\s*)((?:${n.redirection.join("|")})\s*(?::\s*)?)\[\[([^\n|\]]+)(\|.*?)?\]\](\s*)`,"iu"));let t=n.regexRedirect.exec(a);return t&&$.normalizeTitle(t[3],0,!1,n,{halfParsed:!0,temporary:!0,decode:!0}).valid?(a=`\0${e.length}o${a.slice(t[0].length)}`,new ht(...t.slice(1),n,e),a):!1}});var gs,Pn,Ka,mt,ps=k(()=>{"use strict";_e();O();gs=[de("<onlyinclude>")];mt=class extends(Ka=v){get type(){return"onlyinclude"}toString(n){return`<onlyinclude>${super.toString(n)}</onlyinclude>`}isPlain(){return!0}print(){return super.print({pre:'<span class="wpb-ext">&lt;onlyinclude&gt;</span>',post:'<span class="wpb-ext">&lt;/onlyinclude&gt;</span>'})}};Pn=P(Ka),mt=B(Pn,0,"OnlyincludeToken",gs,mt),j(Pn,1,mt)});var tt,$r=k(()=>{"use strict";le();tt=(a=1)=>n=>{class e extends n{getGaps(){return a}}return Ie(e,n),e}});var us,rt,jn,Ja,we,Xr=k(()=>{"use strict";$r();O();us=[tt()];we=class extends(Ja=v){constructor(e,t,r,i,s,o=[]){super(void 0,s);T(this,rt);ae(this,"closed");ae(this,"selfClosing");this.setAttribute("name",e.toLowerCase()),y(this,rt,[e,i||e]),this.closed=i!=="",this.selfClosing=i===void 0,this.append(t,r);let l=typeof t=="string"?-1:o.indexOf(t);o.splice(l===-1?1/0:l,0,this)}get innerText(){return this.selfClosing?void 0:this.lastChild.text()}toString(e){let{selfClosing:t,firstChild:r,lastChild:i}=this,[s,o]=c(this,rt);return t?`<${s}${r.toString(e)}/>`:`<${s}${r.toString(e)}>${i.toString(e)}${this.closed?`</${o}>`:""}`}text(){let[e,t]=c(this,rt);return this.selfClosing?`<${e}${this.firstChild.text()}/>`:`<${e}${super.text(">")}${this.closed?`</${t}>`:""}`}getAttribute(e){return e==="padding"?c(this,rt)[0].length+1:super.getAttribute(e)}print(){let[e,t]=c(this,rt);return super.print(this.selfClosing?{pre:`&lt;${e}`,post:"/&gt;"}:{pre:`&lt;${e}`,sep:"&gt;",post:this.closed?`&lt;/${t}&gt;`:""})}};jn=P(Ja),rt=new WeakMap,we=B(jn,0,"TagPairToken",us,we),j(jn,1,we)});var Kr,cs,Qr,hs=k(()=>{"use strict";O();Xr();ut();Ue();Qr=class extends we{constructor(e,t,r,i=[]){let s=new ue(e,"translate-attr",r,i);t=t==null?void 0:t.replace(/(<tvar\|[^>]+>)([\s\S]*?)(<\/>)/gu,(l,g,u,d)=>(new z(g,r,i),new z(d,r,i),`\0${i.length-1}n${u}\0${i.length}n`)).replace(/(<tvar\s+name\s*=(?:\s*(?:(["'])[\s\S]*?\2|[^"'\s>]+))?\s*>)([\s\S]*?)(<\/tvar\s*>)/giu,(l,g,u,d,p)=>(new z(g,r,i),new z(p,r,i),`\0${i.length-1}n${d}\0${i.length}n`));let o=new v(t,r,i);o.type="translate-inner";super("translate",s,o,"translate",r,i);T(this,Kr);this.seal("closed",!0),this.seal("selfClosing",!0)}get type(){return"translate"}toString(e){return e?this.lastChild.toString(!0):super.toString()}text(){return this.lastChild.text()}print(){return`<span class="wpb-ext">&lt;translate${N(this,Kr,cs).call(this)?'<span class="wpb-ext-attrs"> <span class="wpb-ext-attr"><span class="wpb-attr-key">nowrap</span></span></span>':""}&gt;${this.lastChild.print({class:"ext-inner"})}&lt;/translate&gt;</span>`}};Kr=new WeakSet,cs=function(){return this.firstChild.toString()===" nowrap"}});var ms,Bn,Ya,ft,fs=k(()=>{"use strict";_();te();pt();V();Xr();ms=[be(!1)];ft=class extends(Ya=we){get type(){return"include"}constructor(n,e="",t,r,i,s){super(n,e,t!=null?t:"",t===void 0||r!=null?r:"",i,s)}toString(n){return n?"":super.toString()}lint(n=this.getAbsoluteIndex()){let e=[],{firstChild:t,closed:r,name:i}=this,s=new R(this,n);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(!r){let o=L(this,s,"unclosed-comment",$.msg("unclosed $1",`<${i}>`));o.suggestions=[{desc:"close",range:[o.endIndex,o.endIndex],text:`</${i}>`}],e.push(o)}return e}};Bn=P(Ya),ft=B(Bn,0,"IncludeToken",ms,ft),j(Bn,1,ft)});var Ht,Jr=k(()=>{"use strict";le();Ht=(a=0)=>n=>{var t,xs;class e extends n{constructor(){super(...arguments);T(this,t)}getAttr(o){return N(this,t,xs).call(this).getAttr(o)}}return t=new WeakSet,xs=function(){return this.childNodes[a]},Ie(e,n),e}});var Z,bs,Ts,Yr,On,ys,Gt,vs,As,Ss,qn,ks,Ee,ws,Cs,$s,Ns,Is=k(()=>{"use strict";Z=new Set(["align"]),bs=new Set(["cite"]),Ts=new Set(["cite","datetime"]),Yr=new Set(["width"]),On=new Set(["axis","align","bgcolor","height","width","valign"]),ys=new Set([...On,"abbr","headers","scope","rowspan","colspan"]),Gt=new Set(["type"]),vs=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),As=new Set(["clear"]),Ss=new Set(["bgcolor","align","valign"]),qn=new Set(["qid","forcemathmode","type","display"]),ks=new Set(["enclose","inline","lang","line","linelinks","style","class","id","dir","copy","highlight","start"]),Ee=new Set,ws=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"]),Cs={div:Z,h1:Z,h2:Z,h3:Z,h4:Z,h5:Z,h6:Z,blockquote:bs,q:bs,p:Z,br:As,pre:Yr,ins:Ts,del:Ts,ul:Gt,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...vs,"border"]),caption:Z,tr:Ss,td:ys,th:ys,img:new Set(["alt","src","width","height","srcset"]),font:new Set(["size","color","face"]),hr:Yr,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:Gt,poem:Z,categorytree:Z,combooption:Z,math:Ee,chem:Ee,ce:Ee},$s={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:Ee,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:Ee,inputbox:Ee,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:Ee,poll:new Set(["id","show-results-before-voting"]),sm2:Gt,flashmp3:Gt,score:new Set(["line_width_inches","lang","override_midi","raw","note-language","override_audio","override_ogg","sound","vorbis"]),seo:new Set(["title","title_mode","title_separator","keywords","description","robots","google_bot","image","image_width","image_height","image_alt","type","site_name","locale","section","author","published_time","twitter_site"]),tab:new Set(["nested","name","index","class","block","inline","openname","closename","collapsed","dropdown","style","bgcolor","container","id","title"]),tabs:new Set(["plain","class","container","id","title","style"]),combobox:new Set(["placeholder","value","id","class","text","dropdown","style"]),math:new Set([...qn,"chem"]),chem:qn,ce:qn,hiero:Ee,phonos:new Set(["ipa","class","text","lang","wikibase","file"]),section:new Set(["begin","end"]),source:ks,syntaxhighlight:ks,templatedata:Ee,timeline:new Set(["method","font"]),quiz:new Set(["display","shuffleanswers","points","shuffle","case"]),languages:Ee},Ns={table:vs,td:new Set([...On,"scope"]),th:On,br:As,caption:Z,div:Z,hr:Yr,h1:Z,h2:Z,h3:Z,h4:Z,h5:Z,h6:Z,li:Gt,p:Z,pre:Yr,tr:Ss,ul:Gt}});var Za,el,Nr,Vt,se,Le,Xt,Es=k(()=>{"use strict";_();ee();Is();te();V();O();Me();Za=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,el=new Set(["ext","arg","magic-word","template"]),Xt=class extends v{constructor(e,t,r,i="",s,o=[],l=$.getConfig(),g=[]){let u=new X(r,"attr-key",l,g),d;if(r==="title"||t==="img"&&r==="alt")d=new v(s,l,g,{}),d.type="attr-value",d.setAttribute("stage",10);else if(t==="gallery"&&r==="caption"||t==="choose"&&(r==="before"||r==="after")){let p={...l,excludes:[...l.excludes,"heading","html","table","hr","list"]};d=new v(s,p,g,{}),d.type="attr-value",d.setAttribute("stage",1)}else d=new X(s,"attr-value",l,g,{});super(void 0,l,g);T(this,Nr);T(this,Vt);T(this,se);T(this,Le);y(this,Nr,e),this.append(u,d),y(this,se,i),y(this,Le,[...o]),y(this,Vt,t),this.setAttribute("name",qe(ie(r)))}get type(){return c(this,Nr)}get tag(){return c(this,Vt)}get balanced(){return!c(this,se)||c(this,Le)[0]===c(this,Le)[1]}afterBuild(){c(this,se).includes("\0")&&y(this,se,this.buildFromStr(c(this,se),0)),this.parentNode&&y(this,Vt,this.parentNode.name),this.setAttribute("name",qe(this.firstChild.text())),super.afterBuild()}toString(e){let[t="",r=""]=c(this,Le);return c(this,se)?super.toString(e,c(this,se)+t)+r:this.firstChild.toString(e)}text(){return c(this,se)?`${super.text(`${c(this,se).trim()}"`)}"`:this.firstChild.text()}getGaps(){var e,t;return c(this,se)?c(this,se).length+((t=(e=c(this,Le)[0])==null?void 0:e.length)!=null?t:0):0}lint(e=this.getAbsoluteIndex(),t){var x;let r=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 b=C(o,p,"unclosed-quote",$.msg("unclosed $1","quotes"),"warning");b.startIndex--,b.startCol--,b.suggestions=[{range:[b.endIndex,b.endIndex],text:c(this,Le)[0],desc:"close"}],r.push(b)}let m=$s[u],f=Cs[u],{length:h}=this.toString();if(!(m!=null&&m.has(g))&&!(f!=null&&f.has(g))&&(l==="ext-attr"?m||f:!/\{\{[^{]+\}\}/u.test(g))&&(l==="ext-attr"&&!f||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(g)&&(u==="meta"||u==="link"||!ws.has(g)))){let b=C(s,p,"illegal-attr","illegal attribute name");b.suggestions=[{desc:"remove",range:[e,e+h],text:""}],r.push(b)}else if(g==="style"&&typeof d=="string"&&Za.test(d))r.push(C(o,p,"insecure-style","insecure style"));else if(g==="tabindex"&&typeof d=="string"&&d!=="0"){let b=C(o,p,"illegal-attr","nonzero tabindex");b.suggestions=[{desc:"remove",range:[e,e+h],text:""},{desc:"0 tabindex",range:[b.startIndex,b.endIndex],text:"0"}],r.push(b)}else if(l!=="ext-attr"&&!o.childNodes.some(({type:b})=>el.has(b))){let b=Ki(u,g),S=String(d).toLowerCase();b.length>0&&b.every(w=>w!==S)&&r.push(C(o,p,"illegal-attr","illegal attribute value","warning"))}return(x=Ns[u])!=null&&x.has(g)&&r.push(C(s,p,"obsolete-attr","obsolete attribute","warning")),r}getValue(){return c(this,se)?this.lastChild.text().trim():this.type==="ext-attr"||""}print(){let[e="",t=""]=c(this,Le);return c(this,se)?super.print({sep:Bt(c(this,se))+e,post:t}):super.print()}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return r.tag=this.tag,r}};Nr=new WeakMap,Vt=new WeakMap,se=new WeakMap,Le=new WeakMap});var Ls,tl,_n,Ir,nt,Zr=k(()=>{"use strict";_();ee();te();V();O();Me();Es();Ls=a=>a.slice(0,-1),tl=a=>`${Ls(a)}-dirty`;try{_n=new RegExp(String.raw`[\p{L}\p{N}]`,"u")}catch{_n=/[^\W_]/u}nt=class extends v{constructor(e,t,r,i,s=[]){super(void 0,i,s,{});T(this,Ir);if(y(this,Ir,t),this.setAttribute("name",r),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 X(l,tl(t),i,s,{})),l="")};for(;g;){let{index:p,0:m,1:f,2:h,3:x,4:b,5:S,6:w}=g;if(l+=e.slice(u,p),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(ie(f).trim())){let A=b!=null?b:w,I=[x,S],q=new Xt(Ls(t),r,f,h,A,I,i,s);d(),super.insertAt(q)}else l+=m;({lastIndex:u}=o),g=o.exec(e)}l+=e.slice(u),d()}}get type(){return c(this,Ir)}afterBuild(){let{parentNode:e}=this;(e==null?void 0:e.type)==="td"&&this.setAttribute("name",e.subtype),super.afterBuild()}getAttrTokens(e){return this.childNodes.filter(t=>t instanceof Xt&&(!e||t.name===qe(e)))}getAttrToken(e){let t=this.getAttrTokens(e);return t[t.length-1]}getAttr(e){var t;return(t=this.getAttrToken(e))==null?void 0:t.getValue()}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{parentNode:i,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=L(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:""}],r.push(u)}for(let u of s)if(u instanceof Xt){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",_n.test(d)?"error":"warning");p.suggestions=[{desc:"remove",range:[p.startIndex,p.endIndex],text:" "}],r.push(p)}}if(l.size>0)for(let u of l){let d=o.get(u).map(p=>{let m=p.getValue();return[p,m===!0?"":m]});r.push(...d.map(([p,m],f)=>{let h=C(p,g,"no-duplicate",$.msg("duplicated $1 attribute",u)),x={desc:"remove",range:[h.startIndex,h.endIndex],text:""};return!m||d.slice(0,f).some(([,b])=>b===m)?h.fix=x:h.suggestions=[x],h}))}return r}print(){return this.toString()?`<span class="wpb-${this.type}">${this.childNodes.map(e=>e.print(e instanceof X?{class:e.toString().trim()&&"attr-dirty"}:void 0)).join("")}</span>`:""}};Ir=new WeakMap});var Fs={};J(Fs,{PreToken:()=>Mn});var Mn,Rs=k(()=>{"use strict";O();Ue();Mn=class extends v{get type(){return"ext-inner"}constructor(n,e,t=[]){if(n){let r=/<nowiki>/giu,i=/<\/nowiki>/giu,{length:s}=r.source,o=r.exec(n);o&&(i.lastIndex=o.index+s);let l=i.exec(n),g=0,u="";for(;o&&l;)new z(o[0],e,t),new z(l[0],e,t),u+=`${n.slice(g,o.index)}\0${t.length-1}n${n.slice(o.index+s,l.index)}\0${t.length}n`,g=l.index+s+1,r.lastIndex=g,o=r.exec(n),o&&(i.lastIndex=o.index+s),l=i.exec(n);n=u+n.slice(g)}super(n,e,t,{}),this.setAttribute("stage",10)}isPlain(){return!0}lint(n=this.getAbsoluteIndex()){return super.lint(n,/<\s*\/\s*(pre)\b/giu)}}});var Qt,en=k(()=>{"use strict";le();Qt=a=>{class n extends a{toString(t){return super.toString(t,`
1
+ "use strict";(()=>{var Na=Object.create;var Rt=Object.defineProperty;var qi=Object.getOwnPropertyDescriptor;var Ia=Object.getOwnPropertyNames;var Ea=Object.prototype.hasOwnProperty;var _i=(a,n)=>(n=Symbol[a])?n:Symbol.for("Symbol."+a),Pt=a=>{throw TypeError(a)};var Mi=(a,n,e)=>n in a?Rt(a,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[n]=e;var Oi=(a,n)=>Rt(a,"name",{value:n,configurable:!0});var k=(a,n)=>()=>(a&&(n=a(a=0)),n);var La=(a,n)=>()=>(n||a((n={exports:{}}).exports,n),n.exports),J=(a,n)=>{for(var e in n)Rt(a,e,{get:n[e],enumerable:!0})},Fa=(a,n,e,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of Ia(n))!Ea.call(a,r)&&r!==e&&Rt(a,r,{get:()=>n[r],enumerable:!(t=qi(n,r))||t.enumerable});return a};var U=a=>Fa(Rt({},"__esModule",{value:!0}),a);var P=a=>{var n;return[,,,Na((n=a==null?void 0:a[_i("metadata")])!=null?n:null)]},zi=["class","method","getter","setter","accessor","field","value","get","set"],mr=a=>a!==void 0&&typeof a!="function"?Pt("Function expected"):a,Ra=(a,n,e,t,r)=>({kind:zi[a],name:n,metadata:t,addInitializer:i=>e._?Pt("Already initialized"):r.push(mr(i||null))}),Pa=(a,n)=>Mi(n,_i("metadata"),a[3]),j=(a,n,e,t)=>{for(var r=0,i=a[n>>1],s=i&&i.length;r<s;r++)n&1?i[r].call(e):t=i[r].call(e,t);return t},B=(a,n,e,t,r,i)=>{var s,o,l,g,u,d=n&7,p=!!(n&8),m=!!(n&16),f=d>3?a.length+1:d?p?1:2:0,h=zi[d+5],x=d>3&&(a[f-1]=[]),b=a[f]||(a[f]=[]),S=d&&(!m&&!p&&(r=r.prototype),d<5&&(d>3||!m)&&qi(d<4?r:{get[e](){return c(this,i)},set[e](A){return y(this,i,A)}},e));d?m&&d<4&&Oi(i,(d>2?"set ":d>1?"get ":"")+e):Oi(r,e);for(var C=t.length-1;C>=0;C--)g=Ra(d,e,l={},a[3],b),d&&(g.static=p,g.private=m,u=g.access={has:m?A=>ja(r,A):A=>e in A},d^3&&(u.get=m?A=>(d^1?c:N)(A,r,d^4?i:S.get):A=>A[e]),d>2&&(u.set=m?(A,I)=>y(A,r,I,d^4?i:S.set):(A,I)=>A[e]=I)),o=(0,t[C])(d?d<4?m?i:S[h]:d>4?void 0:{get:S.get,set:S.set}:r,g),l._=1,d^4||o===void 0?mr(o)&&(d>4?x.unshift(o):d?m?i=o:S[h]=o:r=o):typeof o!="object"||o===null?Pt("Object expected"):(mr(s=o.get)&&(S.get=s),mr(s=o.set)&&(S.set=s),mr(s=o.init)&&x.unshift(s));return d||Pa(a,r),S&&Rt(r,e,S),m?d^4?i:S:r},le=(a,n,e)=>Mi(a,typeof n!="symbol"?n+"":n,e),kn=(a,n,e)=>n.has(a)||Pt("Cannot "+e),ja=(a,n)=>Object(n)!==n?Pt('Cannot use the "in" operator on this value'):a.has(n),c=(a,n,e)=>(kn(a,n,"read from private field"),e?e.call(a):n.get(a)),T=(a,n,e)=>n.has(a)?Pt("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(a):n.set(a,e),y=(a,n,e,t)=>(kn(a,n,"write to private field"),t?t.call(a,e):n.set(a,e),e),N=(a,n,e)=>(kn(a,n,"access private method"),e);var Wr=(a,n,e,t)=>({set _(r){y(a,n,r,e)},get _(){return c(a,n,t)}});var Ui,Wi,Di=k(()=>{"use strict";Ui=(()=>{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,"list-range":11};return Object.setPrototypeOf(a,null),a})(),Wi=(()=>{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})()});function $e(a){return n=>{let e=new(typeof n=="string"?Map:WeakMap);if(e.has(n)){let r=e.get(n);return r.lastIndex=0,r}let t=a(n);return e.set(n,t),t}}var Je,jt=k(()=>{"use strict";Je=a=>decodeURIComponent(a.replace(/%(?![\da-f]{2})/giu,"%25"))});var ke,Hi,je,Be,Oe,Ne,dt,Gi,ie,id,xe,Ba,Oa,gt,Vi,sd,qa,_a,Bt,qe,ee=k(()=>{"use strict";jt();ke=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,Hi=String.raw`[^[\]<>"\0-\x1F\x7F${ke}\uFFFD]`,je=String.raw`(?:\[[\da-f:.]+\]|${Hi})`,Be=String.raw`(?:${Hi}|\0\d+[cn!~]\x7F)*`,Oe=a=>a.trim().toLowerCase(),Ne=(a,n)=>a.replace(/\0(\d+)\x7F/gu,(e,t)=>n[t]),dt=(a,n)=>e=>e.replace(a,n),Gi=dt(/[\0\x7F]|\r$/gmu,""),ie=dt(/\0\d+[cn]\x7F/gu,""),id=dt(/[\\{}()|.?*+^$[\]]/gu,String.raw`\$&`),xe=(a,n="")=>a.map(e=>typeof e=="string"?e:e.text()).join(n),Ba={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},Oa=dt(/&(?:#(\d+|[Xx][\da-fA-F]+)|([lg]t|[LG]T|[lr]brac[ke]|nbsp|amp|AMP|quot|QUOT));/gu,(a,n,e)=>n?String.fromCodePoint(+((/^x/iu.test(n)?"0":"")+n)):Ba[e.toLowerCase()]),gt=a=>Oa(a),Vi=dt(/&#(\d+|x[\da-f]+);/giu,(a,n)=>String.fromCodePoint(+((/^x/iu.test(n)?"0":"")+n))),sd=dt(/\n/gu,String.raw`\n`),qa={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},_a=a=>dt(a,n=>`&${qa[n]};`),Bt=_a(/[&<>]/gu),qe=(a,n={})=>{let{pre:e="",post:t="",sep:r=""}=n;return e+a.map(i=>i.print()).join(r)+t}});var Xi=La((ld,Ma)=>{Ma.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},functionHook:["msgnw"],variable:["!","=","pageid","articlepath","server","servername","scriptpath","stylepath"],parserFunction:[{msgnw:"msgnw",pageid:"pageid",articlepath:"articlepath",server:"server",servername:"servername",scriptpath:"scriptpath",stylepath:"stylepath","#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","#rmatch":"rmatch","#rreplace":"rreplace","#replace":"replace","#rsplit":"rsplit","#explode":"explode","#tab":"tab","#seo":"seo","#babel":"babel","#translation":"translation","#commaseparatedlist":"commaseparatedlist","#coordinates":"coordinates","#lst":"lst","#lsth":"lsth","#lstx":"lstx","#assessment":"assessment","#mentor":"mentor","#property":"property","#target":"target","#section":"lst","#section-x":"lstx","#section-h":"lsth","#statements":"statements","#useliquidthreads":"useliquidthreads","#lqtpagelimit":"lqtpagelimit","#chart":"chart"},{"!":"!","=":"=","#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 vn,Qi=k(()=>{"use strict";vn=Xi()});var fr,Ot,xr,br,An,R,te=k(()=>{"use strict";R=class{constructor(n,e){T(this,br);T(this,fr);T(this,Ot);T(this,xr);y(this,fr,n),y(this,Ot,e)}get start(){return c(this,Ot)}get top(){return N(this,br,An).call(this).top}get left(){return N(this,br,An).call(this).left}};fr=new WeakMap,Ot=new WeakMap,xr=new WeakMap,br=new WeakSet,An=function(){var n;return(n=c(this,xr))!=null||y(this,xr,c(this,fr).getRootNode().posFromIndex(c(this,Ot))),c(this,xr)}});var Sn,Ki,$,L,ve,Ji,_=k(()=>{"use strict";de();te();W();Sn=(a,n,e,t)=>({line:a+e-1,character:(e===1?n:0)+t}),Ki=a=>(n,e,t,r,i="error")=>{let{start:s}=e,{top:o,left:l}=e instanceof R?e:new R(n,s),{offsetHeight:g,offsetWidth:u}=n,{startIndex:d,startLine:p,startCol:m}=a(n,s,o,l),{line:f,character:h}=Sn(p,m,g,u);return{rule:t,message:w.msg(r),severity:i,startIndex:d,endIndex:d+n.toString().length,startLine:p,endLine:f,startCol:m,endCol:h}},$=Ki((a,n,e,t)=>{let r=a.getRelativeIndex(),{top:i,left:s}=a.parentNode.posFromIndex(r);return{startIndex:n+r,startLine:e+i,startCol:i?s:t+s}}),L=Ki((a,n,e,t)=>({startIndex:n,startLine:e,startCol:t})),ve=(a,n,e)=>{if(a&&w.viewOnly&&a[0]===se.rev)return a[1];let t=n();return w.viewOnly&&e([se.rev,t]),t},Ji=(a,n)=>a==="ol"&&n==="type"?["1","a","A","i","I"]:a==="th"&&n==="scope"?["row","col","rowgroup","colgroup"]:n==="dir"?["ltr","rtl","auto"]:n==="aria-hidden"?["true","false"]:[]});var za,Dr,Yi=k(()=>{"use strict";za=(a,n,e)=>{if(a.includes("#")){let[t,...r]=a.split("#");return(!t||t===n)&&r.every(i=>i===e)}return!a||a===n},Dr=(a,n,e)=>({type:t,name:r})=>a.split(",").some(i=>za(i.trim(),t,r))});var Tr,qt,_t,yr,kr,Mt,zt,vr,wn,Ut,Cn=k(()=>{"use strict";_();de();W();Ut=class{constructor(){T(this,vr);le(this,"childNodes",[]);T(this,Tr);T(this,qt);T(this,_t);T(this,yr);T(this,kr);T(this,Mt);T(this,zt,{})}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get parentNode(){return c(this,Tr)}get nextSibling(){return c(this,qt)}get previousSibling(){return c(this,_t)}get offsetHeight(){return N(this,vr,wn).call(this).height}get offsetWidth(){return N(this,vr,wn).call(this).width}getChildNodes(){let{childNodes:n}=this;return Object.isFrozen(n)?[...n]:n}getAttribute(n){return n==="padding"?0:this[n]}setAttribute(n,e){switch(n){case"parentNode":y(this,Tr,e),e||(y(this,qt,void 0),y(this,_t,void 0));break;case"nextSibling":y(this,qt,e);break;case"previousSibling":y(this,_t,e);break;case"aIndex":w.viewOnly&&y(this,Mt,[se.rev,e]);break;default:this[n]=e}}getRootNode(){return ve(c(this,kr),()=>{var n,e;return(e=(n=this.parentNode)==null?void 0:n.getRootNode())!=null?e:this},n=>{let[,e]=n;e.type==="root"&&y(this,kr,n)})}indexFromPos(n,e){}posFromIndex(n){let{length:e}=String(this);if(n+=n<0?e:0,n>=0&&n<=e){let t=this.getLines(),r=t.findIndex(([,,i])=>n<=i);return{top:r,left:n-t[r][1]}}}getGaps(n){return 0}getRelativeIndex(n){if(n===void 0){let{parentNode:e}=this;return e?e.getRelativeIndex(e.childNodes.indexOf(this)):0}return ve(c(this,zt)[n],()=>{let{childNodes:e}=this,t=n+(n<0?e.length:0),r=this.getAttribute("padding");for(let i=0;i<t;i++)w.viewOnly&&(c(this,zt)[i]=[se.rev,r]),r+=e[i].toString().length+this.getGaps(i);return r},e=>{c(this,zt)[n]=e})}getAbsoluteIndex(){return ve(c(this,Mt),()=>{let{parentNode:n}=this;return n?n.getAbsoluteIndex()+this.getRelativeIndex():0},n=>{y(this,Mt,n)})}getBoundingClientRect(){}is(n){return this.type===n}getLines(){return ve(c(this,yr),()=>{let n=[],e=0;for(let t of String(this).split(`
2
+ `)){let r=e+t.length;n.push([t,e,r]),e=r+1}return n},n=>{y(this,yr,n)})}seal(n,e){Object.defineProperty(this,n,{enumerable:!e&&!!this[n],configurable:!0})}};Tr=new WeakMap,qt=new WeakMap,_t=new WeakMap,yr=new WeakMap,kr=new WeakMap,Mt=new WeakMap,zt=new WeakMap,vr=new WeakSet,wn=function(){let n=this.getLines(),e=n[n.length-1];return{height:n.length,width:e[2]-e[1]}}});var Ye,$n,Nn,Hr,Zi=k(()=>{"use strict";ee();de();Yi();Cn();Hr=class extends Ut{constructor(){super(...arguments);T(this,Ye)}get length(){return this.childNodes.length}text(e){return xe(this.childNodes,e)}normalize(){let e=this.getChildNodes(),t=r=>{var i,s;e.splice(r,1),(i=e[r-1])==null||i.setAttribute("nextSibling",e[r]),(s=e[r])==null||s.setAttribute("previousSibling",e[r-1])};for(let r=e.length-1;r>=0;r--){let{type:i,data:s}=e[r];i!=="text"||e.length===1||this.getGaps(r-(r&&1))||s===""&&t(r)}this.setAttribute("childNodes",e)}removeAt(e){return Ar(this,e,1)[0]}insertAt(e,t=this.length){return Ar(this,t,0,[e]),e}closest(e){let t=Dr(e,this),{parentNode:r}=this;for(;r;){if(t(r))return r;({parentNode:r}=r)}}querySelector(e){let t=Dr(e,this);return N(this,Ye,$n).call(this,t)}querySelectorAll(e){let t=Dr(e,this);return N(this,Ye,Nn).call(this,t)}append(...e){this.safeAppend(e)}safeAppend(e){for(let t of e)this.insertAt(t)}replaceChildren(...e){this.safeReplaceChildren(e)}safeReplaceChildren(e){for(let t=this.length-1;t>=0;t--)this.removeAt(t);this.safeAppend(e)}setText(e,t=0){t+=t<0?this.length:0;let r=this.childNodes[t],{data:i}=r;return r.replaceData(e),i}toString(e,t=""){return this.childNodes.map(r=>r.toString(e)).join(t)}caretPositionFromIndex(e){}elementFromIndex(e){}elementFromPoint(e,t){}lint(e=this.getAbsoluteIndex(),t){let r=[];for(let i=0,s=e+this.getAttribute("padding");i<this.length;i++){let o=this.childNodes[i];o.setAttribute("aIndex",s);let l=o.lint(s,t);l.length>0&&r.push(...l),s+=o.toString().length+this.getGaps(i)}return r}print(e={}){let t=e.class;return this.toString()?(t===""?"":`<span class="wpb-${t!=null?t:this.type}">`)+qe(this.childNodes,e)+(t===""?"":"</span>"):""}json(e,t=this.getAbsoluteIndex()){let r={...this,type:this.type,range:[t,t+this.toString().length],childNodes:[]};for(let i=0,s=t+this.getAttribute("padding");i<this.length;i++){let o=this.childNodes[i],{length:l}=o.toString();o.setAttribute("aIndex",s),r.childNodes.push(o.type==="text"?{data:o.data,range:[s,s+l]}:o.json(void 0,s)),s+=l+this.getGaps(i)}return r}};Ye=new WeakSet,$n=function(e){var t;for(let r of this.childNodes){if(r.type==="text")continue;if(e(r))return r;let i=N(t=r,Ye,$n).call(t,e);if(i)return i}},Nn=function(e){var r;let t=[];for(let i of this.childNodes)i.type!=="text"&&(e(i)&&t.push(i),t=[...t,...N(r=i,Ye,Nn).call(r,e)]);return t}});var In,ts,Ua,Wa,Da,Ha,Ga,es,En,Gr,rs,Sr,ns=k(()=>{"use strict";ee();_();W();Cn();In=String.raw`[${ke}\t]*`,ts=String.raw`<\s*(?:/\s*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+|(?:rfc|pmid)(?=[-::]?${In}\d)|isbn(?=[-::]?${In}(?:\d(?:${In}|-)){6})`,Ua=new RegExp(String.raw`${ts}|https?[:/]/+`,"giu"),Wa=new RegExp(ts,"giu"),Da=new Set(["attr-value","ext-link-text","link-text"]),Ha={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},Ga={"<":"tag-like","[":"lonely-bracket","{":"lonely-bracket","]":"lonely-bracket","}":"lonely-bracket",h:"lonely-http",r:"lonely-http",p:"lonely-http",i:"lonely-http"},es=new Set(["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{En=new RegExp(String.raw`[\p{L}\p{N}_]`,"u")}catch{En=/\w/u}Sr=class extends Ut{constructor(e){super();T(this,Gr);le(this,"data","");this.data=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 M,F,G;if(t===!1)return[];let{data:r,parentNode:i,nextSibling:s,previousSibling:o}=this;if(!i)throw new Error("An isolated text node cannot be linted!");let{type:l,name:g,parentNode:u}=i,d=!1;if(l==="attr-value"){let{type:V,name:re,tag:ne}=u;if(V!=="ext-attr")d=!0;else if(ne==="ref"&&(re==="name"||re==="extends"||re==="follow")||ne==="choose"&&(re==="before"||re==="after"))return[]}if(t!=null||(t=l==="free-ext-link"||l==="ext-link-url"||l==="ext-link-text"||l==="image-parameter"&&g==="link"||d?Wa:Ua),r.search(t)===-1)return[];t.lastIndex=0;let p=[],m=s==null?void 0:s.type,f=s==null?void 0:s.name,h=o==null?void 0:o.type,x=this.getRootNode(),b=x.toString(),{ext:S,html:C}=x.getAttribute("config"),{top:A,left:I}=x.posFromIndex(e),O=new Set(["onlyinclude","noinclude","includeonly",...S,...C[0],...C[1],...C[2],...es]);for(let V=t.exec(r);V;V=t.exec(r)){let[,re,ne]=V,{index:Y,0:Q}=V;if(ne&&ne!=="]"){let{length:he}=ne;Y+=he,Q=Q.slice(he)}Q=Q.toLowerCase();let{0:E,length:Ce}=Q,ye=E==="r"||E==="p"||E==="i";if(E==="<"&&!O.has(re.toLowerCase())||E==="["&&l==="ext-link-text"&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(r.slice(Y+1))||s!=null&&s.is("ext")&&f==="nowiki"&&((M=s.innerText)!=null&&M.includes("]")))||ye&&(!i.isPlain()||Da.has(l)))continue;E==="]"&&(Y||Ce>1)&&t.lastIndex--;let ae=e+Y,Re=ae+Ce,Pe=b[Re],xn=b[ae-1],bn=Ce>1&&!(E==="<"&&(/^<\s/u.test(Q)||!/[\s/>]/u.test(Pe!=null?Pe:"")||es.has(re))||d&&(E==="["||E==="]")||ye&&l==="parameter-value"||/^(?:rfc|pmid|isbn)$/iu.test(Q))||E==="{"&&(Pe===E||xn==="-")||E==="}"&&(xn===E||Pe==="-")||E==="["&&(l==="ext-link-text"||m==="free-ext-link"&&!r.slice(Y+1).trim())||E==="]"&&h==="free-ext-link"&&!r.slice(0,Y).includes("]")?"error":"warning",Tn=E==="{"||E==="[";if(bn==="warning"&&(Tn||(E==="]"||E==="}"))){let he=Ha[E],yn=Tn?r.slice(Y+1):r.slice(0,Y);if(E==="{"&&((F=he.exec(yn))==null?void 0:F[0])==="}"||E==="}"&&((G=he.exec(yn))==null?void 0:G[0])==="{")continue;if(!yn.includes(E)){let Bi=Tn?"nextSibling":"previousSibling",lt=this[Bi];for(;lt&&(lt.type!=="text"||!he.test(lt.data));)lt=lt[Bi];if(lt&&he.exec(lt.data)[0]!==E)continue}}ye&&(Q=Q.toUpperCase());let Ri=this.posFromIndex(Y),{line:Pi,character:ji}=Sn(A,I,Ri.top+1,Ri.left),Ft={rule:Ga[E],message:w.msg('lonely "$1"',ye||E==="h"?Q:E),severity:bn,startIndex:ae,endIndex:Re,startLine:Pi,endLine:Pi,startCol:ji,endCol:ji+Ce};if(E==="<")Ft.suggestions=[{desc:"escape",range:[ae,ae+1],text:"&lt;"}];else if(E==="h"&&l!=="link-text"&&En.test(xn||""))Ft.suggestions=[{desc:"whitespace",range:[ae,ae],text:" "}];else if(E==="["&&l==="ext-link-text"){let he=i.getAbsoluteIndex()+i.toString().length;Ft.suggestions=[{desc:"escape",range:[he,he+1],text:"&#93;"}]}else if(E==="]"&&h==="free-ext-link"&&bn==="error"){let he=e-o.toString().length;Ft.fix={range:[he,he],text:"[",desc:"left bracket"}}else ye&&(Ft.suggestions=[...V[0]===Q?[]:[{desc:"uppercase",range:[ae,Re],text:Q}],...Pe===":"||Pe===":"?[{desc:"whitespace",range:[Re,Re+1],text:" "}]:[]]);p.push(Ft)}return p}replaceData(e){N(this,Gr,rs).call(this,e)}print(){return Bt(this.data)}};Gr=new WeakSet,rs=function(e){this.setAttribute("data",e)}});var be,pt=k(()=>{"use strict";de();be=(a=!0,n=!0)=>e=>{class t extends e{text(){return""}lint(i){return a?[]:super.lint(i)}}return Ie(t,e),t}});var wr,ue,ut=k(()=>{"use strict";q();ue=class extends v{constructor(e,t,r,i,s){super(e,r,i,s);T(this,wr);y(this,wr,t)}get type(){return c(this,wr)}lint(e=this.getAbsoluteIndex()){return super.lint(e,!1)}};wr=new WeakMap});var ge,_e=k(()=>{"use strict";de();ge=({length:a})=>n=>{class e extends n{getAttribute(r){return r==="padding"?a:super.getAttribute(r)}}return Ie(e,n),e}});var Wt,X,Me=k(()=>{"use strict";q();X=class extends v{constructor(e,t,r,i,s){super(e,r,i,s);T(this,Wt);y(this,Wt,t)}get type(){return c(this,Wt)}set type(e){y(this,Wt,e)}};Wt=new WeakMap});var Va,is,ct,Ae,ze,Ln,Xa,me,Cr=k(()=>{"use strict";_();ee();te();_e();q();Me();Va=a=>a==="redirect-target"||a==="link";is=[ge("[[")];me=class extends(Xa=v){constructor(e,t,r,i=[],s="|"){super(void 0,r,i,{});T(this,ct,!0);T(this,Ae);T(this,ze);if(this.insertAt(new X(e,"link-target",r,i,{})),t!==void 0){let o=new v(t,r,i,{});o.type="link-text",o.setAttribute("stage",10),this.insertAt(o)}y(this,Ae,s)}get link(){}get fragment(){return c(this,ze).fragment}afterBuild(){y(this,ze,this.getTitle()),c(this,Ae).includes("\0")&&y(this,Ae,this.buildFromStr(c(this,Ae),0)),this.setAttribute("name",c(this,ze).title),super.afterBuild()}setAttribute(e,t){e==="bracket"?y(this,ct,t):e==="title"?y(this,ze,t):super.setAttribute(e,t)}toString(e){let t=super.toString(e,c(this,Ae));return c(this,ct)?`[[${t}]]`:t}text(){let e=super.text("|");return c(this,ct)?`[[${e}]]`:e}getAttribute(e){return e==="title"?c(this,ze):super.getAttribute(e)}getGaps(e){return e===0?c(this,Ae).length:1}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{childNodes:[i,s],type:o}=this,{encoded:l,fragment:g}=c(this,ze),u=new R(this,e);if(i.childNodes.some(({type:d})=>d==="template")&&r.push($(i,u,"unknown-page","template in an internal link target","warning")),l){let d=$(i,u,"url-encoding","unnecessary URL encoding in an internal link");d.suggestions=[{desc:"decode",range:[d.startIndex,d.endIndex],text:Je(i.text())}],r.push(d)}if(o==="link"||o==="category"){let d=s==null?void 0:s.childNodes.findIndex(m=>m.type==="text"&&m.data.includes("|")),p=s==null?void 0:s.childNodes[d];if(p){let m=$(s,u,"pipe-like",'additional "|" in the link text',"warning"),f=m.startIndex+s.getRelativeIndex(d);m.suggestions=[{desc:"escape",range:[f,f+p.data.length],text:p.data.replace(/\|/gu,"&#124;")}],r.push(m)}}if(g!==void 0&&!Va(o)){let d=$(i,u,"no-ignored","useless fragment"),p=i.childNodes.findIndex(f=>f.type==="text"&&f.data.includes("#")),m=i.childNodes[p];m&&(d.fix={range:[d.startIndex+i.getRelativeIndex(p)+m.data.indexOf("#"),d.endIndex],text:"",desc:"remove"}),r.push(d)}return r}getTitle(e,t){return this.normalizeTitle(this.firstChild.text(),0,{halfParsed:t,temporary:e,decode:!0,selfLink:!0})}print(){return super.print(c(this,ct)?{pre:"[[",post:"]]",sep:c(this,Ae)}:{sep:c(this,Ae)})}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t),{type:i,fragment:s}=this;return s!==void 0&&(i==="link"||i==="redirect-target")&&(r.fragment=s),r}};Ln=P(Xa),ct=new WeakMap,Ae=new WeakMap,ze=new WeakMap,me=B(Ln,0,"LinkBaseToken",is,me),j(Ln,1,me)});var pe,Ze=k(()=>{"use strict";q();pe=class extends v{get innerText(){return this.firstChild.data}constructor(n="",e,t){super(n,e,t)}}});var ss,Fn,Qa,z,Ue=k(()=>{"use strict";pt();Ze();ss=[be()];z=class extends(Qa=pe){get type(){return"noinclude"}toString(n){return n?"":super.toString()}};Fn=P(Qa),z=B(Fn,0,"NoincludeToken",ss,z),j(Fn,1,z)});var Vr,os=k(()=>{"use strict";_();Cr();Ue();Vr=class extends me{get type(){return"redirect-target"}constructor(n,e,t,r){super(n,void 0,t,r),e!==void 0&&this.insertAt(new z(e,t,r))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,{halfParsed:!0,decode:!0})}lint(n=this.getAbsoluteIndex()){let e=super.lint(n,!1);if(this.length===2){let t=$(this.lastChild,{start:n},"no-ignored","useless link text","warning");t.startIndex--,t.startCol--,t.fix={range:[t.startIndex,t.endIndex],text:"",desc:"remove"},e.push(t)}return e}}});var as,et,Dt,Rn,Ka,ht,ls=k(()=>{"use strict";pt();q();ut();os();as=[be(!1,!1)];ht=class extends(Ka=v){constructor(e,t,r,i,s,o,l=[]){super(void 0,o,l);T(this,et);T(this,Dt);y(this,et,e),y(this,Dt,s),this.append(new ue(t,"redirect-syntax",o,l),new Vr(r,i==null?void 0:i.slice(1),o,l))}get type(){return"redirect"}getAttribute(e){return e==="padding"?c(this,et).length:super.getAttribute(e)}toString(e){return c(this,et)+super.toString(e)+c(this,Dt)}lint(e=this.getAbsoluteIndex()){let t=e+c(this,et).length+this.firstChild.toString().length;return this.lastChild.setAttribute("aIndex",t),this.lastChild.lint(t)}print(){return super.print({pre:c(this,et),post:c(this,Dt)})}};Rn=P(Ka),et=new WeakMap,Dt=new WeakMap,ht=B(Rn,0,"RedirectToken",as,ht),j(Rn,1,ht)});var ds={};J(ds,{parseRedirect:()=>Ja});var Ja,gs=k(()=>{"use strict";W();ls();Ja=(a,n,e)=>{var r;(r=n.regexRedirect)!=null||(n.regexRedirect=new RegExp(String.raw`^(\s*)((?:${n.redirection.join("|")})\s*(?::\s*)?)\[\[([^\n|\]]+)(\|.*?)?\]\](\s*)`,"iu"));let t=n.regexRedirect.exec(a);return t&&w.normalizeTitle(t[3],0,!1,n,{halfParsed:!0,temporary:!0,decode:!0}).valid?(a=`\0${e.length}o${a.slice(t[0].length)}`,new ht(...t.slice(1),n,e),a):!1}});var ps,Pn,Ya,mt,us=k(()=>{"use strict";_e();q();ps=[ge("<onlyinclude>")];mt=class extends(Ya=v){get type(){return"onlyinclude"}toString(n){return`<onlyinclude>${super.toString(n)}</onlyinclude>`}isPlain(){return!0}print(){return super.print({pre:'<span class="wpb-ext">&lt;onlyinclude&gt;</span>',post:'<span class="wpb-ext">&lt;/onlyinclude&gt;</span>'})}};Pn=P(Ya),mt=B(Pn,0,"OnlyincludeToken",ps,mt),j(Pn,1,mt)});var tt,$r=k(()=>{"use strict";de();tt=(a=1)=>n=>{class e extends n{getGaps(){return a}}return Ie(e,n),e}});var cs,rt,jn,Za,we,Xr=k(()=>{"use strict";$r();q();cs=[tt()];we=class extends(Za=v){constructor(e,t,r,i,s,o=[]){super(void 0,s);T(this,rt);le(this,"closed");le(this,"selfClosing");this.setAttribute("name",e.toLowerCase()),y(this,rt,[e,i||e]),this.closed=i!=="",this.selfClosing=i===void 0,this.append(t,r);let l=typeof t=="string"?-1:o.indexOf(t);o.splice(l===-1?1/0:l,0,this)}get innerText(){return this.selfClosing?void 0:this.lastChild.text()}toString(e){let{selfClosing:t,firstChild:r,lastChild:i}=this,[s,o]=c(this,rt);return t?`<${s}${r.toString(e)}/>`:`<${s}${r.toString(e)}>${i.toString(e)}${this.closed?`</${o}>`:""}`}text(){let[e,t]=c(this,rt);return this.selfClosing?`<${e}${this.firstChild.text()}/>`:`<${e}${super.text(">")}${this.closed?`</${t}>`:""}`}getAttribute(e){return e==="padding"?c(this,rt)[0].length+1:super.getAttribute(e)}print(){let[e,t]=c(this,rt);return super.print(this.selfClosing?{pre:`&lt;${e}`,post:"/&gt;"}:{pre:`&lt;${e}`,sep:"&gt;",post:this.closed?`&lt;/${t}&gt;`:""})}};jn=P(Za),rt=new WeakMap,we=B(jn,0,"TagPairToken",cs,we),j(jn,1,we)});var Kr,hs,Qr,ms=k(()=>{"use strict";q();Xr();ut();Ue();Qr=class extends we{constructor(e,t,r,i=[]){let s=new ue(e,"translate-attr",r,i);t=t==null?void 0:t.replace(/(<tvar\|[^>]+>)([\s\S]*?)(<\/>)/gu,(l,g,u,d)=>(new z(g,r,i),new z(d,r,i),`\0${i.length-1}n${u}\0${i.length}n`)).replace(/(<tvar\s+name\s*=(?:\s*(?:(["'])[\s\S]*?\2|[^"'\s>]+))?\s*>)([\s\S]*?)(<\/tvar\s*>)/giu,(l,g,u,d,p)=>(new z(g,r,i),new z(p,r,i),`\0${i.length-1}n${d}\0${i.length}n`));let o=new v(t,r,i);o.type="translate-inner";super("translate",s,o,"translate",r,i);T(this,Kr);this.seal("closed",!0),this.seal("selfClosing",!0)}get type(){return"translate"}toString(e){return e?this.lastChild.toString(!0):super.toString()}text(){return this.lastChild.text()}print(){return`<span class="wpb-ext">&lt;translate${N(this,Kr,hs).call(this)?'<span class="wpb-ext-attrs"> <span class="wpb-ext-attr"><span class="wpb-attr-key">nowrap</span></span></span>':""}&gt;${this.lastChild.print({class:"ext-inner"})}&lt;/translate&gt;</span>`}};Kr=new WeakSet,hs=function(){return this.firstChild.toString()===" nowrap"}});var fs,Bn,el,ft,xs=k(()=>{"use strict";_();te();pt();W();Xr();fs=[be(!1)];ft=class extends(el=we){get type(){return"include"}constructor(n,e="",t,r,i,s){super(n,e,t!=null?t:"",t===void 0||r!=null?r:"",i,s)}toString(n){return n?"":super.toString()}lint(n=this.getAbsoluteIndex()){let e=[],{firstChild:t,closed:r,name:i}=this,s=new R(this,n);if(t.data.trim()){let o=$(t,s,"no-ignored","useless attribute","warning");o.suggestions=[{desc:"remove",range:[o.startIndex,o.endIndex],text:""}],e.push(o)}if(!r){let o=L(this,s,"unclosed-comment",w.msg("unclosed $1",`<${i}>`));o.suggestions=[{desc:"close",range:[o.endIndex,o.endIndex],text:`</${i}>`}],e.push(o)}return e}};Bn=P(el),ft=B(Bn,0,"IncludeToken",fs,ft),j(Bn,1,ft)});var Ht,Jr=k(()=>{"use strict";de();Ht=(a=0)=>n=>{var t,bs;class e extends n{constructor(){super(...arguments);T(this,t)}getAttr(o){return N(this,t,bs).call(this).getAttr(o)}}return t=new WeakSet,bs=function(){return this.childNodes[a]},Ie(e,n),e}});var Z,Ts,ys,Yr,qn,ks,Gt,As,Ss,ws,On,vs,Ee,Cs,$s,Ns,Is,Es=k(()=>{"use strict";Z=new Set(["align"]),Ts=new Set(["cite"]),ys=new Set(["cite","datetime"]),Yr=new Set(["width"]),qn=new Set(["axis","align","bgcolor","height","width","valign"]),ks=new Set([...qn,"abbr","headers","scope","rowspan","colspan"]),Gt=new Set(["type"]),As=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),Ss=new Set(["clear"]),ws=new Set(["bgcolor","align","valign"]),On=new Set(["qid","forcemathmode","type","display"]),vs=new Set(["enclose","inline","lang","line","linelinks","style","class","id","dir","copy","highlight","start"]),Ee=new Set,Cs=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"]),$s={div:Z,h1:Z,h2:Z,h3:Z,h4:Z,h5:Z,h6:Z,blockquote:Ts,q:Ts,p:Z,br:Ss,pre:Yr,ins:ys,del:ys,ul:Gt,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...As,"border"]),caption:Z,tr:ws,td:ks,th:ks,img:new Set(["alt","src","width","height","srcset"]),font:new Set(["size","color","face"]),hr:Yr,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:Gt,poem:Z,categorytree:Z,combooption:Z,math:Ee,chem:Ee,ce:Ee},Ns={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:Ee,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:Ee,inputbox:Ee,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:Ee,poll:new Set(["id","show-results-before-voting"]),sm2:Gt,flashmp3:Gt,score:new Set(["line_width_inches","lang","override_midi","raw","note-language","override_audio","override_ogg","sound","vorbis"]),seo:new Set(["title","title_mode","title_separator","keywords","description","robots","google_bot","image","image_width","image_height","image_alt","type","site_name","locale","section","author","published_time","twitter_site"]),tab:new Set(["nested","name","index","class","block","inline","openname","closename","collapsed","dropdown","style","bgcolor","container","id","title"]),tabs:new Set(["plain","class","container","id","title","style"]),combobox:new Set(["placeholder","value","id","class","text","dropdown","style"]),math:new Set([...On,"chem"]),chem:On,ce:On,hiero:Ee,phonos:new Set(["ipa","class","text","lang","wikibase","file"]),section:new Set(["begin","end"]),source:vs,syntaxhighlight:vs,templatedata:Ee,timeline:new Set(["method","font"]),quiz:new Set(["display","shuffleanswers","points","shuffle","case"]),languages:Ee},Is={table:As,td:new Set([...qn,"scope"]),th:qn,br:Ss,caption:Z,div:Z,hr:Yr,h1:Z,h2:Z,h3:Z,h4:Z,h5:Z,h6:Z,li:Gt,p:Z,pre:Yr,tr:ws,ul:Gt}});var tl,rl,Nr,Vt,oe,Le,Xt,Ls=k(()=>{"use strict";_();ee();Es();te();W();q();Me();tl=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,rl=new Set(["ext","arg","magic-word","template"]),Xt=class extends v{constructor(e,t,r,i="",s,o=[],l=w.getConfig(),g=[]){let u=new X(r,"attr-key",l,g),d;if(r==="title"||t==="img"&&r==="alt")d=new v(s,l,g,{}),d.type="attr-value",d.setAttribute("stage",10);else if(t==="gallery"&&r==="caption"||t==="choose"&&(r==="before"||r==="after")){let p={...l,excludes:[...l.excludes,"heading","html","table","hr","list"]};d=new v(s,p,g,{}),d.type="attr-value",d.setAttribute("stage",1)}else d=new X(s,"attr-value",l,g,{});super(void 0,l,g);T(this,Nr);T(this,Vt);T(this,oe);T(this,Le);y(this,Nr,e),this.append(u,d),y(this,oe,i),y(this,Le,[...o]),y(this,Vt,t),this.setAttribute("name",Oe(ie(r)))}get type(){return c(this,Nr)}get tag(){return c(this,Vt)}get balanced(){return!c(this,oe)||c(this,Le)[0]===c(this,Le)[1]}afterBuild(){c(this,oe).includes("\0")&&y(this,oe,this.buildFromStr(c(this,oe),0)),this.parentNode&&y(this,Vt,this.parentNode.name),this.setAttribute("name",Oe(this.firstChild.text())),super.afterBuild()}toString(e){let[t="",r=""]=c(this,Le);return c(this,oe)?super.toString(e,c(this,oe)+t)+r:this.firstChild.toString(e)}text(){return c(this,oe)?`${super.text(`${c(this,oe).trim()}"`)}"`:this.firstChild.text()}getGaps(){var e,t;return c(this,oe)?c(this,oe).length+((t=(e=c(this,Le)[0])==null?void 0:e.length)!=null?t:0):0}lint(e=this.getAbsoluteIndex(),t){var x;let r=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 b=$(o,p,"unclosed-quote",w.msg("unclosed $1","quotes"),"warning");b.startIndex--,b.startCol--,b.suggestions=[{range:[b.endIndex,b.endIndex],text:c(this,Le)[0],desc:"close"}],r.push(b)}let m=Ns[u],f=$s[u],{length:h}=this.toString();if(!(m!=null&&m.has(g))&&!(f!=null&&f.has(g))&&(l==="ext-attr"?m||f:!/\{\{[^{]+\}\}/u.test(g))&&(l==="ext-attr"&&!f||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(g)&&(u==="meta"||u==="link"||!Cs.has(g)))){let b=$(s,p,"illegal-attr","illegal attribute name");b.suggestions=[{desc:"remove",range:[e,e+h],text:""}],r.push(b)}else if(g==="style"&&typeof d=="string"&&tl.test(d))r.push($(o,p,"insecure-style","insecure style"));else if(g==="tabindex"&&typeof d=="string"&&d!=="0"){let b=$(o,p,"illegal-attr","nonzero tabindex");b.suggestions=[{desc:"remove",range:[e,e+h],text:""},{desc:"0 tabindex",range:[b.startIndex,b.endIndex],text:"0"}],r.push(b)}else if(l!=="ext-attr"&&!o.childNodes.some(({type:b})=>rl.has(b))){let b=Ji(u,g),S=String(d).toLowerCase();b.length>0&&b.every(C=>C!==S)&&r.push($(o,p,"illegal-attr","illegal attribute value","warning"))}return(x=Is[u])!=null&&x.has(g)&&r.push($(s,p,"obsolete-attr","obsolete attribute","warning")),r}getValue(){return c(this,oe)?this.lastChild.text().trim():this.type==="ext-attr"||""}print(){let[e="",t=""]=c(this,Le);return c(this,oe)?super.print({sep:Bt(c(this,oe))+e,post:t}):super.print()}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return r.tag=this.tag,r}};Nr=new WeakMap,Vt=new WeakMap,oe=new WeakMap,Le=new WeakMap});var Fs,nl,_n,Ir,nt,Zr=k(()=>{"use strict";_();ee();te();W();q();Me();Ls();Fs=a=>a.slice(0,-1),nl=a=>`${Fs(a)}-dirty`;try{_n=new RegExp(String.raw`[\p{L}\p{N}]`,"u")}catch{_n=/[^\W_]/u}nt=class extends v{constructor(e,t,r,i,s=[]){super(void 0,i,s,{});T(this,Ir);if(y(this,Ir,t),this.setAttribute("name",r),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 X(l,nl(t),i,s,{})),l="")};for(;g;){let{index:p,0:m,1:f,2:h,3:x,4:b,5:S,6:C}=g;if(l+=e.slice(u,p),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(ie(f).trim())){let A=b!=null?b:C,I=[x,S],O=new Xt(Fs(t),r,f,h,A,I,i,s);d(),super.insertAt(O)}else l+=m;({lastIndex:u}=o),g=o.exec(e)}l+=e.slice(u),d()}}get type(){return c(this,Ir)}afterBuild(){let{parentNode:e}=this;(e==null?void 0:e.type)==="td"&&this.setAttribute("name",e.subtype),super.afterBuild()}getAttrTokens(e){return this.childNodes.filter(t=>t instanceof Xt&&(!e||t.name===Oe(e)))}getAttrToken(e){let t=this.getAttrTokens(e);return t[t.length-1]}getAttr(e){var t;return(t=this.getAttrToken(e))==null?void 0:t.getValue()}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{parentNode:i,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=L(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:""}],r.push(u)}for(let u of s)if(u instanceof Xt){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=$(u,g,"no-ignored","containing invalid attribute",_n.test(d)?"error":"warning");p.suggestions=[{desc:"remove",range:[p.startIndex,p.endIndex],text:" "}],r.push(p)}}if(l.size>0)for(let u of l){let d=o.get(u).map(p=>{let m=p.getValue();return[p,m===!0?"":m]});r.push(...d.map(([p,m],f)=>{let h=$(p,g,"no-duplicate",w.msg("duplicated $1 attribute",u)),x={desc:"remove",range:[h.startIndex,h.endIndex],text:""};return!m||d.slice(0,f).some(([,b])=>b===m)?h.fix=x:h.suggestions=[x],h}))}return r}print(){return this.toString()?`<span class="wpb-${this.type}">${this.childNodes.map(e=>e.print(e instanceof X?{class:e.toString().trim()&&"attr-dirty"}:void 0)).join("")}</span>`:""}};Ir=new WeakMap});var Rs={};J(Rs,{PreToken:()=>Mn});var Mn,Ps=k(()=>{"use strict";q();Ue();Mn=class extends v{get type(){return"ext-inner"}constructor(n,e,t=[]){if(n){let r=/<nowiki>/giu,i=/<\/nowiki>/giu,{length:s}=r.source,o=r.exec(n);o&&(i.lastIndex=o.index+s);let l=i.exec(n),g=0,u="";for(;o&&l;)new z(o[0],e,t),new z(l[0],e,t),u+=`${n.slice(g,o.index)}\0${t.length-1}n${n.slice(o.index+s,l.index)}\0${t.length}n`,g=l.index+s+1,r.lastIndex=g,o=r.exec(n),o&&(i.lastIndex=o.index+s),l=i.exec(n);n=u+n.slice(g)}super(n,e,t,{}),this.setAttribute("stage",10)}isPlain(){return!0}lint(n=this.getAbsoluteIndex()){return super.lint(n,/<\s*\/\s*(pre)\b/giu)}}});var Qt,en=k(()=>{"use strict";de();Qt=a=>{class n extends a{toString(t){return super.toString(t,`
3
3
  `)}text(){return super.text(`
4
4
  `).replace(/\n\s*\n/gu,`
5
5
  `)}getGaps(){return 1}print(){return super.print({sep:`
6
- `})}}return Ie(n,a),n}});var js={};J(js,{ParamTagToken:()=>it});var Ps,zn,rl,it,Un=k(()=>{"use strict";_();te();Er();en();V();O();Me();Ps=[Qt];it=class extends(rl=v){get type(){return"ext-inner"}constructor(n,e,t=$.getConfig(),r=[],i){if(super(void 0,t,r,{}),e){let s=X;this.append(...e.split(`
7
- `).map(o=>i?o:xt(o,t,r,n)).map(o=>new s(o,"param-line",t,r,{})))}r.splice(r.indexOf(this),1),r.push(this)}lint(n=this.getAbsoluteIndex()){let e=new R(this,n),t=$.msg("invalid parameter of <$1>",this.name),r=[];for(let i of this.childNodes){i.setAttribute("aIndex",n);let s=i.childNodes.filter(({type:o})=>o!=="comment"&&o!=="include"&&o!=="noinclude");if(s.some(({type:o})=>o==="ext"))r.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:""}],r.push(g)}else{let g=i.lint(n,!1);g.length>0&&r.push(...g)}}n+=i.toString().length+1}return r}};zn=P(rl),it=B(zn,0,"ParamTagToken",Ps,it),j(zn,1,it)});var Lr,Kt,tn,Jt,Wn=k(()=>{"use strict";_();le();te();V();O();ut();Jt=class extends v{constructor(e,t,r,i=[]){super(void 0,r,i);T(this,Kt);T(this,Lr);y(this,Lr,e);let s=new v(t[0],r,i);s.type="heading-title",s.setAttribute("stage",2);let o=new ue(t[1],"heading-trail",r,i);this.append(s,o)}get type(){return"heading"}get level(){return c(this,Lr)}toString(e){let t=N(this,Kt,tn).call(this);return t+this.firstChild.toString(e)+t+this.lastChild.toString(e)}text(){let e=N(this,Kt,tn).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 r=super.lint(e,t),{firstChild:i,level:s}=this,o=i.toString(),l=o.startsWith("="),g=l||o.endsWith("="),u=i.childNodes.filter(Yt("quote")),d=u.filter(({bold:h})=>h),p=u.filter(({italic:h})=>h),m=new R(this,e);if(this.level===1){let h=C(i,m,"h1","<h1>");g||(h.suggestions=[{desc:"h2",range:[h.startIndex,h.endIndex],text:`=${o}=`}]),r.push(h)}if(g){let h=C(i,m,"unbalanced-header",$.msg("unbalanced $1 in a section header",'"="'));if(o!=="=")if(l){let[x]=/^=+/u.exec(o),b=s+x.length;h.suggestions=[{desc:`h${s}`,range:[h.startIndex,h.startIndex+x.length],text:""}],b<7&&h.suggestions.push({desc:`h${b}`,range:[h.endIndex,h.endIndex],text:x})}else{let x=/[^=](=+)$/u.exec(o)[1],b=s+x.length;h.suggestions=[{desc:`h${s}`,range:[h.endIndex-x.length,h.endIndex],text:""}],b<7&&h.suggestions.push({desc:`h${b}`,range:[h.startIndex,h.startIndex],text:x})}r.push(h)}this.closest("html-attrs,table-attrs")&&r.push(L(this,m,"parsing-order","section header in an HTML tag"));let f=this.getRootNode().toString();if(d.length%2){let h=C(d[d.length-1],{...m,start:e+s,left:m.left+s},"format-leakage",$.msg("unbalanced $1 in a section header","bold apostrophes")),x=e+s+o.length;f.slice(h.endIndex,x).trim()?h.suggestions=[{desc:"close",range:[x,x],text:"'''"}]:h.fix={desc:"remove",range:[h.startIndex,h.endIndex],text:""},r.push(h)}if(p.length%2){let h=C(p[p.length-1],{start:e+s},"format-leakage",$.msg("unbalanced $1 in a section header","italic apostrophes")),x=e+s+o.length;h.fix=f.slice(h.endIndex,x).trim()?{desc:"close",range:[x,x],text:"''"}:{desc:"remove",range:[h.startIndex,h.endIndex],text:""},r.push(h)}return r}print(){let e=N(this,Kt,tn).call(this);return super.print({pre:e,sep:e})}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return r.level=this.level,r}};Lr=new WeakMap,Kt=new WeakSet,tn=function(){return"=".repeat(this.level)}});var nl,rn,Bs=k(()=>{"use strict";ee();_();O();nl=new RegExp(`https?://${je}${Be}$`,"iu"),rn=class extends v{get type(){return"parameter"}get anon(){return this.firstChild.length===0}get duplicated(){var n;try{return!!((n=this.parentNode)!=null&&n.getDuplicatedArgs().some(([e])=>e===this.name))}catch{return!1}}constructor(n,e,t,r=[]){super(void 0,t,r);let i=new v(typeof n=="number"?void 0:n,t,r,{}),s=new v(e,t,r);i.type="parameter-key",i.setAttribute("stage",2),s.type="parameter-value",s.setAttribute("stage",2),this.append(i,s)}trimName(n,e=!0){let t=(typeof n=="string"?n:n.toString(!0)).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1");return this.setAttribute("name",t),t}afterBuild(){if(!this.anon){let{parentNode:n,firstChild:e}=this,t=this.trimName(e);n&&n.getArgs(t,!1,!1).add(this)}super.afterBuild()}toString(n){return this.anon?this.lastChild.toString(n):super.toString(n,"=")}text(){return this.anon?this.lastChild.text():super.text("=")}getGaps(){return this.anon?0:1}lint(n=this.getAbsoluteIndex(),e){var s;let t=super.lint(n,e),{firstChild:r}=this,i=(s=nl.exec(r.text()))==null?void 0:s[0];if(i&&new URL(i).search){let o=C(r,{start:n},"unescaped","unescaped query string in an anonymous parameter");o.startIndex=o.endIndex,o.startLine=o.endLine,o.startCol=o.endCol,o.endIndex++,o.endCol++,o.fix={range:[o.startIndex,o.endIndex],text:"{{=}}",desc:"escape"},t.push(o)}return t}print(){return super.print({sep:this.anon?"":"="})}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return Object.assign(t,{anon:this.anon},this.duplicated&&{duplicated:!0}),t}}});var qs,Fr,ot,bt,Tt,Zt,yt,Hn,Os,Dn,il,st,_s=k(()=>{"use strict";ee();_();le();te();$r();O();Bs();Me();ut();qs=[tt()];st=class extends(il=v){constructor(e,t,r,i=[]){var S,w;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`,i[s].toString().replace(/^\n/u,"")));super(void 0,r,i,{});T(this,yt);ae(this,"modifier","");T(this,Fr,"template");T(this,ot,":");T(this,bt,!1);T(this,Tt,new Map);T(this,Zt);let{parserFunction:[l,g],variable:u,functionHook:d}=r,p=(S=/^(?:\s|\0\d+[cn]\x7F)*\0\d+s\x7F/u.exec(e))==null?void 0:S[0];if(p)this.setAttribute("modifier",p),e=e.slice(p.length);else if(e.includes(":")){let[A,...I]=e.split(":"),[q]=/^(?:\s|\0\d+[cn]\x7F)*/u.exec((w=I[0])!=null?w:"");this.setModifier(`${A}:${q}`)&&(e=I.join(":").slice(q.length))}let m=e.search(/[::]/u),f=e[m]===":",h=m!==-1;if(h||t.length===0&&!c(this,bt)){let A=h?e.slice(0,m):e,I=h&&e.slice(m+1),q=ie(A),M=h?q.slice(q.search(/\S/u))+(f?":":""):q.trim(),F=M.toLowerCase(),H=Array.isArray(g),G=H?g.includes(M):Object.prototype.hasOwnProperty.call(g,M),re=!H&&G?g[M]:Object.prototype.hasOwnProperty.call(l,F)&&l[F],ne=H&&G||!("functionHook"in r)||d.includes(re),Y=H&&G||u.includes(re);if(h?re&&ne:Y){this.setAttribute("name",re||F.replace(/^#|:$/u,"")),y(this,Fr,"magic-word"),f&&y(this,ot,":");let Q=new ue(A,"magic-word-name",r,i);if(super.insertAt(Q),I!==!1&&t.unshift([I]),this.name==="invoke")for(let E=0;E<2;E++){let Ce=t.shift();if(!Ce)break;let ye=new X(Ce.join("="),`invoke-${E?"function":"module"}`,r,i);super.insertAt(ye)}}}if(this.type==="template"){let A=ie(e).trim();if(!this.normalizeTitle(A,10,{halfParsed:!0,temporary:!0}).valid)throw i.pop(),new SyntaxError("Invalid template name");let I=new X(e,"template-name",r,i,{});super.insertAt(I)}typeof s=="number"&&(i[s]=void 0);let x=this.isTemplate(),b=1;for(let A=0;A<t.length;A++){let I=t[A];x||this.name==="switch"&&A>0||this.name==="tag"&&A>1||(I[0]=I.join("="),I.length=1),I.length===1&&(I.unshift(b),b++),this.insertAt(new rn(...I,r,i))}this.seal("modifier")}get type(){return c(this,Fr)}setModifier(e){let{parserFunction:[,,t,r]}=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=r.includes(s);return c(this,bt)&&o||!c(this,bt)&&(l||e==="")||(pe.running||this.length>1)&&(o||l||e==="")?(this.setAttribute("modifier",e),y(this,bt,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"&&(y(this,Zt,N(this,yt,Hn).call(this)),this.setAttribute("name",c(this,Zt).title))}toString(e){return`{{${this.modifier}${this.type==="magic-word"?this.firstChild.toString(e)+(this.length===1?"":c(this,ot))+this.childNodes.slice(1).map(t=>t.toString(e)).join("|"):super.toString(e,"|")}}}`}text(){let{childNodes:e,length:t,firstChild:r,modifier:i,type:s,name:o}=this;return s==="magic-word"&&o==="vardefine"?"":`{{${i}${s==="magic-word"?r.text()+(t===1?"":c(this,ot))+xe(e.slice(1),"|"):super.text("|")}}}`}getAttribute(e){switch(e){case"padding":return this.modifier.length+2;case"title":return c(this,Zt);case"colon":return c(this,ot);default:return super.getAttribute(e)}}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t);if(!this.isTemplate())return r;let{type:i,childNodes:s,length:o}=this,l=new R(this,e),g=i==="magic-word";if(g&&!N(this,yt,Hn).call(this).valid)r.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"&&gt(f.data).includes("#")),m=d.childNodes[p];if(m){let f=C(d,l,"no-ignored","useless fragment");f.fix={range:[f.startIndex+d.getRelativeIndex(p)+m.data.indexOf("#"),f.endIndex],text:"",desc:"remove"},r.push(f)}}if(g&&o===2)return r.push(L(this,l,"invalid-invoke","missing module function")),r;let u=this.getDuplicatedArgs().filter(([,d])=>!d[0].querySelector("ext"));if(u.length>0)for(let[,d]of u)r.push(...d.map(p=>{let m=C(p,l,"no-duplicate","duplicated parameter");return m.suggestions=[{desc:"remove",range:[m.startIndex-1,m.endIndex],text:""}],m}));return r}insertAt(e,t=this.length){return super.insertAt(e,t),e.anon?N(this,yt,Os).call(this,e):e.name&&this.getArgs(e.name,!1,!1).add(e),e}getAllArgs(){return this.childNodes.filter(Yt("parameter"))}getAnonArgs(){return this.getAllArgs().filter(({anon:e})=>e)}getArgs(e,t,r=!0){let i=String(e).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1"),s;return c(this,Tt).has(i)?s=c(this,Tt).get(i):(s=new Set(this.getAllArgs().filter(({name:o})=>i===o)),c(this,Tt).set(i,s)),s}getDuplicatedArgs(){return[...c(this,Tt)].filter(([,{size:e}])=>e>1).map(([e,t])=>[e,[...t]])}getPossibleValues(){let{type:e,name:t,childNodes:r}=this;if(e==="template")throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!");let i,s;switch(t){case"if":case"ifexist":case"ifexpr":case"iferror":i=2;break;case"ifeq":i=3;break;case"switch":{let o=r.slice(2),l=o[o.length-1];s=[...o.filter(({anon:g})=>!g),...l!=null&&l.anon?[l]:[]].map(({lastChild:g})=>g);break}default:throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!")}s!=null||(s=r.slice(i,i+2).map(({lastChild: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{o++}}return s}print(){let{childNodes:e,length:t,firstChild:r,modifier:i,type:s}=this;return`<span class="wpb-${s}">{{${Bt(i)}${s==="magic-word"?r.print()+(t===1?"":c(this,ot))+Oe(e.slice(1),{sep:"|"}):Oe(e,{sep:"|"})}}}</span>`}};Dn=P(il),Fr=new WeakMap,ot=new WeakMap,bt=new WeakMap,Tt=new WeakMap,Zt=new WeakMap,yt=new WeakSet,Hn=function(){let e=this.type==="template";return this.normalizeTitle(this.childNodes[e?0:1].text(),e?10:828,{temporary:!0})},Os=function(e){let t=this.getAnonArgs(),r=typeof e!="number";for(let i=r?t.indexOf(e):e-1;i<t.length;i++){let s=t[i],{name:o}=s,l=String(i+1);(o!==l||s===e)&&(s.setAttribute("name",l),this.getArgs(l,!1,!1).add(s))}},st=B(Dn,0,"TranscludeToken",qs,st),j(Dn,1,st)});var Ms,Gn,sl,kt,zs=k(()=>{"use strict";pt();O();Ms=[be()];kt=class extends(sl=v){get type(){return"hidden"}};Gn=P(sl),kt=B(Gn,0,"HiddenToken",Ms,kt),j(Gn,1,kt)});var Us,Xn,ol,Vn,al,vt,Ws=k(()=>{"use strict";ee();_();te();_e();$r();O();Me();zs();Us=[de("{{{"),tt()];vt=class extends(al=v){constructor(e,t,r=[]){super(void 0,t,r,{});T(this,Xn);for(let i=0;i<e.length;i++){let s=e[i];if(i===0){let o=new X(s,"arg-name",t,r,{});super.insertAt(o)}else if(i>1){let o=new kt(s,t,r);super.insertAt(o)}else{let o=new v(s,t,r);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`{{{${xe(this.childNodes.slice(0,2),"|")}}}}`}afterBuild(){super.afterBuild()}lint(e=this.getAbsoluteIndex(),t){let{childNodes:[r,i,...s]}=this;if(!this.getAttribute("include")){let l=L(this,{start:e},"no-arg","unexpected template argument");return i&&(l.suggestions=[{range:[e,l.endIndex],text:i.text(),desc:"expand"}]),[l]}r.setAttribute("aIndex",e+3);let o=r.lint(e+3,t);if(i){let l=e+4+r.toString().length;i.setAttribute("aIndex",l);let g=i.lint(l,t);g.length>0&&o.push(...g)}if(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 r=super.json(void 0,t);return r.default=this.default,r}};Vn=P(al),Xn=new WeakSet,ol=function(){},vt=B(Vn,0,"ArgToken",Us,vt),j(Vn,1,vt)});var Ks={};J(Ks,{parseBraces:()=>Rr});var ll,Ds,Qn,Hs,Gs,Vs,Qs,Xs,Rr,nn=k(()=>{"use strict";jt();ee();Wn();_s();Ws();ll={"=":String.raw`\n(?!(?:[^\S\n]|\0\d+[cn]\x7F)*\n)`,"{":String.raw`\}{2,}|\|`,"-":String.raw`\}-`,"[":String.raw`\]\]`},Ds=String.raw`\[(?!\[)`,Qn=String.raw`\n(?![=\0])`,Hs=String.raw`|\{{2,}`,Gs=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"],["server","m"]]),Vs=$e(a=>new RegExp(a,"gmu"));Qs=new RegExp(String.raw`\{\{((?:[^\n{}[]|${Ds}|${Qn})*)\}\}(?!\})`+"|"+String.raw`\[\[(?:[^\n[\]{]|${Qn})*\]\]`+"|"+String.raw`-\{(?:[^\n{}[]|${Ds}|${Qn})*\}-`,"gu");Xs=a=>{let n=qe(ie(a));return Gs.has(n)?Gs.get(n):/^(?:filepath|(?:full|canonical)urle?):./u.test(n)?"m":/^#vardefine:./u.test(n)?"n":"t"},Rr=(a,n,e)=>{var f,h,x,b,S;let t=String.raw`${n.excludes.includes("heading")?"":String.raw`^((?:\0\d+[cno]\x7F)*)={1,6}|`}\[\[|-\{(?!\{)`,{parserFunction:[,,,r]}=n,i=[],s=[],o=(w,A,I,q)=>{A[A.length-1].push(Ne(w.slice(I,q),s))},l;do l!==void 0&&(a=l),l=a.replace(Qs,(w,A,I)=>{if(A!==void 0||typeof I=="string")try{let{length:q}=e,M=(A!=null?A:I).split("|");return new st(Ne(M[0],s),M.slice(1).map(F=>{let H=F.indexOf("=");return(H===-1?[F]:[F.slice(0,H),F.slice(H+1)]).map(G=>Ne(G,s))}),n,e),`\0${q}${Xs(M[0])}`}catch(q){if(!(q instanceof SyntaxError)||q.message!=="Invalid template name")throw q}return s.push(Ne(w,s)),`\0${s.length-1}`});while(l!==a);a=l;let g=a.lastIndexOf("}}")-a.length,u=g+a.length!==-1,d=Vs(t+(u?Hs:"")),p=d.exec(a),m;for(;p||m!==void 0&&m<=a.length&&((h=(f=i[i.length-1])==null?void 0:f[0])!=null&&h.startsWith("="));){if(p!=null&&p[1]){let[,{length:Y}]=p;p[0]=p[0].slice(Y),p.index+=Y}let{0:w,index:A}=p!=null?p:{0:`
8
- `,index:a.length},I=(x=i.pop())!=null?x:{},{0:q,index:M,parts:F,findEqual:H,pos:G}=I,re=w==="="&&H;if(w==="]]"||w==="}-")m=A+2;else if(w===`
6
+ `})}}return Ie(n,a),n}});var Bs={};J(Bs,{ParamTagToken:()=>it});var js,zn,il,it,Un=k(()=>{"use strict";_();te();Er();en();W();q();Me();js=[Qt];it=class extends(il=v){get type(){return"ext-inner"}constructor(n,e,t=w.getConfig(),r=[],i){if(super(void 0,t,r,{}),e){let s=X;this.append(...e.split(`
7
+ `).map(o=>i?o:xt(o,t,r,n)).map(o=>new s(o,"param-line",t,r,{})))}r.splice(r.indexOf(this),1),r.push(this)}lint(n=this.getAbsoluteIndex()){let e=new R(this,n),t=w.msg("invalid parameter of <$1>",this.name),r=[];for(let i of this.childNodes){i.setAttribute("aIndex",n);let s=i.childNodes.filter(({type:o})=>o!=="comment"&&o!=="include"&&o!=="noinclude");if(s.some(({type:o})=>o==="ext"))r.push($(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=$(i,e,"no-ignored",t);g.suggestions=[{desc:"remove",range:[g.startIndex,g.endIndex],text:""}],r.push(g)}else{let g=i.lint(n,!1);g.length>0&&r.push(...g)}}n+=i.toString().length+1}return r}};zn=P(il),it=B(zn,0,"ParamTagToken",js,it),j(zn,1,it)});var Lr,Kt,tn,Jt,Wn=k(()=>{"use strict";_();de();te();W();q();ut();Jt=class extends v{constructor(e,t,r,i=[]){super(void 0,r,i);T(this,Kt);T(this,Lr);y(this,Lr,e);let s=new v(t[0],r,i);s.type="heading-title",s.setAttribute("stage",2);let o=new ue(t[1],"heading-trail",r,i);this.append(s,o)}get type(){return"heading"}get level(){return c(this,Lr)}toString(e){let t=N(this,Kt,tn).call(this);return t+this.firstChild.toString(e)+t+this.lastChild.toString(e)}text(){let e=N(this,Kt,tn).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 r=super.lint(e,t),{firstChild:i,level:s}=this,o=i.toString(),l=o.startsWith("="),g=l||o.endsWith("="),u=i.childNodes.filter(Yt("quote")),d=u.filter(({bold:h})=>h),p=u.filter(({italic:h})=>h),m=new R(this,e);if(this.level===1){let h=$(i,m,"h1","<h1>");g||(h.suggestions=[{desc:"h2",range:[h.startIndex,h.endIndex],text:`=${o}=`}]),r.push(h)}if(g){let h=$(i,m,"unbalanced-header",w.msg("unbalanced $1 in a section header",'"="'));if(o!=="=")if(l){let[x]=/^=+/u.exec(o),b=s+x.length;h.suggestions=[{desc:`h${s}`,range:[h.startIndex,h.startIndex+x.length],text:""}],b<7&&h.suggestions.push({desc:`h${b}`,range:[h.endIndex,h.endIndex],text:x})}else{let x=/[^=](=+)$/u.exec(o)[1],b=s+x.length;h.suggestions=[{desc:`h${s}`,range:[h.endIndex-x.length,h.endIndex],text:""}],b<7&&h.suggestions.push({desc:`h${b}`,range:[h.startIndex,h.startIndex],text:x})}r.push(h)}this.closest("html-attrs,table-attrs")&&r.push(L(this,m,"parsing-order","section header in an HTML tag"));let f=this.getRootNode().toString();if(d.length%2){let h=$(d[d.length-1],{...m,start:e+s,left:m.left+s},"format-leakage",w.msg("unbalanced $1 in a section header","bold apostrophes")),x=e+s+o.length;f.slice(h.endIndex,x).trim()?h.suggestions=[{desc:"close",range:[x,x],text:"'''"}]:h.fix={desc:"remove",range:[h.startIndex,h.endIndex],text:""},r.push(h)}if(p.length%2){let h=$(p[p.length-1],{start:e+s},"format-leakage",w.msg("unbalanced $1 in a section header","italic apostrophes")),x=e+s+o.length;h.fix=f.slice(h.endIndex,x).trim()?{desc:"close",range:[x,x],text:"''"}:{desc:"remove",range:[h.startIndex,h.endIndex],text:""},r.push(h)}return r}print(){let e=N(this,Kt,tn).call(this);return super.print({pre:e,sep:e})}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return r.level=this.level,r}};Lr=new WeakMap,Kt=new WeakSet,tn=function(){return"=".repeat(this.level)}});var sl,rn,Os=k(()=>{"use strict";ee();_();q();sl=new RegExp(`https?://${je}${Be}$`,"iu"),rn=class extends v{get type(){return"parameter"}get anon(){return this.firstChild.length===0}get duplicated(){var n;try{return!!((n=this.parentNode)!=null&&n.getDuplicatedArgs().some(([e])=>e===this.name))}catch{return!1}}constructor(n,e,t,r=[]){super(void 0,t,r);let i=new v(typeof n=="number"?void 0:n,t,r,{}),s=new v(e,t,r);i.type="parameter-key",i.setAttribute("stage",2),s.type="parameter-value",s.setAttribute("stage",2),this.append(i,s)}trimName(n,e=!0){let t=(typeof n=="string"?n:n.toString(!0)).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1");return this.setAttribute("name",t),t}afterBuild(){if(!this.anon){let{parentNode:n,firstChild:e}=this,t=this.trimName(e);n&&n.getArgs(t,!1,!1).add(this)}super.afterBuild()}toString(n){return this.anon?this.lastChild.toString(n):super.toString(n,"=")}text(){return this.anon?this.lastChild.text():super.text("=")}getGaps(){return this.anon?0:1}lint(n=this.getAbsoluteIndex(),e){var s;let t=super.lint(n,e),{firstChild:r}=this,i=(s=sl.exec(r.text()))==null?void 0:s[0];if(i&&new URL(i).search){let o=$(r,{start:n},"unescaped","unescaped query string in an anonymous parameter");o.startIndex=o.endIndex,o.startLine=o.endLine,o.startCol=o.endCol,o.endIndex++,o.endCol++,o.fix={range:[o.startIndex,o.endIndex],text:"{{=}}",desc:"escape"},t.push(o)}return t}print(){return super.print({sep:this.anon?"":"="})}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return Object.assign(t,{anon:this.anon},this.duplicated&&{duplicated:!0}),t}}});var qs,Fr,ot,bt,Tt,Zt,yt,Hn,_s,Dn,ol,st,Ms=k(()=>{"use strict";ee();_();de();te();$r();q();Os();Me();ut();qs=[tt()];st=class extends(ol=v){constructor(e,t,r,i=[]){var S,C;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`,i[s].toString().replace(/^\n/u,"")));super(void 0,r,i,{});T(this,yt);le(this,"modifier","");T(this,Fr,"template");T(this,ot,":");T(this,bt,!1);T(this,Tt,new Map);T(this,Zt);let{parserFunction:[l,g],variable:u,functionHook:d}=r,p=(S=/^(?:\s|\0\d+[cn]\x7F)*\0\d+s\x7F/u.exec(e))==null?void 0:S[0];if(p)this.setAttribute("modifier",p),e=e.slice(p.length);else if(e.includes(":")){let[A,...I]=e.split(":"),[O]=/^(?:\s|\0\d+[cn]\x7F)*/u.exec((C=I[0])!=null?C:"");this.setModifier(`${A}:${O}`)&&(e=I.join(":").slice(O.length))}let m=e.search(/[::]/u),f=e[m]===":",h=m!==-1;if(h||t.length===0&&!c(this,bt)){let A=h?e.slice(0,m):e,I=h&&e.slice(m+1),O=ie(A),M=h?O.slice(O.search(/\S/u))+(f?":":""):O.trim(),F=M.toLowerCase(),G=Array.isArray(g),V=G?g.includes(M):Object.prototype.hasOwnProperty.call(g,M),re=!G&&V?g[M]:Object.prototype.hasOwnProperty.call(l,F)&&l[F],ne=G&&V||!("functionHook"in r)||d.includes(re),Y=G&&V||u.includes(re);if(h?re&&ne:Y){this.setAttribute("name",re||F.replace(/^#|:$/u,"")),y(this,Fr,"magic-word"),f&&y(this,ot,":");let Q=new ue(A,"magic-word-name",r,i);if(super.insertAt(Q),I!==!1&&t.unshift([I]),this.name==="invoke")for(let E=0;E<2;E++){let Ce=t.shift();if(!Ce)break;let ye=new X(Ce.join("="),`invoke-${E?"function":"module"}`,r,i);super.insertAt(ye)}}}if(this.type==="template"){let A=ie(e).trim();if(!this.normalizeTitle(A,10,{halfParsed:!0,temporary:!0}).valid)throw i.pop(),new SyntaxError("Invalid template name");let I=new X(e,"template-name",r,i,{});super.insertAt(I)}typeof s=="number"&&(i[s]=void 0);let x=this.isTemplate(),b=1;for(let A=0;A<t.length;A++){let I=t[A];x||this.name==="switch"&&A>0||this.name==="tag"&&A>1||(I[0]=I.join("="),I.length=1),I.length===1&&(I.unshift(b),b++),this.insertAt(new rn(...I,r,i))}this.seal("modifier")}get type(){return c(this,Fr)}setModifier(e){let{parserFunction:[,,t,r]}=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=r.includes(s);return c(this,bt)&&o||!c(this,bt)&&(l||!e)||(se.running||this.length>1)&&(o||l||!e)?(this.setAttribute("modifier",e),y(this,bt,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"&&(y(this,Zt,N(this,yt,Hn).call(this)),this.setAttribute("name",c(this,Zt).title))}toString(e){return`{{${this.modifier}${this.type==="magic-word"?this.firstChild.toString(e)+(this.length===1?"":c(this,ot))+this.childNodes.slice(1).map(t=>t.toString(e)).join("|"):super.toString(e,"|")}}}`}text(){let{childNodes:e,length:t,firstChild:r,modifier:i,type:s,name:o}=this;return s==="magic-word"&&o==="vardefine"?"":`{{${i}${s==="magic-word"?r.text()+(t===1?"":c(this,ot))+xe(e.slice(1),"|"):super.text("|")}}}`}getAttribute(e){switch(e){case"padding":return this.modifier.length+2;case"title":return c(this,Zt);case"colon":return c(this,ot);default:return super.getAttribute(e)}}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t);if(!this.isTemplate())return r;let{type:i,childNodes:s,length:o}=this,l=new R(this,e),g=i==="magic-word";if(g&&!N(this,yt,Hn).call(this).valid)r.push($(s[1],l,"invalid-invoke","illegal module name"));else{let d=s[g?1:0],p=d.childNodes.findIndex(f=>f.type==="text"&&gt(f.data).includes("#")),m=d.childNodes[p];if(m){let f=$(d,l,"no-ignored","useless fragment");f.fix={range:[f.startIndex+d.getRelativeIndex(p)+m.data.indexOf("#"),f.endIndex],text:"",desc:"remove"},r.push(f)}}if(g&&o===2)return r.push(L(this,l,"invalid-invoke","missing module function")),r;let u=this.getDuplicatedArgs().filter(([,d])=>!d[0].querySelector("ext"));if(u.length>0)for(let[,d]of u)r.push(...d.map(p=>{let m=$(p,l,"no-duplicate","duplicated parameter");return m.suggestions=[{desc:"remove",range:[m.startIndex-1,m.endIndex],text:""}],m}));return r}insertAt(e,t=this.length){return super.insertAt(e,t),e.anon?N(this,yt,_s).call(this,e):e.name&&this.getArgs(e.name,!1,!1).add(e),e}getAllArgs(){return this.childNodes.filter(Yt("parameter"))}getAnonArgs(){return this.getAllArgs().filter(({anon:e})=>e)}getArgs(e,t,r=!0){let i=String(e).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1"),s;return c(this,Tt).has(i)?s=c(this,Tt).get(i):(s=new Set(this.getAllArgs().filter(({name:o})=>i===o)),c(this,Tt).set(i,s)),s}getDuplicatedArgs(){return[...c(this,Tt)].filter(([,{size:e}])=>e>1).map(([e,t])=>[e,[...t]])}getPossibleValues(){let{type:e,name:t,childNodes:r}=this;if(e==="template")throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!");let i,s;switch(t){case"if":case"ifexist":case"ifexpr":case"iferror":i=2;break;case"ifeq":i=3;break;case"switch":{let o=r.slice(2),l=o[o.length-1];s=[...o.filter(({anon:g})=>!g),...l!=null&&l.anon?[l]:[]].map(({lastChild:g})=>g);break}default:throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!")}s!=null||(s=r.slice(i,i+2).map(({lastChild: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{o++}}return s}print(){let{childNodes:e,length:t,firstChild:r,modifier:i,type:s}=this;return`<span class="wpb-${s}">{{${Bt(i)}${s==="magic-word"?r.print()+(t===1?"":c(this,ot))+qe(e.slice(1),{sep:"|"}):qe(e,{sep:"|"})}}}</span>`}};Dn=P(ol),Fr=new WeakMap,ot=new WeakMap,bt=new WeakMap,Tt=new WeakMap,Zt=new WeakMap,yt=new WeakSet,Hn=function(){let e=this.type==="template";return this.normalizeTitle(this.childNodes[e?0:1].text(),e?10:828,{temporary:!0})},_s=function(e){let t=this.getAnonArgs(),r=typeof e!="number";for(let i=r?t.indexOf(e):e-1;i<t.length;i++){let s=t[i],{name:o}=s,l=String(i+1);(o!==l||s===e)&&(s.setAttribute("name",l),this.getArgs(l,!1,!1).add(s))}},st=B(Dn,0,"TranscludeToken",qs,st),j(Dn,1,st)});var zs,Gn,al,kt,Us=k(()=>{"use strict";pt();q();zs=[be()];kt=class extends(al=v){get type(){return"hidden"}};Gn=P(al),kt=B(Gn,0,"HiddenToken",zs,kt),j(Gn,1,kt)});var Ws,Xn,ll,Vn,dl,vt,Ds=k(()=>{"use strict";ee();_();te();_e();$r();q();Me();Us();Ws=[ge("{{{"),tt()];vt=class extends(dl=v){constructor(e,t,r=[]){super(void 0,t,r,{});T(this,Xn);for(let i=0;i<e.length;i++){let s=e[i];if(i===0){let o=new X(s,"arg-name",t,r,{});super.insertAt(o)}else if(i>1){let o=new kt(s,t,r);super.insertAt(o)}else{let o=new v(s,t,r);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`{{{${xe(this.childNodes.slice(0,2),"|")}}}}`}afterBuild(){super.afterBuild()}lint(e=this.getAbsoluteIndex(),t){let{childNodes:[r,i,...s]}=this;if(!this.getAttribute("include")){let l=L(this,{start:e},"no-arg","unexpected template argument");return i&&(l.suggestions=[{range:[e,l.endIndex],text:i.text(),desc:"expand"}]),[l]}r.setAttribute("aIndex",e+3);let o=r.lint(e+3,t);if(i){let l=e+4+r.toString().length;i.setAttribute("aIndex",l);let g=i.lint(l,t);g.length>0&&o.push(...g)}if(s.length>0){let l=new R(this,e);o.push(...s.map(g=>{let u=$(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 r=super.json(void 0,t);return r.default=this.default,r}};Vn=P(dl),Xn=new WeakSet,ll=function(){},vt=B(Vn,0,"ArgToken",Ws,vt),j(Vn,1,vt)});var Js={};J(Js,{parseBraces:()=>Rr});var gl,Hs,Qn,Gs,Vs,Xs,Ks,Qs,Rr,nn=k(()=>{"use strict";jt();ee();Wn();Ms();Ds();gl={"=":String.raw`\n(?!(?:[^\S\n]|\0\d+[cn]\x7F)*\n)`,"{":String.raw`\}{2,}|\|`,"-":String.raw`\}-`,"[":String.raw`\]\]`},Hs=String.raw`\[(?!\[)`,Qn=String.raw`\n(?![=\0])`,Gs=String.raw`|\{{2,}`,Vs=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"],["server","m"]]),Xs=$e(a=>new RegExp(a,"gmu"));Ks=new RegExp(String.raw`\{\{((?:[^\n{}[]|${Hs}|${Qn})*)\}\}(?!\})`+"|"+String.raw`\[\[(?:[^\n[\]{]|${Qn})*\]\]`+"|"+String.raw`-\{(?:[^\n{}[]|${Hs}|${Qn})*\}-`,"gu");Qs=a=>{let n=Oe(ie(a));return Vs.has(n)?Vs.get(n):/^(?:filepath|(?:full|canonical)urle?):./u.test(n)?"m":/^#vardefine:./u.test(n)?"n":"t"},Rr=(a,n,e)=>{var f,h,x,b,S;let t=String.raw`${n.excludes.includes("heading")?"":String.raw`^((?:\0\d+[cno]\x7F)*)={1,6}|`}\[\[|-\{(?!\{)`,{parserFunction:[,,,r]}=n,i=[],s=[],o=(C,A,I,O)=>{A[A.length-1].push(Ne(C.slice(I,O),s))},l;do l!==void 0&&(a=l),l=a.replace(Ks,(C,A,I)=>{if(A!==void 0||typeof I=="string")try{let{length:O}=e,M=(A!=null?A:I).split("|");return new st(Ne(M[0],s),M.slice(1).map(F=>{let G=F.indexOf("=");return(G===-1?[F]:[F.slice(0,G),F.slice(G+1)]).map(V=>Ne(V,s))}),n,e),`\0${O}${Qs(M[0])}`}catch(O){if(!(O instanceof SyntaxError)||O.message!=="Invalid template name")throw O}return s.push(Ne(C,s)),`\0${s.length-1}`});while(l!==a);a=l;let g=a.lastIndexOf("}}")-a.length,u=g+a.length!==-1,d=Xs(t+(u?Gs:"")),p=d.exec(a),m;for(;p||m!==void 0&&m<=a.length&&((h=(f=i[i.length-1])==null?void 0:f[0])!=null&&h.startsWith("="));){if(p!=null&&p[1]){let[,{length:Y}]=p;p[0]=p[0].slice(Y),p.index+=Y}let{0:C,index:A}=p!=null?p:{0:`
8
+ `,index:a.length},I=(x=i.pop())!=null?x:{},{0:O,index:M,parts:F,findEqual:G,pos:V}=I,re=C==="="&&G;if(C==="]]"||C==="}-")m=A+2;else if(C===`
9
9
  `){m=A+1;let{pos:Y,findEqual:Q}=(b=i[i.length-1])!=null?b:{};if(Y===void 0||Q||ie(a.slice(Y,M))!==""){let E=/^(={1,6})(.+)\1((?:\s|\0\d+[cn]\x7F)*)$/u.exec(a.slice(M,A));E&&(E[2]=Ne(E[2],s),E[2].includes(`
10
- `)||(a=`${a.slice(0,M)}\0${e.length}h${a.slice(A)}`,m=M+4+String(e.length).length,new Jt(E[1].length,E.slice(2),n,e)))}}else if(w==="|"||re)m=A+1,o(a,F,G,A),w==="|"&&F.push([]),I.pos=m,I.findEqual=w==="|",i.push(I);else if(w.startsWith("}}")){let Y=w.slice(0,Math.min(q.length,3)),Q=q.length-Y.length,{length:E}=e;m=A+Y.length,o(a,F,G,A);let Ce=!1,ye="t";if(Y.length===3){let oe=F.map(Pe=>Pe.join("=")),Re=oe.length>1&&ie(oe[1]).trim();new vt(oe,n,e),Re&&Re.endsWith(":")&&r.includes(Re.slice(0,-1).toLowerCase())&&(ye="s")}else try{new st(F[0][0],F.slice(1),n,e),ye=Xs(F[0][0])}catch(oe){if(oe instanceof SyntaxError&&oe.message==="Invalid template name")Ce=!0;else throw oe}Ce||(a=`${a.slice(0,M+Q)}\0${E}${ye}${a.slice(m)}`,m=M+Q+3+String(E).length,Q>1?i.push({0:q.slice(0,Q),index:M,pos:M+Q,parts:[[]]}):Q===1&&a[M-1]==="-"&&i.push({0:"-{",index:M-1,pos:M+1,parts:[[]]}))}else m=A+w.length,w.startsWith("{")&&(p.pos=m,p.parts=[[]]),i.push(..."0"in I?[I]:[],p);let ne=i[i.length-1];if(u&&g+a.length<m)for(u=!1;(S=ne==null?void 0:ne[0])!=null&&S.startsWith("{");)i.pop(),ne=i[i.length-1];d=Vs(t+(u?Hs:"")+(ne?`|${ll[ne[0][0]]}${ne.findEqual?"|=":""}`:"")),d.lastIndex=m,p=d.exec(a)}return Ne(a,s)}});var Js={};J(Js,{InputboxToken:()=>Kn});var Kn,Ys=k(()=>{"use strict";Er();nn();V();Un();Kn=class extends it{constructor(n,e,t=$.getConfig(),r=[]){let i=Symbol("InputboxToken"),s=t.excludes.includes("heading")?t:{...t,excludes:[...t.excludes,"heading"]},{length:o}=r;r.push(i),e&&(e=xt(e,s,r,n)),e&&(e=Rr(e,s,r)),r.splice(o,1),super(n,e,s,r,{})}}});var sn={};J(sn,{NestedToken:()=>Jn});var dl,gl,Pr,er,Jn,on=k(()=>{"use strict";_();te();Er();nn();V();O();Yn();Ue();dl=new Set(["comment","include","arg","template","magic-word"]),gl=[!1,!0].map(a=>{let n=a?"includeonly":"noinclude";return new RegExp(String.raw`^(?:<${n}(?:\s[^>]*)?/?>|</${n}\s*>)$`,"iu")}),Jn=class extends v{constructor(e,t,r,i,s=[]){if(typeof t=="boolean"){let o=Symbol("InputboxToken"),{length:l}=s;s.push(o),e&&(e=xt(e,i,s,t)),e&&(e=Rr(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`;return new We(l,g,u,d,i,!1,s),p}));e&&(e=e.replace(/(^|\0\d+.\x7F)([^\0]+)(?=$|\0\d+.\x7F)/gu,(o,l,g)=>(new z(g,i,s),`${l}\0${s.length}n`)));super(e,i,s);T(this,Pr);T(this,er);y(this,Pr,[...r]),y(this,er,t)}get type(){return"ext-inner"}lint(e=this.getAbsoluteIndex(),t){let r=new R(this,e),i=typeof c(this,er)=="boolean"?gl[c(this,er)?1:0]:/^<!--[\s\S]*-->$/u;return[...super.lint(e,t),...this.childNodes.filter(s=>{let{type:o,name:l}=s;if(o==="ext")return!c(this,Pr).includes(l);if(dl.has(o))return!1;let g=s.toString().trim();return g&&!i.test(g)}).map(s=>{let o=C(s,r,"no-ignored",$.msg("invalid content in <$1>",this.name));return o.suggestions=[{desc:"remove",range:[o.startIndex,o.endIndex],text:""},{desc:"comment",range:[o.startIndex,o.endIndex],text:`<!--${s.toString()}-->`}],o})]}};Pr=new WeakMap,er=new WeakMap});function Zs(a,n,e,t,r){n=ie(n).trim();let i=n.replace(a==="link"?/\0\d+[tq]\x7F/gu:/\0\d+t\x7F/gu,"").trim();switch(a){case"width":return!i&&!!n||/^(?:\d+x?|\d*x\d+)(?:\s*px)?$/u.test(i);case"link":{if(i){if(pl(e.protocol).test(i))return ul(e.protocol).test(i)&&n;i.startsWith("[[")&&i.endsWith("]]")&&(i=i.slice(2,-2))}else return n;let s=$.normalizeTitle(i,0,!1,e,{halfParsed:t,decode:!0,selfLink:!0});return s.valid&&s}case"lang":return(r==="svg"||r==="svgz")&&!/[^a-z\d-]/u.test(i);case"alt":case"class":case"manualthumb":return!0;case"page":return(r==="djvu"||r==="djv"||r==="pdf")&&Number(i)>0;default:return!!i&&!isNaN(i)}}var pl,ul,cl,hl,ce,ln,eo,an,to=k(()=>{"use strict";jt();ee();_();V();O();pl=$e(a=>new RegExp(String.raw`^(?:${a}|//|\0\d+m\x7F)`,"iu")),ul=$e(a=>new RegExp(String.raw`^(?:(?:${a}|//)${je}|\0\d+m\x7F)${Be}$`,"iu")),cl=$e(a=>new RegExp(String.raw`^(\s*(?!\s))${a.replace("$1","(.*)")}${a.endsWith("$1")?`(?=$|
11
- )`:""}(\s*)$`,"u")),hl=new Set(["alt","link","lang","page","caption"]);an=class extends v{constructor(e,t,r,i){var n=(...ku)=>(super(...ku),T(this,ln),T(this,ce,""),this);let s,o=Object.entries(r.img).map(([g,u])=>[g,u,cl(g)]),l=o.find(([,g,u])=>(s=u.exec(e),s&&(s.length!==4||Zs(g,s[2],r,!0,t)!==!1)));if(l&&s){s.length===3?(n(void 0,r,i),y(this,ce,e)):(n(s[2],r,i,{}),y(this,ce,s[1]+l[0]+s[3])),this.setAttribute("name",l[1]);return}n(e,r.excludes.includes("list")?r:{...r,excludes:[...r.excludes,"list"]},i),this.setAttribute("name","caption"),this.setAttribute("stage",7)}get type(){return"image-parameter"}get link(){return this.name==="link"?Zs("link",super.text(),this.getAttribute("config")):void 0}afterBuild(){var e;((e=this.parentNode)==null?void 0:e.type)==="gallery-image"&&!hl.has(this.name)&&this.setAttribute("name","invalid"),super.afterBuild()}toString(e){return c(this,ce)?c(this,ce).replace("$1",super.toString(e)):super.toString(e)}text(){return c(this,ce)?c(this,ce).replace("$1",super.text()).trim():super.text().trim()}isPlain(){return this.name==="caption"}getAttribute(e){return e==="padding"?Math.max(0,c(this,ce).indexOf("$1")):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{link:i,name:s}=this;if(s==="invalid"){let o=L(this,{start:e},"invalid-gallery","invalid image parameter");o.fix={range:[e-1,o.endIndex],text:"",desc:"remove"},r.push(o)}else if(typeof i=="object"&&i.encoded){let o=L(this,{start:e},"url-encoding","unnecessary URL encoding in an internal link");o.suggestions=[{desc:"decode",range:[e,o.endIndex],text:Je(this.text())}],r.push(o)}return r}getValue(){return this.name==="invalid"?this.text():N(this,ln,eo).call(this)||super.text()}print(){return c(this,ce)?`<span class="wpb-image-parameter">${c(this,ce).replace("$1",`<span class="wpb-image-caption">${Oe(this.childNodes)}</span>`)}</span>`:super.print({class:"image-caption"})}};ce=new WeakMap,ln=new WeakSet,eo=function(){return c(this,ce)&&!c(this,ce).includes("$1")}});var ro,no,io,ml,fl,tr,Zn=k(()=>{"use strict";_();te();V();Cr();to();ro=new Map([["manualthumb","Thumb"],["frameless","Frameless"],["framed","Frame"],["thumbnail","Thumb"]]),no=new Set(["left","right","center","none"]),io=new Set(["baseline","sub","super","top","text-top","middle","bottom","text-bottom"]),ml=new Set(["tiff","tif","png","gif","jpg","jpeg","webp","xcf","pdf","svg","djvu"]),fl=a=>{if(a===void 0)return[];let n=/-\{|\}-|\|/gu,e=[],t=n.exec(a),r=0,i=0;for(;t;){let{0:s,index:o}=t;s!=="|"?r+=s==="-{"?1:-1:r===0&&(e.push(a.slice(i,o)),{lastIndex:i}=n),t=n.exec(a)}return e.push(a.slice(i)),e},tr=class extends me{get type(){return"file"}get extension(){return this.getAttribute("title").extension}constructor(n,e,t,r=[],i="|"){super(n,void 0,t,r,i);let{extension:s}=this.getTitle(!0,!0);this.safeAppend(fl(e).map(o=>new an(o,s,t,r)))}lint(n=this.getAbsoluteIndex(),e){var f;let t=super.lint(n,e),r=this.getAllArgs().filter(({childNodes:h})=>{let x=h.filter(b=>b.text().trim());return x.length!==1||x[0].type!=="arg"}),i=[...new Set(r.map(({name:h})=>h))],s=i.filter(h=>ro.has(h)),o=i.filter(h=>no.has(h)),l=i.filter(h=>io.has(h)),[g]=s,u=g==="framed"||g==="manualthumb",d=new R(this,n);if(this.closest("ext-link-text")&&((f=this.getValue("link"))==null?void 0:f.trim())!==""&&t.push(L(this,d,"nested-link","internal link in an external link")),u)for(let h of r.filter(({name:x})=>x==="width")){let x=C(h,d,"invalid-gallery","invalid image parameter");x.fix={range:[x.startIndex-1,x.endIndex],text:"",desc:"remove"},t.push(x)}if(r.length===i.length&&s.length<2&&o.length<2&&l.length<2)return t;let p=(h,x,b)=>S=>{let w=C(S,d,"no-duplicate",$.msg(`${h} image $1 parameter`,x),b);return w.suggestions=[{desc:"remove",range:[w.startIndex-1,w.endIndex],text:""}],w},{extension:m}=this;for(let h of i){if(h==="invalid"||h==="width"&&u)continue;let x=r.filter(({name:b})=>b===h);h==="caption"&&(x=[...x.slice(0,-1).filter(b=>b.text()),...x.slice(-1)]),x.length>1&&t.push(...x.map(p("duplicated",h,h==="caption"&&m&&!ml.has(m)?"warning":"error")))}return s.length>1&&t.push(...r.filter(({name:h})=>ro.has(h)).map(p("conflicting","frame"))),o.length>1&&t.push(...r.filter(({name:h})=>no.has(h)).map(p("conflicting","horizontal-alignment"))),l.length>1&&t.push(...r.filter(({name:h})=>io.has(h)).map(p("conflicting","vertical-alignment"))),t}getAllArgs(){return this.childNodes.slice(1)}getArgs(n){return this.getAllArgs().filter(({name:e})=>n===e)}getArg(n){let e=this.getArgs(n);return e[n==="manualthumb"?0:e.length-1]}getValue(n){var e;return(e=this.getArg(n))==null?void 0:e.getValue()}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e),{extension:r}=this;return r&&(t.extension=r),t}}});var so,ei,xl,De,ti=k(()=>{"use strict";_();_e();O();Zn();so=[de("")];De=class extends(xl=tr){constructor(e,t,r,i,s=[]){let o;if(r!==void 0){let{length:l}=s;o=new v(r,i,s);for(let g=1;g<11;g++)o.parseOnce();s.splice(l,1)}super(t,o==null?void 0:o.toString(),i,s);ae(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,{halfParsed:!0,temporary:e,decode:!t})}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{ns:i}=this.getAttribute("title");if(i!==6){let s=L(this,{start:e},"invalid-gallery","invalid gallery image");s.suggestions=[{desc:"prefix",range:[e,e],text:"File:"}],r.push(s)}return r}};ei=P(xl),De=B(ei,0,"GalleryImageToken",so,De),j(ei,1,De)});var lo={};J(lo,{GalleryToken:()=>rr});var oo,At,ao,ni,ri,bl,rr,go=k(()=>{"use strict";en();V();O();ti();Ue();oo=[Qt];rr=class extends(bl=v){constructor(e,t,r=[]){var i;super(void 0,t,r,{});T(this,At);for(let s of(i=e==null?void 0:e.split(`
12
- `))!=null?i:[]){let o=/^([^|]+)(?:\|(.*))?/u.exec(s);if(!o){super.insertAt(s.trim()?new z(s,t,r):s);continue}let[,l,g]=o;N(this,At,ao).call(this,l)?super.insertAt(new De("gallery",l,g,t,r)):super.insertAt(new z(s,t,r))}}get type(){return"ext-inner"}get widths(){return N(this,At,ni).call(this,"widths")}get heights(){return N(this,At,ni).call(this,"heights")}lint(e=this.getAbsoluteIndex(),t){let{top:r,left:i}=this.getRootNode().posFromIndex(e),s=[];for(let o=0;o<this.length;o++){let l=this.childNodes[o],g=l.toString(),{length:u}=g,d=g.trim(),{type:p}=l,m=r+o,f=o?0:i;if(l.setAttribute("aIndex",e),p==="noinclude"&&d&&!/^<!--.*-->$/u.test(d)){let h=e+u;s.push({rule:"no-ignored",message:$.msg("invalid content in <$1>","gallery"),severity:d.endsWith("-->")||/^(?:\||<!--)/u.test(d)?"warning":"error",startIndex:e,endIndex:h,startLine:m,endLine:m,startCol:f,endCol:f+u,suggestions:[{desc:"remove",range:[e,h],text:""},{desc:"comment",range:[e,h],text:`<!--${g}-->`}]})}else if(p!=="noinclude"&&p!=="text"){let h=l.lint(e,t);h.length>0&&s.push(...h)}e+=u+1}return s}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return Object.assign(r,{widths:this.widths,heights:this.heights}),r}};ri=P(bl),At=new WeakSet,ao=function(e){return this.normalizeTitle(e,6,{halfParsed:!0,temporary:!0,decode:!0}).valid},ni=function(e){var i,s;let t=(i=this.parentNode)==null?void 0:i.getAttr(e),r=typeof t=="string"&&((s=/^(\d+)\s*(?:px)?$/u.exec(t))==null?void 0:s[1]);return r&&Number(r)||120},rr=B(ri,0,"GalleryToken",oo,rr),j(ri,1,rr)});var nr,ii=k(()=>{"use strict";_();Cr();nr=class extends me{get type(){return"link"}lint(n=this.getAbsoluteIndex(),e){let t=super.lint(n,e);return this.closest("ext-link-text")&&t.push(L(this,{start:n},"nested-link","internal link in an external link")),t}}});var Tl,yl,jr,He,dn=k(()=>{"use strict";_();ee();te();V();O();Tl=String.raw`(?:[${ke}\t]|&nbsp;|&#0*160;|&#[xX]0*[aA]0;)`,yl=new RegExp(`${Tl}+`,"gu"),He=class extends v{constructor(e,t="free-ext-link",r=$.getConfig(),i){super(e,r,i,{});T(this,jr);y(this,jr,t)}get type(){return c(this,jr)}get innerText(){let e=new Map([["!","|"],["=","="]]),t=xe(this.childNodes.map(r=>{let{type:i}=r,s=String(r.name);return i==="magic-word"&&e.has(s)?e.get(s):r}));return this.type==="magic-link"&&(t=t.replace(yl," ")),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:Gi(e)}lint(e=this.getAbsoluteIndex(),t){let r=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(m=>m==="X"?10:Number(m));(p.length===10&&p.reduce((m,f,h)=>m+f*(10-h),0)%11||p.length===13&&(p[12]===10||p.reduce((m,f,h)=>m+f*(h%2?3:1),0)%10))&&r.push(L(this,i,"invalid-isbn","invalid ISBN"))}return r}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",$.msg("$1 in URL",l?'"|"':"full-width punctuation"),"warning"),{index:m,0:f}=g.exec(d),h=p.startIndex+m;p.suggestions=l?[{desc:"whitespace",range:[h,h+1],text:" "}]:[{desc:"whitespace",range:[h,h],text:" "},{desc:"escape",range:[h,h+f.length],text:encodeURI(f)}],r.push(p)}return r}getUrl(e){}};jr=new WeakMap});var po,Ge,si,kl,Ve,oi=k(()=>{"use strict";_();_e();O();dn();po=[de("[")];Ve=class extends(kl=v){constructor(e,t="",r="",i,s=[]){super(void 0,i,s,{});T(this,Ge);let o=e&&/^\0\d+f\x7F$/u.test(e)?s[Number(e.slice(1,-2))]:new He(e,"ext-link-url",i,s);if(this.insertAt(o),y(this,Ge,t),r){let l=new v(r,i,s,{});l.type="ext-link-text",l.setAttribute("stage",10),this.insertAt(l)}}get type(){return"ext-link"}toString(e){return this.length===1?`[${super.toString(e)}${c(this,Ge)}]`:`[${super.toString(e,c(this,Ge))}]`}text(){return`[${super.text(" ")}]`}getGaps(){return c(this,Ge).length}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t);return this.length===1&&this.closest("heading-title")&&r.push(L(this,{start:e},"var-anchor","variable anchor in a section header")),r}print(){return super.print(this.length===1?{pre:"[",post:`${c(this,Ge)}]`}:{pre:"[",sep:c(this,Ge),post:"]"})}};si=P(kl),Ge=new WeakMap,Ve=B(si,0,"ExtLinkToken",po,Ve),j(si,1,Ve)});var Br,uo=k(()=>{"use strict";O();Ue();ii();oi();Br=class extends v{get type(){return"imagemap-link"}constructor(n,e,t,r,i=[]){super(void 0,r,i),this.append(n,e.length===2?new nr(...e,r,i):new Ve(...e,r,i),new z(t,r,i))}}});var ho={};J(ho,{ImagemapToken:()=>ir});var co,ai,vl,ir,mo=k(()=>{"use strict";_();le();te();en();V();O();Ue();ti();uo();co=[Qt];ir=class extends(vl=v){get type(){return"ext-inner"}get image(){return this.childNodes.find(Yt("imagemap-image"))}constructor(n,e=$.getConfig(),t=[]){if(super(void 0,e,t,{}),!n)return;let r=n.split(`
13
- `),i=new Set(e.protocol.split("|")),s=z,o=!0,l=!1;for(let g of r){let u=g.trim();if(!(l||!u||u.startsWith("#"))){if(o){let d=g.indexOf("|"),p=d===-1?g:g.slice(0,d),{valid:m,ns:f}=this.normalizeTitle(p,0,{halfParsed:!0,temporary:!0});if(m&&f===6){let h=new De("imagemap",p,d===-1?void 0:g.slice(d+1),e,t);super.insertAt(h),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),m=/^\[\[([^|]+)(?:\|([^\]]*))?\]\][\w\s]*$/u.exec(p);if(m){if(this.normalizeTitle(m[1],0,{halfParsed:!0,temporary:!0,selfLink:!0}).valid){super.insertAt(new Br(g.slice(0,d),m.slice(1),p.slice(p.indexOf("]]")+2),e,t));continue}}else if(p.startsWith("[//")||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))}}lint(n=this.getAbsoluteIndex(),e){let t=super.lint(n,e),r=new R(this,n);return this.image?t.push(...this.childNodes.filter(i=>{let s=i.toString().trim();return i.type==="noinclude"&&s&&!s.startsWith("#")}).map(i=>{let s=C(i,r,"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(L(this,r,"invalid-imagemap","<imagemap> without an image")),t}};ai=P(vl),ir=B(ai,0,"ImagemapToken",co,ir),j(ai,1,ir)});var fo,li,Al,Xe,di=k(()=>{"use strict";_();pt();_e();V();Ze();fo=[be(!1),de("<!--")];Xe=class extends(Al=ge){constructor(e,t,r,i){super(e,r,i);ae(this,"closed");this.closed=t}get type(){return"comment"}lint(e=this.getAbsoluteIndex()){if(this.closed)return[];let t=L(this,{start:e},"unclosed-comment",$.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;":""})}};li=P(Al),Xe=B(li,0,"CommentToken",fo,Xe),j(li,1,Xe)});var xo={};J(xo,{CommentedToken:()=>gi});var gi,bo=k(()=>{"use strict";O();di();gi=class extends v{get type(){return"ext-inner"}constructor(n,e,t=[]){if(super(void 0,e,t,{AstText:":",CommentToken:":"}),n){let r=n.indexOf("<!--"),i=r!==-1&&n.indexOf("-->",r+4),s=0;for(;i!==!1&&i!==-1;)r>s&&this.insertAt(n.slice(s,r)),this.insertAt(new Xe(n.slice(r+4,i),!0,e,t)),s=i+3,r=n.indexOf("<!--",s),i=r!==-1&&n.indexOf("-->",r+4);s<n.length&&this.insertAt(n.slice(s))}}lint(n=this.getAbsoluteIndex()){return super.lint(n,/<\s*(?:\/\s*)?(hiero)\b/giu)}}});var To={};J(To,{NowikiToken:()=>pi});var Sl,wl,pi,yo=k(()=>{"use strict";jt();_();V();Ze();Sl=$e(a=>new RegExp(String.raw`<\s*(?:/\s*)${a==="nowiki"?"":"?"}(${a})\b`,"giu")),wl=new Set(["templatestyles","section","languages"]),pi=class extends ge{get type(){return"ext-inner"}lint(n=this.getAbsoluteIndex()){let{name:e,firstChild:{data:t}}=this;if(wl.has(e)&&t){let r=L(this,{start:n},"void-ext",$.msg("nothing should be in <$1>",e));return r.fix={range:[n,r.endIndex],text:"",desc:"empty"},[r]}return super.lint(n,Sl(e))}}});var ko,ui,Cl,We,Yn=k(()=>{"use strict";_();te();V();Jr();O();Xr();Zr();ko=[Ht()];We=class extends(Cl=we){get type(){return"ext"}constructor(n,e,t,r,i=$.getConfig(),s=!1,o=[]){let l=n.toLowerCase(),g=new nt(!e||/^\s/u.test(e)?e:` ${e}`,"ext-attrs",l,i,o),u={...i,ext:i.ext.filter(p=>p!==l),excludes:[...i.excludes]},d;switch(u.inExt=!0,l){case"tab":u.ext=u.ext.filter(p=>p!=="tabs");case"indicator":case"poem":case"ref":case"option":case"combooption":case"tabs":case"poll":case"seo":case"langconvert":case"phonos":l==="poem"&&u.excludes.push("heading"),d=new v(t,u,o);break;case"pre":{let{PreToken:p}=(Rs(),U(Fs));d=new p(t,u,o);break}case"dynamicpagelist":{let{ParamTagToken:p}=(Un(),U(js));d=new p(s,t,u,o);break}case"inputbox":{let{InputboxToken:p}=(Ys(),U(Js));d=new p(s,t,u,o);break}case"references":{let{NestedToken:p}=(on(),U(sn));u.excludes.push("heading"),d=new p(t,s,["ref"],u,o);break}case"choose":{let{NestedToken:p}=(on(),U(sn));d=new p(t,/<(option|choicetemplate)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(\1)>)/gu,["option","choicetemplate"],u,o);break}case"combobox":{let{NestedToken:p}=(on(),U(sn));d=new p(t,/<(combooption)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(combooption\s*)>)/giu,["combooption"],u,o);break}case"gallery":{let{GalleryToken:p}=(go(),U(lo));d=new p(t,u,o);break}case"imagemap":{let{ImagemapToken:p}=(mo(),U(ho));d=new p(t,u,o);break}case"hiero":{let{CommentedToken:p}=(bo(),U(xo));d=new p(t,u,o);break}default:{let{NowikiToken:p}=(yo(),U(To));d=new p(t,u,o)}}d.setAttribute("name",l),d.type==="plain"&&(d.type="ext-inner"),super(n,g,d,r,i,o),this.seal("closed",!0)}lint(n=this.getAbsoluteIndex(),e){let t=super.lint(n,e),r=new R(this,n);return this.name!=="nowiki"&&this.closest("html-attrs,table-attrs")&&t.push(L(this,r,"parsing-order","extension tag in HTML tag attributes")),this.name==="ref"&&this.closest("heading-title")&&t.push(L(this,r,"var-anchor","variable anchor in a section header")),t}};ui=P(Cl),We=B(ui,0,"ExtToken",ko,We),j(ui,1,We)});var So={};J(So,{parseCommentAndExt:()=>xt});var Ao,$l,ci,Nl,vo,xt,Er=k(()=>{"use strict";jt();ee();ps();Ue();hs();fs();Yn();di();Ao="<onlyinclude>",$l="</onlyinclude>",{length:ci}=Ao,Nl=[!1,!0].map(a=>{let n=a?"includeonly":"(?:no|only)include",e=a?"noinclude":"includeonly";return $e(t=>new RegExp(String.raw`<!--[\s\S]*?(?:-->|$)|<${n}(?:\s[^>]*)?/?>|</${n}\s*>|<(${t.join("|")})(\s[^>]*?)?(?:/>|>([\s\S]*?)</(\1\s*)>)|<(${e})(\s[^>]*?)?(?:/>|>([\s\S]*?)(?:</(${e}\s*)>|$))`,"giu"))}),vo=a=>{let n=a.indexOf(Ao);return{i:n,j:a.indexOf($l,n+ci)}},xt=(a,n,e,t)=>{if(t){let{i:o,j:l}=vo(a);if(o!==-1&&l!==-1){let g="",u=d=>{new z(d,n,e),g+=`\0${e.length-1}n`};for(;o!==-1&&l!==-1;){let d=`\0${e.length}e`;new mt(a.slice(o+ci,l),n,e),o>0&&u(a.slice(0,o)),g+=d,a=a.slice(l+ci+1),{i:o,j:l}=vo(a)}return a&&u(a),g}}let{ext:r}=n,i=r.filter(o=>o!=="translate"&&o!=="tvar"),s={...n,ext:i};if(r.includes("translate")){let o=[];a=a.replace(/<nowiki>[\s\S]*?<\/nowiki>/giu,l=>(o.push(l),`\0${o.length-1}`)).replace(/<translate( nowrap)?>([\s\S]+?)?<\/translate>/gu,(l,g,u)=>{let d=e.length;return new Qr(g,u&&Ne(u,o),s,e),`\0${d}g`}),a=Ne(a,o)}return a.replace(Nl[t?1:0](i),(o,l,g,u,d,p,m,f,h)=>{let x=e.length,b="n";if(l)b="e",new We(l,g,u,d,s,p,e);else if(o.startsWith("<!--")){b="c";let S=o.endsWith("-->");new Xe(o.slice(4,S?-3:void 0),S,n,e)}else p?new ft(p,m,f,h,n,e):new z(o,n,e);return`\0${x}${b}`})}});var Il,El,Ll,wo,sr,Fe,at,Qe,hi,Fl,St,Co=k(()=>{"use strict";_();le();te();Jr();O();Il=new Set(["if","ifeq","ifexpr","ifexist","iferror","switch"]),El=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"]),Ll=new Set(["strike","big","center","font","tt"]);wo=[Ht()];St=class extends(Fl=v){constructor(e,t,r,i,s,o){super(void 0,s,o);T(this,sr);T(this,Fe);T(this,at);T(this,Qe);this.insertAt(t),this.setAttribute("name",e.toLowerCase()),y(this,sr,r),y(this,Fe,i),y(this,at,e)}get type(){return"html"}get selfClosing(){return c(this,Fe)}get closing(){return c(this,sr)}toString(e){return`<${this.closing?"/":""}${c(this,at)}${super.toString(e)}${c(this,Fe)?"/":""}>`}text(){let{closing:e}=this,t=c(this,at)+(e?"":super.text());return`<${e?"/":""}${t}${c(this,Fe)?"/":""}>`}getAttribute(e){return e==="padding"?c(this,at).length+(this.closing?2:1):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{name:i,parentNode:s,closing:o,selfClosing:l}=this,g=new R(this,e);if(i==="h1"&&!o){let h=L(this,g,"h1","<h1>");h.suggestions=[{desc:"h2",range:[e+2,e+3],text:"2"}],r.push(h)}if(this.closest("table-attrs")){let h=L(this,g,"parsing-order","HTML tag in table attributes");h.fix={desc:"remove",range:[e,h.endIndex],text:""},r.push(h)}Ll.has(i)&&r.push(L(this,g,"obsolete-tag","obsolete HTML tag","warning")),(i==="b"||i==="strong")&&this.closest("heading-title")&&r.push(L(this,g,"bold-header","bold in section header","warning"));let{html:[,u,d]}=this.getAttribute("config"),p=d.includes(i),m=u.includes(i);if(o&&(l||p)||l&&(!p&&!m)){let h=L(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:""},b={desc:"no self-closing",range:[h.endIndex-2,h.endIndex-1],text:""};m?h.suggestions=[x,b]:o?h.fix=p?x:b:h.suggestions=[b,{desc:"close",range:[h.endIndex-2,h.endIndex],text:`></${i}>`}],r.push(h)}else if(!this.findMatchingTag()){let h=L(this,g,"unmatched-tag",o?"unmatched closing tag":"unclosed tag");if(o){let x=this.closest("magic-word");x&&Il.has(x.name)?h.severity="warning":h.suggestions=[{desc:"remove",range:[e,h.endIndex],text:""}]}else{let x=s==null?void 0:s.childNodes;El.has(i)&&(x!=null&&x.slice(0,x.indexOf(this)).some(({type:b,name:S})=>b==="html"&&S===i))?h.suggestions=[{desc:"close",range:[e+1,e+1],text:"/"}]:this.closest("heading-title")||(h.severity="warning")}r.push(h)}return r}findMatchingTag(){return ve(c(this,Qe),()=>{let{name:e,parentNode:t,closing:r,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=r?u.slice(0,d).reverse():u.slice(d+1),m=[this],{rev:f}=pe;for(let h of p)if(!(!h.is("html")||h.name!==e||g&&c(h,Fe)))if(c(h,sr)===r)m.push(h);else{let x=m.pop();if(x===this)return h;y(x,Qe,[f,h]),y(h,Qe,[f,x])}for(let h of m)y(h,Qe,[f,void 0])},e=>{y(this,Qe,e),e[1]&&e[1]!==this&&y(e[1],Qe,[pe.rev,this])})}print(){return super.print({pre:`&lt;${this.closing?"/":""}${c(this,at)}`,post:`${c(this,Fe)?"/":""}&gt;`})}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return Object.assign(r,{closing:this.closing,selfClosing:c(this,Fe)}),r}};hi=P(Fl),sr=new WeakMap,Fe=new WeakMap,at=new WeakMap,Qe=new WeakMap,St=B(hi,0,"HtmlToken",wo,St),j(hi,1,St)});var $o={};J($o,{parseHtml:()=>Pl});var Rl,Pl,No=k(()=>{"use strict";Zr();Co();Rl=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,Pl=(a,n,e)=>{var s;let{html:t}=n;(s=n.htmlElements)!=null||(n.htmlElements=new Set([...t[0],...t[1],...t[2]]));let r=a.split("<"),i=r.shift();for(let o of r){let l=Rl.exec(o),g=l==null?void 0:l[2],u=g==null?void 0:g.toLowerCase();if(!l||!n.htmlElements.has(u)){i+=`<${o}`;continue}let[,d,,p="",m,f]=l,{length:h}=e,x=new nt(p,"html-attrs",u,n,e),b=x.getAttr("itemprop");if(u==="meta"&&(b===void 0||x.getAttr("content")===void 0)||u==="link"&&(b===void 0||x.getAttr("href")===void 0)){i+=`<${o}`,e.length=h;continue}i+=`\0${e.length}x${f}`,new St(g,x,d==="/",m==="/>",n,e)}return i}});var or,mi=k(()=>{"use strict";Jr();O();ut();Zr();or=class extends Ht(1)(v){constructor(n,e,t,r,i,s=[],o){super(void 0,i,s,o),this.append(new ue(e,"table-syntax",i,s),new nt(r,"table-attrs",t,i,s))}}});var Te,qr,Or,fi,ar,xi=k(()=>{"use strict";_();te();O();mi();ar=class extends or{constructor(e,t,r,i=[]){var g;let s=/\||\0\d+!\x7F/u.exec(t!=null?t:""),o=s?t.slice(0,s.index):"";/\[\[|-\{/u.test(o)&&(s=null,o="");super(/^(?:\n[^\S\n]*(?:[|!]|\|\+|\{\{\s*!\s*\}\}\+?)|(?:\||\{\{\s*!\s*\}\}){2}|!!|\{\{\s*!!\s*\}\})$/u,e,"td",o,r,i);T(this,Or);T(this,Te,"");T(this,qr);s&&([Wr(this,Te)._]=s);let l=new v(t==null?void 0:t.slice(((g=s==null?void 0:s.index)!=null?g:NaN)+c(this,Te).length),r,i);l.type="td-inner",l.setAttribute("stage",4),this.insertAt(l)}get type(){return"td"}get rowspan(){return this.getAttr("rowspan")}get colspan(){return this.getAttr("colspan")}get subtype(){return N(this,Or,fi).call(this).subtype}afterBuild(){c(this,Te).includes("\0")&&y(this,Te,this.buildFromStr(c(this,Te),0)),super.afterBuild()}toString(e){let{childNodes:[t,r,i]}=this;return t.toString(e)+r.toString(e)+c(this,Te)+i.toString(e)}text(){let{childNodes:[e,t,r]}=this;return e.text()+t.text()+c(this,Te)+r.text()}getGaps(e){return e===1?c(this,Te).length:0}lint(e=this.getAbsoluteIndex(),t){let r=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,`
10
+ `)||(a=`${a.slice(0,M)}\0${e.length}h${a.slice(A)}`,m=M+4+String(e.length).length,new Jt(E[1].length,E.slice(2),n,e)))}}else if(C==="|"||re)m=A+1,o(a,F,V,A),C==="|"&&F.push([]),I.pos=m,I.findEqual=C==="|",i.push(I);else if(C.startsWith("}}")){let Y=C.slice(0,Math.min(O.length,3)),Q=O.length-Y.length,{length:E}=e;m=A+Y.length,o(a,F,V,A);let Ce=!1,ye="t";if(Y.length===3){let ae=F.map(Pe=>Pe.join("=")),Re=ae.length>1&&ie(ae[1]).trim();new vt(ae,n,e),Re&&Re.endsWith(":")&&r.includes(Re.slice(0,-1).toLowerCase())&&(ye="s")}else try{new st(F[0][0],F.slice(1),n,e),ye=Qs(F[0][0])}catch(ae){if(ae instanceof SyntaxError&&ae.message==="Invalid template name")Ce=!0;else throw ae}Ce||(a=`${a.slice(0,M+Q)}\0${E}${ye}${a.slice(m)}`,m=M+Q+3+String(E).length,Q>1?i.push({0:O.slice(0,Q),index:M,pos:M+Q,parts:[[]]}):Q===1&&a[M-1]==="-"&&i.push({0:"-{",index:M-1,pos:M+1,parts:[[]]}))}else m=A+C.length,C.startsWith("{")&&(p.pos=m,p.parts=[[]]),i.push(..."0"in I?[I]:[],p);let ne=i[i.length-1];if(u&&g+a.length<m)for(u=!1;(S=ne==null?void 0:ne[0])!=null&&S.startsWith("{");)i.pop(),ne=i[i.length-1];d=Xs(t+(u?Gs:"")+(ne?`|${gl[ne[0][0]]}${ne.findEqual?"|=":""}`:"")),d.lastIndex=m,p=d.exec(a)}return Ne(a,s)}});var Ys={};J(Ys,{InputboxToken:()=>Kn});var Kn,Zs=k(()=>{"use strict";Er();nn();W();Un();Kn=class extends it{constructor(n,e,t=w.getConfig(),r=[]){let i=Symbol("InputboxToken"),s=t.excludes.includes("heading")?t:{...t,excludes:[...t.excludes,"heading"]},{length:o}=r;r.push(i),e&&(e=xt(e,s,r,n)),e&&(e=Rr(e,s,r)),r.splice(o,1),super(n,e,s,r,{})}}});var sn={};J(sn,{NestedToken:()=>Jn});var pl,ul,Pr,er,Jn,on=k(()=>{"use strict";_();te();Er();nn();W();q();Yn();Ue();pl=new Set(["comment","include","arg","template","magic-word"]),ul=[!1,!0].map(a=>{let n=a?"includeonly":"noinclude";return new RegExp(String.raw`^(?:<${n}(?:\s[^>]*)?/?>|</${n}\s*>)$`,"iu")}),Jn=class extends v{constructor(e,t,r,i,s=[]){if(typeof t=="boolean"){let o=Symbol("InputboxToken"),{length:l}=s;s.push(o),e&&(e=xt(e,i,s,t)),e&&(e=Rr(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`;return new We(l,g,u,d,i,!1,s),p}));e&&(e=e.replace(/(^|\0\d+.\x7F)([^\0]+)(?=$|\0\d+.\x7F)/gu,(o,l,g)=>(new z(g,i,s),`${l}\0${s.length}n`)));super(e,i,s);T(this,Pr);T(this,er);y(this,Pr,[...r]),y(this,er,t)}get type(){return"ext-inner"}lint(e=this.getAbsoluteIndex(),t){let r=new R(this,e),i=typeof c(this,er)=="boolean"?ul[c(this,er)?1:0]:/^<!--[\s\S]*-->$/u;return[...super.lint(e,t),...this.childNodes.filter(s=>{let{type:o,name:l}=s;if(o==="ext")return!c(this,Pr).includes(l);if(pl.has(o))return!1;let g=s.toString().trim();return g&&!i.test(g)}).map(s=>{let o=$(s,r,"no-ignored",w.msg("invalid content in <$1>",this.name));return o.suggestions=[{desc:"remove",range:[o.startIndex,o.endIndex],text:""},{desc:"comment",range:[o.startIndex,o.endIndex],text:`<!--${s.toString()}-->`}],o})]}};Pr=new WeakMap,er=new WeakMap});function eo(a,n,e,t,r){n=ie(n).trim();let i=n.replace(a==="link"?/\0\d+[tq]\x7F/gu:/\0\d+t\x7F/gu,"").trim();switch(a){case"width":return!i&&!!n||/^(?:\d+x?|\d*x\d+)(?:\s*px)?$/u.test(i);case"link":{if(i){if(cl(e.protocol).test(i))return hl(e.protocol).test(i)&&n;i.startsWith("[[")&&i.endsWith("]]")&&(i=i.slice(2,-2))}else return n;let s=w.normalizeTitle(i,0,!1,e,{halfParsed:t,decode:!0,selfLink:!0});return s.valid&&s}case"lang":return(r==="svg"||r==="svgz")&&!/[^a-z\d-]/u.test(i);case"alt":case"class":case"manualthumb":return!0;case"page":return(r==="djvu"||r==="djv"||r==="pdf")&&Number(i)>0;default:return!!i&&!isNaN(i)}}var cl,hl,ml,fl,ce,ln,to,an,ro=k(()=>{"use strict";jt();ee();_();W();q();cl=$e(a=>new RegExp(String.raw`^(?:${a}|//|\0\d+m\x7F)`,"iu")),hl=$e(a=>new RegExp(String.raw`^(?:(?:${a}|//)${je}|\0\d+m\x7F)${Be}$`,"iu")),ml=$e(a=>new RegExp(String.raw`^(\s*(?!\s))${a.replace("$1","(.*)")}${a.endsWith("$1")?`(?=$|
11
+ )`:""}(\s*)$`,"u")),fl=new Set(["alt","link","lang","page","caption"]);an=class extends v{constructor(e,t,r,i){var n=(...Cu)=>(super(...Cu),T(this,ln),T(this,ce,""),this);let s,o=Object.entries(r.img).map(([g,u])=>[g,u,ml(g)]),l=o.find(([,g,u])=>(s=u.exec(e),s&&(s.length!==4||eo(g,s[2],r,!0,t)!==!1)));if(l&&s){s.length===3?(n(void 0,r,i),y(this,ce,e)):(n(s[2],r,i,{}),y(this,ce,s[1]+l[0]+s[3])),this.setAttribute("name",l[1]);return}n(e,r.excludes.includes("list")?r:{...r,excludes:[...r.excludes,"list"]},i),this.setAttribute("name","caption"),this.setAttribute("stage",7)}get type(){return"image-parameter"}get link(){return this.name==="link"?eo("link",super.text(),this.getAttribute("config")):void 0}afterBuild(){var e;((e=this.parentNode)==null?void 0:e.type)==="gallery-image"&&!fl.has(this.name)&&this.setAttribute("name","invalid"),super.afterBuild()}toString(e){return c(this,ce)?c(this,ce).replace("$1",super.toString(e)):super.toString(e)}text(){return c(this,ce)?c(this,ce).replace("$1",super.text()).trim():super.text().trim()}isPlain(){return this.name==="caption"}getAttribute(e){return e==="padding"?Math.max(0,c(this,ce).indexOf("$1")):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{link:i,name:s}=this;if(s==="invalid"){let o=L(this,{start:e},"invalid-gallery","invalid image parameter");o.fix={range:[e-1,o.endIndex],text:"",desc:"remove"},r.push(o)}else if(typeof i=="object"&&i.encoded){let o=L(this,{start:e},"url-encoding","unnecessary URL encoding in an internal link");o.suggestions=[{desc:"decode",range:[e,o.endIndex],text:Je(this.text())}],r.push(o)}return r}getValue(){return this.name==="invalid"?this.text():N(this,ln,to).call(this)||super.text()}print(){return c(this,ce)?`<span class="wpb-image-parameter">${c(this,ce).replace("$1",`<span class="wpb-image-caption">${qe(this.childNodes)}</span>`)}</span>`:super.print({class:"image-caption"})}};ce=new WeakMap,ln=new WeakSet,to=function(){return c(this,ce)&&!c(this,ce).includes("$1")}});var no,xl,bl,io,so,Tl,yl,oo,tr,Zn=k(()=>{"use strict";_();te();W();Cr();ro();no=new Map([["manualthumb","Thumb"],["frameless","Frameless"],["framed","Frame"],["thumbnail","Thumb"]]),xl=new Set(["arg"]),bl=new Set(["template","magic-word"]),io=new Set(["left","right","center","none"]),so=new Set(["baseline","sub","super","top","text-top","middle","bottom","text-bottom"]),Tl=new Set(["tiff","tif","png","gif","jpg","jpeg","webp","xcf","pdf","svg","djvu"]),yl=a=>{if(a===void 0)return[];let n=/-\{|\}-|\|/gu,e=[],t=n.exec(a),r=0,i=0;for(;t;){let{0:s,index:o}=t;s!=="|"?r+=s==="-{"?1:-1:r===0&&(e.push(a.slice(i,o)),{lastIndex:i}=n),t=n.exec(a)}return e.push(a.slice(i)),e},oo=(a,n)=>a.filter(({childNodes:e})=>{let t=e.filter(r=>r.text().trim());return t.length!==1||!n.has(t[0].type)}),tr=class extends me{get type(){return"file"}get extension(){return this.getAttribute("title").extension}constructor(n,e,t,r=[],i="|"){super(n,void 0,t,r,i);let{extension:s}=this.getTitle(!0,!0);this.safeAppend(yl(e).map(o=>new an(o,s,t,r)))}lint(n=this.getAbsoluteIndex(),e){var f;let t=super.lint(n,e),r=oo(this.getAllArgs(),xl),i=[...new Set(r.map(({name:h})=>h))],s=i.filter(h=>no.has(h)),o=i.filter(h=>io.has(h)),l=i.filter(h=>so.has(h)),[g]=s,u=g==="framed"||g==="manualthumb",d=new R(this,n);if(this.closest("ext-link-text")&&((f=this.getValue("link"))==null?void 0:f.trim())!==""&&t.push(L(this,d,"nested-link","internal link in an external link")),u)for(let h of r.filter(({name:x})=>x==="width")){let x=$(h,d,"invalid-gallery","invalid image parameter");x.fix={range:[x.startIndex-1,x.endIndex],text:"",desc:"remove"},t.push(x)}if(r.length===i.length&&s.length<2&&o.length<2&&l.length<2)return t;let p=(h,x,b=!0)=>S=>{let C=typeof b=="function"?b(S):b,A=$(S,d,"no-duplicate",w.msg(`${h} image $1 parameter`,x),C?"error":"warning");return A.suggestions=[{desc:"remove",range:[A.startIndex-1,A.endIndex],text:""}],A},{extension:m}=this;for(let h of i){if(h==="invalid"||h==="width"&&u)continue;let x=h==="caption",b=r.filter(({name:S})=>S===h);if(x&&(b=[...b.slice(0,-1).filter(S=>S.text()),...b.slice(-1)]),b.length>1){let S=!x||!m||Tl.has(m);if(x&&S){let C=oo(b,bl);S=C.length>1&&(A=>C.includes(A))}t.push(...b.map(p("duplicated",h,S)))}}return s.length>1&&t.push(...r.filter(({name:h})=>no.has(h)).map(p("conflicting","frame"))),o.length>1&&t.push(...r.filter(({name:h})=>io.has(h)).map(p("conflicting","horizontal-alignment"))),l.length>1&&t.push(...r.filter(({name:h})=>so.has(h)).map(p("conflicting","vertical-alignment"))),t}getAllArgs(){return this.childNodes.slice(1)}getArgs(n){return this.getAllArgs().filter(({name:e})=>n===e)}getArg(n){let e=this.getArgs(n);return e[n==="manualthumb"?0:e.length-1]}getValue(n){var e;return(e=this.getArg(n))==null?void 0:e.getValue()}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e),{extension:r}=this;return r&&(t.extension=r),t}}});var ao,ei,kl,De,ti=k(()=>{"use strict";_();_e();q();Zn();ao=[ge("")];De=class extends(kl=tr){constructor(e,t,r,i,s=[]){let o;if(r!==void 0){let{length:l}=s;o=new v(r,i,s);for(let g=1;g<11;g++)o.parseOnce();s.splice(l,1)}super(t,o==null?void 0:o.toString(),i,s);le(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,{halfParsed:!0,temporary:e,decode:!t})}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{ns:i}=this.getAttribute("title");if(i!==6){let s=L(this,{start:e},"invalid-gallery","invalid gallery image");s.suggestions=[{desc:"prefix",range:[e,e],text:"File:"}],r.push(s)}return r}};ei=P(kl),De=B(ei,0,"GalleryImageToken",ao,De),j(ei,1,De)});var po={};J(po,{GalleryToken:()=>rr});var lo,At,go,ni,ri,vl,rr,uo=k(()=>{"use strict";en();W();q();ti();Ue();lo=[Qt];rr=class extends(vl=v){constructor(e,t,r=[]){var i;super(void 0,t,r,{});T(this,At);for(let s of(i=e==null?void 0:e.split(`
12
+ `))!=null?i:[]){let o=/^([^|]+)(?:\|(.*))?/u.exec(s);if(!o){super.insertAt(s.trim()?new z(s,t,r):s);continue}let[,l,g]=o;N(this,At,go).call(this,l)?super.insertAt(new De("gallery",l,g,t,r)):super.insertAt(new z(s,t,r))}}get type(){return"ext-inner"}get widths(){return N(this,At,ni).call(this,"widths")}get heights(){return N(this,At,ni).call(this,"heights")}lint(e=this.getAbsoluteIndex(),t){let{top:r,left:i}=this.getRootNode().posFromIndex(e),s=[];for(let o=0;o<this.length;o++){let l=this.childNodes[o],g=l.toString(),{length:u}=g,d=g.trim(),{type:p}=l,m=r+o,f=o?0:i;if(l.setAttribute("aIndex",e),p==="noinclude"&&d&&!/^<!--.*-->$/u.test(d)){let h=e+u;s.push({rule:"no-ignored",message:w.msg("invalid content in <$1>","gallery"),severity:d.endsWith("-->")||/^(?:\||<!--)/u.test(d)?"warning":"error",startIndex:e,endIndex:h,startLine:m,endLine:m,startCol:f,endCol:f+u,suggestions:[{desc:"remove",range:[e,h],text:""},{desc:"comment",range:[e,h],text:`<!--${g}-->`}]})}else if(p!=="noinclude"&&p!=="text"){let h=l.lint(e,t);h.length>0&&s.push(...h)}e+=u+1}return s}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return Object.assign(r,{widths:this.widths,heights:this.heights}),r}};ri=P(vl),At=new WeakSet,go=function(e){return this.normalizeTitle(e,6,{halfParsed:!0,temporary:!0,decode:!0}).valid},ni=function(e){var i,s;let t=(i=this.parentNode)==null?void 0:i.getAttr(e),r=typeof t=="string"&&((s=/^(\d+)\s*(?:px)?$/u.exec(t))==null?void 0:s[1]);return r&&Number(r)||120},rr=B(ri,0,"GalleryToken",lo,rr),j(ri,1,rr)});var nr,ii=k(()=>{"use strict";_();Cr();nr=class extends me{get type(){return"link"}lint(n=this.getAbsoluteIndex(),e){let t=super.lint(n,e);return this.closest("ext-link-text")&&t.push(L(this,{start:n},"nested-link","internal link in an external link")),t}}});var Al,Sl,jr,He,dn=k(()=>{"use strict";_();ee();te();W();q();Al=String.raw`(?:[${ke}\t]|&nbsp;|&#0*160;|&#[xX]0*[aA]0;)`,Sl=new RegExp(`${Al}+`,"gu"),He=class extends v{constructor(e,t="free-ext-link",r=w.getConfig(),i){super(e,r,i,{});T(this,jr);y(this,jr,t)}get type(){return c(this,jr)}get innerText(){let e=new Map([["!","|"],["=","="]]),t=xe(this.childNodes.map(r=>{let{type:i}=r,s=String(r.name);return i==="magic-word"&&e.has(s)?e.get(s):r}));return this.type==="magic-link"&&(t=t.replace(Sl," ")),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 r=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(m=>m==="X"?10:Number(m));(p.length===10&&p.reduce((m,f,h)=>m+f*(10-h),0)%11||p.length===13&&(p[12]===10||p.reduce((m,f,h)=>m+f*(h%2?3:1),0)%10))&&r.push(L(this,i,"invalid-isbn","invalid ISBN"))}return r}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=$(u,i,"unterminated-url",w.msg("$1 in URL",l?'"|"':"full-width punctuation"),"warning"),{index:m,0:f}=g.exec(d),h=p.startIndex+m;p.suggestions=l?[{desc:"whitespace",range:[h,h+1],text:" "}]:[{desc:"whitespace",range:[h,h],text:" "},{desc:"escape",range:[h,h+f.length],text:encodeURI(f)}],r.push(p)}return r}getUrl(e){}};jr=new WeakMap});var co,Ge,si,wl,Ve,oi=k(()=>{"use strict";_();_e();q();dn();co=[ge("[")];Ve=class extends(wl=v){constructor(e,t="",r="",i,s=[]){super(void 0,i,s,{});T(this,Ge);let o=e&&/^\0\d+f\x7F$/u.test(e)?s[Number(e.slice(1,-2))]:new He(e,"ext-link-url",i,s);if(this.insertAt(o),y(this,Ge,t),r){let l=new v(r,i,s,{});l.type="ext-link-text",l.setAttribute("stage",10),this.insertAt(l)}}get type(){return"ext-link"}toString(e){return this.length===1?`[${super.toString(e)}${c(this,Ge)}]`:`[${super.toString(e,c(this,Ge))}]`}text(){return`[${super.text(" ")}]`}getGaps(){return c(this,Ge).length}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t);return this.length===1&&this.closest("heading-title")&&r.push(L(this,{start:e},"var-anchor","variable anchor in a section header")),r}print(){return super.print(this.length===1?{pre:"[",post:`${c(this,Ge)}]`}:{pre:"[",sep:c(this,Ge),post:"]"})}};si=P(wl),Ge=new WeakMap,Ve=B(si,0,"ExtLinkToken",co,Ve),j(si,1,Ve)});var Br,ho=k(()=>{"use strict";q();Ue();ii();oi();Br=class extends v{get type(){return"imagemap-link"}constructor(n,e,t,r,i=[]){super(void 0,r,i),this.append(n,e.length===2?new nr(...e,r,i):new Ve(...e,r,i),new z(t,r,i))}}});var fo={};J(fo,{ImagemapToken:()=>ir});var mo,ai,Cl,ir,xo=k(()=>{"use strict";_();de();te();en();W();q();Ue();ti();ho();mo=[Qt];ir=class extends(Cl=v){get type(){return"ext-inner"}get image(){return this.childNodes.find(Yt("imagemap-image"))}constructor(n,e=w.getConfig(),t=[]){if(super(void 0,e,t,{}),!n)return;let r=n.split(`
13
+ `),i=new Set(e.protocol.split("|")),s=z,o=!0,l=!1;for(let g of r){let u=g.trim();if(!(l||!u||u.startsWith("#"))){if(o){let d=g.indexOf("|"),p=d===-1?g:g.slice(0,d),{valid:m,ns:f}=this.normalizeTitle(p,0,{halfParsed:!0,temporary:!0});if(m&&f===6){let h=new De("imagemap",p,d===-1?void 0:g.slice(d+1),e,t);super.insertAt(h),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),m=/^\[\[([^|]+)(?:\|([^\]]*))?\]\][\w\s]*$/u.exec(p);if(m){if(this.normalizeTitle(m[1],0,{halfParsed:!0,temporary:!0,selfLink:!0}).valid){super.insertAt(new Br(g.slice(0,d),m.slice(1),p.slice(p.indexOf("]]")+2),e,t));continue}}else if(p.startsWith("[//")||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))}}lint(n=this.getAbsoluteIndex(),e){let t=super.lint(n,e),r=new R(this,n);return this.image?t.push(...this.childNodes.filter(i=>{let s=i.toString().trim();return i.type==="noinclude"&&s&&!s.startsWith("#")}).map(i=>{let s=$(i,r,"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(L(this,r,"invalid-imagemap","<imagemap> without an image")),t}};ai=P(Cl),ir=B(ai,0,"ImagemapToken",mo,ir),j(ai,1,ir)});var bo,li,$l,Xe,di=k(()=>{"use strict";_();pt();_e();W();Ze();bo=[be(!1),ge("<!--")];Xe=class extends($l=pe){constructor(e,t,r,i){super(e,r,i);le(this,"closed");this.closed=t}get type(){return"comment"}lint(e=this.getAbsoluteIndex()){if(this.closed)return[];let t=L(this,{start:e},"unclosed-comment",w.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;":""})}};li=P($l),Xe=B(li,0,"CommentToken",bo,Xe),j(li,1,Xe)});var To={};J(To,{CommentedToken:()=>gi});var gi,yo=k(()=>{"use strict";q();di();gi=class extends v{get type(){return"ext-inner"}constructor(n,e,t=[]){if(super(void 0,e,t,{AstText:":",CommentToken:":"}),n){let r=n.indexOf("<!--"),i=r!==-1&&n.indexOf("-->",r+4),s=0;for(;i!==!1&&i!==-1;)r>s&&this.insertAt(n.slice(s,r)),this.insertAt(new Xe(n.slice(r+4,i),!0,e,t)),s=i+3,r=n.indexOf("<!--",s),i=r!==-1&&n.indexOf("-->",r+4);s<n.length&&this.insertAt(n.slice(s))}}lint(n=this.getAbsoluteIndex()){return super.lint(n,/<\s*(?:\/\s*)?(hiero)\b/giu)}}});var ko={};J(ko,{NowikiToken:()=>pi});var Nl,Il,pi,vo=k(()=>{"use strict";jt();_();W();Ze();Nl=$e(a=>new RegExp(String.raw`<\s*(?:/\s*)${a==="nowiki"?"":"?"}(${a})\b`,"giu")),Il=new Set(["templatestyles","section","languages"]),pi=class extends pe{get type(){return"ext-inner"}lint(n=this.getAbsoluteIndex()){let{name:e,firstChild:{data:t}}=this;if(Il.has(e)&&t){let r=L(this,{start:n},"void-ext",w.msg("nothing should be in <$1>",e));return r.fix={range:[n,r.endIndex],text:"",desc:"empty"},[r]}return super.lint(n,Nl(e))}}});var Ao,ui,El,We,Yn=k(()=>{"use strict";_();te();W();Jr();q();Xr();Zr();Ao=[Ht()];We=class extends(El=we){get type(){return"ext"}constructor(n,e,t,r,i=w.getConfig(),s=!1,o=[]){let l=n.toLowerCase(),g=new nt(!e||/^\s/u.test(e)?e:` ${e}`,"ext-attrs",l,i,o),u={...i,ext:i.ext.filter(p=>p!==l),excludes:[...i.excludes]},d;switch(u.inExt=!0,l){case"tab":u.ext=u.ext.filter(p=>p!=="tabs");case"indicator":case"poem":case"ref":case"option":case"combooption":case"tabs":case"poll":case"seo":case"langconvert":case"phonos":l==="poem"&&u.excludes.push("heading"),d=new v(t,u,o);break;case"pre":{let{PreToken:p}=(Ps(),U(Rs));d=new p(t,u,o);break}case"dynamicpagelist":{let{ParamTagToken:p}=(Un(),U(Bs));d=new p(s,t,u,o);break}case"inputbox":{let{InputboxToken:p}=(Zs(),U(Ys));d=new p(s,t,u,o);break}case"references":{let{NestedToken:p}=(on(),U(sn));u.excludes.push("heading"),d=new p(t,s,["ref"],u,o);break}case"choose":{let{NestedToken:p}=(on(),U(sn));d=new p(t,/<(option|choicetemplate)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(\1)>)/gu,["option","choicetemplate"],u,o);break}case"combobox":{let{NestedToken:p}=(on(),U(sn));d=new p(t,/<(combooption)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(combooption\s*)>)/giu,["combooption"],u,o);break}case"gallery":{let{GalleryToken:p}=(uo(),U(po));d=new p(t,u,o);break}case"imagemap":{let{ImagemapToken:p}=(xo(),U(fo));d=new p(t,u,o);break}case"hiero":{let{CommentedToken:p}=(yo(),U(To));d=new p(t,u,o);break}default:{let{NowikiToken:p}=(vo(),U(ko));d=new p(t,u,o)}}d.setAttribute("name",l),d.type==="plain"&&(d.type="ext-inner"),super(n,g,d,r,i,o),this.seal("closed",!0)}lint(n=this.getAbsoluteIndex(),e){let t=super.lint(n,e),r=new R(this,n);return this.name!=="nowiki"&&this.closest("html-attrs,table-attrs")&&t.push(L(this,r,"parsing-order","extension tag in HTML tag attributes")),this.name==="ref"&&this.closest("heading-title")&&t.push(L(this,r,"var-anchor","variable anchor in a section header")),t}};ui=P(El),We=B(ui,0,"ExtToken",Ao,We),j(ui,1,We)});var Co={};J(Co,{parseCommentAndExt:()=>xt});var wo,Ll,ci,Fl,So,xt,Er=k(()=>{"use strict";jt();ee();us();Ue();ms();xs();Yn();di();wo="<onlyinclude>",Ll="</onlyinclude>",{length:ci}=wo,Fl=[!1,!0].map(a=>{let n=a?"includeonly":"(?:no|only)include",e=a?"noinclude":"includeonly";return $e(t=>new RegExp(String.raw`<!--[\s\S]*?(?:-->|$)|<${n}(?:\s[^>]*)?/?>|</${n}\s*>|<(${t.join("|")})(\s[^>]*?)?(?:/>|>([\s\S]*?)</(\1\s*)>)|<(${e})(\s[^>]*?)?(?:/>|>([\s\S]*?)(?:</(${e}\s*)>|$))`,"giu"))}),So=a=>{let n=a.indexOf(wo);return{i:n,j:a.indexOf(Ll,n+ci)}},xt=(a,n,e,t)=>{if(t){let{i:o,j:l}=So(a);if(o!==-1&&l!==-1){let g="",u=d=>{new z(d,n,e),g+=`\0${e.length-1}n`};for(;o!==-1&&l!==-1;){let d=`\0${e.length}e`;new mt(a.slice(o+ci,l),n,e),o>0&&u(a.slice(0,o)),g+=d,a=a.slice(l+ci+1),{i:o,j:l}=So(a)}return a&&u(a),g}}let{ext:r}=n,i=r.filter(o=>o!=="translate"&&o!=="tvar"),s={...n,ext:i};if(r.includes("translate")){let o=[];a=a.replace(/<nowiki>[\s\S]*?<\/nowiki>/giu,l=>(o.push(l),`\0${o.length-1}`)).replace(/<translate( nowrap)?>([\s\S]+?)?<\/translate>/gu,(l,g,u)=>{let d=e.length;return new Qr(g,u&&Ne(u,o),s,e),`\0${d}g`}),a=Ne(a,o)}return a.replace(Fl[t?1:0](i),(o,l,g,u,d,p,m,f,h)=>{let x=e.length,b="n";if(l)b="e",new We(l,g,u,d,s,p,e);else if(o.startsWith("<!--")){b="c";let S=o.endsWith("-->");new Xe(o.slice(4,S?-3:void 0),S,n,e)}else p?new ft(p,m,f,h,n,e):new z(o,n,e);return`\0${x}${b}`})}});var Rl,Pl,jl,$o,sr,Fe,at,Qe,hi,Bl,St,No=k(()=>{"use strict";_();de();te();Jr();q();W();Rl=new Set(["if","ifeq","ifexpr","ifexist","iferror","switch"]),Pl=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"]),jl=new Set(["strike","big","center","font","tt"]);$o=[Ht()];St=class extends(Bl=v){constructor(e,t,r,i,s,o){super(void 0,s,o);T(this,sr);T(this,Fe);T(this,at);T(this,Qe);this.insertAt(t),this.setAttribute("name",e.toLowerCase()),y(this,sr,r),y(this,Fe,i),y(this,at,e)}get type(){return"html"}get selfClosing(){return c(this,Fe)}get closing(){return c(this,sr)}toString(e){return`<${this.closing?"/":""}${c(this,at)}${super.toString(e)}${c(this,Fe)?"/":""}>`}text(){let{closing:e}=this,t=c(this,at)+(e?"":super.text());return`<${e?"/":""}${t}${c(this,Fe)?"/":""}>`}getAttribute(e){return e==="padding"?c(this,at).length+(this.closing?2:1):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{name:i,parentNode:s,closing:o,selfClosing:l}=this,g=new R(this,e);if(i==="h1"&&!o){let h=L(this,g,"h1","<h1>");h.suggestions=[{desc:"h2",range:[e+2,e+3],text:"2"}],r.push(h)}if(this.closest("table-attrs")){let h=L(this,g,"parsing-order","HTML tag in table attributes");h.fix={desc:"remove",range:[e,h.endIndex],text:""},r.push(h)}jl.has(i)&&r.push(L(this,g,"obsolete-tag","obsolete HTML tag","warning")),(i==="b"||i==="strong")&&this.closest("heading-title")&&r.push(L(this,g,"bold-header","bold in section header","warning"));let{html:[,u,d]}=this.getAttribute("config"),p=d.includes(i),m=u.includes(i);if(o&&(l||p)||l&&(!p&&!m)){let h=L(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:""},b={desc:"no self-closing",range:[h.endIndex-2,h.endIndex-1],text:""};m?h.suggestions=[x,b]:o?h.fix=p?x:b:h.suggestions=[b,{desc:"close",range:[h.endIndex-2,h.endIndex],text:`></${i}>`}],r.push(h)}else if(!this.findMatchingTag()){let h=L(this,g,"unmatched-tag",o?"unmatched closing tag":"unclosed tag");if(o){let x=this.closest("magic-word");x&&Rl.has(x.name)?h.severity="warning":h.suggestions=[{desc:"remove",range:[e,h.endIndex],text:""}]}else{let x=s==null?void 0:s.childNodes;Pl.has(i)&&(x!=null&&x.slice(0,x.indexOf(this)).some(({type:b,name:S})=>b==="html"&&S===i))?h.suggestions=[{desc:"close",range:[e+1,e+1],text:"/"}]:this.closest("heading-title")||(h.severity="warning")}r.push(h)}return r}findMatchingTag(){return ve(c(this,Qe),()=>{let{name:e,parentNode:t,closing:r,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=r?u.slice(0,d).reverse():u.slice(d+1),m=[this],{rev:f}=se;for(let h of p)if(!(!h.is("html")||h.name!==e||g&&c(h,Fe)))if(c(h,sr)===r)m.push(h);else{let x=m.pop();if(x===this)return h;w.viewOnly&&(y(x,Qe,[f,h]),y(h,Qe,[f,x]))}if(w.viewOnly)for(let h of m)y(h,Qe,[f,void 0])},e=>{y(this,Qe,e),e[1]&&e[1]!==this&&y(e[1],Qe,[se.rev,this])})}print(){return super.print({pre:`&lt;${this.closing?"/":""}${c(this,at)}`,post:`${c(this,Fe)?"/":""}&gt;`})}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return Object.assign(r,{closing:this.closing,selfClosing:c(this,Fe)}),r}};hi=P(Bl),sr=new WeakMap,Fe=new WeakMap,at=new WeakMap,Qe=new WeakMap,St=B(hi,0,"HtmlToken",$o,St),j(hi,1,St)});var Io={};J(Io,{parseHtml:()=>ql});var Ol,ql,Eo=k(()=>{"use strict";Zr();No();Ol=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,ql=(a,n,e)=>{var s;let{html:t}=n;(s=n.htmlElements)!=null||(n.htmlElements=new Set([...t[0],...t[1],...t[2]]));let r=a.split("<"),i=r.shift();for(let o of r){let l=Ol.exec(o),g=l==null?void 0:l[2],u=g==null?void 0:g.toLowerCase();if(!l||!n.htmlElements.has(u)){i+=`<${o}`;continue}let[,d,,p="",m,f]=l,{length:h}=e,x=new nt(p,"html-attrs",u,n,e),b=x.getAttr("itemprop");if(u==="meta"&&(b===void 0||x.getAttr("content")===void 0)||u==="link"&&(b===void 0||x.getAttr("href")===void 0)){i+=`<${o}`,e.length=h;continue}i+=`\0${e.length}x${f}`,new St(g,x,d==="/",m==="/>",n,e)}return i}});var or,mi=k(()=>{"use strict";Jr();q();ut();Zr();or=class extends Ht(1)(v){constructor(n,e,t,r,i,s=[],o){super(void 0,i,s,o),this.append(new ue(e,"table-syntax",i,s),new nt(r,"table-attrs",t,i,s))}}});var Te,Or,qr,fi,ar,xi=k(()=>{"use strict";_();te();q();mi();ar=class extends or{constructor(e,t,r,i=[]){var g;let s=/\||\0\d+!\x7F/u.exec(t!=null?t:""),o=s?t.slice(0,s.index):"";/\[\[|-\{/u.test(o)&&(s=null,o="");super(/^(?:\n[^\S\n]*(?:[|!]|\|\+|\{\{\s*!\s*\}\}\+?)|(?:\||\{\{\s*!\s*\}\}){2}|!!|\{\{\s*!!\s*\}\})$/u,e,"td",o,r,i);T(this,qr);T(this,Te,"");T(this,Or);s&&([Wr(this,Te)._]=s);let l=new v(t==null?void 0:t.slice(((g=s==null?void 0:s.index)!=null?g:NaN)+c(this,Te).length),r,i);l.type="td-inner",l.setAttribute("stage",4),this.insertAt(l)}get type(){return"td"}get rowspan(){return this.getAttr("rowspan")}get colspan(){return this.getAttr("colspan")}get subtype(){return N(this,qr,fi).call(this).subtype}afterBuild(){c(this,Te).includes("\0")&&y(this,Te,this.buildFromStr(c(this,Te),0)),super.afterBuild()}toString(e){let{childNodes:[t,r,i]}=this;return t.toString(e)+r.toString(e)+c(this,Te)+i.toString(e)}text(){let{childNodes:[e,t,r]}=this;return e.text()+t.text()+c(this,Te)+r.text()}getGaps(e){return e===1?c(this,Te).length:0}lint(e=this.getAbsoluteIndex(),t){let r=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=$(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,`
14
14
  ${u}`),desc:"newline"}}else g.suggestions=[{desc:"escape",range:[g.startIndex,g.endIndex],text:o.replace(/\|/gu,"&#124;")}];r.push(g)}}return r}isIndependent(){return this.firstChild.text().startsWith(`
15
- `)}getAttr(e){let t=super.getAttr(e);return e==="rowspan"||e==="colspan"?parseInt(t)||1:t}print(){let{childNodes:[e,t,r]}=this;return`<span class="wpb-td">${e.print()}${t.print()}${c(this,Te)}${r.print()}</span>`}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t),{rowspan:i,colspan:s}=this;return Object.assign(r,{subtype:this.subtype},i!==1&&{rowspan:i},s!==1&&{colspan:s}),r}};Te=new WeakMap,qr=new WeakMap,Or=new WeakSet,fi=function(){return ve(c(this,qr),()=>{var o;let e=this.firstChild.text(),t=e.slice(-1),r="td";if(t==="!"?r="th":t==="+"&&(r="caption"),this.isIndependent())return{subtype:r};let{previousSibling:i}=this;return{...N(o=i,Or,fi).call(o)}},e=>{y(this,qr,e)})}});var jl,Bl,bi,lr,Ti=k(()=>{"use strict";_();mi();xi();jl=new Set(["tr","td","th","caption"]),Bl=new Set(["Template:!!","Template:!-"]),bi=a=>{let n=a.childNodes.find(e=>e.text().trim());if(!n||n.type==="text"&&n.data.trim().startsWith("!")||n.type==="magic-word"&&n.name==="!"||n.type==="template"&&Bl.has(n.name)||n.is("html")&&jl.has(n.name))return!1;if(n.is("arg"))return n.length>1&&bi(n.childNodes[1]);if(n.is("magic-word"))try{let e=n.getPossibleValues().map(bi);return e.includes("error")?"error":e.includes("warning")&&"warning"}catch{}return n.type==="template"||n.type==="magic-word"&&n.name==="invoke"?"warning":"error"},lr=class extends or{lint(n=this.getAbsoluteIndex(),e){let t=super.lint(n,e),r=this.childNodes.find(({type:o})=>o==="table-inter");if(!r)return t;let i=bi(r);if(!i)return t;let s=C(r,{start:n},"fostered-content","content to be moved out from the table",i);return s.startIndex++,s.startLine++,s.startCol=0,t.push(s),t}getRowCount(){return Number(this.childNodes.some(n=>n instanceof ar&&n.isIndependent()&&!n.firstChild.text().endsWith("+")))}}});var ql,Ol,yi,gn,Io=k(()=>{"use strict";_();le();te();V();Ti();ut();ql=(a,n)=>new Array(a).fill(void 0).map((e,t)=>n(t)),Ol=({type:a})=>a==="tr"||a==="table-syntax",yi=class extends Array{},gn=class extends lr{get type(){return"table"}get closed(){return this.lastChild.type==="table-syntax"}constructor(n,e,t,r){super(/^(?:\{\||\{\{\{\s*!\s*\}\}|\{\{\s*\(!\s*\}\})$/u,n,"table",e,t,r,{})}lint(n=this.getAbsoluteIndex(),e){let t=super.lint(n,e),r=new R(this,n);this.closed||t.push(C(this.firstChild,r,"unclosed-table",$.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),r,"table-layout","inconsistent table layout","warning");u.startIndex++,u.startLine++,u.startCol=0,t.push(u)}}return t}close(n=`
16
- |}`,e){let t=this.getAttribute("config"),r=this.getAttribute("accum"),i=[n];pe.run(()=>{let s=new ue(void 0,"table-syntax",t,r);super.insertAt(s)}),this.lastChild.safeReplaceChildren(i)}getLayout(n){let e=this.getAllRows(),{length:t}=e,r=yi.from(ql(t,()=>[]));for(let i=0;i<r.length;i++){let s=r[i],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:m}=u;for(o++;s[l];)l++;for(let f=i;f<Math.min(i+p,t);f++)for(let h=l;h<l+m;h++)r[f][h]=d;l+=m}}else if(Ol(u))break}return r}getAllRows(){return[...super.getRowCount()?[this]:[],...this.childNodes.slice(1).filter(n=>n.type==="tr"&&n.getRowCount()>0)]}getNthRow(n,e,t){let r=super.getRowCount();if(n===0&&r)return this;r&&n--;for(let i of this.childNodes.slice(2)){let{type:s}=i;if(s==="tr"&&i.getRowCount()&&(n--,n<0))return i}}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return t.closed=this.closed,t}}});var pn,Eo=k(()=>{"use strict";Ti();pn=class extends lr{get type(){return"tr"}constructor(n,e,t,r){super(/^\n[^\S\n]*(?:\|-+|\{\{\s*!\s*\}\}-+|\{\{\s*!-\s*\}\}-*)$/u,n,"tr",e,t,r)}}});var dr,ki=k(()=>{"use strict";Ze();dr=class extends ge{get indent(){return this.innerText.split(":").length-1}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e),{indent:r}=this;return r&&(t.indent=r),t}}});var gr,vi=k(()=>{"use strict";ki();gr=class extends dr{get type(){return"dd"}}});var Fo={};J(Fo,{parseTable:()=>Ml});var _l,Lo,Ml,Ro=k(()=>{"use strict";O();Io();Eo();xi();vi();_l=a=>a.lastChild.constructor!==v,Lo=(a,n)=>a.type==="td"?n.pop():a,Ml=({firstChild:{data:a},type:n,name:e},t,r)=>{let i=[],s=a.split(`
15
+ `)}getAttr(e){let t=super.getAttr(e);return e==="rowspan"||e==="colspan"?parseInt(t)||1:t}print(){let{childNodes:[e,t,r]}=this;return`<span class="wpb-td">${e.print()}${t.print()}${c(this,Te)}${r.print()}</span>`}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t),{rowspan:i,colspan:s}=this;return Object.assign(r,{subtype:this.subtype},i!==1&&{rowspan:i},s!==1&&{colspan:s}),r}};Te=new WeakMap,Or=new WeakMap,qr=new WeakSet,fi=function(){return ve(c(this,Or),()=>{var o;let e=this.firstChild.text(),t=e.slice(-1),r="td";if(t==="!"?r="th":t==="+"&&(r="caption"),this.isIndependent())return{subtype:r};let{previousSibling:i}=this;return{...N(o=i,qr,fi).call(o)}},e=>{y(this,Or,e)})}});var _l,Ml,bi,lr,Ti=k(()=>{"use strict";_();mi();xi();_l=new Set(["tr","td","th","caption"]),Ml=new Set(["Template:!!","Template:!-"]),bi=a=>{let n=a.childNodes.find(e=>e.text().trim());if(!n||n.type==="text"&&n.data.trim().startsWith("!")||n.type==="magic-word"&&n.name==="!"||n.type==="template"&&Ml.has(n.name)||n.is("html")&&_l.has(n.name))return!1;if(n.is("arg"))return n.length>1&&bi(n.childNodes[1]);if(n.is("magic-word"))try{let e=n.getPossibleValues().map(bi);return e.includes("error")?"error":e.includes("warning")&&"warning"}catch{}return n.type==="template"||n.type==="magic-word"&&n.name==="invoke"?"warning":"error"},lr=class extends or{lint(n=this.getAbsoluteIndex(),e){let t=super.lint(n,e),r=this.childNodes.find(({type:o})=>o==="table-inter");if(!r)return t;let i=bi(r);if(!i)return t;let s=$(r,{start:n},"fostered-content","content to be moved out from the table",i);return s.startIndex++,s.startLine++,s.startCol=0,t.push(s),t}getRowCount(){return Number(this.childNodes.some(n=>n instanceof ar&&n.isIndependent()&&!n.firstChild.text().endsWith("+")))}}});var zl,Ul,yi,gn,Lo=k(()=>{"use strict";_();de();te();W();Ti();ut();zl=(a,n)=>new Array(a).fill(void 0).map((e,t)=>n(t)),Ul=({type:a})=>a==="tr"||a==="table-syntax",yi=class extends Array{},gn=class extends lr{get type(){return"table"}get closed(){return this.lastChild.type==="table-syntax"}constructor(n,e,t,r){super(/^(?:\{\||\{\{\{\s*!\s*\}\}|\{\{\s*\(!\s*\}\})$/u,n,"table",e,t,r,{})}lint(n=this.getAbsoluteIndex(),e){let t=super.lint(n,e),r=new R(this,n);this.closed||t.push($(this.firstChild,r,"unclosed-table",w.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=$(this.getNthRow(g),r,"table-layout","inconsistent table layout","warning");u.startIndex++,u.startLine++,u.startCol=0,t.push(u)}}return t}close(n=`
16
+ |}`,e){let t=this.getAttribute("config"),r=this.getAttribute("accum"),i=[n];se.run(()=>{let s=new ue(void 0,"table-syntax",t,r);super.insertAt(s)}),this.lastChild.safeReplaceChildren(i)}getLayout(n){let e=this.getAllRows(),{length:t}=e,r=yi.from(zl(t,()=>[]));for(let i=0;i<r.length;i++){let s=r[i],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:m}=u;for(o++;s[l];)l++;for(let f=i;f<Math.min(i+p,t);f++)for(let h=l;h<l+m;h++)r[f][h]=d;l+=m}}else if(Ul(u))break}return r}getAllRows(){return[...super.getRowCount()?[this]:[],...this.childNodes.slice(1).filter(n=>n.type==="tr"&&n.getRowCount()>0)]}getNthRow(n,e,t){let r=super.getRowCount();if(n===0&&r)return this;r&&n--;for(let i of this.childNodes.slice(2)){let{type:s}=i;if(s==="tr"&&i.getRowCount()&&(n--,n<0))return i}}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return t.closed=this.closed,t}}});var pn,Fo=k(()=>{"use strict";Ti();pn=class extends lr{get type(){return"tr"}constructor(n,e,t,r){super(/^\n[^\S\n]*(?:\|-+|\{\{\s*!\s*\}\}-+|\{\{\s*!-\s*\}\}-*)$/u,n,"tr",e,t,r)}}});var dr,ki=k(()=>{"use strict";Ze();dr=class extends pe{get indent(){return this.innerText.split(":").length-1}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e),{indent:r}=this;return r&&(t.indent=r),t}}});var gr,vi=k(()=>{"use strict";ki();gr=class extends dr{get type(){return"dd"}}});var Po={};J(Po,{parseTable:()=>Dl});var Wl,Ro,Dl,jo=k(()=>{"use strict";q();Lo();Fo();xi();vi();Wl=a=>a.lastChild.constructor!==v,Ro=(a,n)=>a.type==="td"?n.pop():a,Dl=({firstChild:{data:a},type:n,name:e},t,r)=>{let i=[],s=a.split(`
17
17
  `),o=n==="root"||n==="parameter-value"||n==="ext-inner"&&e==="poem"?"":`
18
- ${s.shift()}`,l,g=(u,d)=>{if(!d){o+=u;return}let{lastChild:p}=d;if(_l(d)){let m=new v(u,t,r);m.type="table-inter",m.setAttribute("stage",3),d.insertAt(m)}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),m=/^(:*)((?:\s|\0\d+[cn]\x7F)*)(\{\||\{(?:\0\d+[cn]\x7F)*\0\d+!\x7F|\0\d+\{\x7F)(.*)$/u.exec(p);if(m){for(;l&&l.type!=="td";)l=i.pop();let[,w,A,I,q]=m;w&&new gr(w,t,r),g(`
19
- ${d}${w&&`\0${r.length-1}d`}${A}\0${r.length}b`,l),i.push(...l?[l]:[],new gn(I,q,t,r));continue}else if(!l){o+=`
18
+ ${s.shift()}`,l,g=(u,d)=>{if(!d){o+=u;return}let{lastChild:p}=d;if(Wl(d)){let m=new v(u,t,r);m.type="table-inter",m.setAttribute("stage",3),d.insertAt(m)}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),m=/^(:*)((?:\s|\0\d+[cn]\x7F)*)(\{\||\{(?:\0\d+[cn]\x7F)*\0\d+!\x7F|\0\d+\{\x7F)(.*)$/u.exec(p);if(m){for(;l&&l.type!=="td";)l=i.pop();let[,C,A,I,O]=m;C&&new gr(C,t,r),g(`
19
+ ${d}${C&&`\0${r.length-1}d`}${A}\0${r.length}b`,l),i.push(...l?[l]:[],new gn(I,O,t,r));continue}else if(!l){o+=`
20
20
  ${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(`
21
21
  ${u}`,l),i.push(l);continue}let[,h,x,b,S]=f;if(h){for(;l.type!=="table";)l=i.pop();l.close(`
22
- ${d}${h}`,!0),g(S,i[i.length-1])}else if(x){l=Lo(l,i),l.type==="tr"&&(l=i.pop());let w=new pn(`
23
- ${d}${x}`,S,t,r);i.push(l,w),l.insertAt(w)}else{l=Lo(l,i);let w=b==="!"?/!!|(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu:/(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu,A=w.exec(S),I=0,q=`
24
- ${d}${b}`,M=F=>{let H=new ar(q,S.slice(I,A==null?void 0:A.index),t,r);return F.insertAt(H),H};for(;A;)M(l),{lastIndex:I}=w,[q]=A,A=w.exec(S);i.push(l,M(l))}}return o.slice(1)}});var un,Po=k(()=>{"use strict";Ze();un=class extends ge{get type(){return"hr"}}});var jo,Ai,zl,wt,Bo=k(()=>{"use strict";pt();_e();Ze();jo=[be(),de("__")];wt=class extends(zl=ge){get type(){return"double-underscore"}constructor(n,e,t,r){var l,g;super(n,t,r);let i=n.toLowerCase(),{doubleUnderscore:[,,s,o]}=t;this.setAttribute("name",(g=e?(l=o==null?void 0:o[n])==null?void 0:l.toLowerCase():s==null?void 0:s[i])!=null?g:i)}toString(){return`__${this.innerText}__`}print(){return super.print({pre:"__",post:"__"})}};Ai=P(zl),wt=B(Ai,0,"DoubleUnderscoreToken",jo,wt),j(Ai,1,wt)});var qo={};J(qo,{parseHrAndDoubleUnderscore:()=>Ul});var Ul,Oo=k(()=>{"use strict";Po();Bo();Wn();Ul=({firstChild:{data:a},type:n,name:e},t,r)=>{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")),n!=="root"&&(n!=="ext-inner"||e!=="poem")&&(a=`\0${a}`),a=a.replace(/^((?:\0\d+[cno]\x7F)*)(-{4,})/gmu,(d,p,m)=>(new un(m,t,r),`${p}\0${r.length-1}r`)).replace(t.regexHrAndDoubleUnderscore,(d,p)=>{var x;let m=t.sensitiveDoubleUnderscore.has(p),f=p.toLowerCase(),h=t.insensitiveDoubleUnderscore.has(f);return m||h?(new wt(p,m,t,r),`\0${r.length-1}${h&&((x=o==null?void 0:o[f])!=null?x:f)==="toc"?"u":"n"}`):d}).replace(/^((?:\0\d+[cn]\x7F)*)(={1,6})(.+)\2((?:\s|\0\d+[cn]\x7F)*)$/gmu,(d,p,m,f,h)=>{let x=`${p}\0${r.length}h`;return new Jt(m.length,[f,h],t,r),x}),n==="root"||n==="ext-inner"&&e==="poem"?a:a.slice(1)}});var pr,cn,_o=k(()=>{"use strict";_();te();V();Ze();cn=class extends ge{constructor(e,t,r,i){super(e,r,i);T(this,pr);y(this,pr,t)}get type(){return"quote"}get bold(){return this.innerText.length!==2}get italic(){return this.innerText.length!==3}get closing(){return{...this.bold?{bold:c(this,pr).bold}:void 0,...this.italic?{italic:c(this,pr).italic}:void 0}}text(){let{parentNode:e,innerText:t}=this;return(e==null?void 0:e.type)==="image-parameter"&&e.name!=="caption"?"":t}lint(e=this.getAbsoluteIndex()){let{previousSibling:t,nextSibling:r,bold:i,closing:s}=this,o=(t==null?void 0:t.type)==="text"?t.data:void 0,l=(r==null?void 0:r.type)==="text"?r.data:void 0,g=$.msg('lonely "$1"',"'"),u=[],d=new R(this,e),p=(m,f,h)=>[{desc:"escape",range:[m,f],text:"&apos;".repeat(h)},{desc:"remove",range:[m,f],text:""}];if(o!=null&&o.endsWith("'")){let m=L(this,d,"lonely-apos",g,(s.bold||s.italic)&&(/[a-z\d]'$/iu.test(o)||l&&/^[a-z\d]/iu.test(l))?"warning":"error"),{startIndex:f,startLine:h,startCol:x}=m,[,{length:b}]=/(?:^|[^'])('+)$/u.exec(o),S=e-b;u.push({...m,startIndex:S,endIndex:f,endLine:h,startCol:x-b,endCol:x,suggestions:p(S,f,b)})}if(l!=null&&l.startsWith("'")){let m=L(this,d,"lonely-apos",g),{endIndex:f,endLine:h,endCol:x}=m,[{length:b}]=/^'+/u.exec(l),S=f+b;u.push({...m,startIndex:f,endIndex:S,startLine:h,startCol:x,endCol:x+b,suggestions:p(f,S,b)})}if(i&&this.closest("heading-title")){let m=L(this,d,"bold-header","bold in section header","warning");m.suggestions=[{desc:"remove",range:[e,e+3],text:""}],u.push(m)}return u}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return Object.assign(r,{bold:this.bold,italic:this.italic}),r}};pr=new WeakMap});var Mo={};J(Mo,{parseQuotes:()=>Si});var Si,wi=k(()=>{"use strict";_o();Si=(a,n,e,t)=>{var m;let r=a.split(/('{2,})/u),{length:i}=r;if(i===1)return a;let s=0,o=0,l,g,u;for(let f=1;f<i;f+=2){let h=r[f].length;switch(h){case 2:o++;break;case 4:r[f-1]+="'",r[f]="'''";case 3:if(s++,l!==void 0)break;r[f-1].endsWith(" ")?g===void 0&&u===void 0&&(u=f):r[f-1].slice(-2,-1)===" "?l=f:g!=null||(g=f);break;default:r[f-1]+="'".repeat(h-5),r[f]="'''''",o++,s++}}if(o%2===1&&s%2===1){let f=(m=l!=null?l:g)!=null?m:u;f!==void 0&&(r[f]="''",r[f-1]+="'")}let d=!0,p=!0;for(let f=1;f<i;f+=2){let h=r[f].length,x=h!==2,b=h!==3;x&&(d=!d),b&&(p=!p),new cn(r[f],{bold:x&&d,italic:b&&p},n,e),r[f]=`\0${e.length-1}q`}return r.join("")}});var zo={};J(zo,{parseExternalLinks:()=>Ci});var Ci,$i=k(()=>{"use strict";ee();oi();dn();Ci=(a,n,e,t)=>{var r;return(r=n.regexExternalLinks)!=null||(n.regexExternalLinks=new RegExp(String.raw`\[(\0\d+f\x7F|(?:(?:${n.protocol}|//)${je}|\0\d+m\x7F)${Be}(?=[[\]<>"\t${ke}]|\0\d))([${ke}]*(?![${ke}]))([^\]\x01-\x08\x0A-\x1F\uFFFD]*)\]`,"giu")),a.replace(n.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 He(s,"ext-link-url",n,e),`[\0${g}f${o}${l}]`):(new Ve(s,o,l,n,e),`\0${g}w`)})}});var hn,Uo=k(()=>{"use strict";ee();Cr();hn=class extends me{get type(){return"category"}get sortkey(){let{childNodes:[,n]}=this;return n&&gt(n.text())}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e),{sortkey:r}=this;return r&&(t.sortkey=r),t}}});var Do={};J(Do,{parseLinks:()=>Wo});var Wl,Wo,Ho=k(()=>{"use strict";V();wi();$i();ii();Zn();Uo();Wl=/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(\||\0\d+!\x7F)([\s\S]*)$/u,Wo=(a,n,e,t)=>{var o;(o=n.regexLinks)!=null||(n.regexLinks=new RegExp(String.raw`^\s*(?:${n.protocol}|//)`,"iu"));let r=n.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,m,f=i[l],h=r.exec(f);if(h)[,u,d,p,m]=h,m.startsWith("]")&&(p!=null&&p.includes("["))&&(p+="]",m=m.slice(1));else{let A=Wl.exec(f);A&&(g=!0,[,u,d,p]=A)}if(u===void 0||n.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:b,valid:S}=$.normalizeTitle(u,0,!1,n,{halfParsed:!0,temporary:!0,decode:!0,selfLink:!0});if(S){if(g){if(b!==6){s+=`[[${f}`;continue}let A=!1;for(l++;l<i.length;l++){let I=i[l],q=I.split("]]");if(q.length>2){A=!0,p+=`[[${q[0]}]]${q[1]}`,m=q.slice(2).join("]]");break}else if(q.length===2)p+=`[[${q[0]}]]${q[1]}`;else{p+=`[[${I}`;break}}if(p=Wo(p,n,e,t),!A){s+=`[[${u}${d}${p}`;continue}}}else{s+=`[[${f}`;continue}p&&(p=Si(p,n,e,t));let w=nr;x||(b===6?(p&&(p=Ci(p,n,e,!0)),w=tr):b===14&&(w=hn)),p===void 0&&d&&(p=""),s+=`\0${e.length}l${m}`,new w(u,p,n,e,d)}return s}});var Ko={};J(Ko,{parseMagicLinks:()=>Dl});var Qo,Go,Vo,Xo,Dl,Jo=k(()=>{"use strict";ee();dn();Qo=String.raw`[${ke}\t]|&nbsp;|&#0*160;|&#x0*a0;`,Go=`(?:${Qo})+`,Vo=`(?:${Qo}|-)`,Xo=String.raw`(?:RFC|PMID)${Go}\d+\b|ISBN${Go}(?:97[89]${Vo}?)?(?:\d${Vo}?){9}[\dx]\b`,Dl=(a,n,e)=>{if(!n.regexMagicLinks)try{n.regexMagicLinks=new RegExp(String.raw`(^|[^\p{L}\p{N}_])(?:(?:${n.protocol})(${je}${Be})|${Xo})`,"giu")}catch{n.regexMagicLinks=new RegExp(String.raw`(^|\W)(?:(?:${n.protocol})(${je}${Be})|${Xo})`,"giu")}return a.replace(n.regexMagicLinks,(t,r,i)=>{let s=r?t.slice(r.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 He(s,void 0,n,e),`${r}\0${e.length-1}w${o}`)}else if(!/^(?:RFC|PMID|ISBN)/u.test(s))return t;return new He(s,"magic-link",n,e),`${r}\0${e.length-1}i`})}});var Yo,Zo=k(()=>{"use strict";Yo=(a,n)=>a.startsWith(n)?n.length:[...n].findIndex((e,t)=>e!==a[t])});var mn,ea=k(()=>{"use strict";ki();mn=class extends dr{get type(){return"list"}}});var ta={};J(ta,{parseList:()=>Hl});var Hl,ra=k(()=>{"use strict";Zo();ea();vi();Hl=(a,n,e,t)=>{let r=/^((?:\0\d+[cno]\x7F)*)([;:*#]+\s*)/u.exec(a);if(!r)return n.lastPrefix="",a;let[i,s,o]=r,l=o.replace(/;/gu,":"),g=Yo(l,n.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 F=o.slice(0,g-1);d?u.unshift(F):u[0]=F+u[0]}n.lastPrefix=l;let m=s+u.map((F,H)=>`\0${t.length+H}d`).join("")+a.slice(i.length);for(let F of u)new mn(F,e,t);if(!p)return m;let{html:[f]}=e,h=/:+|-\{|\0\d+[xq]\x7F/gu,x=h,b=x.exec(m),S=0,w=!1,A=!1,I=0,q=(F,H)=>(new gr(F,e,t),`${m.slice(0,H)}\0${t.length-1}d${m.slice(H+F.length)}`),M=F=>{F?S&&S--:S++};for(;b&&p;){let{0:F,index:H}=b;if(F==="-{"){if(!I){let{lastIndex:G}=x;x=/-\{|\}-/gu,x.lastIndex=G}I++}else if(F==="}-"){if(I--,!I){let{lastIndex:G}=x;x=h,x.lastIndex=G}}else if(F.endsWith("x")){let{name:G,closing:re,selfClosing:ne}=t[Number(F.slice(1,-2))];(!ne||f.includes(G))&&M(re)}else if(F.endsWith("q")){let{bold:G,italic:re}=t[Number(F.slice(1,-2))];G&&(M(w),w=!w),re&&(M(A),A=!A)}else if(S===0){if(F.length>=p)return q(F.slice(0,p),H);p-=F.length,x.lastIndex=H+4+String(t.length).length,m=q(F,H)}b=x.exec(m)}return m}});var na,ia,Ke,Ni,Gl,Ct,sa=k(()=>{"use strict";_();te();$r();O();Me();na=new Set(["A","T","R","D","-","H","N"]);ia=[tt()];Ct=class extends(Gl=v){constructor(e,t,r=[]){super(void 0,t,r,{});T(this,Ke);this.safeAppend(e.map(i=>new X(i,"converter-flag",t,r)))}get type(){return"converter-flags"}afterBuild(){y(this,Ke,this.childNodes.map(e=>e.text().trim())),super.afterBuild()}toString(e){return super.toString(e,";")}text(){return super.text(";")}getUnknownFlags(){return new Set(c(this,Ke).filter(e=>/\{{3}[^{}]+\}{3}/u.test(e)))}getVariantFlags(){let e=new Set(this.getAttribute("config").variants);return new Set(c(this,Ke).filter(t=>e.has(t)))}lint(e=this.getAbsoluteIndex(),t){let r=this.getVariantFlags(),i=this.getUnknownFlags(),s=new Set(c(this,Ke).filter(d=>na.has(d))),o=c(this,Ke).filter(d=>!d).length,l=c(this,Ke).length-i.size-o,g=super.lint(e,t);if(r.size===l||s.size===l)return g;let u=new R(this,e);for(let d=0;d<this.length;d++){let p=this.childNodes[d],m=p.text().trim();if(m&&!r.has(m)&&!i.has(m)&&(r.size>0||!s.has(m))){let f=C(p,u,"no-ignored","invalid conversion flag");r.size===0&&na.has(m.toUpperCase())?f.fix={range:[f.startIndex,f.endIndex],text:m.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:";"})}};Ni=P(Gl),Ke=new WeakMap,Ct=B(Ni,0,"ConverterFlagsToken",ia,Ct),j(Ni,1,Ct)});var ur,oa=k(()=>{"use strict";V();O();Me();ur=class extends v{get type(){return"converter-rule"}get variant(){var n,e;return(e=(n=this.childNodes[this.length-2])==null?void 0:n.text().trim())!=null?e:""}constructor(n,e=!0,t=$.getConfig(),r=[]){super(void 0,t,r);let i=n.indexOf(":"),s=n.slice(0,i).indexOf("=>"),o=s===-1?n.slice(0,i):n.slice(s+2,i);e&&t.variants.includes(o.trim())?(super.insertAt(new X(o,"converter-rule-variant",t,r)),super.insertAt(new X(n.slice(i+1),"converter-rule-to",t,r)),s!==-1&&super.insertAt(new X(n.slice(0,s),"converter-rule-from",t,r),0)):super.insertAt(new X(n,"converter-rule-to",t,r))}toString(n){let{childNodes:e,firstChild:t,lastChild:r}=this;return e.length===3?`${t.toString(n)}=>${e[1].toString(n)}:${r.toString(n)}`:super.toString(n,":")}text(){let{childNodes:n,firstChild:e,lastChild:t}=this;return n.length===3?`${e.text()}=>${n[1].text()}:${t.text()}`:super.text(":")}getGaps(n){return n===0&&this.length===3?2:1}print(){let{childNodes:n}=this;if(n.length===3){let[e,t,r]=n;return`<span class="wpb-converter-rule">${e.print()}=>${t.print()}:${r.print()}</span>`}return super.print({sep:":"})}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return t.variant=this.variant,t}}});var aa,Ii,Vl,$t,la=k(()=>{"use strict";ee();_e();O();sa();oa();aa=[de("-{")];$t=class extends(Vl=v){get type(){return"converter"}constructor(n,e,t,r=[]){super(void 0,t,r),this.insertAt(new Ct(n,t,r));let[i]=e,s=i.includes(":"),o=new ur(i,s,t,r);s&&o.length===1||!s&&e.length===2&&!ie(e[1]).trim()?this.insertAt(new ur(e.join(";"),!1,t,r)):this.append(o,...e.slice(1).map(l=>new ur(l,!0,t,r)))}toString(n){let{childNodes:[e,...t]}=this;return`-{${e.toString(n)}${e.length>0?"|":""}${t.map(r=>r.toString(n)).join(";")}}-`}text(){let{childNodes:[n,...e]}=this;return`-{${n.text()}|${xe(e,";")}}-`}getGaps(n){return n||this.firstChild.length>0?1:0}print(){let{childNodes:[n,...e]}=this;return`<span class="wpb-converter">-{${n.print()}${n.length>0?"|":""}${Oe(e,{sep:";"})}}-</span>`}};Ii=P(Vl),$t=B(Ii,0,"ConverterToken",aa,$t),j(Ii,1,$t)});var da={};J(da,{parseConverter:()=>Xl});var Xl,ga=k(()=>{"use strict";la();Xl=(a,n,e)=>{var l;(l=n.regexConverter)!=null||(n.regexConverter=new RegExp(String.raw`;(?=(?:[^;]*?=>)?\s*(?:${n.variants.join("|")})\s*:|(?:\s|\0\d+[cn]\x7F)*$)`,"u"));let t=/-\{/gu,r=/-\{|\}-/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,m=a.slice(d.index+2,u),f=m.indexOf("|"),[h,x]=f===-1?[[],m]:[m.slice(0,f).split(";"),m.slice(f+1)],b=x.replace(/(&[#a-z\d]+);/giu,"$1"),S=b.split(n.regexConverter).map(w=>w.replace(/\x01/gu,";"));new $t(h,S,n,e),a=`${a.slice(0,d.index)}\0${p}v${a.slice(u+2)}`,i.length===0&&(s=t),s.lastIndex=d.index+3+String(p).length}else i.push(o),s=r,s.lastIndex=u+2;o=s.exec(a)}return a}});var fn={};J(fn,{Token:()=>v});var _r,fe,W,K,Nt,cr,Mr,D,pa,ua,ca,ha,ma,fa,xa,ba,Ta,ya,ka,va,Ei,v,O=k(()=>{"use strict";ee();_();le();V();Yi();rs();Ei=class Ei extends Hr{constructor(e,t=$.getConfig(),r=[],i){super();T(this,D);T(this,_r,"plain");T(this,fe,0);T(this,W);T(this,K);T(this,Nt);T(this,cr,!1);T(this,Mr);typeof e=="string"&&this.insertAt(e),y(this,W,t),y(this,K,r),r.push(this)}get type(){return c(this,_r)}set type(e){y(this,_r,e)}parseOnce(e=c(this,fe),t=!1,r){if(e<c(this,fe)||this.length===0||!this.isPlain())return this;if(c(this,fe)>=11)return this;switch(e){case 0:if(this.type==="root"){c(this,K).pop();let i=N(this,D,pa).call(this);t&&(t=!i)}y(this,Nt,t),N(this,D,ua).call(this,t);break;case 1:N(this,D,ca).call(this);break;case 2:N(this,D,ha).call(this);break;case 3:N(this,D,ma).call(this);break;case 4:N(this,D,fa).call(this);break;case 5:N(this,D,xa).call(this,r);break;case 6:N(this,D,ba).call(this,r);break;case 7:N(this,D,Ta).call(this);break;case 8:N(this,D,ya).call(this);break;case 9:N(this,D,ka).call(this);break;case 10:N(this,D,va).call(this)}if(this.type==="root")for(let i of c(this,K))i==null||i.parseOnce(e,t,r);return Wr(this,fe)._++,this}buildFromStr(e,t){let r=e.split(/[\0\x7F]/u).map((i,s)=>{if(s%2===0)return new Sr(i);if(isNaN(i.slice(-1)))return c(this,K)[Number(i.slice(0,-1))];throw new Error(`Failed to build! Unrecognized token: ${i}`)});return t===0?r.map(String).join(""):t===1?xe(r):r}build(){y(this,fe,11);let{length:e,firstChild:t}=this,r=t==null?void 0:t.toString();if(e===1&&t.type==="text"&&r.includes("\0")&&(Ar(this,0,1,this.buildFromStr(r)),this.normalize(),this.type==="root"))for(let i of c(this,K))i==null||i.build()}afterBuild(){if(this.type==="root")for(let e of c(this,K))e==null||e.afterBuild();y(this,cr,!0)}parse(e=11,t,r){for(e=Math.min(e,11);c(this,fe)<e;)this.parseOnce(c(this,fe),t,r);return e&&(this.build(),this.afterBuild()),this}isPlain(){return this.constructor===Ei}getAttribute(e){var t;switch(e){case"config":return c(this,W);case"include":return(t=c(this,Nt))!=null?t:!!c(this.getRootNode(),Nt);case"accum":return c(this,K);case"built":return c(this,cr);case"stage":return c(this,fe);default:return super.getAttribute(e)}}setAttribute(e,t){switch(e){case"stage":c(this,fe)===0&&this.type==="root"&&c(this,K).shift(),y(this,fe,t);break;default:super.setAttribute(e,t)}}insertAt(e,t=this.length){let r=typeof e=="string"?new Sr(e):e;super.insertAt(r,t);let{type:i}=r;return i==="root"&&(r.type="plain"),r}normalizeTitle(e,t=0,r){return $.normalizeTitle(e,t,c(this,Nt),c(this,W),r)}lint(e=this.getAbsoluteIndex(),t){var i;let r=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 m;if(p.type==="category")m=p.name;else{let f=p.getValue();f&&f!==!0&&(m=`#${f}`)}if(m){let f=s.get(m);f?f.add(p):s.set(m,new Set([p]))}}for(let[p,m]of s)if(m.size>1&&!p.startsWith("#mw-customcollapsible-")){let f=!p.startsWith("#"),h=`duplicated ${f?"category":"id"}`,x=f?"error":"warning";r.push(...[...m].map(b=>{let S=L(b,{start:b.getAbsoluteIndex()},"no-duplicate",h,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:m}=d,f=(i=d[2])==null?void 0:i.trim();u.push({line:this.posFromIndex(m).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(h=>h.trim())):void 0}),d=l.exec(g)}r=r.filter(({rule:p,startLine:m,startIndex:f})=>{let h={pos:0};for(let{line:x,from:b,to:S,rules:w}of u){if(x>m+1)break;if(w&&!w.has(p))continue;if(x===m&&b===void 0&&S===void 0)return!1;b<=f&&b>h.pos?(h.pos=b,h.type="from"):S<=f&&S>h.pos&&(h.pos=S,h.type="to")}return h.type!=="from"})}return r}toString(e,t){return e?super.toString(!0,t):ve(c(this,Mr),()=>super.toString(!1,t),r=>{let i=this.getRootNode();i.type==="root"&&c(i,cr)&&y(this,Mr,r)})}};_r=new WeakMap,fe=new WeakMap,W=new WeakMap,K=new WeakMap,Nt=new WeakMap,cr=new WeakMap,Mr=new WeakMap,D=new WeakSet,pa=function(){let{parseRedirect:e}=(ds(),U(ls)),t=this.firstChild.toString(),r=e(t,c(this,W),c(this,K));return r&&this.setText(r),!!r},ua=function(e){let{parseCommentAndExt:t}=(Er(),U(So));this.setText(t(this.firstChild.toString(),c(this,W),c(this,K),e))},ca=function(){let{parseBraces:e}=(nn(),U(Ks)),t=this.type==="root"?this.firstChild.toString():`\0${this.firstChild.toString()}`,r=e(t,c(this,W),c(this,K));this.setText(this.type==="root"?r:r.slice(1))},ha=function(){if(c(this,W).excludes.includes("html"))return;let{parseHtml:e}=(No(),U($o));this.setText(e(this.firstChild.toString(),c(this,W),c(this,K)))},ma=function(){if(c(this,W).excludes.includes("table"))return;let{parseTable:e}=(Ro(),U(Fo));this.setText(e(this,c(this,W),c(this,K)))},fa=function(){if(c(this,W).excludes.includes("hr"))return;let{parseHrAndDoubleUnderscore:e}=(Oo(),U(qo));this.setText(e(this,c(this,W),c(this,K)))},xa=function(e){let{parseLinks:t}=(Ho(),U(Do));this.setText(t(this.firstChild.toString(),c(this,W),c(this,K),e))},ba=function(e){if(c(this,W).excludes.includes("quote"))return;let{parseQuotes:t}=(wi(),U(Mo)),r=this.firstChild.toString().split(`
25
- `);for(let i=0;i<r.length;i++)r[i]=t(r[i],c(this,W),c(this,K),e);this.setText(r.join(`
26
- `))},Ta=function(){if(c(this,W).excludes.includes("extLink"))return;let{parseExternalLinks:e}=($i(),U(zo));this.setText(e(this.firstChild.toString(),c(this,W),c(this,K)))},ya=function(){if(c(this,W).excludes.includes("magicLink"))return;let{parseMagicLinks:e}=(Jo(),U(Ko));this.setText(e(this.firstChild.toString(),c(this,W),c(this,K)))},ka=function(){if(c(this,W).excludes.includes("list"))return;let{parseList:e}=(ra(),U(ta)),{firstChild:t,type:r,name:i}=this,s=t.toString().split(`
27
- `),o={lastPrefix:""},l=r==="root"||r==="ext-inner"&&i==="poem"?0:1;for(;l<s.length;l++)s[l]=e(s[l],o,c(this,W),c(this,K));this.setText(s.join(`
28
- `))},va=function(){if(c(this,W).variants.length>0){let{parseConverter:e}=(ga(),U(da));this.setText(e(this.firstChild.toString(),c(this,W),c(this,K)))}};v=Ei});var pe,Yt,Ar,Ie,le=k(()=>{"use strict";pe={running:!1,run(a){let{running:n}=this;this.running=!0;try{let{Token:e}=(O(),U(fn)),t=a();return t instanceof e&&!t.getAttribute("built")&&t.afterBuild(),this.running=n,t}catch(e){throw this.running=n,e}},rev:0},Yt=a=>n=>n.type===a,Ar=(a,n,e,t=[])=>{var s,o;let r=a.getChildNodes(),i;r.length===e?(i=r,r=t):i=r.splice(n,e,...t);for(let l=0;l<t.length;l++){let g=t[l];g.setAttribute("parentNode",a),g.setAttribute("nextSibling",r[n+l+1]),g.setAttribute("previousSibling",r[n+l-1])}return(s=r[n-1])==null||s.setAttribute("nextSibling",r[n]),(o=r[n+t.length])==null||o.setAttribute("previousSibling",r[n+t.length-1]),r===t&&a.setAttribute("childNodes",r),i},Ie=(a,n)=>{Object.defineProperty(a,"name",{value:n.name})}});var Aa={};J(Aa,{Title:()=>Li});var zr,Ur,It,hr,Et,Li,Sa=k(()=>{"use strict";ee();Li=class{constructor(n,e,t,{temporary:r,decode:i,selfLink:s}={}){T(this,zr);T(this,Ur);T(this,It);T(this,hr);T(this,Et);ae(this,"valid");ae(this,"encoded",!1);let o=n.trim().startsWith("../");if(i&&n.includes("%"))try{let g=/%(?!21|3[ce]|5[bd]|7[b-d])[\da-f]{2}/iu.test(n);n=Je(n),this.encoded=g}catch{}if(n=gt(n).replace(/[_ ]+/gu," ").trim(),o)y(this,hr,0);else{let g=e;n.startsWith(":")&&(g=0,n=n.slice(1).trim());let u=n.split(":");if(u.length>1){let d=qe(u[0]),p=Object.prototype.hasOwnProperty.call(t.nsid,d)&&t.nsid[d];p&&(g=p,n=u.slice(1).join(":").trim())}y(this,hr,g)}let l=n.indexOf("#");if(l!==-1){let g=n.slice(l).trim().slice(1);if(g.includes("%"))try{g=Je(g)}catch{}y(this,Et,g.replace(/ /gu,"_")),n=n.slice(0,l).trim()}this.valid=!!(n||s&&this.ns===0&&c(this,Et)!==void 0)&&gt(n)===n&&!/^:|\0\d+[eh!+-]\x7F|[<>[\]{}|\n]|%[\da-f]{2}|(?:^|\/)\.{1,2}(?:$|\/)/iu.test(o?/^(?:\.\.\/)+(.*)/u.exec(n)[1]:n),this.main=n,y(this,Ur,t.namespaces),y(this,It,t.articlePath||"/wiki/$1"),c(this,It).includes("$1")||y(this,It,c(this,It)+`${c(this,It).endsWith("/")?"":"/"}$1`),r||Object.defineProperties(this,{encoded:{enumerable:!1,writable:!1}})}get ns(){return c(this,hr)}get fragment(){return c(this,Et)}get main(){return c(this,zr)}set main(n){n=n.replace(/_/gu," ").trim(),y(this,zr,n&&n[0].toUpperCase()+n.slice(1))}get prefix(){let n=c(this,Ur)[this.ns];return n+(n&&":")}get title(){return this.getRedirection()[1]}get extension(){let{main:n}=this,e=n.lastIndexOf(".");return e===-1?void 0:n.slice(e+1).toLowerCase()}getRedirection(){return[!1,(this.prefix+this.main).replace(/ /gu,"_")]}setFragment(n){y(this,Et,n)}getUrl(n){}};zr=new WeakMap,Ur=new WeakMap,It=new WeakMap,hr=new WeakMap,Et=new WeakMap});var Lt,wa,Ql,$,V=k(()=>{Wi();le();Xi();ee();Lt={config:vn,i18n:void 0,rules:Ui,getConfig(a){let n=a!=null?a:this.config,{doubleUnderscore:e,ext:t,parserFunction:r,variable:i}=n;for(let s=0;s<2;s++)e.length>s+2&&e[s].length===0&&(e[s]=Object.keys(e[s+2]));return t.includes("translate")&&!i.includes("translationlanguage")&&(i.push("translationlanguage"),Array.isArray(r[1])?r[1].push("TRANSLATIONLANGUAGE"):r[1].TRANSLATIONLANGUAGE="translationlanguage"),{...vn,...n,excludes:[]}},msg(a,n=""){var e,t;return a&&((t=(e=this.i18n)==null?void 0:e[a])!=null?t:a).replace("$1",this.msg(n))},normalizeTitle(a,n=0,e,t=Lt.getConfig(),r){let{Title:i}=(Sa(),U(Aa)),s;if(r!=null&&r.halfParsed)s=new i(a,n,t,r);else{let{Token:o}=(O(),U(fn));s=pe.run(()=>{let l=new o(a,t);l.type="root",l.parseOnce(0,e).parseOnce();let g=new i(l.toString(),n,t,r);for(let u of["main","fragment"]){let d=g[u];if(d!=null&&d.includes("\0")){let p=l.buildFromStr(d,1);u==="main"?g.main=p:g.setFragment(p)}}return g})}return s},parse(a,n,e=11,t=Lt.getConfig()){a=Hi(a);let r;typeof e!="number"&&(r=Array.isArray(e)?e:[e],e=Math.max(...r.map(o=>zi[o]||11)));let{Token:i}=(O(),U(fn));return pe.run(()=>{let o=new i(a,t);return o.type="root",o.parse(e,n)})},async partialParse(a,n,e,t=Lt.getConfig()){},createLanguageService(a){}},wa={},Ql=new Set(["normalizeTitle","parse","createLanguageService"]);for(let a in Lt)Ql.has(a)||(wa[a]={enumerable:!1});Object.defineProperties(Lt,wa);Object.assign(typeof globalThis=="object"?globalThis:self,{Parser:Lt});$=Lt});V();})();
22
+ ${d}${h}`,!0),g(S,i[i.length-1])}else if(x){l=Ro(l,i),l.type==="tr"&&(l=i.pop());let C=new pn(`
23
+ ${d}${x}`,S,t,r);i.push(l,C),l.insertAt(C)}else{l=Ro(l,i);let C=b==="!"?/!!|(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu:/(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu,A=C.exec(S),I=0,O=`
24
+ ${d}${b}`,M=F=>{let G=new ar(O,S.slice(I,A==null?void 0:A.index),t,r);return F.insertAt(G),G};for(;A;)M(l),{lastIndex:I}=C,[O]=A,A=C.exec(S);i.push(l,M(l))}}return o.slice(1)}});var un,Bo=k(()=>{"use strict";Ze();un=class extends pe{get type(){return"hr"}}});var Oo,Ai,Hl,wt,qo=k(()=>{"use strict";pt();_e();Ze();Oo=[be(),ge("__")];wt=class extends(Hl=pe){get type(){return"double-underscore"}constructor(n,e,t,r){var l,g;super(n,t,r);let i=n.toLowerCase(),{doubleUnderscore:[,,s,o]}=t;this.setAttribute("name",(g=e?(l=o==null?void 0:o[n])==null?void 0:l.toLowerCase():s==null?void 0:s[i])!=null?g:i)}toString(){return`__${this.innerText}__`}print(){return super.print({pre:"__",post:"__"})}};Ai=P(Hl),wt=B(Ai,0,"DoubleUnderscoreToken",Oo,wt),j(Ai,1,wt)});var _o={};J(_o,{parseHrAndDoubleUnderscore:()=>Gl});var Gl,Mo=k(()=>{"use strict";Bo();qo();Wn();Gl=({firstChild:{data:a},type:n,name:e},t,r)=>{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")),n!=="root"&&(n!=="ext-inner"||e!=="poem")&&(a=`\0${a}`),a=a.replace(/^((?:\0\d+[cno]\x7F)*)(-{4,})/gmu,(d,p,m)=>(new un(m,t,r),`${p}\0${r.length-1}r`)).replace(t.regexHrAndDoubleUnderscore,(d,p)=>{var x;let m=t.sensitiveDoubleUnderscore.has(p),f=p.toLowerCase(),h=t.insensitiveDoubleUnderscore.has(f);return m||h?(new wt(p,m,t,r),`\0${r.length-1}${h&&((x=o==null?void 0:o[f])!=null?x:f)==="toc"?"u":"n"}`):d}).replace(/^((?:\0\d+[cn]\x7F)*)(={1,6})(.+)\2((?:\s|\0\d+[cn]\x7F)*)$/gmu,(d,p,m,f,h)=>{let x=`${p}\0${r.length}h`;return new Jt(m.length,[f,h],t,r),x}),n==="root"||n==="ext-inner"&&e==="poem"?a:a.slice(1)}});var pr,cn,zo=k(()=>{"use strict";_();te();W();Ze();cn=class extends pe{constructor(e,t,r,i){super(e,r,i);T(this,pr);y(this,pr,t)}get type(){return"quote"}get bold(){return this.innerText.length!==2}get italic(){return this.innerText.length!==3}get closing(){return{...this.bold?{bold:c(this,pr).bold}:void 0,...this.italic?{italic:c(this,pr).italic}:void 0}}text(){let{parentNode:e,innerText:t}=this;return(e==null?void 0:e.type)==="image-parameter"&&e.name!=="caption"?"":t}lint(e=this.getAbsoluteIndex()){let{previousSibling:t,nextSibling:r,bold:i,closing:s}=this,o=(t==null?void 0:t.type)==="text"?t.data:void 0,l=(r==null?void 0:r.type)==="text"?r.data:void 0,g=w.msg('lonely "$1"',"'"),u=[],d=new R(this,e),p=(m,f,h)=>[{desc:"escape",range:[m,f],text:"&apos;".repeat(h)},{desc:"remove",range:[m,f],text:""}];if(o!=null&&o.endsWith("'")){let m=L(this,d,"lonely-apos",g,(s.bold||s.italic)&&(/[a-z\d]'$/iu.test(o)||l&&/^[a-z\d]/iu.test(l))?"warning":"error"),{startIndex:f,startLine:h,startCol:x}=m,[,{length:b}]=/(?:^|[^'])('+)$/u.exec(o),S=e-b;u.push({...m,startIndex:S,endIndex:f,endLine:h,startCol:x-b,endCol:x,suggestions:p(S,f,b)})}if(l!=null&&l.startsWith("'")){let m=L(this,d,"lonely-apos",g),{endIndex:f,endLine:h,endCol:x}=m,[{length:b}]=/^'+/u.exec(l),S=f+b;u.push({...m,startIndex:f,endIndex:S,startLine:h,startCol:x,endCol:x+b,suggestions:p(f,S,b)})}if(i&&this.closest("heading-title")){let m=L(this,d,"bold-header","bold in section header","warning");m.suggestions=[{desc:"remove",range:[e,e+3],text:""}],u.push(m)}return u}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return Object.assign(r,{bold:this.bold,italic:this.italic}),r}};pr=new WeakMap});var Uo={};J(Uo,{parseQuotes:()=>Si});var Si,wi=k(()=>{"use strict";zo();Si=(a,n,e,t)=>{var m;let r=a.split(/('{2,})/u),{length:i}=r;if(i===1)return a;let s=0,o=0,l,g,u;for(let f=1;f<i;f+=2){let h=r[f].length;switch(h){case 2:o++;break;case 4:r[f-1]+="'",r[f]="'''";case 3:if(s++,l!==void 0)break;r[f-1].endsWith(" ")?g===void 0&&u===void 0&&(u=f):r[f-1].slice(-2,-1)===" "?l=f:g!=null||(g=f);break;default:r[f-1]+="'".repeat(h-5),r[f]="'''''",o++,s++}}if(o%2===1&&s%2===1){let f=(m=l!=null?l:g)!=null?m:u;f!==void 0&&(r[f]="''",r[f-1]+="'")}let d=!0,p=!0;for(let f=1;f<i;f+=2){let h=r[f].length,x=h!==2,b=h!==3;x&&(d=!d),b&&(p=!p),new cn(r[f],{bold:x&&d,italic:b&&p},n,e),r[f]=`\0${e.length-1}q`}return r.join("")}});var Wo={};J(Wo,{parseExternalLinks:()=>Ci});var Ci,$i=k(()=>{"use strict";ee();oi();dn();Ci=(a,n,e,t)=>{var r;return(r=n.regexExternalLinks)!=null||(n.regexExternalLinks=new RegExp(String.raw`\[(\0\d+f\x7F|(?:(?:${n.protocol}|//)${je}|\0\d+m\x7F)${Be}(?=[[\]<>"\t${ke}]|\0\d))([${ke}]*(?![${ke}]))([^\]\x01-\x08\x0A-\x1F\uFFFD]*)\]`,"giu")),a.replace(n.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 He(s,"ext-link-url",n,e),`[\0${g}f${o}${l}]`):(new Ve(s,o,l,n,e),`\0${g}w`)})}});var hn,Do=k(()=>{"use strict";ee();Cr();hn=class extends me{get type(){return"category"}get sortkey(){let{childNodes:[,n]}=this;return n&&gt(n.text())}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e),{sortkey:r}=this;return r&&(t.sortkey=r),t}}});var Go={};J(Go,{parseLinks:()=>Ho});var Vl,Ho,Vo=k(()=>{"use strict";W();wi();$i();ii();Zn();Do();Vl=/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(\||\0\d+!\x7F)([\s\S]*)$/u,Ho=(a,n,e,t)=>{var o;(o=n.regexLinks)!=null||(n.regexLinks=new RegExp(String.raw`^\s*(?:${n.protocol}|//)`,"iu"));let r=n.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,m,f=i[l],h=r.exec(f);if(h)[,u,d,p,m]=h,m.startsWith("]")&&(p!=null&&p.includes("["))&&(p+="]",m=m.slice(1));else{let A=Vl.exec(f);A&&(g=!0,[,u,d,p]=A)}if(u===void 0||n.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:b,valid:S}=w.normalizeTitle(u,0,!1,n,{halfParsed:!0,temporary:!0,decode:!0,selfLink:!0});if(S){if(g){if(b!==6){s+=`[[${f}`;continue}let A=!1;for(l++;l<i.length;l++){let I=i[l],O=I.split("]]");if(O.length>2){A=!0,p+=`[[${O[0]}]]${O[1]}`,m=O.slice(2).join("]]");break}else if(O.length===2)p+=`[[${O[0]}]]${O[1]}`;else{p+=`[[${I}`;break}}if(p=Ho(p,n,e,t),!A){s+=`[[${u}${d}${p}`;continue}}}else{s+=`[[${f}`;continue}p&&(p=Si(p,n,e,t));let C=nr;x||(b===6?(p&&(p=Ci(p,n,e,!0)),C=tr):b===14&&(C=hn)),p===void 0&&d&&(p=""),s+=`\0${e.length}l${m}`,new C(u,p,n,e,d)}return s}});var Yo={};J(Yo,{parseMagicLinks:()=>Xl});var Jo,Xo,Qo,Ko,Xl,Zo=k(()=>{"use strict";ee();dn();Jo=String.raw`[${ke}\t]|&nbsp;|&#0*160;|&#x0*a0;`,Xo=`(?:${Jo})+`,Qo=`(?:${Jo}|-)`,Ko=String.raw`(?:RFC|PMID)${Xo}\d+\b|ISBN${Xo}(?:97[89]${Qo}?)?(?:\d${Qo}?){9}[\dx]\b`,Xl=(a,n,e)=>{if(!n.regexMagicLinks)try{n.regexMagicLinks=new RegExp(String.raw`(^|[^\p{L}\p{N}_])(?:(?:${n.protocol})(${je}${Be})|${Ko})`,"giu")}catch{n.regexMagicLinks=new RegExp(String.raw`(^|\W)(?:(?:${n.protocol})(${je}${Be})|${Ko})`,"giu")}return a.replace(n.regexMagicLinks,(t,r,i)=>{let s=r?t.slice(r.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 He(s,void 0,n,e),`${r}\0${e.length-1}w${o}`)}else if(!/^(?:RFC|PMID|ISBN)/u.test(s))return t;return new He(s,"magic-link",n,e),`${r}\0${e.length-1}i`})}});var ea,ta=k(()=>{"use strict";ea=(a,n)=>a.startsWith(n)?n.length:[...n].findIndex((e,t)=>e!==a[t])});var mn,ra=k(()=>{"use strict";ki();mn=class extends dr{get type(){return"list"}}});var na={};J(na,{parseList:()=>Ql});var Ql,ia=k(()=>{"use strict";ta();ra();vi();Ql=(a,n,e,t)=>{let r=/^((?:\0\d+[cno]\x7F)*)([;:*#]+\s*)/u.exec(a);if(!r)return n.lastPrefix="",a;let[i,s,o]=r,l=o.replace(/;/gu,":"),g=ea(l,n.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 F=o.slice(0,g-1);d?u.unshift(F):u[0]=F+u[0]}n.lastPrefix=l;let m=s+u.map((F,G)=>`\0${t.length+G}d`).join("")+a.slice(i.length);for(let F of u)new mn(F,e,t);if(!p)return m;let{html:[f]}=e,h=/:+|-\{|\0\d+[xq]\x7F/gu,x=h,b=x.exec(m),S=0,C=!1,A=!1,I=0,O=(F,G)=>(new gr(F,e,t),`${m.slice(0,G)}\0${t.length-1}d${m.slice(G+F.length)}`),M=F=>{F?S&&S--:S++};for(;b&&p;){let{0:F,index:G}=b;if(F==="-{"){if(!I){let{lastIndex:V}=x;x=/-\{|\}-/gu,x.lastIndex=V}I++}else if(F==="}-"){if(I--,!I){let{lastIndex:V}=x;x=h,x.lastIndex=V}}else if(F.endsWith("x")){let{name:V,closing:re,selfClosing:ne}=t[Number(F.slice(1,-2))];(!ne||f.includes(V))&&M(re)}else if(F.endsWith("q")){let{bold:V,italic:re}=t[Number(F.slice(1,-2))];V&&(M(C),C=!C),re&&(M(A),A=!A)}else if(S===0){if(F.length>=p)return O(F.slice(0,p),G);p-=F.length,x.lastIndex=G+4+String(t.length).length,m=O(F,G)}b=x.exec(m)}return m}});var sa,oa,Ke,Ni,Kl,Ct,aa=k(()=>{"use strict";_();te();$r();q();Me();sa=new Set(["A","T","R","D","-","H","N"]);oa=[tt()];Ct=class extends(Kl=v){constructor(e,t,r=[]){super(void 0,t,r,{});T(this,Ke);this.safeAppend(e.map(i=>new X(i,"converter-flag",t,r)))}get type(){return"converter-flags"}afterBuild(){y(this,Ke,this.childNodes.map(e=>e.text().trim())),super.afterBuild()}toString(e){return super.toString(e,";")}text(){return super.text(";")}getUnknownFlags(){return new Set(c(this,Ke).filter(e=>/\{{3}[^{}]+\}{3}/u.test(e)))}getVariantFlags(){let e=new Set(this.getAttribute("config").variants);return new Set(c(this,Ke).filter(t=>e.has(t)))}lint(e=this.getAbsoluteIndex(),t){let r=this.getVariantFlags(),i=this.getUnknownFlags(),s=new Set(c(this,Ke).filter(d=>sa.has(d))),o=c(this,Ke).filter(d=>!d).length,l=c(this,Ke).length-i.size-o,g=super.lint(e,t);if(r.size===l||s.size===l)return g;let u=new R(this,e);for(let d=0;d<this.length;d++){let p=this.childNodes[d],m=p.text().trim();if(m&&!r.has(m)&&!i.has(m)&&(r.size>0||!s.has(m))){let f=$(p,u,"no-ignored","invalid conversion flag");r.size===0&&sa.has(m.toUpperCase())?f.fix={range:[f.startIndex,f.endIndex],text:m.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:";"})}};Ni=P(Kl),Ke=new WeakMap,Ct=B(Ni,0,"ConverterFlagsToken",oa,Ct),j(Ni,1,Ct)});var ur,la=k(()=>{"use strict";W();q();Me();ur=class extends v{get type(){return"converter-rule"}get variant(){var n,e;return(e=(n=this.childNodes[this.length-2])==null?void 0:n.text().trim())!=null?e:""}constructor(n,e=!0,t=w.getConfig(),r=[]){super(void 0,t,r);let i=n.indexOf(":"),s=n.slice(0,i).indexOf("=>"),o=s===-1?n.slice(0,i):n.slice(s+2,i);e&&t.variants.includes(o.trim())?(super.insertAt(new X(o,"converter-rule-variant",t,r)),super.insertAt(new X(n.slice(i+1),"converter-rule-to",t,r)),s!==-1&&super.insertAt(new X(n.slice(0,s),"converter-rule-from",t,r),0)):super.insertAt(new X(n,"converter-rule-to",t,r))}toString(n){let{childNodes:e,firstChild:t,lastChild:r}=this;return e.length===3?`${t.toString(n)}=>${e[1].toString(n)}:${r.toString(n)}`:super.toString(n,":")}text(){let{childNodes:n,firstChild:e,lastChild:t}=this;return n.length===3?`${e.text()}=>${n[1].text()}:${t.text()}`:super.text(":")}getGaps(n){return n===0&&this.length===3?2:1}print(){let{childNodes:n}=this;if(n.length===3){let[e,t,r]=n;return`<span class="wpb-converter-rule">${e.print()}=>${t.print()}:${r.print()}</span>`}return super.print({sep:":"})}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return t.variant=this.variant,t}}});var da,Ii,Jl,$t,ga=k(()=>{"use strict";ee();_e();q();aa();la();da=[ge("-{")];$t=class extends(Jl=v){get type(){return"converter"}constructor(n,e,t,r=[]){super(void 0,t,r),this.insertAt(new Ct(n,t,r));let[i]=e,s=i.includes(":"),o=new ur(i,s,t,r);s&&o.length===1||!s&&e.length===2&&!ie(e[1]).trim()?this.insertAt(new ur(e.join(";"),!1,t,r)):this.append(o,...e.slice(1).map(l=>new ur(l,!0,t,r)))}toString(n){let{childNodes:[e,...t]}=this;return`-{${e.toString(n)}${e.length>0?"|":""}${t.map(r=>r.toString(n)).join(";")}}-`}text(){let{childNodes:[n,...e]}=this;return`-{${n.text()}|${xe(e,";")}}-`}getGaps(n){return n||this.firstChild.length>0?1:0}print(){let{childNodes:[n,...e]}=this;return`<span class="wpb-converter">-{${n.print()}${n.length>0?"|":""}${qe(e,{sep:";"})}}-</span>`}};Ii=P(Jl),$t=B(Ii,0,"ConverterToken",da,$t),j(Ii,1,$t)});var pa={};J(pa,{parseConverter:()=>Yl});var Yl,ua=k(()=>{"use strict";ga();Yl=(a,n,e)=>{var l;(l=n.regexConverter)!=null||(n.regexConverter=new RegExp(String.raw`;(?=(?:[^;]*?=>)?\s*(?:${n.variants.join("|")})\s*:|(?:\s|\0\d+[cn]\x7F)*$)`,"u"));let t=/-\{/gu,r=/-\{|\}-/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,m=a.slice(d.index+2,u),f=m.indexOf("|"),[h,x]=f===-1?[[],m]:[m.slice(0,f).split(";"),m.slice(f+1)],b=x.replace(/(&[#a-z\d]+);/giu,"$1"),S=b.split(n.regexConverter).map(C=>C.replace(/\x01/gu,";"));new $t(h,S,n,e),a=`${a.slice(0,d.index)}\0${p}v${a.slice(u+2)}`,i.length===0&&(s=t),s.lastIndex=d.index+3+String(p).length}else i.push(o),s=r,s.lastIndex=u+2;o=s.exec(a)}return a}});var fn={};J(fn,{Token:()=>v});var _r,fe,D,K,Nt,cr,Mr,H,ca,ha,ma,fa,xa,ba,Ta,ya,ka,va,Aa,Sa,Ei,v,q=k(()=>{"use strict";ee();_();de();W();Zi();ns();Ei=class Ei extends Hr{constructor(e,t=w.getConfig(),r=[],i){super();T(this,H);T(this,_r,"plain");T(this,fe,0);T(this,D);T(this,K);T(this,Nt);T(this,cr,!1);T(this,Mr);typeof e=="string"&&this.insertAt(e),y(this,D,t),y(this,K,r),r.push(this)}get type(){return c(this,_r)}set type(e){y(this,_r,e)}parseOnce(e=c(this,fe),t=!1,r){if(e<c(this,fe)||this.length===0||!this.isPlain())return this;if(c(this,fe)>=11)return this;switch(e){case 0:if(this.type==="root"){c(this,K).pop();let i=N(this,H,ca).call(this);t&&(t=!i)}y(this,Nt,t),N(this,H,ha).call(this,t);break;case 1:N(this,H,ma).call(this);break;case 2:N(this,H,fa).call(this);break;case 3:N(this,H,xa).call(this);break;case 4:N(this,H,ba).call(this);break;case 5:N(this,H,Ta).call(this,r);break;case 6:N(this,H,ya).call(this,r);break;case 7:N(this,H,ka).call(this);break;case 8:N(this,H,va).call(this);break;case 9:N(this,H,Aa).call(this);break;case 10:N(this,H,Sa).call(this)}if(this.type==="root")for(let i of c(this,K))i==null||i.parseOnce(e,t,r);return Wr(this,fe)._++,this}buildFromStr(e,t){let r=e.split(/[\0\x7F]/u).map((i,s)=>{if(s%2===0)return new Sr(i);if(isNaN(i.slice(-1)))return c(this,K)[Number(i.slice(0,-1))];throw new Error(`Failed to build! Unrecognized token: ${i}`)});return t===0?r.map(String).join(""):t===1?xe(r):r}build(){y(this,fe,11);let{length:e,firstChild:t}=this,r=t==null?void 0:t.toString();if(e===1&&t.type==="text"&&r.includes("\0")&&(Ar(this,0,1,this.buildFromStr(r)),this.normalize(),this.type==="root"))for(let i of c(this,K))i==null||i.build()}afterBuild(){if(this.type==="root")for(let e of c(this,K))e==null||e.afterBuild();y(this,cr,!0)}parse(e=11,t,r){for(e=Math.min(e,11);c(this,fe)<e;)this.parseOnce(c(this,fe),t,r);return e&&(this.build(),this.afterBuild()),this}isPlain(){return this.constructor===Ei}getAttribute(e){var t;switch(e){case"config":return c(this,D);case"include":return(t=c(this,Nt))!=null?t:!!c(this.getRootNode(),Nt);case"accum":return c(this,K);case"built":return c(this,cr);case"stage":return c(this,fe);default:return super.getAttribute(e)}}setAttribute(e,t){switch(e){case"stage":c(this,fe)===0&&this.type==="root"&&c(this,K).shift(),y(this,fe,t);break;default:super.setAttribute(e,t)}}insertAt(e,t=this.length){let r=typeof e=="string"?new Sr(e):e;super.insertAt(r,t);let{type:i}=r;return i==="root"&&(r.type="plain"),r}normalizeTitle(e,t=0,r){return w.normalizeTitle(e,t,c(this,Nt),c(this,D),r)}lint(e=this.getAbsoluteIndex(),t){var i;let r=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 m;if(p.type==="category")m=p.name;else{let f=p.getValue();f&&f!==!0&&(m=`#${f}`)}if(m){let f=s.get(m);f?f.add(p):s.set(m,new Set([p]))}}for(let[p,m]of s)if(m.size>1&&!p.startsWith("#mw-customcollapsible-")){let f=!p.startsWith("#"),h=`duplicated ${f?"category":"id"}`,x=f?"error":"warning";r.push(...[...m].map(b=>{let S=L(b,{start:b.getAbsoluteIndex()},"no-duplicate",h,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:m}=d,f=(i=d[2])==null?void 0:i.trim();u.push({line:this.posFromIndex(m).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(h=>h.trim())):void 0}),d=l.exec(g)}r=r.filter(({rule:p,startLine:m,startIndex:f})=>{let h={pos:0};for(let{line:x,from:b,to:S,rules:C}of u){if(x>m+1)break;if(C&&!C.has(p))continue;if(x===m&&b===void 0&&S===void 0)return!1;b<=f&&b>h.pos?(h.pos=b,h.type="from"):S<=f&&S>h.pos&&(h.pos=S,h.type="to")}return h.type!=="from"})}return r}toString(e,t){return e?super.toString(!0,t):ve(c(this,Mr),()=>super.toString(!1,t),r=>{let i=this.getRootNode();i.type==="root"&&c(i,cr)&&y(this,Mr,r)})}};_r=new WeakMap,fe=new WeakMap,D=new WeakMap,K=new WeakMap,Nt=new WeakMap,cr=new WeakMap,Mr=new WeakMap,H=new WeakSet,ca=function(){let{parseRedirect:e}=(gs(),U(ds)),t=this.firstChild.toString(),r=e(t,c(this,D),c(this,K));return r&&this.setText(r),!!r},ha=function(e){let{parseCommentAndExt:t}=(Er(),U(Co));this.setText(t(this.firstChild.toString(),c(this,D),c(this,K),e))},ma=function(){let{parseBraces:e}=(nn(),U(Js)),t=this.type==="root"?this.firstChild.toString():`\0${this.firstChild.toString()}`,r=e(t,c(this,D),c(this,K));this.setText(this.type==="root"?r:r.slice(1))},fa=function(){if(c(this,D).excludes.includes("html"))return;let{parseHtml:e}=(Eo(),U(Io));this.setText(e(this.firstChild.toString(),c(this,D),c(this,K)))},xa=function(){if(c(this,D).excludes.includes("table"))return;let{parseTable:e}=(jo(),U(Po));this.setText(e(this,c(this,D),c(this,K)))},ba=function(){if(c(this,D).excludes.includes("hr"))return;let{parseHrAndDoubleUnderscore:e}=(Mo(),U(_o));this.setText(e(this,c(this,D),c(this,K)))},Ta=function(e){let{parseLinks:t}=(Vo(),U(Go));this.setText(t(this.firstChild.toString(),c(this,D),c(this,K),e))},ya=function(e){if(c(this,D).excludes.includes("quote"))return;let{parseQuotes:t}=(wi(),U(Uo)),r=this.firstChild.toString().split(`
25
+ `);for(let i=0;i<r.length;i++)r[i]=t(r[i],c(this,D),c(this,K),e);this.setText(r.join(`
26
+ `))},ka=function(){if(c(this,D).excludes.includes("extLink"))return;let{parseExternalLinks:e}=($i(),U(Wo));this.setText(e(this.firstChild.toString(),c(this,D),c(this,K)))},va=function(){if(c(this,D).excludes.includes("magicLink"))return;let{parseMagicLinks:e}=(Zo(),U(Yo));this.setText(e(this.firstChild.toString(),c(this,D),c(this,K)))},Aa=function(){if(c(this,D).excludes.includes("list"))return;let{parseList:e}=(ia(),U(na)),{firstChild:t,type:r,name:i}=this,s=t.toString().split(`
27
+ `),o={lastPrefix:""},l=r==="root"||r==="ext-inner"&&i==="poem"?0:1;for(;l<s.length;l++)s[l]=e(s[l],o,c(this,D),c(this,K));this.setText(s.join(`
28
+ `))},Sa=function(){if(c(this,D).variants.length>0){let{parseConverter:e}=(ua(),U(pa));this.setText(e(this.firstChild.toString(),c(this,D),c(this,K)))}};v=Ei});var se,Yt,Ar,Ie,de=k(()=>{"use strict";se={running:!1,run(a){let{running:n}=this;this.running=!0;try{let{Token:e}=(q(),U(fn)),t=a();return t instanceof e&&!t.getAttribute("built")&&t.afterBuild(),this.running=n,t}catch(e){throw this.running=n,e}},rev:0},Yt=a=>n=>n.type===a,Ar=(a,n,e,t=[])=>{var s,o;let r=a.getChildNodes(),i;r.length===e?(i=r,r=t):i=r.splice(n,e,...t);for(let l=0;l<t.length;l++){let g=t[l];g.setAttribute("parentNode",a),g.setAttribute("nextSibling",r[n+l+1]),g.setAttribute("previousSibling",r[n+l-1])}return(s=r[n-1])==null||s.setAttribute("nextSibling",r[n]),(o=r[n+t.length])==null||o.setAttribute("previousSibling",r[n+t.length-1]),r===t&&a.setAttribute("childNodes",r),i},Ie=(a,n)=>{Object.defineProperty(a,"name",{value:n.name})}});var wa={};J(wa,{Title:()=>Li});var zr,Ur,It,hr,Et,Li,Ca=k(()=>{"use strict";ee();Li=class{constructor(n,e,t,{temporary:r,decode:i,selfLink:s}={}){T(this,zr);T(this,Ur);T(this,It);T(this,hr);T(this,Et);le(this,"valid");le(this,"encoded",!1);let o=n.trim().startsWith("../");if(i&&n.includes("%"))try{let g=/%(?!21|3[ce]|5[bd]|7[b-d])[\da-f]{2}/iu.test(n);n=Je(n),this.encoded=g}catch{}if(n=gt(n).replace(/[_ ]+/gu," ").trim(),o)y(this,hr,0);else{let g=e;n.startsWith(":")&&(g=0,n=n.slice(1).trim());let u=n.split(":");if(u.length>1){let d=Oe(u[0]),p=Object.prototype.hasOwnProperty.call(t.nsid,d)&&t.nsid[d];p&&(g=p,n=u.slice(1).join(":").trim())}y(this,hr,g)}let l=n.indexOf("#");if(l!==-1){let g=n.slice(l).trim().slice(1);if(g.includes("%"))try{g=Je(g)}catch{}y(this,Et,g.replace(/ /gu,"_")),n=n.slice(0,l).trim()}this.valid=!!(n||s&&this.ns===0&&c(this,Et)!==void 0)&&gt(n)===n&&!/^:|\0\d+[eh!+-]\x7F|[<>[\]{}|\n]|%[\da-f]{2}|(?:^|\/)\.{1,2}(?:$|\/)/iu.test(o?/^(?:\.\.\/)+(.*)/u.exec(n)[1]:n),this.main=n,y(this,Ur,t.namespaces),y(this,It,t.articlePath||"/wiki/$1"),c(this,It).includes("$1")||y(this,It,c(this,It)+`${c(this,It).endsWith("/")?"":"/"}$1`),r||Object.defineProperties(this,{encoded:{enumerable:!1,writable:!1}})}get ns(){return c(this,hr)}get fragment(){return c(this,Et)}get main(){return c(this,zr)}set main(n){n=n.replace(/_/gu," ").trim(),y(this,zr,n&&n[0].toUpperCase()+n.slice(1))}get prefix(){let n=c(this,Ur)[this.ns];return n+(n&&":")}get title(){return this.getRedirection()[1]}get extension(){let{main:n}=this,e=n.lastIndexOf(".");return e===-1?void 0:n.slice(e+1).toLowerCase()}getRedirection(){return[!1,(this.prefix+this.main).replace(/ /gu,"_")]}setFragment(n){y(this,Et,n)}getUrl(n){}};zr=new WeakMap,Ur=new WeakMap,It=new WeakMap,hr=new WeakMap,Et=new WeakMap});var Fi,Lt,$a,Zl,w,W=k(()=>{Di();de();Qi();ee();Fi=!0,Lt={config:vn,i18n:void 0,rules:Wi,get viewOnly(){return Fi},set viewOnly(a){Fi&&!a&&se.rev++,Fi=a},getConfig(a){let n=a!=null?a:this.config,{doubleUnderscore:e,ext:t,parserFunction:r,variable:i}=n;for(let s=0;s<2;s++)e.length>s+2&&e[s].length===0&&(e[s]=Object.keys(e[s+2]));return t.includes("translate")&&!i.includes("translationlanguage")&&(i.push("translationlanguage"),Array.isArray(r[1])?r[1].push("TRANSLATIONLANGUAGE"):r[1].TRANSLATIONLANGUAGE="translationlanguage"),{...vn,...n,excludes:[]}},msg(a,n=""){var e,t;return a&&((t=(e=this.i18n)==null?void 0:e[a])!=null?t:a).replace("$1",this.msg(n))},normalizeTitle(a,n=0,e,t=Lt.getConfig(),r){let{Title:i}=(Ca(),U(wa)),s;if(r!=null&&r.halfParsed)s=new i(a,n,t,r);else{let{Token:o}=(q(),U(fn));s=se.run(()=>{let l=new o(a,t);l.type="root",l.parseOnce(0,e).parseOnce();let g=new i(l.toString(),n,t,r);for(let u of["main","fragment"]){let d=g[u];if(d!=null&&d.includes("\0")){let p=l.buildFromStr(d,1);u==="main"?g.main=p:g.setFragment(p)}}return g})}return s},parse(a,n,e=11,t=Lt.getConfig()){a=Gi(a);let r;typeof e!="number"&&(r=Array.isArray(e)?e:[e],e=Math.max(...r.map(o=>Ui[o]||11)));let{Token:i}=(q(),U(fn));return se.run(()=>{let o=new i(a,t);return o.type="root",o.parse(e,n)})},async partialParse(a,n,e,t=Lt.getConfig()){},createLanguageService(a){}},$a={},Zl=new Set(["normalizeTitle","parse","createLanguageService"]);for(let a in Lt)Zl.has(a)||($a[a]={enumerable:!1});Object.defineProperties(Lt,$a);Object.assign(typeof globalThis=="object"?globalThis:self,{Parser:Lt});w=Lt});W();})();
29
29
  //# sourceMappingURL=bundle.min.js.map