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.
- package/bundle/bundle-es7.min.js +20 -20
- package/bundle/bundle-lsp.min.js +23 -23
- package/bundle/bundle.min.js +20 -20
- package/dist/addon/token.js +1 -1
- package/dist/index.js +10 -5
- package/dist/lib/element.js +1 -1
- package/dist/lib/lsp.js +1 -1
- package/dist/lib/node.js +4 -2
- package/dist/lib/text.js +3 -5
- package/dist/lib/title.js +0 -1
- package/dist/parser/externalLinks.js +1 -1
- package/dist/parser/magicLinks.js +1 -1
- package/dist/parser/selector.js +5 -5
- package/dist/src/attributes.js +1 -1
- package/dist/src/extLink.js +0 -1
- package/dist/src/html.js +3 -1
- package/dist/src/imageParameter.js +1 -1
- package/dist/src/link/file.js +21 -10
- package/dist/src/magicLink.js +3 -3
- package/dist/src/parameter.js +1 -1
- package/dist/src/table/index.js +1 -1
- package/dist/src/transclude.js +2 -2
- package/dist/util/lint.js +3 -2
- package/extensions/dist/base.js +1 -1
- package/package.json +3 -5
package/bundle/bundle-es7.min.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
"use strict";(()=>{var La=Object.create;var jt=Object.defineProperty,Fa=Object.defineProperties,zi=Object.getOwnPropertyDescriptor,Ra=Object.getOwnPropertyDescriptors,Pa=Object.getOwnPropertyNames,_i=Object.getOwnPropertySymbols;var Ui=Object.prototype.hasOwnProperty,ja=Object.prototype.propertyIsEnumerable;var Wi=(a,n)=>(n=Symbol[a])?n:Symbol.for("Symbol."+a),Bt=a=>{throw TypeError(a)};var Hr=(a,n,e)=>n in a?jt(a,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[n]=e,G=(a,n)=>{for(var e in n||(n={}))Ui.call(n,e)&&Hr(a,e,n[e]);if(_i)for(var e of _i(n))ja.call(n,e)&&Hr(a,e,n[e]);return a},ie=(a,n)=>Fa(a,Ra(n)),Mi=(a,n)=>jt(a,"name",{value:n,configurable:!0});var k=(a,n)=>()=>(a&&(n=a(a=0)),n);var Ba=(a,n)=>()=>(n||a((n={exports:{}}).exports,n),n.exports),Y=(a,n)=>{for(var e in n)jt(a,e,{get:n[e],enumerable:!0})},qa=(a,n,e,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of Pa(n))!Ui.call(a,r)&&r!==e&&jt(a,r,{get:()=>n[r],enumerable:!(t=zi(n,r))||t.enumerable});return a};var U=a=>qa(jt({},"__esModule",{value:!0}),a);var P=a=>{var n;return[,,,La((n=a==null?void 0:a[Wi("metadata")])!=null?n:null)]},Di=["class","method","getter","setter","accessor","field","value","get","set"],xr=a=>a!==void 0&&typeof a!="function"?Bt("Function expected"):a,Oa=(a,n,e,t,r)=>({kind:Di[a],name:n,metadata:t,addInitializer:i=>e._?Bt("Already initialized"):r.push(xr(i||null))}),_a=(a,n)=>Hr(n,Wi("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,d,u,g=n&7,p=!!(n&8),m=!!(n&16),f=g>3?a.length+1:g?p?1:2:0,h=Di[g+5],x=g>3&&(a[f-1]=[]),b=a[f]||(a[f]=[]),S=g&&(!m&&!p&&(r=r.prototype),g<5&&(g>3||!m)&&zi(g<4?r:{get[e](){return c(this,i)},set[e](A){return y(this,i,A)}},e));g?m&&g<4&&Mi(i,(g>2?"set ":g>1?"get ":"")+e):Mi(r,e);for(var w=t.length-1;w>=0;w--)d=Oa(g,e,l={},a[3],b),g&&(d.static=p,d.private=m,u=d.access={has:m?A=>Ma(r,A):A=>e in A},g^3&&(u.get=m?A=>(g^1?c:N)(A,r,g^4?i:S.get):A=>A[e]),g>2&&(u.set=m?(A,I)=>y(A,r,I,g^4?i:S.set):(A,I)=>A[e]=I)),o=(0,t[w])(g?g<4?m?i:S[h]:g>4?void 0:{get:S.get,set:S.set}:r,d),l._=1,g^4||o===void 0?xr(o)&&(g>4?x.unshift(o):g?m?i=o:S[h]=o:r=o):typeof o!="object"||o===null?Bt("Object expected"):(xr(s=o.get)&&(S.get=s),xr(s=o.set)&&(S.set=s),xr(s=o.init)&&x.unshift(s));return g||_a(a,r),S&&jt(r,e,S),m?g^4?i:S:r},de=(a,n,e)=>Hr(a,typeof n!="symbol"?n+"":n,e),Sn=(a,n,e)=>n.has(a)||Bt("Cannot "+e),Ma=(a,n)=>Object(n)!==n?Bt('Cannot use the "in" operator on this value'):a.has(n),c=(a,n,e)=>(Sn(a,n,"read from private field"),e?e.call(a):n.get(a)),T=(a,n,e)=>n.has(a)?Bt("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(a):n.set(a,e),y=(a,n,e,t)=>(Sn(a,n,"write to private field"),t?t.call(a,e):n.set(a,e),e),N=(a,n,e)=>(Sn(a,n,"access private method"),e);var Gr=(a,n,e,t)=>({set _(r){y(a,n,r,e)},get _(){return c(a,n,t)}});var Hi=(a,n,e)=>new Promise((t,r)=>{var i=l=>{try{o(e.next(l))}catch(d){r(d)}},s=l=>{try{o(e.throw(l))}catch(d){r(d)}},o=l=>l.done?t(l.value):Promise.resolve(l.value).then(i,s);o((e=e.apply(a,n)).next())});var Gi,Vi,Xi=k(()=>{"use strict";Gi=(()=>{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})(),Vi=(()=>{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 Ie(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 Ze,qt=k(()=>{"use strict";Ze=a=>decodeURIComponent(a.replace(/%(?![\da-f]{2})/giu,"%25"))});var Ae,Qi,qe,Oe,_e,Ee,pt,Ki,oe,ad,Te,za,Ua,ut,Ji,ld,Wa,Da,Ot,Me,te=k(()=>{"use strict";qt();Ae=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,Qi=String.raw`[^[\]<>"\0-\x1F\x7F${Ae}\uFFFD]`,qe=String.raw`(?:\[[\da-f:.]+\]|${Qi})`,Oe=String.raw`(?:${Qi}|\0\d+[cn!~]\x7F)*`,_e=a=>a.trim().toLowerCase(),Ee=(a,n)=>a.replace(/\0(\d+)\x7F/gu,(e,t)=>n[t]),pt=(a,n)=>e=>e.replace(a,n),Ki=pt(/[\0\x7F]|\r$/gmu,""),oe=pt(/\0\d+[cn]\x7F/gu,""),ad=pt(/[\\{}()|.?*+^$[\]]/gu,String.raw`\$&`),Te=(a,n="")=>a.map(e=>typeof e=="string"?e:e.text()).join(n),za={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},Ua=pt(/&(?:#(\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)):za[e.toLowerCase()]),ut=a=>Ua(a),Ji=pt(/&#(\d+|x[\da-f]+);/giu,(a,n)=>String.fromCodePoint(+((/^x/iu.test(n)?"0":"")+n))),ld=pt(/\n/gu,String.raw`\n`),Wa={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},Da=a=>pt(a,n=>`&${Wa[n]};`),Ot=Da(/[&<>]/gu),Me=(a,n={})=>{let{pre:e="",post:t="",sep:r=""}=n;return e+a.map(i=>i.print()).join(r)+t}});var Yi=Ba((pd,Ha)=>{Ha.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 wn,Zi=k(()=>{"use strict";wn=Yi()});var br,_t,Tr,yr,Cn,R,re=k(()=>{"use strict";R=class{constructor(n,e){T(this,yr);T(this,br);T(this,_t);T(this,Tr);y(this,br,n),y(this,_t,e)}get start(){return c(this,_t)}get top(){return N(this,yr,Cn).call(this).top}get left(){return N(this,yr,Cn).call(this).left}};br=new WeakMap,_t=new WeakMap,Tr=new WeakMap,yr=new WeakSet,Cn=function(){var n;return(n=c(this,Tr))!=null||y(this,Tr,c(this,br).getRootNode().posFromIndex(c(this,_t))),c(this,Tr)}});var $n,es,C,L,Se,ts,_=k(()=>{"use strict";ge();re();X();$n=(a,n,e,t)=>({line:a+e-1,character:(e===1?n:0)+t}),es=a=>(n,e,t,r,i="error")=>{let{start:s}=e,{top:o,left:l}=e instanceof R?e:new R(n,s),{offsetHeight:d,offsetWidth:u}=n,{startIndex:g,startLine:p,startCol:m}=a(n,s,o,l),{line:f,character:h}=$n(p,m,d,u);return{rule:t,message:$.msg(r),severity:i,startIndex:g,endIndex:g+n.toString().length,startLine:p,endLine:f,startCol:m,endCol:h}},C=es((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=es((a,n,e,t)=>({startIndex:n,startLine:e,startCol:t})),Se=(a,n,e)=>{if(a)return a[1];let t=n();return e([ce.rev,t]),t},ts=(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 Ga,Vr,rs=k(()=>{"use strict";Ga=(a,n,e)=>{if(a.includes("#")){let[t,...r]=a.split("#");return(!t||t===n)&&r.every(i=>i===e)}return!a||a===n},Vr=(a,n,e)=>({type:t,name:r})=>a.split(",").some(i=>Ga(i.trim(),t,r))});var kr,Mt,zt,vr,Ar,Ut,Wt,Sr,Nn,Dt,In=k(()=>{"use strict";_();ge();Dt=class{constructor(){T(this,Sr);de(this,"childNodes",[]);T(this,kr);T(this,Mt);T(this,zt);T(this,vr);T(this,Ar);T(this,Ut);T(this,Wt,{})}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get parentNode(){return c(this,kr)}get nextSibling(){return c(this,Mt)}get previousSibling(){return c(this,zt)}get offsetHeight(){return N(this,Sr,Nn).call(this).height}get offsetWidth(){return N(this,Sr,Nn).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,kr,e),e||(y(this,Mt,void 0),y(this,zt,void 0));break;case"nextSibling":y(this,Mt,e);break;case"previousSibling":y(this,zt,e);break;case"aIndex":y(this,Ut,[ce.rev,e]);break;default:this[n]=e}}getRootNode(){return Se(c(this,Ar),()=>{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,Ar,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 Se(c(this,Wt)[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,Wt)[i]=[ce.rev,r],r+=e[i].toString().length+this.getGaps(i);return r},e=>{c(this,Wt)[n]=e})}getAbsoluteIndex(){return Se(c(this,Ut),()=>{let{parentNode:n}=this;return n?n.getAbsoluteIndex()+this.getRelativeIndex():0},n=>{y(this,Ut,n)})}getBoundingClientRect(){}is(n){return this.type===n}getLines(){return Se(c(this,vr),()=>{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,vr,n)})}seal(n,e){Object.defineProperty(this,n,{enumerable:!e&&!!this[n],configurable:!0})}};kr=new WeakMap,Mt=new WeakMap,zt=new WeakMap,vr=new WeakMap,Ar=new WeakMap,Ut=new WeakMap,Wt=new WeakMap,Sr=new WeakSet,Nn=function(){let n=this.getLines(),e=n[n.length-1];return{height:n.length,width:e[2]-e[1]}}});var et,En,Ln,Xr,ns=k(()=>{"use strict";te();ge();rs();In();Xr=class extends Dt{constructor(){super(...arguments);T(this,et)}get length(){return this.childNodes.length}text(e){return Te(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 wr(this,e,1)[0]}insertAt(e,t=this.length){return wr(this,t,0,[e]),e}closest(e){let t=Vr(e,this),{parentNode:r}=this;for(;r;){if(t(r))return r;({parentNode:r}=r)}}querySelector(e){let t=Vr(e,this);return N(this,et,En).call(this,t)}querySelectorAll(e){let t=Vr(e,this);return N(this,et,Ln).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}">`)+Me(this.childNodes,e)+(t===""?"":"</span>"):""}json(e,t=this.getAbsoluteIndex()){let r=ie(G({},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}};et=new WeakSet,En=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,et,En).call(t,e);if(i)return i}},Ln=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,et,Ln).call(r,e)]);return t}});var Fn,ss,Va,Xa,Qa,Ka,Ja,is,Rn,Qr,os,Cr,as=k(()=>{"use strict";te();_();X();In();Fn=String.raw`[${Ae}\t]*`,ss=String.raw`<\s*(?:/\s*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+|(?:rfc|pmid)(?=[-::]?${Fn}\d)|isbn(?=[-::]?${Fn}(?:\d(?:${Fn}|-)){6})`,Va=new RegExp(String.raw`${ss}|https?[:/]/+`,"giu"),Xa=new RegExp(ss,"giu"),Qa=new Set(["attr-value","ext-link-text","link-text"]),Ka={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},Ja={"<":"tag-like","[":"lonely-bracket","{":"lonely-bracket","]":"lonely-bracket","}":"lonely-bracket",h:"lonely-http",r:"lonely-http",p:"lonely-http",i:"lonely-http"},is=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{Rn=new RegExp(String.raw`[\p{L}\p{N}_]`,"u")}catch(a){Rn=/\w/u}Cr=class extends Dt{constructor(e){super();T(this,Qr);de(this,"data","");this.data=e}get type(){return"text"}toString(e){var t;return e&&!((t=this.parentNode)!=null&&t.getAttribute("built"))?oe(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:d,parentNode:u}=i,g=!1;if(l==="attr-value"){let{type:V,name:ne,tag:se}=u;if(V!=="ext-attr")g=!0;else if(se==="ref"&&(ne==="name"||ne==="extends"||ne==="follow")||se==="choose"&&(ne==="before"||ne==="after"))return[]}if(t!=null||(t=l==="free-ext-link"||l==="ext-link-url"||l==="ext-link-text"||l==="image-parameter"&&d==="link"||g?Xa:Va),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],...is]);for(let V=t.exec(r);V;V=t.exec(r)){let[,ne,se]=V,{index:Z,0:K}=V;if(se&&se!=="]"){let{length:fe}=se;Z+=fe,K=K.slice(fe)}K=K.toLowerCase();let{0:E,length:Ne}=K,ve=E==="r"||E==="p"||E==="i";if(E==="<"&&!q.has(ne.toLowerCase())||E==="["&&l==="ext-link-text"&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(r.slice(Z+1))||s!=null&&s.is("ext")&&f==="nowiki"&&((M=s.innerText)!=null&&M.includes("]")))||ve&&(!i.isPlain()||Qa.has(l)))continue;E==="]"&&(Z||Ne>1)&&t.lastIndex--;let le=e+Z,je=le+Ne,Be=b[je],yn=b[le-1],kn=Ne>1&&!(E==="<"&&(/^<\s/u.test(K)||!/[\s/>]/u.test(Be!=null?Be:"")||is.has(ne))||g&&(E==="["||E==="]")||ve&&l==="parameter-value"||/^(?:rfc|pmid|isbn)$/iu.test(K))||E==="{"&&(Be===E||yn==="-")||E==="}"&&(yn===E||Be==="-")||E==="["&&(l==="ext-link-text"||m==="free-ext-link"&&!r.slice(Z+1).trim())||E==="]"&&h==="free-ext-link"&&!r.slice(0,Z).includes("]")?"error":"warning",vn=E==="{"||E==="[";if(kn==="warning"&&(vn||(E==="]"||E==="}"))){let fe=Ka[E],An=vn?r.slice(Z+1):r.slice(0,Z);if(E==="{"&&((F=fe.exec(An))==null?void 0:F[0])==="}"||E==="}"&&((H=fe.exec(An))==null?void 0:H[0])==="{")continue;if(!An.includes(E)){let Oi=vn?"nextSibling":"previousSibling",gt=this[Oi];for(;gt&&(gt.type!=="text"||!fe.test(gt.data));)gt=gt[Oi];if(gt&&fe.exec(gt.data)[0]!==E)continue}}ve&&(K=K.toUpperCase());let ji=this.posFromIndex(Z),{line:Bi,character:qi}=$n(A,I,ji.top+1,ji.left),Pt={rule:Ja[E],message:$.msg('lonely "$1"',ve||E==="h"?K:E),severity:kn,startIndex:le,endIndex:je,startLine:Bi,endLine:Bi,startCol:qi,endCol:qi+Ne};if(E==="<")Pt.suggestions=[{desc:"escape",range:[le,le+1],text:"<"}];else if(E==="h"&&l!=="link-text"&&Rn.test(yn||""))Pt.suggestions=[{desc:"whitespace",range:[le,le],text:" "}];else if(E==="["&&l==="ext-link-text"){let fe=i.getAbsoluteIndex()+i.toString().length;Pt.suggestions=[{desc:"escape",range:[fe,fe+1],text:"]"}]}else if(E==="]"&&h==="free-ext-link"&&kn==="error"){let fe=e-o.toString().length;Pt.fix={range:[fe,fe],text:"[",desc:"left bracket"}}else ve&&(Pt.suggestions=[...V[0]===K?[]:[{desc:"uppercase",range:[le,je],text:K}],...Be===":"||Be===":"?[{desc:"whitespace",range:[je,je+1],text:" "}]:[]]);p.push(Pt)}return p}replaceData(e){N(this,Qr,os).call(this,e)}print(){return Ot(this.data)}};Qr=new WeakSet,os=function(e){this.setAttribute("data",e)}});var ye,ct=k(()=>{"use strict";ge();ye=(a=!0,n=!0)=>e=>{class t extends e{text(){return""}lint(i){return a?[]:super.lint(i)}}return Le(t,e),t}});var $r,he,ht=k(()=>{"use strict";O();he=class extends v{constructor(e,t,r,i,s){super(e,r,i,s);T(this,$r);y(this,$r,t)}get type(){return c(this,$r)}lint(e=this.getAbsoluteIndex()){return super.lint(e,!1)}};$r=new WeakMap});var pe,ze=k(()=>{"use strict";ge();pe=({length:a})=>n=>{class e extends n{getAttribute(r){return r==="padding"?a:super.getAttribute(r)}}return Le(e,n),e}});var Ht,Q,Ue=k(()=>{"use strict";O();Q=class extends v{constructor(e,t,r,i,s){super(e,r,i,s);T(this,Ht);y(this,Ht,t)}get type(){return c(this,Ht)}set type(e){y(this,Ht,e)}};Ht=new WeakMap});var Ya,ls,mt,we,We,Pn,Za,xe,Nr=k(()=>{"use strict";_();te();re();ze();O();Ue();Ya=a=>a==="redirect-target"||a==="link";ls=[pe("[[")];xe=class extends(Za=v){constructor(e,t,r,i=[],s="|"){super(void 0,r,i,{});T(this,mt,!0);T(this,we);T(this,We);if(this.insertAt(new Q(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,we,s)}get link(){}get fragment(){return c(this,We).fragment}afterBuild(){y(this,We,this.getTitle()),c(this,we).includes("\0")&&y(this,we,this.buildFromStr(c(this,we),0)),this.setAttribute("name",c(this,We).title),super.afterBuild()}setAttribute(e,t){e==="bracket"?y(this,mt,t):e==="title"?y(this,We,t):super.setAttribute(e,t)}toString(e){let t=super.toString(e,c(this,we));return c(this,mt)?`[[${t}]]`:t}text(){let e=super.text("|");return c(this,mt)?`[[${e}]]`:e}getAttribute(e){return e==="title"?c(this,We):super.getAttribute(e)}getGaps(e){return e===0?c(this,we).length:1}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{childNodes:[i,s],type:o}=this,{encoded:l,fragment:d}=c(this,We),u=new R(this,e);if(i.childNodes.some(({type:g})=>g==="template")&&r.push(C(i,u,"unknown-page","template in an internal link target","warning")),l){let g=C(i,u,"url-encoding","unnecessary URL encoding in an internal link");g.suggestions=[{desc:"decode",range:[g.startIndex,g.endIndex],text:Ze(i.text())}],r.push(g)}if(o==="link"||o==="category"){let g=s==null?void 0:s.childNodes.findIndex(m=>m.type==="text"&&m.data.includes("|")),p=s==null?void 0:s.childNodes[g];if(p){let m=C(s,u,"pipe-like",'additional "|" in the link text',"warning"),f=m.startIndex+s.getRelativeIndex(g);m.suggestions=[{desc:"escape",range:[f,f+p.data.length],text:p.data.replace(/\|/gu,"|")}],r.push(m)}}if(d!==void 0&&!Ya(o)){let g=C(i,u,"no-ignored","useless fragment"),p=i.childNodes.findIndex(f=>f.type==="text"&&f.data.includes("#")),m=i.childNodes[p];m&&(g.fix={range:[g.startIndex+i.getRelativeIndex(p)+m.data.indexOf("#"),g.endIndex],text:"",desc:"remove"}),r.push(g)}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,mt)?{pre:"[[",post:"]]",sep:c(this,we)}:{sep:c(this,we)})}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}};Pn=P(Za),mt=new WeakMap,we=new WeakMap,We=new WeakMap,xe=B(Pn,0,"LinkBaseToken",ls,xe),j(Pn,1,xe)});var ue,tt=k(()=>{"use strict";O();ue=class extends v{get innerText(){return this.firstChild.data}constructor(n="",e,t){super(n,e,t)}}});var ds,jn,el,z,De=k(()=>{"use strict";ct();tt();ds=[ye()];z=class extends(el=ue){get type(){return"noinclude"}toString(n){return n?"":super.toString()}};jn=P(el),z=B(jn,0,"NoincludeToken",ds,z),j(jn,1,z)});var Kr,gs=k(()=>{"use strict";_();Nr();De();Kr=class extends xe{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 ps,rt,Gt,Bn,tl,ft,us=k(()=>{"use strict";ct();O();ht();gs();ps=[ye(!1,!1)];ft=class extends(tl=v){constructor(e,t,r,i,s,o,l=[]){super(void 0,o,l);T(this,rt);T(this,Gt);y(this,rt,e),y(this,Gt,s),this.append(new he(t,"redirect-syntax",o,l),new Kr(r,i==null?void 0:i.slice(1),o,l))}get type(){return"redirect"}getAttribute(e){return e==="padding"?c(this,rt).length:super.getAttribute(e)}toString(e){return c(this,rt)+super.toString(e)+c(this,Gt)}lint(e=this.getAbsoluteIndex()){let t=e+c(this,rt).length+this.firstChild.toString().length;return this.lastChild.setAttribute("aIndex",t),this.lastChild.lint(t)}print(){return super.print({pre:c(this,rt),post:c(this,Gt)})}};Bn=P(tl),rt=new WeakMap,Gt=new WeakMap,ft=B(Bn,0,"RedirectToken",ps,ft),j(Bn,1,ft)});var cs={};Y(cs,{parseRedirect:()=>rl});var rl,hs=k(()=>{"use strict";X();us();rl=(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 ft(...t.slice(1),n,e),a):!1}});var ms,qn,nl,xt,fs=k(()=>{"use strict";ze();O();ms=[pe("<onlyinclude>")];xt=class extends(nl=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"><onlyinclude></span>',post:'<span class="wpb-ext"></onlyinclude></span>'})}};qn=P(nl),xt=B(qn,0,"OnlyincludeToken",ms,xt),j(qn,1,xt)});var nt,Ir=k(()=>{"use strict";ge();nt=(a=1)=>n=>{class e extends n{getGaps(){return a}}return Le(e,n),e}});var xs,it,On,il,$e,Jr=k(()=>{"use strict";Ir();O();xs=[nt()];$e=class extends(il=v){constructor(e,t,r,i,s,o=[]){super(void 0,s);T(this,it);de(this,"closed");de(this,"selfClosing");this.setAttribute("name",e.toLowerCase()),y(this,it,[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,it);return t?`<${s}${r.toString(e)}/>`:`<${s}${r.toString(e)}>${i.toString(e)}${this.closed?`</${o}>`:""}`}text(){let[e,t]=c(this,it);return this.selfClosing?`<${e}${this.firstChild.text()}/>`:`<${e}${super.text(">")}${this.closed?`</${t}>`:""}`}getAttribute(e){return e==="padding"?c(this,it)[0].length+1:super.getAttribute(e)}print(){let[e,t]=c(this,it);return super.print(this.selfClosing?{pre:`<${e}`,post:"/>"}:{pre:`<${e}`,sep:">",post:this.closed?`</${t}>`:""})}};On=P(il),it=new WeakMap,$e=B(On,0,"TagPairToken",xs,$e),j(On,1,$e)});var Zr,bs,Yr,Ts=k(()=>{"use strict";O();Jr();ht();De();Yr=class extends $e{constructor(e,t,r,i=[]){let s=new he(e,"translate-attr",r,i);t=t==null?void 0:t.replace(/(<tvar\|[^>]+>)([\s\S]*?)(<\/>)/gu,(l,d,u,g)=>(new z(d,r,i),new z(g,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,d,u,g,p)=>(new z(d,r,i),new z(p,r,i),`\0${i.length-1}n${g}\0${i.length}n`));let o=new v(t,r,i);o.type="translate-inner";super("translate",s,o,"translate",r,i);T(this,Zr);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"><translate${N(this,Zr,bs).call(this)?'<span class="wpb-ext-attrs"> <span class="wpb-ext-attr"><span class="wpb-attr-key">nowrap</span></span></span>':""}>${this.lastChild.print({class:"ext-inner"})}</translate></span>`}};Zr=new WeakSet,bs=function(){return this.firstChild.toString()===" nowrap"}});var ys,_n,sl,bt,ks=k(()=>{"use strict";_();re();ct();X();Jr();ys=[ye(!1)];bt=class extends(sl=$e){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}};_n=P(sl),bt=B(_n,0,"IncludeToken",ys,bt),j(_n,1,bt)});var Vt,en=k(()=>{"use strict";ge();Vt=(a=0)=>n=>{var t,vs;class e extends n{constructor(){super(...arguments);T(this,t)}getAttr(o){return N(this,t,vs).call(this).getAttr(o)}}return t=new WeakSet,vs=function(){return this.childNodes[a]},Le(e,n),e}});var ee,As,Ss,tn,zn,ws,Xt,$s,Ns,Is,Mn,Cs,Fe,Es,Ls,Fs,Rs,Ps=k(()=>{"use strict";ee=new Set(["align"]),As=new Set(["cite"]),Ss=new Set(["cite","datetime"]),tn=new Set(["width"]),zn=new Set(["axis","align","bgcolor","height","width","valign"]),ws=new Set([...zn,"abbr","headers","scope","rowspan","colspan"]),Xt=new Set(["type"]),$s=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),Ns=new Set(["clear"]),Is=new Set(["bgcolor","align","valign"]),Mn=new Set(["qid","forcemathmode","type","display"]),Cs=new Set(["enclose","inline","lang","line","linelinks","style","class","id","dir","copy","highlight","start"]),Fe=new Set,Es=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"]),Ls={div:ee,h1:ee,h2:ee,h3:ee,h4:ee,h5:ee,h6:ee,blockquote:As,q:As,p:ee,br:Ns,pre:tn,ins:Ss,del:Ss,ul:Xt,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...$s,"border"]),caption:ee,tr:Is,td:ws,th:ws,img:new Set(["alt","src","width","height","srcset"]),font:new Set(["size","color","face"]),hr:tn,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:Xt,poem:ee,categorytree:ee,combooption:ee,math:Fe,chem:Fe,ce:Fe},Fs={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:Fe,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:Fe,inputbox:Fe,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:Fe,poll:new Set(["id","show-results-before-voting"]),sm2:Xt,flashmp3:Xt,score:new Set(["line_width_inches","lang","override_midi","raw","note-language","override_audio","override_ogg","sound","vorbis"]),seo:new Set(["title","title_mode","title_separator","keywords","description","robots","google_bot","image","image_width","image_height","image_alt","type","site_name","locale","section","author","published_time","twitter_site"]),tab:new Set(["nested","name","index","class","block","inline","openname","closename","collapsed","dropdown","style","bgcolor","container","id","title"]),tabs:new Set(["plain","class","container","id","title","style"]),combobox:new Set(["placeholder","value","id","class","text","dropdown","style"]),math:new Set([...Mn,"chem"]),chem:Mn,ce:Mn,hiero:Fe,phonos:new Set(["ipa","class","text","lang","wikibase","file"]),section:new Set(["begin","end"]),source:Cs,syntaxhighlight:Cs,templatedata:Fe,timeline:new Set(["method","font"]),quiz:new Set(["display","shuffleanswers","points","shuffle","case"]),languages:Fe},Rs={table:$s,td:new Set([...zn,"scope"]),th:zn,br:Ns,caption:ee,div:ee,hr:tn,h1:ee,h2:ee,h3:ee,h4:ee,h5:ee,h6:ee,li:Xt,p:ee,pre:tn,tr:Is,ul:Xt}});var ol,al,Er,Qt,ae,Re,Kt,js=k(()=>{"use strict";_();te();Ps();re();X();O();Ue();ol=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,al=new Set(["ext","arg","magic-word","template"]),Kt=class extends v{constructor(e,t,r,i="",s,o=[],l=$.getConfig(),d=[]){let u=new Q(r,"attr-key",l,d),g;if(r==="title"||t==="img"&&r==="alt")g=new v(s,l,d,{}),g.type="attr-value",g.setAttribute("stage",10);else if(t==="gallery"&&r==="caption"||t==="choose"&&(r==="before"||r==="after")){let p=ie(G({},l),{excludes:[...l.excludes,"heading","html","table","hr","list"]});g=new v(s,p,d,{}),g.type="attr-value",g.setAttribute("stage",1)}else g=new Q(s,"attr-value",l,d,{});super(void 0,l,d);T(this,Er);T(this,Qt);T(this,ae);T(this,Re);y(this,Er,e),this.append(u,g),y(this,ae,i),y(this,Re,[...o]),y(this,Qt,t),this.setAttribute("name",_e(oe(r)))}get type(){return c(this,Er)}get tag(){return c(this,Qt)}get balanced(){return!c(this,ae)||c(this,Re)[0]===c(this,Re)[1]}afterBuild(){c(this,ae).includes("\0")&&y(this,ae,this.buildFromStr(c(this,ae),0)),this.parentNode&&y(this,Qt,this.parentNode.name),this.setAttribute("name",_e(this.firstChild.text())),super.afterBuild()}toString(e){let[t="",r=""]=c(this,Re);return c(this,ae)?super.toString(e,c(this,ae)+t)+r:this.firstChild.toString(e)}text(){return c(this,ae)?`${super.text(`${c(this,ae).trim()}"`)}"`:this.firstChild.text()}getGaps(){var e,t;return c(this,ae)?c(this,ae).length+((t=(e=c(this,Re)[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:d,tag:u}=this,g=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,Re)[0],desc:"close"}],r.push(b)}let m=Fs[u],f=Ls[u],{length:h}=this.toString();if(!(m!=null&&m.has(d))&&!(f!=null&&f.has(d))&&(l==="ext-attr"?m||f:!/\{\{[^{]+\}\}/u.test(d))&&(l==="ext-attr"&&!f||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(d)&&(u==="meta"||u==="link"||!Es.has(d)))){let b=C(s,p,"illegal-attr","illegal attribute name");b.suggestions=[{desc:"remove",range:[e,e+h],text:""}],r.push(b)}else if(d==="style"&&typeof g=="string"&&ol.test(g))r.push(C(o,p,"insecure-style","insecure style"));else if(d==="tabindex"&&typeof g=="string"&&g!=="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})=>al.has(b))){let b=ts(u,d),S=String(g).toLowerCase();b.length>0&&b.every(w=>w!==S)&&r.push(C(o,p,"illegal-attr","illegal attribute value","warning"))}return(x=Rs[u])!=null&&x.has(d)&&r.push(C(s,p,"obsolete-attr","obsolete attribute","warning")),r}getValue(){return c(this,ae)?this.lastChild.text().trim():this.type==="ext-attr"||""}print(){let[e="",t=""]=c(this,Re);return c(this,ae)?super.print({sep:Ot(c(this,ae))+e,post:t}):super.print()}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return r.tag=this.tag,r}};Er=new WeakMap,Qt=new WeakMap,ae=new WeakMap,Re=new WeakMap});var Bs,ll,Un,Lr,st,rn=k(()=>{"use strict";_();te();re();X();O();Ue();js();Bs=a=>a.slice(0,-1),ll=a=>`${Bs(a)}-dirty`;try{Un=new RegExp(String.raw`[\p{L}\p{N}]`,"u")}catch(a){Un=/[^\W_]/u}st=class extends v{constructor(e,t,r,i,s=[]){super(void 0,i,s,{});T(this,Lr);if(y(this,Lr,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="",d=o.exec(e),u=0,g=()=>{l&&(super.insertAt(new Q(l,ll(t),i,s,{})),l="")};for(;d;){let{index:p,0:m,1:f,2:h,3:x,4:b,5:S,6:w}=d;if(l+=e.slice(u,p),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(oe(f).trim())){let A=b!=null?b:w,I=[x,S],q=new Kt(Bs(t),r,f,h,A,I,i,s);g(),super.insertAt(q)}else l+=m;({lastIndex:u}=o),d=o.exec(e)}l+=e.slice(u),g()}}get type(){return c(this,Lr)}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 Kt&&(!e||t.name===_e(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,d=new R(this,e);if((i==null?void 0:i.type)==="html"&&i.closing&&this.text().trim()){let u=L(this,d,"no-ignored","attributes of a closing tag"),g=i.getAbsoluteIndex();u.suggestions=[{desc:"remove",range:[e,u.endIndex],text:""},{desc:"open",range:[g+1,g+2],text:""}],r.push(u)}for(let u of s)if(u instanceof Kt){let{name:g}=u;o.has(g)?(l.add(g),o.get(g).push(u)):o.set(g,[u])}else{let g=u.text().trim();if(g){let p=C(u,d,"no-ignored","containing invalid attribute",Un.test(g)?"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 g=o.get(u).map(p=>{let m=p.getValue();return[p,m===!0?"":m]});r.push(...g.map(([p,m],f)=>{let h=C(p,d,"no-duplicate",$.msg("duplicated $1 attribute",u)),x={desc:"remove",range:[h.startIndex,h.endIndex],text:""};return!m||g.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 Q?{class:e.toString().trim()&&"attr-dirty"}:void 0)).join("")}</span>`:""}};Lr=new WeakMap});var qs={};Y(qs,{PreToken:()=>Wn});var Wn,Os=k(()=>{"use strict";O();De();Wn=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),d=0,u="";for(;o&&l;)new z(o[0],e,t),new z(l[0],e,t),u+=`${n.slice(d,o.index)}\0${t.length-1}n${n.slice(o.index+s,l.index)}\0${t.length}n`,d=l.index+s+1,r.lastIndex=d,o=r.exec(n),o&&(i.lastIndex=o.index+s),l=i.exec(n);n=u+n.slice(d)}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 Jt,nn=k(()=>{"use strict";ge();Jt=a=>{class n extends a{toString(t){return super.toString(t,`
|
|
1
|
+
"use strict";(()=>{var Ra=Object.create;var jt=Object.defineProperty,Pa=Object.defineProperties,Ui=Object.getOwnPropertyDescriptor,ja=Object.getOwnPropertyDescriptors,Ba=Object.getOwnPropertyNames,Mi=Object.getOwnPropertySymbols;var Wi=Object.prototype.hasOwnProperty,Oa=Object.prototype.propertyIsEnumerable;var Di=(a,n)=>(n=Symbol[a])?n:Symbol.for("Symbol."+a),Bt=a=>{throw TypeError(a)};var Hr=(a,n,e)=>n in a?jt(a,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[n]=e,V=(a,n)=>{for(var e in n||(n={}))Wi.call(n,e)&&Hr(a,e,n[e]);if(Mi)for(var e of Mi(n))Oa.call(n,e)&&Hr(a,e,n[e]);return a},ie=(a,n)=>Pa(a,ja(n)),zi=(a,n)=>jt(a,"name",{value:n,configurable:!0});var k=(a,n)=>()=>(a&&(n=a(a=0)),n);var qa=(a,n)=>()=>(n||a((n={exports:{}}).exports,n),n.exports),Y=(a,n)=>{for(var e in n)jt(a,e,{get:n[e],enumerable:!0})},_a=(a,n,e,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of Ba(n))!Wi.call(a,r)&&r!==e&&jt(a,r,{get:()=>n[r],enumerable:!(t=Ui(n,r))||t.enumerable});return a};var U=a=>_a(jt({},"__esModule",{value:!0}),a);var P=a=>{var n;return[,,,Ra((n=a==null?void 0:a[Di("metadata")])!=null?n:null)]},Hi=["class","method","getter","setter","accessor","field","value","get","set"],xr=a=>a!==void 0&&typeof a!="function"?Bt("Function expected"):a,Ma=(a,n,e,t,r)=>({kind:Hi[a],name:n,metadata:t,addInitializer:i=>e._?Bt("Already initialized"):r.push(xr(i||null))}),za=(a,n)=>Hr(n,Di("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,d,u,g=n&7,p=!!(n&8),m=!!(n&16),f=g>3?a.length+1:g?p?1:2:0,h=Hi[g+5],x=g>3&&(a[f-1]=[]),b=a[f]||(a[f]=[]),S=g&&(!m&&!p&&(r=r.prototype),g<5&&(g>3||!m)&&Ui(g<4?r:{get[e](){return c(this,i)},set[e](A){return y(this,i,A)}},e));g?m&&g<4&&zi(i,(g>2?"set ":g>1?"get ":"")+e):zi(r,e);for(var C=t.length-1;C>=0;C--)d=Ma(g,e,l={},a[3],b),g&&(d.static=p,d.private=m,u=d.access={has:m?A=>Ua(r,A):A=>e in A},g^3&&(u.get=m?A=>(g^1?c:N)(A,r,g^4?i:S.get):A=>A[e]),g>2&&(u.set=m?(A,I)=>y(A,r,I,g^4?i:S.set):(A,I)=>A[e]=I)),o=(0,t[C])(g?g<4?m?i:S[h]:g>4?void 0:{get:S.get,set:S.set}:r,d),l._=1,g^4||o===void 0?xr(o)&&(g>4?x.unshift(o):g?m?i=o:S[h]=o:r=o):typeof o!="object"||o===null?Bt("Object expected"):(xr(s=o.get)&&(S.get=s),xr(s=o.set)&&(S.set=s),xr(s=o.init)&&x.unshift(s));return g||za(a,r),S&&jt(r,e,S),m?g^4?i:S:r},ge=(a,n,e)=>Hr(a,typeof n!="symbol"?n+"":n,e),Sn=(a,n,e)=>n.has(a)||Bt("Cannot "+e),Ua=(a,n)=>Object(n)!==n?Bt('Cannot use the "in" operator on this value'):a.has(n),c=(a,n,e)=>(Sn(a,n,"read from private field"),e?e.call(a):n.get(a)),T=(a,n,e)=>n.has(a)?Bt("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(a):n.set(a,e),y=(a,n,e,t)=>(Sn(a,n,"write to private field"),t?t.call(a,e):n.set(a,e),e),N=(a,n,e)=>(Sn(a,n,"access private method"),e);var Gr=(a,n,e,t)=>({set _(r){y(a,n,r,e)},get _(){return c(a,n,t)}});var Gi=(a,n,e)=>new Promise((t,r)=>{var i=l=>{try{o(e.next(l))}catch(d){r(d)}},s=l=>{try{o(e.throw(l))}catch(d){r(d)}},o=l=>l.done?t(l.value):Promise.resolve(l.value).then(i,s);o((e=e.apply(a,n)).next())});var Vi,Xi,Qi=k(()=>{"use strict";Vi=(()=>{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})(),Xi=(()=>{let a=["bold-header","format-leakage","fostered-content","h1","illegal-attr","insecure-style","invalid-gallery","invalid-imagemap","invalid-invoke","invalid-isbn","lonely-apos","lonely-bracket","lonely-http","nested-link","no-arg","no-duplicate","no-ignored","obsolete-attr","obsolete-tag","parsing-order","pipe-like","table-layout","tag-like","unbalanced-header","unclosed-comment","unclosed-quote","unclosed-table","unescaped","unknown-page","unmatched-tag","unterminated-url","url-encoding","var-anchor","void-ext"];return Object.freeze(a),a})()});function Ie(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 Ze,Ot=k(()=>{"use strict";Ze=a=>decodeURIComponent(a.replace(/%(?![\da-f]{2})/giu,"%25"))});var Ae,Ki,Oe,qe,_e,Ee,pt,Ji,oe,pd,Te,Wa,Da,ut,Yi,ud,Ha,Ga,qt,Me,te=k(()=>{"use strict";Ot();Ae=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,Ki=String.raw`[^[\]<>"\0-\x1F\x7F${Ae}\uFFFD]`,Oe=String.raw`(?:\[[\da-f:.]+\]|${Ki})`,qe=String.raw`(?:${Ki}|\0\d+[cn!~]\x7F)*`,_e=a=>a.trim().toLowerCase(),Ee=(a,n)=>a.replace(/\0(\d+)\x7F/gu,(e,t)=>n[t]),pt=(a,n)=>e=>e.replace(a,n),Ji=pt(/[\0\x7F]|\r$/gmu,""),oe=pt(/\0\d+[cn]\x7F/gu,""),pd=pt(/[\\{}()|.?*+^$[\]]/gu,String.raw`\$&`),Te=(a,n="")=>a.map(e=>typeof e=="string"?e:e.text()).join(n),Wa={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},Da=pt(/&(?:#(\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)):Wa[e.toLowerCase()]),ut=a=>Da(a),Yi=pt(/&#(\d+|x[\da-f]+);/giu,(a,n)=>String.fromCodePoint(+((/^x/iu.test(n)?"0":"")+n))),ud=pt(/\n/gu,String.raw`\n`),Ha={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},Ga=a=>pt(a,n=>`&${Ha[n]};`),qt=Ga(/[&<>]/gu),Me=(a,n={})=>{let{pre:e="",post:t="",sep:r=""}=n;return e+a.map(i=>i.print()).join(r)+t}});var Zi=qa((md,Va)=>{Va.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 wn,es=k(()=>{"use strict";wn=Zi()});var br,_t,Tr,yr,Cn,R,re=k(()=>{"use strict";R=class{constructor(n,e){T(this,yr);T(this,br);T(this,_t);T(this,Tr);y(this,br,n),y(this,_t,e)}get start(){return c(this,_t)}get top(){return N(this,yr,Cn).call(this).top}get left(){return N(this,yr,Cn).call(this).left}};br=new WeakMap,_t=new WeakMap,Tr=new WeakMap,yr=new WeakSet,Cn=function(){var n;return(n=c(this,Tr))!=null||y(this,Tr,c(this,br).getRootNode().posFromIndex(c(this,_t))),c(this,Tr)}});var $n,ts,$,L,Se,rs,_=k(()=>{"use strict";pe();re();W();$n=(a,n,e,t)=>({line:a+e-1,character:(e===1?n:0)+t}),ts=a=>(n,e,t,r,i="error")=>{let{start:s}=e,{top:o,left:l}=e instanceof R?e:new R(n,s),{offsetHeight:d,offsetWidth:u}=n,{startIndex:g,startLine:p,startCol:m}=a(n,s,o,l),{line:f,character:h}=$n(p,m,d,u);return{rule:t,message:w.msg(r),severity:i,startIndex:g,endIndex:g+n.toString().length,startLine:p,endLine:f,startCol:m,endCol:h}},$=ts((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=ts((a,n,e,t)=>({startIndex:n,startLine:e,startCol:t})),Se=(a,n,e)=>{if(a&&w.viewOnly&&a[0]===ae.rev)return a[1];let t=n();return w.viewOnly&&e([ae.rev,t]),t},rs=(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 Xa,Vr,ns=k(()=>{"use strict";Xa=(a,n,e)=>{if(a.includes("#")){let[t,...r]=a.split("#");return(!t||t===n)&&r.every(i=>i===e)}return!a||a===n},Vr=(a,n,e)=>({type:t,name:r})=>a.split(",").some(i=>Xa(i.trim(),t,r))});var kr,Mt,zt,vr,Ar,Ut,Wt,Sr,Nn,Dt,In=k(()=>{"use strict";_();pe();W();Dt=class{constructor(){T(this,Sr);ge(this,"childNodes",[]);T(this,kr);T(this,Mt);T(this,zt);T(this,vr);T(this,Ar);T(this,Ut);T(this,Wt,{})}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get parentNode(){return c(this,kr)}get nextSibling(){return c(this,Mt)}get previousSibling(){return c(this,zt)}get offsetHeight(){return N(this,Sr,Nn).call(this).height}get offsetWidth(){return N(this,Sr,Nn).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,kr,e),e||(y(this,Mt,void 0),y(this,zt,void 0));break;case"nextSibling":y(this,Mt,e);break;case"previousSibling":y(this,zt,e);break;case"aIndex":w.viewOnly&&y(this,Ut,[ae.rev,e]);break;default:this[n]=e}}getRootNode(){return Se(c(this,Ar),()=>{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,Ar,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 Se(c(this,Wt)[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,Wt)[i]=[ae.rev,r]),r+=e[i].toString().length+this.getGaps(i);return r},e=>{c(this,Wt)[n]=e})}getAbsoluteIndex(){return Se(c(this,Ut),()=>{let{parentNode:n}=this;return n?n.getAbsoluteIndex()+this.getRelativeIndex():0},n=>{y(this,Ut,n)})}getBoundingClientRect(){}is(n){return this.type===n}getLines(){return Se(c(this,vr),()=>{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,vr,n)})}seal(n,e){Object.defineProperty(this,n,{enumerable:!e&&!!this[n],configurable:!0})}};kr=new WeakMap,Mt=new WeakMap,zt=new WeakMap,vr=new WeakMap,Ar=new WeakMap,Ut=new WeakMap,Wt=new WeakMap,Sr=new WeakSet,Nn=function(){let n=this.getLines(),e=n[n.length-1];return{height:n.length,width:e[2]-e[1]}}});var et,En,Ln,Xr,is=k(()=>{"use strict";te();pe();ns();In();Xr=class extends Dt{constructor(){super(...arguments);T(this,et)}get length(){return this.childNodes.length}text(e){return Te(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 wr(this,e,1)[0]}insertAt(e,t=this.length){return wr(this,t,0,[e]),e}closest(e){let t=Vr(e,this),{parentNode:r}=this;for(;r;){if(t(r))return r;({parentNode:r}=r)}}querySelector(e){let t=Vr(e,this);return N(this,et,En).call(this,t)}querySelectorAll(e){let t=Vr(e,this);return N(this,et,Ln).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}">`)+Me(this.childNodes,e)+(t===""?"":"</span>"):""}json(e,t=this.getAbsoluteIndex()){let r=ie(V({},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}};et=new WeakSet,En=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,et,En).call(t,e);if(i)return i}},Ln=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,et,Ln).call(r,e)]);return t}});var Fn,os,Qa,Ka,Ja,Ya,Za,ss,Rn,Qr,as,Cr,ls=k(()=>{"use strict";te();_();W();In();Fn=String.raw`[${Ae}\t]*`,os=String.raw`<\s*(?:/\s*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+|(?:rfc|pmid)(?=[-::]?${Fn}\d)|isbn(?=[-::]?${Fn}(?:\d(?:${Fn}|-)){6})`,Qa=new RegExp(String.raw`${os}|https?[:/]/+`,"giu"),Ka=new RegExp(os,"giu"),Ja=new Set(["attr-value","ext-link-text","link-text"]),Ya={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},Za={"<":"tag-like","[":"lonely-bracket","{":"lonely-bracket","]":"lonely-bracket","}":"lonely-bracket",h:"lonely-http",r:"lonely-http",p:"lonely-http",i:"lonely-http"},ss=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{Rn=new RegExp(String.raw`[\p{L}\p{N}_]`,"u")}catch(a){Rn=/\w/u}Cr=class extends Dt{constructor(e){super();T(this,Qr);ge(this,"data","");this.data=e}get type(){return"text"}toString(e){var t;return e&&!((t=this.parentNode)!=null&&t.getAttribute("built"))?oe(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:d,parentNode:u}=i,g=!1;if(l==="attr-value"){let{type:X,name:ne,tag:se}=u;if(X!=="ext-attr")g=!0;else if(se==="ref"&&(ne==="name"||ne==="extends"||ne==="follow")||se==="choose"&&(ne==="before"||ne==="after"))return[]}if(t!=null||(t=l==="free-ext-link"||l==="ext-link-url"||l==="ext-link-text"||l==="image-parameter"&&d==="link"||g?Ka:Qa),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],...ss]);for(let X=t.exec(r);X;X=t.exec(r)){let[,ne,se]=X,{index:Z,0:K}=X;if(se&&se!=="]"){let{length:fe}=se;Z+=fe,K=K.slice(fe)}K=K.toLowerCase();let{0:E,length:Ne}=K,ve=E==="r"||E==="p"||E==="i";if(E==="<"&&!O.has(ne.toLowerCase())||E==="["&&l==="ext-link-text"&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(r.slice(Z+1))||s!=null&&s.is("ext")&&f==="nowiki"&&((M=s.innerText)!=null&&M.includes("]")))||ve&&(!i.isPlain()||Ja.has(l)))continue;E==="]"&&(Z||Ne>1)&&t.lastIndex--;let de=e+Z,je=de+Ne,Be=b[je],yn=b[de-1],kn=Ne>1&&!(E==="<"&&(/^<\s/u.test(K)||!/[\s/>]/u.test(Be!=null?Be:"")||ss.has(ne))||g&&(E==="["||E==="]")||ve&&l==="parameter-value"||/^(?:rfc|pmid|isbn)$/iu.test(K))||E==="{"&&(Be===E||yn==="-")||E==="}"&&(yn===E||Be==="-")||E==="["&&(l==="ext-link-text"||m==="free-ext-link"&&!r.slice(Z+1).trim())||E==="]"&&h==="free-ext-link"&&!r.slice(0,Z).includes("]")?"error":"warning",vn=E==="{"||E==="[";if(kn==="warning"&&(vn||(E==="]"||E==="}"))){let fe=Ya[E],An=vn?r.slice(Z+1):r.slice(0,Z);if(E==="{"&&((F=fe.exec(An))==null?void 0:F[0])==="}"||E==="}"&&((G=fe.exec(An))==null?void 0:G[0])==="{")continue;if(!An.includes(E)){let _i=vn?"nextSibling":"previousSibling",gt=this[_i];for(;gt&&(gt.type!=="text"||!fe.test(gt.data));)gt=gt[_i];if(gt&&fe.exec(gt.data)[0]!==E)continue}}ve&&(K=K.toUpperCase());let Bi=this.posFromIndex(Z),{line:Oi,character:qi}=$n(A,I,Bi.top+1,Bi.left),Pt={rule:Za[E],message:w.msg('lonely "$1"',ve||E==="h"?K:E),severity:kn,startIndex:de,endIndex:je,startLine:Oi,endLine:Oi,startCol:qi,endCol:qi+Ne};if(E==="<")Pt.suggestions=[{desc:"escape",range:[de,de+1],text:"<"}];else if(E==="h"&&l!=="link-text"&&Rn.test(yn||""))Pt.suggestions=[{desc:"whitespace",range:[de,de],text:" "}];else if(E==="["&&l==="ext-link-text"){let fe=i.getAbsoluteIndex()+i.toString().length;Pt.suggestions=[{desc:"escape",range:[fe,fe+1],text:"]"}]}else if(E==="]"&&h==="free-ext-link"&&kn==="error"){let fe=e-o.toString().length;Pt.fix={range:[fe,fe],text:"[",desc:"left bracket"}}else ve&&(Pt.suggestions=[...X[0]===K?[]:[{desc:"uppercase",range:[de,je],text:K}],...Be===":"||Be===":"?[{desc:"whitespace",range:[je,je+1],text:" "}]:[]]);p.push(Pt)}return p}replaceData(e){N(this,Qr,as).call(this,e)}print(){return qt(this.data)}};Qr=new WeakSet,as=function(e){this.setAttribute("data",e)}});var ye,ct=k(()=>{"use strict";pe();ye=(a=!0,n=!0)=>e=>{class t extends e{text(){return""}lint(i){return a?[]:super.lint(i)}}return Le(t,e),t}});var $r,he,ht=k(()=>{"use strict";q();he=class extends v{constructor(e,t,r,i,s){super(e,r,i,s);T(this,$r);y(this,$r,t)}get type(){return c(this,$r)}lint(e=this.getAbsoluteIndex()){return super.lint(e,!1)}};$r=new WeakMap});var ue,ze=k(()=>{"use strict";pe();ue=({length:a})=>n=>{class e extends n{getAttribute(r){return r==="padding"?a:super.getAttribute(r)}}return Le(e,n),e}});var Ht,Q,Ue=k(()=>{"use strict";q();Q=class extends v{constructor(e,t,r,i,s){super(e,r,i,s);T(this,Ht);y(this,Ht,t)}get type(){return c(this,Ht)}set type(e){y(this,Ht,e)}};Ht=new WeakMap});var el,ds,mt,we,We,Pn,tl,xe,Nr=k(()=>{"use strict";_();te();re();ze();q();Ue();el=a=>a==="redirect-target"||a==="link";ds=[ue("[[")];xe=class extends(tl=v){constructor(e,t,r,i=[],s="|"){super(void 0,r,i,{});T(this,mt,!0);T(this,we);T(this,We);if(this.insertAt(new Q(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,we,s)}get link(){}get fragment(){return c(this,We).fragment}afterBuild(){y(this,We,this.getTitle()),c(this,we).includes("\0")&&y(this,we,this.buildFromStr(c(this,we),0)),this.setAttribute("name",c(this,We).title),super.afterBuild()}setAttribute(e,t){e==="bracket"?y(this,mt,t):e==="title"?y(this,We,t):super.setAttribute(e,t)}toString(e){let t=super.toString(e,c(this,we));return c(this,mt)?`[[${t}]]`:t}text(){let e=super.text("|");return c(this,mt)?`[[${e}]]`:e}getAttribute(e){return e==="title"?c(this,We):super.getAttribute(e)}getGaps(e){return e===0?c(this,we).length:1}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{childNodes:[i,s],type:o}=this,{encoded:l,fragment:d}=c(this,We),u=new R(this,e);if(i.childNodes.some(({type:g})=>g==="template")&&r.push($(i,u,"unknown-page","template in an internal link target","warning")),l){let g=$(i,u,"url-encoding","unnecessary URL encoding in an internal link");g.suggestions=[{desc:"decode",range:[g.startIndex,g.endIndex],text:Ze(i.text())}],r.push(g)}if(o==="link"||o==="category"){let g=s==null?void 0:s.childNodes.findIndex(m=>m.type==="text"&&m.data.includes("|")),p=s==null?void 0:s.childNodes[g];if(p){let m=$(s,u,"pipe-like",'additional "|" in the link text',"warning"),f=m.startIndex+s.getRelativeIndex(g);m.suggestions=[{desc:"escape",range:[f,f+p.data.length],text:p.data.replace(/\|/gu,"|")}],r.push(m)}}if(d!==void 0&&!el(o)){let g=$(i,u,"no-ignored","useless fragment"),p=i.childNodes.findIndex(f=>f.type==="text"&&f.data.includes("#")),m=i.childNodes[p];m&&(g.fix={range:[g.startIndex+i.getRelativeIndex(p)+m.data.indexOf("#"),g.endIndex],text:"",desc:"remove"}),r.push(g)}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,mt)?{pre:"[[",post:"]]",sep:c(this,we)}:{sep:c(this,we)})}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}};Pn=P(tl),mt=new WeakMap,we=new WeakMap,We=new WeakMap,xe=B(Pn,0,"LinkBaseToken",ds,xe),j(Pn,1,xe)});var ce,tt=k(()=>{"use strict";q();ce=class extends v{get innerText(){return this.firstChild.data}constructor(n="",e,t){super(n,e,t)}}});var gs,jn,rl,z,De=k(()=>{"use strict";ct();tt();gs=[ye()];z=class extends(rl=ce){get type(){return"noinclude"}toString(n){return n?"":super.toString()}};jn=P(rl),z=B(jn,0,"NoincludeToken",gs,z),j(jn,1,z)});var Kr,ps=k(()=>{"use strict";_();Nr();De();Kr=class extends xe{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 us,rt,Gt,Bn,nl,ft,cs=k(()=>{"use strict";ct();q();ht();ps();us=[ye(!1,!1)];ft=class extends(nl=v){constructor(e,t,r,i,s,o,l=[]){super(void 0,o,l);T(this,rt);T(this,Gt);y(this,rt,e),y(this,Gt,s),this.append(new he(t,"redirect-syntax",o,l),new Kr(r,i==null?void 0:i.slice(1),o,l))}get type(){return"redirect"}getAttribute(e){return e==="padding"?c(this,rt).length:super.getAttribute(e)}toString(e){return c(this,rt)+super.toString(e)+c(this,Gt)}lint(e=this.getAbsoluteIndex()){let t=e+c(this,rt).length+this.firstChild.toString().length;return this.lastChild.setAttribute("aIndex",t),this.lastChild.lint(t)}print(){return super.print({pre:c(this,rt),post:c(this,Gt)})}};Bn=P(nl),rt=new WeakMap,Gt=new WeakMap,ft=B(Bn,0,"RedirectToken",us,ft),j(Bn,1,ft)});var hs={};Y(hs,{parseRedirect:()=>il});var il,ms=k(()=>{"use strict";W();cs();il=(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 ft(...t.slice(1),n,e),a):!1}});var fs,On,sl,xt,xs=k(()=>{"use strict";ze();q();fs=[ue("<onlyinclude>")];xt=class extends(sl=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"><onlyinclude></span>',post:'<span class="wpb-ext"></onlyinclude></span>'})}};On=P(sl),xt=B(On,0,"OnlyincludeToken",fs,xt),j(On,1,xt)});var nt,Ir=k(()=>{"use strict";pe();nt=(a=1)=>n=>{class e extends n{getGaps(){return a}}return Le(e,n),e}});var bs,it,qn,ol,$e,Jr=k(()=>{"use strict";Ir();q();bs=[nt()];$e=class extends(ol=v){constructor(e,t,r,i,s,o=[]){super(void 0,s);T(this,it);ge(this,"closed");ge(this,"selfClosing");this.setAttribute("name",e.toLowerCase()),y(this,it,[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,it);return t?`<${s}${r.toString(e)}/>`:`<${s}${r.toString(e)}>${i.toString(e)}${this.closed?`</${o}>`:""}`}text(){let[e,t]=c(this,it);return this.selfClosing?`<${e}${this.firstChild.text()}/>`:`<${e}${super.text(">")}${this.closed?`</${t}>`:""}`}getAttribute(e){return e==="padding"?c(this,it)[0].length+1:super.getAttribute(e)}print(){let[e,t]=c(this,it);return super.print(this.selfClosing?{pre:`<${e}`,post:"/>"}:{pre:`<${e}`,sep:">",post:this.closed?`</${t}>`:""})}};qn=P(ol),it=new WeakMap,$e=B(qn,0,"TagPairToken",bs,$e),j(qn,1,$e)});var Zr,Ts,Yr,ys=k(()=>{"use strict";q();Jr();ht();De();Yr=class extends $e{constructor(e,t,r,i=[]){let s=new he(e,"translate-attr",r,i);t=t==null?void 0:t.replace(/(<tvar\|[^>]+>)([\s\S]*?)(<\/>)/gu,(l,d,u,g)=>(new z(d,r,i),new z(g,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,d,u,g,p)=>(new z(d,r,i),new z(p,r,i),`\0${i.length-1}n${g}\0${i.length}n`));let o=new v(t,r,i);o.type="translate-inner";super("translate",s,o,"translate",r,i);T(this,Zr);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"><translate${N(this,Zr,Ts).call(this)?'<span class="wpb-ext-attrs"> <span class="wpb-ext-attr"><span class="wpb-attr-key">nowrap</span></span></span>':""}>${this.lastChild.print({class:"ext-inner"})}</translate></span>`}};Zr=new WeakSet,Ts=function(){return this.firstChild.toString()===" nowrap"}});var ks,_n,al,bt,vs=k(()=>{"use strict";_();re();ct();W();Jr();ks=[ye(!1)];bt=class extends(al=$e){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}};_n=P(al),bt=B(_n,0,"IncludeToken",ks,bt),j(_n,1,bt)});var Vt,en=k(()=>{"use strict";pe();Vt=(a=0)=>n=>{var t,As;class e extends n{constructor(){super(...arguments);T(this,t)}getAttr(o){return N(this,t,As).call(this).getAttr(o)}}return t=new WeakSet,As=function(){return this.childNodes[a]},Le(e,n),e}});var ee,Ss,ws,tn,zn,Cs,Xt,Ns,Is,Es,Mn,$s,Fe,Ls,Fs,Rs,Ps,js=k(()=>{"use strict";ee=new Set(["align"]),Ss=new Set(["cite"]),ws=new Set(["cite","datetime"]),tn=new Set(["width"]),zn=new Set(["axis","align","bgcolor","height","width","valign"]),Cs=new Set([...zn,"abbr","headers","scope","rowspan","colspan"]),Xt=new Set(["type"]),Ns=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),Is=new Set(["clear"]),Es=new Set(["bgcolor","align","valign"]),Mn=new Set(["qid","forcemathmode","type","display"]),$s=new Set(["enclose","inline","lang","line","linelinks","style","class","id","dir","copy","highlight","start"]),Fe=new Set,Ls=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"]),Fs={div:ee,h1:ee,h2:ee,h3:ee,h4:ee,h5:ee,h6:ee,blockquote:Ss,q:Ss,p:ee,br:Is,pre:tn,ins:ws,del:ws,ul:Xt,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...Ns,"border"]),caption:ee,tr:Es,td:Cs,th:Cs,img:new Set(["alt","src","width","height","srcset"]),font:new Set(["size","color","face"]),hr:tn,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:Xt,poem:ee,categorytree:ee,combooption:ee,math:Fe,chem:Fe,ce:Fe},Rs={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:Fe,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:Fe,inputbox:Fe,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:Fe,poll:new Set(["id","show-results-before-voting"]),sm2:Xt,flashmp3:Xt,score:new Set(["line_width_inches","lang","override_midi","raw","note-language","override_audio","override_ogg","sound","vorbis"]),seo:new Set(["title","title_mode","title_separator","keywords","description","robots","google_bot","image","image_width","image_height","image_alt","type","site_name","locale","section","author","published_time","twitter_site"]),tab:new Set(["nested","name","index","class","block","inline","openname","closename","collapsed","dropdown","style","bgcolor","container","id","title"]),tabs:new Set(["plain","class","container","id","title","style"]),combobox:new Set(["placeholder","value","id","class","text","dropdown","style"]),math:new Set([...Mn,"chem"]),chem:Mn,ce:Mn,hiero:Fe,phonos:new Set(["ipa","class","text","lang","wikibase","file"]),section:new Set(["begin","end"]),source:$s,syntaxhighlight:$s,templatedata:Fe,timeline:new Set(["method","font"]),quiz:new Set(["display","shuffleanswers","points","shuffle","case"]),languages:Fe},Ps={table:Ns,td:new Set([...zn,"scope"]),th:zn,br:Is,caption:ee,div:ee,hr:tn,h1:ee,h2:ee,h3:ee,h4:ee,h5:ee,h6:ee,li:Xt,p:ee,pre:tn,tr:Es,ul:Xt}});var ll,dl,Er,Qt,le,Re,Kt,Bs=k(()=>{"use strict";_();te();js();re();W();q();Ue();ll=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,dl=new Set(["ext","arg","magic-word","template"]),Kt=class extends v{constructor(e,t,r,i="",s,o=[],l=w.getConfig(),d=[]){let u=new Q(r,"attr-key",l,d),g;if(r==="title"||t==="img"&&r==="alt")g=new v(s,l,d,{}),g.type="attr-value",g.setAttribute("stage",10);else if(t==="gallery"&&r==="caption"||t==="choose"&&(r==="before"||r==="after")){let p=ie(V({},l),{excludes:[...l.excludes,"heading","html","table","hr","list"]});g=new v(s,p,d,{}),g.type="attr-value",g.setAttribute("stage",1)}else g=new Q(s,"attr-value",l,d,{});super(void 0,l,d);T(this,Er);T(this,Qt);T(this,le);T(this,Re);y(this,Er,e),this.append(u,g),y(this,le,i),y(this,Re,[...o]),y(this,Qt,t),this.setAttribute("name",_e(oe(r)))}get type(){return c(this,Er)}get tag(){return c(this,Qt)}get balanced(){return!c(this,le)||c(this,Re)[0]===c(this,Re)[1]}afterBuild(){c(this,le).includes("\0")&&y(this,le,this.buildFromStr(c(this,le),0)),this.parentNode&&y(this,Qt,this.parentNode.name),this.setAttribute("name",_e(this.firstChild.text())),super.afterBuild()}toString(e){let[t="",r=""]=c(this,Re);return c(this,le)?super.toString(e,c(this,le)+t)+r:this.firstChild.toString(e)}text(){return c(this,le)?`${super.text(`${c(this,le).trim()}"`)}"`:this.firstChild.text()}getGaps(){var e,t;return c(this,le)?c(this,le).length+((t=(e=c(this,Re)[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:d,tag:u}=this,g=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,Re)[0],desc:"close"}],r.push(b)}let m=Rs[u],f=Fs[u],{length:h}=this.toString();if(!(m!=null&&m.has(d))&&!(f!=null&&f.has(d))&&(l==="ext-attr"?m||f:!/\{\{[^{]+\}\}/u.test(d))&&(l==="ext-attr"&&!f||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(d)&&(u==="meta"||u==="link"||!Ls.has(d)))){let b=$(s,p,"illegal-attr","illegal attribute name");b.suggestions=[{desc:"remove",range:[e,e+h],text:""}],r.push(b)}else if(d==="style"&&typeof g=="string"&&ll.test(g))r.push($(o,p,"insecure-style","insecure style"));else if(d==="tabindex"&&typeof g=="string"&&g!=="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})=>dl.has(b))){let b=rs(u,d),S=String(g).toLowerCase();b.length>0&&b.every(C=>C!==S)&&r.push($(o,p,"illegal-attr","illegal attribute value","warning"))}return(x=Ps[u])!=null&&x.has(d)&&r.push($(s,p,"obsolete-attr","obsolete attribute","warning")),r}getValue(){return c(this,le)?this.lastChild.text().trim():this.type==="ext-attr"||""}print(){let[e="",t=""]=c(this,Re);return c(this,le)?super.print({sep:qt(c(this,le))+e,post:t}):super.print()}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return r.tag=this.tag,r}};Er=new WeakMap,Qt=new WeakMap,le=new WeakMap,Re=new WeakMap});var Os,gl,Un,Lr,st,rn=k(()=>{"use strict";_();te();re();W();q();Ue();Bs();Os=a=>a.slice(0,-1),gl=a=>`${Os(a)}-dirty`;try{Un=new RegExp(String.raw`[\p{L}\p{N}]`,"u")}catch(a){Un=/[^\W_]/u}st=class extends v{constructor(e,t,r,i,s=[]){super(void 0,i,s,{});T(this,Lr);if(y(this,Lr,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="",d=o.exec(e),u=0,g=()=>{l&&(super.insertAt(new Q(l,gl(t),i,s,{})),l="")};for(;d;){let{index:p,0:m,1:f,2:h,3:x,4:b,5:S,6:C}=d;if(l+=e.slice(u,p),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(oe(f).trim())){let A=b!=null?b:C,I=[x,S],O=new Kt(Os(t),r,f,h,A,I,i,s);g(),super.insertAt(O)}else l+=m;({lastIndex:u}=o),d=o.exec(e)}l+=e.slice(u),g()}}get type(){return c(this,Lr)}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 Kt&&(!e||t.name===_e(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,d=new R(this,e);if((i==null?void 0:i.type)==="html"&&i.closing&&this.text().trim()){let u=L(this,d,"no-ignored","attributes of a closing tag"),g=i.getAbsoluteIndex();u.suggestions=[{desc:"remove",range:[e,u.endIndex],text:""},{desc:"open",range:[g+1,g+2],text:""}],r.push(u)}for(let u of s)if(u instanceof Kt){let{name:g}=u;o.has(g)?(l.add(g),o.get(g).push(u)):o.set(g,[u])}else{let g=u.text().trim();if(g){let p=$(u,d,"no-ignored","containing invalid attribute",Un.test(g)?"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 g=o.get(u).map(p=>{let m=p.getValue();return[p,m===!0?"":m]});r.push(...g.map(([p,m],f)=>{let h=$(p,d,"no-duplicate",w.msg("duplicated $1 attribute",u)),x={desc:"remove",range:[h.startIndex,h.endIndex],text:""};return!m||g.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 Q?{class:e.toString().trim()&&"attr-dirty"}:void 0)).join("")}</span>`:""}};Lr=new WeakMap});var qs={};Y(qs,{PreToken:()=>Wn});var Wn,_s=k(()=>{"use strict";q();De();Wn=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),d=0,u="";for(;o&&l;)new z(o[0],e,t),new z(l[0],e,t),u+=`${n.slice(d,o.index)}\0${t.length-1}n${n.slice(o.index+s,l.index)}\0${t.length}n`,d=l.index+s+1,r.lastIndex=d,o=r.exec(n),o&&(i.lastIndex=o.index+s),l=i.exec(n);n=u+n.slice(d)}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 Jt,nn=k(()=>{"use strict";pe();Jt=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 Le(n,a),n}});var
|
|
7
|
-
`).map(o=>i?o:Tt(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:d})=>d!=="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 d=C(i,e,"no-ignored",t);d.suggestions=[{desc:"remove",range:[d.startIndex,d.endIndex],text:""}],r.push(d)}else{let d=i.lint(n,!1);d.length>0&&r.push(...d)}}n+=i.toString().length+1}return r}};Dn=P(dl),ot=B(Dn,0,"ParamTagToken",_s,ot),j(Dn,1,ot)});var Rr,Yt,sn,Zt,Gn=k(()=>{"use strict";_();ge();re();X();O();ht();Zt=class extends v{constructor(e,t,r,i=[]){super(void 0,r,i);T(this,Yt);T(this,Rr);y(this,Rr,e);let s=new v(t[0],r,i);s.type="heading-title",s.setAttribute("stage",2);let o=new he(t[1],"heading-trail",r,i);this.append(s,o)}get type(){return"heading"}get level(){return c(this,Rr)}toString(e){let t=N(this,Yt,sn).call(this);return t+this.firstChild.toString(e)+t+this.lastChild.toString(e)}text(){let e=N(this,Yt,sn).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("="),d=l||o.endsWith("="),u=i.childNodes.filter(er("quote")),g=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>");d||(h.suggestions=[{desc:"h2",range:[h.startIndex,h.endIndex],text:`=${o}=`}]),r.push(h)}if(d){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(g.length%2){let h=C(g[g.length-1],ie(G({},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,Yt,sn).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}};Rr=new WeakMap,Yt=new WeakSet,sn=function(){return"=".repeat(this.level)}});var gl,on,zs=k(()=>{"use strict";te();_();O();gl=new RegExp(`https?://${qe}${Oe}$`,"iu"),on=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(e){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=gl.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 Us,Pr,lt,yt,kt,tr,vt,Xn,Ws,Vn,pl,at,Ds=k(()=>{"use strict";te();_();ge();re();Ir();O();zs();Ue();ht();Us=[nt()];at=class extends(pl=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,vt);de(this,"modifier","");T(this,Pr,"template");T(this,lt,":");T(this,yt,!1);T(this,kt,new Map);T(this,tr);let{parserFunction:[l,d],variable:u,functionHook:g}=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,yt)){let A=h?e.slice(0,m):e,I=h&&e.slice(m+1),q=oe(A),M=h?q.slice(q.search(/\S/u))+(f?":":""):q.trim(),F=M.toLowerCase(),H=Array.isArray(d),V=H?d.includes(M):Object.prototype.hasOwnProperty.call(d,M),ne=!H&&V?d[M]:Object.prototype.hasOwnProperty.call(l,F)&&l[F],se=H&&V||!("functionHook"in r)||g.includes(ne),Z=H&&V||u.includes(ne);if(h?ne&&se:Z){this.setAttribute("name",ne||F.replace(/^#|:$/u,"")),y(this,Pr,"magic-word"),f&&y(this,lt,":");let K=new he(A,"magic-word-name",r,i);if(super.insertAt(K),I!==!1&&t.unshift([I]),this.name==="invoke")for(let E=0;E<2;E++){let Ne=t.shift();if(!Ne)break;let ve=new Q(Ne.join("="),`invoke-${E?"function":"module"}`,r,i);super.insertAt(ve)}}}if(this.type==="template"){let A=oe(e).trim();if(!this.normalizeTitle(A,10,{halfParsed:!0,temporary:!0}).valid)throw i.pop(),new SyntaxError("Invalid template name");let I=new Q(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 on(...I,r,i))}this.seal("modifier")}get type(){return c(this,Pr)}setModifier(e){let{parserFunction:[,,t,r]}=this.getAttribute("config"),i=oe(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,yt)&&o||!c(this,yt)&&(l||e==="")||(ce.running||this.length>1)&&(o||l||e==="")?(this.setAttribute("modifier",e),y(this,yt,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,tr,N(this,vt,Xn).call(this)),this.setAttribute("name",c(this,tr).title))}toString(e){return`{{${this.modifier}${this.type==="magic-word"?this.firstChild.toString(e)+(this.length===1?"":c(this,lt))+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,lt))+Te(e.slice(1),"|"):super.text("|")}}}`}getAttribute(e){switch(e){case"padding":return this.modifier.length+2;case"title":return c(this,tr);case"colon":return c(this,lt);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),d=i==="magic-word";if(d&&!N(this,vt,Xn).call(this).valid)r.push(C(s[1],l,"invalid-invoke","illegal module name"));else{let g=s[d?1:0],p=g.childNodes.findIndex(f=>f.type==="text"&&ut(f.data).includes("#")),m=g.childNodes[p];if(m){let f=C(g,l,"no-ignored","useless fragment");f.fix={range:[f.startIndex+g.getRelativeIndex(p)+m.data.indexOf("#"),f.endIndex],text:"",desc:"remove"},r.push(f)}}if(d&&o===2)return r.push(L(this,l,"invalid-invoke","missing module function")),r;let u=this.getDuplicatedArgs().filter(([,g])=>!g[0].querySelector("ext"));if(u.length>0)for(let[,g]of u)r.push(...g.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,vt,Ws).call(this,e):e.name&&this.getArgs(e.name,!1,!1).add(e),e}getAllArgs(){return this.childNodes.filter(er("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,kt).has(i)?s=c(this,kt).get(i):(s=new Set(this.getAllArgs().filter(({name:o})=>i===o)),c(this,kt).set(i,s)),s}getDuplicatedArgs(){return[...c(this,kt)].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:d})=>!d),...l!=null&&l.anon?[l]:[]].map(({lastChild:d})=>d);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:d}=s[o].childNodes.filter(u=>u.text().trim());if(l===0)s.splice(o,1);else if(l>1||d.type!=="magic-word")o++;else try{let u=d.getPossibleValues();s.splice(o,1,...u),o+=u.length}catch(u){o++}}return s}print(){let{childNodes:e,length:t,firstChild:r,modifier:i,type:s}=this;return`<span class="wpb-${s}">{{${Ot(i)}${s==="magic-word"?r.print()+(t===1?"":c(this,lt))+Me(e.slice(1),{sep:"|"}):Me(e,{sep:"|"})}}}</span>`}};Vn=P(pl),Pr=new WeakMap,lt=new WeakMap,yt=new WeakMap,kt=new WeakMap,tr=new WeakMap,vt=new WeakSet,Xn=function(){let e=this.type==="template";return this.normalizeTitle(this.childNodes[e?0:1].text(),e?10:828,{temporary:!0})},Ws=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))}},at=B(Vn,0,"TranscludeToken",Us,at),j(Vn,1,at)});var Hs,Qn,ul,At,Gs=k(()=>{"use strict";ct();O();Hs=[ye()];At=class extends(ul=v){get type(){return"hidden"}};Qn=P(ul),At=B(Qn,0,"HiddenToken",Hs,At),j(Qn,1,At)});var Vs,Jn,cl,Kn,hl,St,Xs=k(()=>{"use strict";te();_();re();ze();Ir();O();Ue();Gs();Vs=[pe("{{{"),nt()];St=class extends(hl=v){constructor(e,t,r=[]){super(void 0,t,r,{});T(this,Jn);for(let i=0;i<e.length;i++){let s=e[i];if(i===0){let o=new Q(s,"arg-name",t,r,{});super.insertAt(o)}else if(i>1){let o=new At(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`{{{${Te(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 d=i.lint(l,t);d.length>0&&o.push(...d)}if(s.length>0){let l=new R(this,e);o.push(...s.map(d=>{let u=C(d,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}};Kn=P(hl),Jn=new WeakSet,cl=function(){},St=B(Kn,0,"ArgToken",Vs,St),j(Kn,1,St)});var to={};Y(to,{parseBraces:()=>jr});var ml,Qs,Yn,Ks,Js,Ys,eo,Zs,jr,an=k(()=>{"use strict";qt();te();Gn();Ds();Xs();ml={"=":String.raw`\n(?!(?:[^\S\n]|\0\d+[cn]\x7F)*\n)`,"{":String.raw`\}{2,}|\|`,"-":String.raw`\}-`,"[":String.raw`\]\]`},Qs=String.raw`\[(?!\[)`,Yn=String.raw`\n(?![=\0])`,Ks=String.raw`|\{{2,}`,Js=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"],["server","m"]]),Ys=Ie(a=>new RegExp(a,"gmu"));eo=new RegExp(String.raw`\{\{((?:[^\n{}[]|${Qs}|${Yn})*)\}\}(?!\})`+"|"+String.raw`\[\[(?:[^\n[\]{]|${Yn})*\]\]`+"|"+String.raw`-\{(?:[^\n{}[]|${Qs}|${Yn})*\}-`,"gu");Zs=a=>{let n=_e(oe(a));return Js.has(n)?Js.get(n):/^(?:filepath|(?:full|canonical)urle?):./u.test(n)?"m":/^#vardefine:./u.test(n)?"n":"t"},jr=(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(Ee(w.slice(I,q),s))},l;do l!==void 0&&(a=l),l=a.replace(eo,(w,A,I)=>{if(A!==void 0||typeof I=="string")try{let{length:q}=e,M=(A!=null?A:I).split("|");return new at(Ee(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(V=>Ee(V,s))}),n,e),`\0${q}${Zs(M[0])}`}catch(q){if(!(q instanceof SyntaxError)||q.message!=="Invalid template name")throw q}return s.push(Ee(w,s)),`\0${s.length-1}`});while(l!==a);a=l;let d=a.lastIndexOf("}}")-a.length,u=d+a.length!==-1,g=Ys(t+(u?Ks:"")),p=g.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:Z}]=p;p[0]=p[0].slice(Z),p.index+=Z}let{0:w,index:A}=p!=null?p:{0:`
|
|
8
|
-
`,index:a.length},I=(x=i.pop())!=null?x:{},{0:
|
|
6
|
+
`})}}return Le(n,a),n}});var zs={};Y(zs,{ParamTagToken:()=>ot});var Ms,Dn,pl,ot,Hn=k(()=>{"use strict";_();re();Fr();nn();W();q();Ue();Ms=[Jt];ot=class extends(pl=v){get type(){return"ext-inner"}constructor(n,e,t=w.getConfig(),r=[],i){if(super(void 0,t,r,{}),e){let s=Q;this.append(...e.split(`
|
|
7
|
+
`).map(o=>i?o:Tt(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:d})=>d!=="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 d=$(i,e,"no-ignored",t);d.suggestions=[{desc:"remove",range:[d.startIndex,d.endIndex],text:""}],r.push(d)}else{let d=i.lint(n,!1);d.length>0&&r.push(...d)}}n+=i.toString().length+1}return r}};Dn=P(pl),ot=B(Dn,0,"ParamTagToken",Ms,ot),j(Dn,1,ot)});var Rr,Yt,sn,Zt,Gn=k(()=>{"use strict";_();pe();re();W();q();ht();Zt=class extends v{constructor(e,t,r,i=[]){super(void 0,r,i);T(this,Yt);T(this,Rr);y(this,Rr,e);let s=new v(t[0],r,i);s.type="heading-title",s.setAttribute("stage",2);let o=new he(t[1],"heading-trail",r,i);this.append(s,o)}get type(){return"heading"}get level(){return c(this,Rr)}toString(e){let t=N(this,Yt,sn).call(this);return t+this.firstChild.toString(e)+t+this.lastChild.toString(e)}text(){let e=N(this,Yt,sn).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("="),d=l||o.endsWith("="),u=i.childNodes.filter(er("quote")),g=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>");d||(h.suggestions=[{desc:"h2",range:[h.startIndex,h.endIndex],text:`=${o}=`}]),r.push(h)}if(d){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(g.length%2){let h=$(g[g.length-1],ie(V({},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,Yt,sn).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}};Rr=new WeakMap,Yt=new WeakSet,sn=function(){return"=".repeat(this.level)}});var ul,on,Us=k(()=>{"use strict";te();_();q();ul=new RegExp(`https?://${Oe}${qe}$`,"iu"),on=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(e){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=ul.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 Ws,Pr,lt,yt,kt,tr,vt,Xn,Ds,Vn,cl,at,Hs=k(()=>{"use strict";te();_();pe();re();Ir();q();Us();Ue();ht();Ws=[nt()];at=class extends(cl=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,vt);ge(this,"modifier","");T(this,Pr,"template");T(this,lt,":");T(this,yt,!1);T(this,kt,new Map);T(this,tr);let{parserFunction:[l,d],variable:u,functionHook:g}=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,yt)){let A=h?e.slice(0,m):e,I=h&&e.slice(m+1),O=oe(A),M=h?O.slice(O.search(/\S/u))+(f?":":""):O.trim(),F=M.toLowerCase(),G=Array.isArray(d),X=G?d.includes(M):Object.prototype.hasOwnProperty.call(d,M),ne=!G&&X?d[M]:Object.prototype.hasOwnProperty.call(l,F)&&l[F],se=G&&X||!("functionHook"in r)||g.includes(ne),Z=G&&X||u.includes(ne);if(h?ne&&se:Z){this.setAttribute("name",ne||F.replace(/^#|:$/u,"")),y(this,Pr,"magic-word"),f&&y(this,lt,":");let K=new he(A,"magic-word-name",r,i);if(super.insertAt(K),I!==!1&&t.unshift([I]),this.name==="invoke")for(let E=0;E<2;E++){let Ne=t.shift();if(!Ne)break;let ve=new Q(Ne.join("="),`invoke-${E?"function":"module"}`,r,i);super.insertAt(ve)}}}if(this.type==="template"){let A=oe(e).trim();if(!this.normalizeTitle(A,10,{halfParsed:!0,temporary:!0}).valid)throw i.pop(),new SyntaxError("Invalid template name");let I=new Q(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 on(...I,r,i))}this.seal("modifier")}get type(){return c(this,Pr)}setModifier(e){let{parserFunction:[,,t,r]}=this.getAttribute("config"),i=oe(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,yt)&&o||!c(this,yt)&&(l||!e)||(ae.running||this.length>1)&&(o||l||!e)?(this.setAttribute("modifier",e),y(this,yt,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,tr,N(this,vt,Xn).call(this)),this.setAttribute("name",c(this,tr).title))}toString(e){return`{{${this.modifier}${this.type==="magic-word"?this.firstChild.toString(e)+(this.length===1?"":c(this,lt))+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,lt))+Te(e.slice(1),"|"):super.text("|")}}}`}getAttribute(e){switch(e){case"padding":return this.modifier.length+2;case"title":return c(this,tr);case"colon":return c(this,lt);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),d=i==="magic-word";if(d&&!N(this,vt,Xn).call(this).valid)r.push($(s[1],l,"invalid-invoke","illegal module name"));else{let g=s[d?1:0],p=g.childNodes.findIndex(f=>f.type==="text"&&ut(f.data).includes("#")),m=g.childNodes[p];if(m){let f=$(g,l,"no-ignored","useless fragment");f.fix={range:[f.startIndex+g.getRelativeIndex(p)+m.data.indexOf("#"),f.endIndex],text:"",desc:"remove"},r.push(f)}}if(d&&o===2)return r.push(L(this,l,"invalid-invoke","missing module function")),r;let u=this.getDuplicatedArgs().filter(([,g])=>!g[0].querySelector("ext"));if(u.length>0)for(let[,g]of u)r.push(...g.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,vt,Ds).call(this,e):e.name&&this.getArgs(e.name,!1,!1).add(e),e}getAllArgs(){return this.childNodes.filter(er("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,kt).has(i)?s=c(this,kt).get(i):(s=new Set(this.getAllArgs().filter(({name:o})=>i===o)),c(this,kt).set(i,s)),s}getDuplicatedArgs(){return[...c(this,kt)].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:d})=>!d),...l!=null&&l.anon?[l]:[]].map(({lastChild:d})=>d);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:d}=s[o].childNodes.filter(u=>u.text().trim());if(l===0)s.splice(o,1);else if(l>1||d.type!=="magic-word")o++;else try{let u=d.getPossibleValues();s.splice(o,1,...u),o+=u.length}catch(u){o++}}return s}print(){let{childNodes:e,length:t,firstChild:r,modifier:i,type:s}=this;return`<span class="wpb-${s}">{{${qt(i)}${s==="magic-word"?r.print()+(t===1?"":c(this,lt))+Me(e.slice(1),{sep:"|"}):Me(e,{sep:"|"})}}}</span>`}};Vn=P(cl),Pr=new WeakMap,lt=new WeakMap,yt=new WeakMap,kt=new WeakMap,tr=new WeakMap,vt=new WeakSet,Xn=function(){let e=this.type==="template";return this.normalizeTitle(this.childNodes[e?0:1].text(),e?10:828,{temporary:!0})},Ds=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))}},at=B(Vn,0,"TranscludeToken",Ws,at),j(Vn,1,at)});var Gs,Qn,hl,At,Vs=k(()=>{"use strict";ct();q();Gs=[ye()];At=class extends(hl=v){get type(){return"hidden"}};Qn=P(hl),At=B(Qn,0,"HiddenToken",Gs,At),j(Qn,1,At)});var Xs,Jn,ml,Kn,fl,St,Qs=k(()=>{"use strict";te();_();re();ze();Ir();q();Ue();Vs();Xs=[ue("{{{"),nt()];St=class extends(fl=v){constructor(e,t,r=[]){super(void 0,t,r,{});T(this,Jn);for(let i=0;i<e.length;i++){let s=e[i];if(i===0){let o=new Q(s,"arg-name",t,r,{});super.insertAt(o)}else if(i>1){let o=new At(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`{{{${Te(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 d=i.lint(l,t);d.length>0&&o.push(...d)}if(s.length>0){let l=new R(this,e);o.push(...s.map(d=>{let u=$(d,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}};Kn=P(fl),Jn=new WeakSet,ml=function(){},St=B(Kn,0,"ArgToken",Xs,St),j(Kn,1,St)});var ro={};Y(ro,{parseBraces:()=>jr});var xl,Ks,Yn,Js,Ys,Zs,to,eo,jr,an=k(()=>{"use strict";Ot();te();Gn();Hs();Qs();xl={"=":String.raw`\n(?!(?:[^\S\n]|\0\d+[cn]\x7F)*\n)`,"{":String.raw`\}{2,}|\|`,"-":String.raw`\}-`,"[":String.raw`\]\]`},Ks=String.raw`\[(?!\[)`,Yn=String.raw`\n(?![=\0])`,Js=String.raw`|\{{2,}`,Ys=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"],["server","m"]]),Zs=Ie(a=>new RegExp(a,"gmu"));to=new RegExp(String.raw`\{\{((?:[^\n{}[]|${Ks}|${Yn})*)\}\}(?!\})`+"|"+String.raw`\[\[(?:[^\n[\]{]|${Yn})*\]\]`+"|"+String.raw`-\{(?:[^\n{}[]|${Ks}|${Yn})*\}-`,"gu");eo=a=>{let n=_e(oe(a));return Ys.has(n)?Ys.get(n):/^(?:filepath|(?:full|canonical)urle?):./u.test(n)?"m":/^#vardefine:./u.test(n)?"n":"t"},jr=(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(Ee(C.slice(I,O),s))},l;do l!==void 0&&(a=l),l=a.replace(to,(C,A,I)=>{if(A!==void 0||typeof I=="string")try{let{length:O}=e,M=(A!=null?A:I).split("|");return new at(Ee(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(X=>Ee(X,s))}),n,e),`\0${O}${eo(M[0])}`}catch(O){if(!(O instanceof SyntaxError)||O.message!=="Invalid template name")throw O}return s.push(Ee(C,s)),`\0${s.length-1}`});while(l!==a);a=l;let d=a.lastIndexOf("}}")-a.length,u=d+a.length!==-1,g=Zs(t+(u?Js:"")),p=g.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:Z}]=p;p[0]=p[0].slice(Z),p.index+=Z}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:X}=I,ne=C==="="&&G;if(C==="]]"||C==="}-")m=A+2;else if(C===`
|
|
9
9
|
`){m=A+1;let{pos:Z,findEqual:K}=(b=i[i.length-1])!=null?b:{};if(Z===void 0||K||oe(a.slice(Z,M))!==""){let E=/^(={1,6})(.+)\1((?:\s|\0\d+[cn]\x7F)*)$/u.exec(a.slice(M,A));E&&(E[2]=Ee(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 Zt(E[1].length,E.slice(2),n,e)))}}else if(
|
|
11
|
-
)`:""}(\s*)$`,"u")),
|
|
12
|
-
`))!=null?i:[]){let o=/^([^|]+)(?:\|(.*))?/u.exec(s);if(!o){super.insertAt(s.trim()?new z(s,t,r):s);continue}let[,l,d]=o;N(this,wt,
|
|
13
|
-
`),i=new Set(e.protocol.split("|")),s=z,o=!0,l=!1;for(let d of r){let u=d.trim();if(!(l||!u||u.startsWith("#"))){if(o){let g=d.indexOf("|"),p=g===-1?d:d.slice(0,g),{valid:m,ns:f}=this.normalizeTitle(p,0,{halfParsed:!0,temporary:!0});if(m&&f===6){let h=new Ge("imagemap",p,g===-1?void 0:d.slice(g+1),e,t);super.insertAt(h),o=!1;continue}else l=!0}else if(d.trim().split(/[\t ]/u,1)[0]==="desc"){super.insertAt(d);continue}else if(d.includes("[")){let g=d.indexOf("["),p=d.slice(g),m=/^\[\[([^|]+)(?:\|([^\]]*))?\]\][\w\s]*$/u.exec(p);if(m){if(this.normalizeTitle(m[1],0,{halfParsed:!0,temporary:!0,selfLink:!0}).valid){super.insertAt(new Or(d.slice(0,g),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 Or(d.slice(0,g),f.slice(1),p.slice(p.indexOf("]")+1),e,t));continue}}}}super.insertAt(new s(d,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}};gi=P(Il),or=B(gi,0,"ImagemapToken",bo,or),j(gi,1,or)});var ko,pi,El,Ke,ui=k(()=>{"use strict";_();ct();ze();X();tt();ko=[ye(!1),pe("<!--")];Ke=class extends(El=ue){constructor(e,t,r,i){super(e,r,i);de(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:"<!--",post:this.closed?"-->":""})}};pi=P(El),Ke=B(pi,0,"CommentToken",ko,Ke),j(pi,1,Ke)});var vo={};Y(vo,{CommentedToken:()=>ci});var ci,Ao=k(()=>{"use strict";O();ui();ci=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 Ke(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 So={};Y(So,{NowikiToken:()=>hi});var Ll,Fl,hi,wo=k(()=>{"use strict";qt();_();X();tt();Ll=Ie(a=>new RegExp(String.raw`<\s*(?:/\s*)${a==="nowiki"?"":"?"}(${a})\b`,"giu")),Fl=new Set(["templatestyles","section","languages"]),hi=class extends ue{get type(){return"ext-inner"}lint(n=this.getAbsoluteIndex()){let{name:e,firstChild:{data:t}}=this;if(Fl.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,Ll(e))}}});var Co,mi,Rl,He,ti=k(()=>{"use strict";_();re();X();en();O();Jr();rn();Co=[Vt()];He=class extends(Rl=$e){get type(){return"ext"}constructor(n,e,t,r,i=$.getConfig(),s=!1,o=[]){let l=n.toLowerCase(),d=new st(!e||/^\s/u.test(e)?e:` ${e}`,"ext-attrs",l,i,o),u=ie(G({},i),{ext:i.ext.filter(p=>p!==l),excludes:[...i.excludes]}),g;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"),g=new v(t,u,o);break;case"pre":{let{PreToken:p}=(Os(),U(qs));g=new p(t,u,o);break}case"dynamicpagelist":{let{ParamTagToken:p}=(Hn(),U(Ms));g=new p(s,t,u,o);break}case"inputbox":{let{InputboxToken:p}=(no(),U(ro));g=new p(s,t,u,o);break}case"references":{let{NestedToken:p}=(dn(),U(ln));u.excludes.push("heading"),g=new p(t,s,["ref"],u,o);break}case"choose":{let{NestedToken:p}=(dn(),U(ln));g=new p(t,/<(option|choicetemplate)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(\1)>)/gu,["option","choicetemplate"],u,o);break}case"combobox":{let{NestedToken:p}=(dn(),U(ln));g=new p(t,/<(combooption)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(combooption\s*)>)/giu,["combooption"],u,o);break}case"gallery":{let{GalleryToken:p}=(mo(),U(ho));g=new p(t,u,o);break}case"imagemap":{let{ImagemapToken:p}=(yo(),U(To));g=new p(t,u,o);break}case"hiero":{let{CommentedToken:p}=(Ao(),U(vo));g=new p(t,u,o);break}default:{let{NowikiToken:p}=(wo(),U(So));g=new p(t,u,o)}}g.setAttribute("name",l),g.type==="plain"&&(g.type="ext-inner"),super(n,d,g,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}};mi=P(Rl),He=B(mi,0,"ExtToken",Co,He),j(mi,1,He)});var Io={};Y(Io,{parseCommentAndExt:()=>Tt});var No,Pl,fi,jl,$o,Tt,Fr=k(()=>{"use strict";qt();te();fs();De();Ts();ks();ti();ui();No="<onlyinclude>",Pl="</onlyinclude>",{length:fi}=No,jl=[!1,!0].map(a=>{let n=a?"includeonly":"(?:no|only)include",e=a?"noinclude":"includeonly";return Ie(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"))}),$o=a=>{let n=a.indexOf(No);return{i:n,j:a.indexOf(Pl,n+fi)}},Tt=(a,n,e,t)=>{if(t){let{i:o,j:l}=$o(a);if(o!==-1&&l!==-1){let d="",u=g=>{new z(g,n,e),d+=`\0${e.length-1}n`};for(;o!==-1&&l!==-1;){let g=`\0${e.length}e`;new xt(a.slice(o+fi,l),n,e),o>0&&u(a.slice(0,o)),d+=g,a=a.slice(l+fi+1),{i:o,j:l}=$o(a)}return a&&u(a),d}}let{ext:r}=n,i=r.filter(o=>o!=="translate"&&o!=="tvar"),s=ie(G({},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,d,u)=>{let g=e.length;return new Yr(d,u&&Ee(u,o),s,e),`\0${g}g`}),a=Ee(a,o)}return a.replace(jl[t?1:0](i),(o,l,d,u,g,p,m,f,h)=>{let x=e.length,b="n";if(l)b="e",new He(l,d,u,g,s,p,e);else if(o.startsWith("<!--")){b="c";let S=o.endsWith("-->");new Ke(o.slice(4,S?-3:void 0),S,n,e)}else p?new bt(p,m,f,h,n,e):new z(o,n,e);return`\0${x}${b}`})}});var Bl,ql,Ol,Eo,ar,Pe,dt,Je,xi,_l,Ct,Lo=k(()=>{"use strict";_();ge();re();en();O();Bl=new Set(["if","ifeq","ifexpr","ifexist","iferror","switch"]),ql=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"]),Ol=new Set(["strike","big","center","font","tt"]);Eo=[Vt()];Ct=class extends(_l=v){constructor(e,t,r,i,s,o){super(void 0,s,o);T(this,ar);T(this,Pe);T(this,dt);T(this,Je);this.insertAt(t),this.setAttribute("name",e.toLowerCase()),y(this,ar,r),y(this,Pe,i),y(this,dt,e)}get type(){return"html"}get selfClosing(){return c(this,Pe)}get closing(){return c(this,ar)}toString(e){return`<${this.closing?"/":""}${c(this,dt)}${super.toString(e)}${c(this,Pe)?"/":""}>`}text(){let{closing:e}=this,t=c(this,dt)+(e?"":super.text());return`<${e?"/":""}${t}${c(this,Pe)?"/":""}>`}getAttribute(e){return e==="padding"?c(this,dt).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,d=new R(this,e);if(i==="h1"&&!o){let h=L(this,d,"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,d,"parsing-order","HTML tag in table attributes");h.fix={desc:"remove",range:[e,h.endIndex],text:""},r.push(h)}Ol.has(i)&&r.push(L(this,d,"obsolete-tag","obsolete HTML tag","warning")),(i==="b"||i==="strong")&&this.closest("heading-title")&&r.push(L(this,d,"bold-header","bold in section header","warning"));let{html:[,u,g]}=this.getAttribute("config"),p=g.includes(i),m=u.includes(i);if(o&&(l||p)||l&&(!p&&!m)){let h=L(this,d,"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,d,"unmatched-tag",o?"unmatched closing tag":"unclosed tag");if(o){let x=this.closest("magic-word");x&&Bl.has(x.name)?h.severity="warning":h.suggestions=[{desc:"remove",range:[e,h.endIndex],text:""}]}else{let x=s==null?void 0:s.childNodes;ql.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 Se(c(this,Je),()=>{let{name:e,parentNode:t,closing:r,selfClosing:i}=this,{html:[,s,o]}=this.getAttribute("config"),l=o.includes(e),d=s.includes(e);if(l||d&&i)return this;if(!t)return;let{childNodes:u}=t,g=u.indexOf(this),p=r?u.slice(0,g).reverse():u.slice(g+1),m=[this],{rev:f}=ce;for(let h of p)if(!(!h.is("html")||h.name!==e||d&&c(h,Pe)))if(c(h,ar)===r)m.push(h);else{let x=m.pop();if(x===this)return h;y(x,Je,[f,h]),y(h,Je,[f,x])}for(let h of m)y(h,Je,[f,void 0])},e=>{y(this,Je,e),e[1]&&e[1]!==this&&y(e[1],Je,[ce.rev,this])})}print(){return super.print({pre:`<${this.closing?"/":""}${c(this,dt)}`,post:`${c(this,Pe)?"/":""}>`})}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return Object.assign(r,{closing:this.closing,selfClosing:c(this,Pe)}),r}};xi=P(_l),ar=new WeakMap,Pe=new WeakMap,dt=new WeakMap,Je=new WeakMap,Ct=B(xi,0,"HtmlToken",Eo,Ct),j(xi,1,Ct)});var Fo={};Y(Fo,{parseHtml:()=>zl});var Ml,zl,Ro=k(()=>{"use strict";rn();Lo();Ml=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,zl=(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=Ml.exec(o),d=l==null?void 0:l[2],u=d==null?void 0:d.toLowerCase();if(!l||!n.htmlElements.has(u)){i+=`<${o}`;continue}let[,g,,p="",m,f]=l,{length:h}=e,x=new st(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 Ct(d,x,g==="/",m==="/>",n,e)}return i}});var lr,bi=k(()=>{"use strict";en();O();ht();rn();lr=class extends Vt(1)(v){constructor(n,e,t,r,i,s=[],o){super(void 0,i,s,o),this.append(new he(e,"table-syntax",i,s),new st(r,"table-attrs",t,i,s))}}});var ke,_r,Mr,Ti,dr,yi=k(()=>{"use strict";_();re();O();bi();dr=class extends lr{constructor(e,t,r,i=[]){var d;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,Mr);T(this,ke,"");T(this,_r);s&&([Gr(this,ke)._]=s);let l=new v(t==null?void 0:t.slice(((d=s==null?void 0:s.index)!=null?d:NaN)+c(this,ke).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,Mr,Ti).call(this).subtype}afterBuild(){c(this,ke).includes("\0")&&y(this,ke,this.buildFromStr(c(this,ke),0)),super.afterBuild()}toString(e){let{childNodes:[t,r,i]}=this;return t.toString(e)+r.toString(e)+c(this,ke)+i.toString(e)}text(){let{childNodes:[e,t,r]}=this;return e.text()+t.text()+c(this,ke)+r.text()}getGaps(e){return e===1?c(this,ke).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("||"),d=C(s,i,"pipe-like",'additional "|" in a table cell',l?"error":"warning");if(l){let u={caption:"|+",td:"|",th:"!"}[this.subtype];d.fix={range:[d.startIndex,d.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 Zt(E[1].length,E.slice(2),n,e)))}}else if(C==="|"||ne)m=A+1,o(a,F,X,A),C==="|"&&F.push([]),I.pos=m,I.findEqual=C==="|",i.push(I);else if(C.startsWith("}}")){let Z=C.slice(0,Math.min(O.length,3)),K=O.length-Z.length,{length:E}=e;m=A+Z.length,o(a,F,X,A);let Ne=!1,ve="t";if(Z.length===3){let de=F.map(Be=>Be.join("=")),je=de.length>1&&oe(de[1]).trim();new St(de,n,e),je&&je.endsWith(":")&&r.includes(je.slice(0,-1).toLowerCase())&&(ve="s")}else try{new at(F[0][0],F.slice(1),n,e),ve=eo(F[0][0])}catch(de){if(de instanceof SyntaxError&&de.message==="Invalid template name")Ne=!0;else throw de}Ne||(a=`${a.slice(0,M+K)}\0${E}${ve}${a.slice(m)}`,m=M+K+3+String(E).length,K>1?i.push({0:O.slice(0,K),index:M,pos:M+K,parts:[[]]}):K===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 se=i[i.length-1];if(u&&d+a.length<m)for(u=!1;(S=se==null?void 0:se[0])!=null&&S.startsWith("{");)i.pop(),se=i[i.length-1];g=Zs(t+(u?Js:"")+(se?`|${xl[se[0][0]]}${se.findEqual?"|=":""}`:"")),g.lastIndex=m,p=g.exec(a)}return Ee(a,s)}});var no={};Y(no,{InputboxToken:()=>Zn});var Zn,io=k(()=>{"use strict";Fr();an();W();Hn();Zn=class extends ot{constructor(n,e,t=w.getConfig(),r=[]){let i=Symbol("InputboxToken"),s=t.excludes.includes("heading")?t:ie(V({},t),{excludes:[...t.excludes,"heading"]}),{length:o}=r;r.push(i),e&&(e=Tt(e,s,r,n)),e&&(e=jr(e,s,r)),r.splice(o,1),super(n,e,s,r,{})}}});var ln={};Y(ln,{NestedToken:()=>ei});var bl,Tl,Br,rr,ei,dn=k(()=>{"use strict";_();re();Fr();an();W();q();ti();De();bl=new Set(["comment","include","arg","template","magic-word"]),Tl=[!1,!0].map(a=>{let n=a?"includeonly":"noinclude";return new RegExp(String.raw`^(?:<${n}(?:\s[^>]*)?/?>|</${n}\s*>)$`,"iu")}),ei=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=Tt(e,i,s,t)),e&&(e=jr(e,i,s)),s.splice(l,1)}else e&&(e=e.replace(t,(o,l,d,u,g)=>{let p=`\0${s.length+1}e`;return new He(l,d,u,g,i,!1,s),p}));e&&(e=e.replace(/(^|\0\d+.\x7F)([^\0]+)(?=$|\0\d+.\x7F)/gu,(o,l,d)=>(new z(d,i,s),`${l}\0${s.length}n`)));super(e,i,s);T(this,Br);T(this,rr);y(this,Br,[...r]),y(this,rr,t)}get type(){return"ext-inner"}lint(e=this.getAbsoluteIndex(),t){let r=new R(this,e),i=typeof c(this,rr)=="boolean"?Tl[c(this,rr)?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,Br).includes(l);if(bl.has(o))return!1;let d=s.toString().trim();return d&&!i.test(d)}).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})]}};Br=new WeakMap,rr=new WeakMap});function so(a,n,e,t,r){n=oe(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(yl(e.protocol).test(i))return kl(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 yl,kl,vl,Al,me,pn,oo,gn,ao=k(()=>{"use strict";Ot();te();_();W();q();yl=Ie(a=>new RegExp(String.raw`^(?:${a}|//|\0\d+m\x7F)`,"iu")),kl=Ie(a=>new RegExp(String.raw`^(?:(?:${a}|//)${Oe}|\0\d+m\x7F)${qe}$`,"iu")),vl=Ie(a=>new RegExp(String.raw`^(\s*(?!\s))${a.replace("$1","(.*)")}${a.endsWith("$1")?`(?=$|
|
|
11
|
+
)`:""}(\s*)$`,"u")),Al=new Set(["alt","link","lang","page","caption"]);gn=class extends v{constructor(e,t,r,i){var n=(...Pu)=>(super(...Pu),T(this,pn),T(this,me,""),this);let s,o=Object.entries(r.img).map(([d,u])=>[d,u,vl(d)]),l=o.find(([,d,u])=>(s=u.exec(e),s&&(s.length!==4||so(d,s[2],r,!0,t)!==!1)));if(l&&s){s.length===3?(n(void 0,r,i),y(this,me,e)):(n(s[2],r,i,{}),y(this,me,s[1]+l[0]+s[3])),this.setAttribute("name",l[1]);return}n(e,r.excludes.includes("list")?r:ie(V({},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"?so("link",super.text(),this.getAttribute("config")):void 0}afterBuild(){var e;((e=this.parentNode)==null?void 0:e.type)==="gallery-image"&&!Al.has(this.name)&&this.setAttribute("name","invalid"),super.afterBuild()}toString(e){return c(this,me)?c(this,me).replace("$1",super.toString(e)):super.toString(e)}text(){return c(this,me)?c(this,me).replace("$1",super.text()).trim():super.text().trim()}isPlain(){return this.name==="caption"}getAttribute(e){return e==="padding"?Math.max(0,c(this,me).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:Ze(this.text())}],r.push(o)}return r}getValue(){return this.name==="invalid"?this.text():N(this,pn,oo).call(this)||super.text()}print(){return c(this,me)?`<span class="wpb-image-parameter">${c(this,me).replace("$1",`<span class="wpb-image-caption">${Me(this.childNodes)}</span>`)}</span>`:super.print({class:"image-caption"})}};me=new WeakMap,pn=new WeakSet,oo=function(){return c(this,me)&&!c(this,me).includes("$1")}});var lo,Sl,wl,go,po,Cl,$l,uo,nr,ri=k(()=>{"use strict";_();re();W();Nr();ao();lo=new Map([["manualthumb","Thumb"],["frameless","Frameless"],["framed","Frame"],["thumbnail","Thumb"]]),Sl=new Set(["arg"]),wl=new Set(["template","magic-word"]),go=new Set(["left","right","center","none"]),po=new Set(["baseline","sub","super","top","text-top","middle","bottom","text-bottom"]),Cl=new Set(["tiff","tif","png","gif","jpg","jpeg","webp","xcf","pdf","svg","djvu"]),$l=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},uo=(a,n)=>a.filter(({childNodes:e})=>{let t=e.filter(r=>r.text().trim());return t.length!==1||!n.has(t[0].type)}),nr=class extends xe{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($l(e).map(o=>new gn(o,s,t,r)))}lint(n=this.getAbsoluteIndex(),e){var f;let t=super.lint(n,e),r=uo(this.getAllArgs(),Sl),i=[...new Set(r.map(({name:h})=>h))],s=i.filter(h=>lo.has(h)),o=i.filter(h=>go.has(h)),l=i.filter(h=>po.has(h)),[d]=s,u=d==="framed"||d==="manualthumb",g=new R(this,n);if(this.closest("ext-link-text")&&((f=this.getValue("link"))==null?void 0:f.trim())!==""&&t.push(L(this,g,"nested-link","internal link in an external link")),u)for(let h of r.filter(({name:x})=>x==="width")){let x=$(h,g,"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,g,"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||Cl.has(m);if(x&&S){let C=uo(b,wl);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})=>lo.has(h)).map(p("conflicting","frame"))),o.length>1&&t.push(...r.filter(({name:h})=>go.has(h)).map(p("conflicting","horizontal-alignment"))),l.length>1&&t.push(...r.filter(({name:h})=>po.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 co,ni,Nl,Ge,ii=k(()=>{"use strict";_();ze();q();ri();co=[ue("")];Ge=class extends(Nl=nr){constructor(e,t,r,i,s=[]){let o;if(r!==void 0){let{length:l}=s;o=new v(r,i,s);for(let d=1;d<11;d++)o.parseOnce();s.splice(l,1)}super(t,o==null?void 0:o.toString(),i,s);ge(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}};ni=P(Nl),Ge=B(ni,0,"GalleryImageToken",co,Ge),j(ni,1,Ge)});var fo={};Y(fo,{GalleryToken:()=>ir});var ho,wt,mo,oi,si,Il,ir,xo=k(()=>{"use strict";nn();W();q();ii();De();ho=[Jt];ir=class extends(Il=v){constructor(e,t,r=[]){var i;super(void 0,t,r,{});T(this,wt);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,d]=o;N(this,wt,mo).call(this,l)?super.insertAt(new Ge("gallery",l,d,t,r)):super.insertAt(new z(s,t,r))}}get type(){return"ext-inner"}get widths(){return N(this,wt,oi).call(this,"widths")}get heights(){return N(this,wt,oi).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],d=l.toString(),{length:u}=d,g=d.trim(),{type:p}=l,m=r+o,f=o?0:i;if(l.setAttribute("aIndex",e),p==="noinclude"&&g&&!/^<!--.*-->$/u.test(g)){let h=e+u;s.push({rule:"no-ignored",message:w.msg("invalid content in <$1>","gallery"),severity:g.endsWith("-->")||/^(?:\||<!--)/u.test(g)?"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:`<!--${d}-->`}]})}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}};si=P(Il),wt=new WeakSet,mo=function(e){return this.normalizeTitle(e,6,{halfParsed:!0,temporary:!0,decode:!0}).valid},oi=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},ir=B(si,0,"GalleryToken",ho,ir),j(si,1,ir)});var sr,ai=k(()=>{"use strict";_();Nr();sr=class extends xe{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 El,Ll,Or,Ve,un=k(()=>{"use strict";_();te();re();W();q();El=String.raw`(?:[${Ae}\t]| |�*160;|&#[xX]0*[aA]0;)`,Ll=new RegExp(`${El}+`,"gu"),Ve=class extends v{constructor(e,t="free-ext-link",r=w.getConfig(),i){super(e,r,i,{});T(this,Or);y(this,Or,t)}get type(){return c(this,Or)}get innerText(){let e=new Map([["!","|"],["=","="]]),t=Te(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(Ll," ")),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:Yi(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:g}=this;if(g.startsWith("ISBN")){let p=[...g.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",d=l?/\|/u:/[,;。:!?()]+/u,u=o.find(g=>g.type==="text"&&d.test(g.data));if(u){let{data:g}=u,p=$(u,i,"unterminated-url",w.msg("$1 in URL",l?'"|"':"full-width punctuation"),"warning"),{index:m,0:f}=d.exec(g),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){}};Or=new WeakMap});var bo,Xe,li,Fl,Qe,di=k(()=>{"use strict";_();ze();q();un();bo=[ue("[")];Qe=class extends(Fl=v){constructor(e,t="",r="",i,s=[]){super(void 0,i,s,{});T(this,Xe);let o=e&&/^\0\d+f\x7F$/u.test(e)?s[Number(e.slice(1,-2))]:new Ve(e,"ext-link-url",i,s);if(this.insertAt(o),y(this,Xe,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,Xe)}]`:`[${super.toString(e,c(this,Xe))}]`}text(){return`[${super.text(" ")}]`}getGaps(){return c(this,Xe).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,Xe)}]`}:{pre:"[",sep:c(this,Xe),post:"]"})}};li=P(Fl),Xe=new WeakMap,Qe=B(li,0,"ExtLinkToken",bo,Qe),j(li,1,Qe)});var qr,To=k(()=>{"use strict";q();De();ai();di();qr=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 sr(...e,r,i):new Qe(...e,r,i),new z(t,r,i))}}});var ko={};Y(ko,{ImagemapToken:()=>or});var yo,gi,Rl,or,vo=k(()=>{"use strict";_();pe();re();nn();W();q();De();ii();To();yo=[Jt];or=class extends(Rl=v){get type(){return"ext-inner"}get image(){return this.childNodes.find(er("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 d of r){let u=d.trim();if(!(l||!u||u.startsWith("#"))){if(o){let g=d.indexOf("|"),p=g===-1?d:d.slice(0,g),{valid:m,ns:f}=this.normalizeTitle(p,0,{halfParsed:!0,temporary:!0});if(m&&f===6){let h=new Ge("imagemap",p,g===-1?void 0:d.slice(g+1),e,t);super.insertAt(h),o=!1;continue}else l=!0}else if(d.trim().split(/[\t ]/u,1)[0]==="desc"){super.insertAt(d);continue}else if(d.includes("[")){let g=d.indexOf("["),p=d.slice(g),m=/^\[\[([^|]+)(?:\|([^\]]*))?\]\][\w\s]*$/u.exec(p);if(m){if(this.normalizeTitle(m[1],0,{halfParsed:!0,temporary:!0,selfLink:!0}).valid){super.insertAt(new qr(d.slice(0,g),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 qr(d.slice(0,g),f.slice(1),p.slice(p.indexOf("]")+1),e,t));continue}}}}super.insertAt(new s(d,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}};gi=P(Rl),or=B(gi,0,"ImagemapToken",yo,or),j(gi,1,or)});var Ao,pi,Pl,Ke,ui=k(()=>{"use strict";_();ct();ze();W();tt();Ao=[ye(!1),ue("<!--")];Ke=class extends(Pl=ce){constructor(e,t,r,i){super(e,r,i);ge(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:"<!--",post:this.closed?"-->":""})}};pi=P(Pl),Ke=B(pi,0,"CommentToken",Ao,Ke),j(pi,1,Ke)});var So={};Y(So,{CommentedToken:()=>ci});var ci,wo=k(()=>{"use strict";q();ui();ci=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 Ke(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 Co={};Y(Co,{NowikiToken:()=>hi});var jl,Bl,hi,$o=k(()=>{"use strict";Ot();_();W();tt();jl=Ie(a=>new RegExp(String.raw`<\s*(?:/\s*)${a==="nowiki"?"":"?"}(${a})\b`,"giu")),Bl=new Set(["templatestyles","section","languages"]),hi=class extends ce{get type(){return"ext-inner"}lint(n=this.getAbsoluteIndex()){let{name:e,firstChild:{data:t}}=this;if(Bl.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,jl(e))}}});var No,mi,Ol,He,ti=k(()=>{"use strict";_();re();W();en();q();Jr();rn();No=[Vt()];He=class extends(Ol=$e){get type(){return"ext"}constructor(n,e,t,r,i=w.getConfig(),s=!1,o=[]){let l=n.toLowerCase(),d=new st(!e||/^\s/u.test(e)?e:` ${e}`,"ext-attrs",l,i,o),u=ie(V({},i),{ext:i.ext.filter(p=>p!==l),excludes:[...i.excludes]}),g;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"),g=new v(t,u,o);break;case"pre":{let{PreToken:p}=(_s(),U(qs));g=new p(t,u,o);break}case"dynamicpagelist":{let{ParamTagToken:p}=(Hn(),U(zs));g=new p(s,t,u,o);break}case"inputbox":{let{InputboxToken:p}=(io(),U(no));g=new p(s,t,u,o);break}case"references":{let{NestedToken:p}=(dn(),U(ln));u.excludes.push("heading"),g=new p(t,s,["ref"],u,o);break}case"choose":{let{NestedToken:p}=(dn(),U(ln));g=new p(t,/<(option|choicetemplate)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(\1)>)/gu,["option","choicetemplate"],u,o);break}case"combobox":{let{NestedToken:p}=(dn(),U(ln));g=new p(t,/<(combooption)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(combooption\s*)>)/giu,["combooption"],u,o);break}case"gallery":{let{GalleryToken:p}=(xo(),U(fo));g=new p(t,u,o);break}case"imagemap":{let{ImagemapToken:p}=(vo(),U(ko));g=new p(t,u,o);break}case"hiero":{let{CommentedToken:p}=(wo(),U(So));g=new p(t,u,o);break}default:{let{NowikiToken:p}=($o(),U(Co));g=new p(t,u,o)}}g.setAttribute("name",l),g.type==="plain"&&(g.type="ext-inner"),super(n,d,g,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}};mi=P(Ol),He=B(mi,0,"ExtToken",No,He),j(mi,1,He)});var Lo={};Y(Lo,{parseCommentAndExt:()=>Tt});var Eo,ql,fi,_l,Io,Tt,Fr=k(()=>{"use strict";Ot();te();xs();De();ys();vs();ti();ui();Eo="<onlyinclude>",ql="</onlyinclude>",{length:fi}=Eo,_l=[!1,!0].map(a=>{let n=a?"includeonly":"(?:no|only)include",e=a?"noinclude":"includeonly";return Ie(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"))}),Io=a=>{let n=a.indexOf(Eo);return{i:n,j:a.indexOf(ql,n+fi)}},Tt=(a,n,e,t)=>{if(t){let{i:o,j:l}=Io(a);if(o!==-1&&l!==-1){let d="",u=g=>{new z(g,n,e),d+=`\0${e.length-1}n`};for(;o!==-1&&l!==-1;){let g=`\0${e.length}e`;new xt(a.slice(o+fi,l),n,e),o>0&&u(a.slice(0,o)),d+=g,a=a.slice(l+fi+1),{i:o,j:l}=Io(a)}return a&&u(a),d}}let{ext:r}=n,i=r.filter(o=>o!=="translate"&&o!=="tvar"),s=ie(V({},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,d,u)=>{let g=e.length;return new Yr(d,u&&Ee(u,o),s,e),`\0${g}g`}),a=Ee(a,o)}return a.replace(_l[t?1:0](i),(o,l,d,u,g,p,m,f,h)=>{let x=e.length,b="n";if(l)b="e",new He(l,d,u,g,s,p,e);else if(o.startsWith("<!--")){b="c";let S=o.endsWith("-->");new Ke(o.slice(4,S?-3:void 0),S,n,e)}else p?new bt(p,m,f,h,n,e):new z(o,n,e);return`\0${x}${b}`})}});var Ml,zl,Ul,Fo,ar,Pe,dt,Je,xi,Wl,Ct,Ro=k(()=>{"use strict";_();pe();re();en();q();W();Ml=new Set(["if","ifeq","ifexpr","ifexist","iferror","switch"]),zl=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"]),Ul=new Set(["strike","big","center","font","tt"]);Fo=[Vt()];Ct=class extends(Wl=v){constructor(e,t,r,i,s,o){super(void 0,s,o);T(this,ar);T(this,Pe);T(this,dt);T(this,Je);this.insertAt(t),this.setAttribute("name",e.toLowerCase()),y(this,ar,r),y(this,Pe,i),y(this,dt,e)}get type(){return"html"}get selfClosing(){return c(this,Pe)}get closing(){return c(this,ar)}toString(e){return`<${this.closing?"/":""}${c(this,dt)}${super.toString(e)}${c(this,Pe)?"/":""}>`}text(){let{closing:e}=this,t=c(this,dt)+(e?"":super.text());return`<${e?"/":""}${t}${c(this,Pe)?"/":""}>`}getAttribute(e){return e==="padding"?c(this,dt).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,d=new R(this,e);if(i==="h1"&&!o){let h=L(this,d,"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,d,"parsing-order","HTML tag in table attributes");h.fix={desc:"remove",range:[e,h.endIndex],text:""},r.push(h)}Ul.has(i)&&r.push(L(this,d,"obsolete-tag","obsolete HTML tag","warning")),(i==="b"||i==="strong")&&this.closest("heading-title")&&r.push(L(this,d,"bold-header","bold in section header","warning"));let{html:[,u,g]}=this.getAttribute("config"),p=g.includes(i),m=u.includes(i);if(o&&(l||p)||l&&(!p&&!m)){let h=L(this,d,"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,d,"unmatched-tag",o?"unmatched closing tag":"unclosed tag");if(o){let x=this.closest("magic-word");x&&Ml.has(x.name)?h.severity="warning":h.suggestions=[{desc:"remove",range:[e,h.endIndex],text:""}]}else{let x=s==null?void 0:s.childNodes;zl.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 Se(c(this,Je),()=>{let{name:e,parentNode:t,closing:r,selfClosing:i}=this,{html:[,s,o]}=this.getAttribute("config"),l=o.includes(e),d=s.includes(e);if(l||d&&i)return this;if(!t)return;let{childNodes:u}=t,g=u.indexOf(this),p=r?u.slice(0,g).reverse():u.slice(g+1),m=[this],{rev:f}=ae;for(let h of p)if(!(!h.is("html")||h.name!==e||d&&c(h,Pe)))if(c(h,ar)===r)m.push(h);else{let x=m.pop();if(x===this)return h;w.viewOnly&&(y(x,Je,[f,h]),y(h,Je,[f,x]))}if(w.viewOnly)for(let h of m)y(h,Je,[f,void 0])},e=>{y(this,Je,e),e[1]&&e[1]!==this&&y(e[1],Je,[ae.rev,this])})}print(){return super.print({pre:`<${this.closing?"/":""}${c(this,dt)}`,post:`${c(this,Pe)?"/":""}>`})}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return Object.assign(r,{closing:this.closing,selfClosing:c(this,Pe)}),r}};xi=P(Wl),ar=new WeakMap,Pe=new WeakMap,dt=new WeakMap,Je=new WeakMap,Ct=B(xi,0,"HtmlToken",Fo,Ct),j(xi,1,Ct)});var Po={};Y(Po,{parseHtml:()=>Hl});var Dl,Hl,jo=k(()=>{"use strict";rn();Ro();Dl=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,Hl=(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=Dl.exec(o),d=l==null?void 0:l[2],u=d==null?void 0:d.toLowerCase();if(!l||!n.htmlElements.has(u)){i+=`<${o}`;continue}let[,g,,p="",m,f]=l,{length:h}=e,x=new st(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 Ct(d,x,g==="/",m==="/>",n,e)}return i}});var lr,bi=k(()=>{"use strict";en();q();ht();rn();lr=class extends Vt(1)(v){constructor(n,e,t,r,i,s=[],o){super(void 0,i,s,o),this.append(new he(e,"table-syntax",i,s),new st(r,"table-attrs",t,i,s))}}});var ke,_r,Mr,Ti,dr,yi=k(()=>{"use strict";_();re();q();bi();dr=class extends lr{constructor(e,t,r,i=[]){var d;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,Mr);T(this,ke,"");T(this,_r);s&&([Gr(this,ke)._]=s);let l=new v(t==null?void 0:t.slice(((d=s==null?void 0:s.index)!=null?d:NaN)+c(this,ke).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,Mr,Ti).call(this).subtype}afterBuild(){c(this,ke).includes("\0")&&y(this,ke,this.buildFromStr(c(this,ke),0)),super.afterBuild()}toString(e){let{childNodes:[t,r,i]}=this;return t.toString(e)+r.toString(e)+c(this,ke)+i.toString(e)}text(){let{childNodes:[e,t,r]}=this;return e.text()+t.text()+c(this,ke)+r.text()}getGaps(e){return e===1?c(this,ke).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("||"),d=$(s,i,"pipe-like",'additional "|" in a table cell',l?"error":"warning");if(l){let u={caption:"|+",td:"|",th:"!"}[this.subtype];d.fix={range:[d.startIndex,d.endIndex],text:o.replace(/\|\|/gu,`
|
|
14
14
|
${u}`),desc:"newline"}}else d.suggestions=[{desc:"escape",range:[d.startIndex,d.endIndex],text:o.replace(/\|/gu,"|")}];r.push(d)}}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,ke)}${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}};ke=new WeakMap,_r=new WeakMap,Mr=new WeakSet,Ti=function(){return Se(c(this,_r),()=>{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
|
|
16
|
-
|}`,e){let t=this.getAttribute("config"),r=this.getAttribute("accum"),i=[n];
|
|
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,ke)}${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}};ke=new WeakMap,_r=new WeakMap,Mr=new WeakSet,Ti=function(){return Se(c(this,_r),()=>{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 V({},N(o=i,Mr,Ti).call(o))},e=>{y(this,_r,e)})}});var Gl,Vl,ki,gr,vi=k(()=>{"use strict";_();bi();yi();Gl=new Set(["tr","td","th","caption"]),Vl=new Set(["Template:!!","Template:!-"]),ki=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"&&Vl.has(n.name)||n.is("html")&&Gl.has(n.name))return!1;if(n.is("arg"))return n.length>1&&ki(n.childNodes[1]);if(n.is("magic-word"))try{let e=n.getPossibleValues().map(ki);return e.includes("error")?"error":e.includes("warning")&&"warning"}catch(e){}return n.type==="template"||n.type==="magic-word"&&n.name==="invoke"?"warning":"error"},gr=class extends lr{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=ki(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 dr&&n.isIndependent()&&!n.firstChild.text().endsWith("+")))}}});var Xl,Ql,Ai,cn,Bo=k(()=>{"use strict";_();pe();re();W();vi();ht();Xl=(a,n)=>new Array(a).fill(void 0).map((e,t)=>n(t)),Ql=({type:a})=>a==="tr"||a==="table-syntax",Ai=class extends Array{},cn=class extends gr{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,d=0;for(;d<s;d++){let u=i[d],g=u.length;if(g<o)break;g<l&&(l=g);let p=u.indexOf(u[g-1])+1;if(p>l)break;p>o&&(o=p)}if(d<s){let u=$(this.getNthRow(d),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];ae.run(()=>{let s=new he(void 0,"table-syntax",t,r);super.insertAt(s)}),this.lastChild.safeReplaceChildren(i)}getLayout(n){let e=this.getAllRows(),{length:t}=e,r=Ai.from(Xl(t,()=>[]));for(let i=0;i<r.length;i++){let s=r[i],o=0,l=0,d;for(let u of e[i].childNodes.slice(2))if(u.type==="td"){if(u.isIndependent()&&(d=u.subtype!=="caption"),d){let g={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]=g;l+=m}}else if(Ql(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 hn,Oo=k(()=>{"use strict";vi();hn=class extends gr{get type(){return"tr"}constructor(n,e,t,r){super(/^\n[^\S\n]*(?:\|-+|\{\{\s*!\s*\}\}-+|\{\{\s*!-\s*\}\}-*)$/u,n,"tr",e,t,r)}}});var pr,Si=k(()=>{"use strict";tt();pr=class extends ce{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 ur,wi=k(()=>{"use strict";Si();ur=class extends pr{get type(){return"dd"}}});var _o={};Y(_o,{parseTable:()=>Jl});var Kl,qo,Jl,Mo=k(()=>{"use strict";q();Bo();Oo();yi();wi();Kl=a=>a.lastChild.constructor!==v,qo=(a,n)=>a.type==="td"?n.pop():a,Jl=({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,d=(u,g)=>{if(!g){o+=u;return}let{lastChild:p}=g;if(
|
|
19
|
-
${g}${
|
|
18
|
+
${s.shift()}`,l,d=(u,g)=>{if(!g){o+=u;return}let{lastChild:p}=g;if(Kl(g)){let m=new v(u,t,r);m.type="table-inter",m.setAttribute("stage",3),g.insertAt(m)}else p.setText(p.toString()+u)};for(let u of s){l=i.pop();let[g]=/^(?:\s|\0\d+[cno]\x7F)*/u.exec(u),p=u.slice(g.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 ur(C,t,r),d(`
|
|
19
|
+
${g}${C&&`\0${r.length-1}d`}${A}\0${r.length}b`,l),i.push(...l?[l]:[],new cn(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){d(`
|
|
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
|
-
${g}${h}`,!0),d(S,i[i.length-1])}else if(x){l=
|
|
23
|
-
${g}${x}`,S,t,r);i.push(l,
|
|
24
|
-
${g}${b}`,M=F=>{let H=new dr(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 mn,_o=k(()=>{"use strict";tt();mn=class extends ue{get type(){return"hr"}}});var Mo,Ci,Xl,$t,zo=k(()=>{"use strict";ct();ze();tt();Mo=[ye(),pe("__")];$t=class extends(Xl=ue){get type(){return"double-underscore"}constructor(n,e,t,r){var l,d;super(n,t,r);let i=n.toLowerCase(),{doubleUnderscore:[,,s,o]}=t;this.setAttribute("name",(d=e?(l=o==null?void 0:o[n])==null?void 0:l.toLowerCase():s==null?void 0:s[i])!=null?d:i)}toString(){return`__${this.innerText}__`}print(){return super.print({pre:"__",post:"__"})}};Ci=P(Xl),$t=B(Ci,0,"DoubleUnderscoreToken",Mo,$t),j(Ci,1,$t)});var Uo={};Y(Uo,{parseHrAndDoubleUnderscore:()=>Ql});var Ql,Wo=k(()=>{"use strict";_o();zo();Gn();Ql=({firstChild:{data:a},type:n,name:e},t,r)=>{var l,d,u;let{doubleUnderscore:[i,s,o]}=t;return(l=t.insensitiveDoubleUnderscore)!=null||(t.insensitiveDoubleUnderscore=new Set(i)),(d=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,(g,p,m)=>(new mn(m,t,r),`${p}\0${r.length-1}r`)).replace(t.regexHrAndDoubleUnderscore,(g,p)=>{var x;let m=t.sensitiveDoubleUnderscore.has(p),f=p.toLowerCase(),h=t.insensitiveDoubleUnderscore.has(f);return m||h?(new $t(p,m,t,r),`\0${r.length-1}${h&&((x=o==null?void 0:o[f])!=null?x:f)==="toc"?"u":"n"}`):g}).replace(/^((?:\0\d+[cn]\x7F)*)(={1,6})(.+)\2((?:\s|\0\d+[cn]\x7F)*)$/gmu,(g,p,m,f,h)=>{let x=`${p}\0${r.length}h`;return new Zt(m.length,[f,h],t,r),x}),n==="root"||n==="ext-inner"&&e==="poem"?a:a.slice(1)}});var cr,fn,Do=k(()=>{"use strict";_();re();X();tt();fn=class extends ue{constructor(e,t,r,i){super(e,r,i);T(this,cr);y(this,cr,t)}get type(){return"quote"}get bold(){return this.innerText.length!==2}get italic(){return this.innerText.length!==3}get closing(){return G(G({},this.bold?{bold:c(this,cr).bold}:void 0),this.italic?{italic:c(this,cr).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,d=$.msg('lonely "$1"',"'"),u=[],g=new R(this,e),p=(m,f,h)=>[{desc:"escape",range:[m,f],text:"'".repeat(h)},{desc:"remove",range:[m,f],text:""}];if(o!=null&&o.endsWith("'")){let m=L(this,g,"lonely-apos",d,(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(ie(G({},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,g,"lonely-apos",d),{endIndex:f,endLine:h,endCol:x}=m,[{length:b}]=/^'+/u.exec(l),S=f+b;u.push(ie(G({},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,g,"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}};cr=new WeakMap});var Ho={};Y(Ho,{parseQuotes:()=>$i});var $i,Ni=k(()=>{"use strict";Do();$i=(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,d,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(" ")?d===void 0&&u===void 0&&(u=f):r[f-1].slice(-2,-1)===" "?l=f:d!=null||(d=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:d)!=null?m:u;f!==void 0&&(r[f]="''",r[f-1]+="'")}let g=!0,p=!0;for(let f=1;f<i;f+=2){let h=r[f].length,x=h!==2,b=h!==3;x&&(g=!g),b&&(p=!p),new fn(r[f],{bold:x&&g,italic:b&&p},n,e),r[f]=`\0${e.length-1}q`}return r.join("")}});var Go={};Y(Go,{parseExternalLinks:()=>Ii});var Ii,Ei=k(()=>{"use strict";te();di();un();Ii=(a,n,e,t)=>{var r;return(r=n.regexExternalLinks)!=null||(n.regexExternalLinks=new RegExp(String.raw`\[(\0\d+f\x7F|(?:(?:${n.protocol}|//)${qe}|\0\d+m\x7F)${Oe}(?=[[\]<>"\t${Ae}]|\0\d))([${Ae}]*(?![${Ae}]))([^\]\x01-\x08\x0A-\x1F\uFFFD]*)\]`,"giu")),a.replace(n.regexExternalLinks,(i,s,o,l)=>{let{length:d}=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 Ve(s,"ext-link-url",n,e),`[\0${d}f${o}${l}]`):(new Qe(s,o,l,n,e),`\0${d}w`)})}});var xn,Vo=k(()=>{"use strict";te();Nr();xn=class extends xe{get type(){return"category"}get sortkey(){let{childNodes:[,n]}=this;return n&&ut(n.text())}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e),{sortkey:r}=this;return r&&(t.sortkey=r),t}}});var Qo={};Y(Qo,{parseLinks:()=>Xo});var Kl,Xo,Ko=k(()=>{"use strict";X();Ni();Ei();ai();ri();Vo();Kl=/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(\||\0\d+!\x7F)([\s\S]*)$/u,Xo=(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 d=!1,u,g,p,m,f=i[l],h=r.exec(f);if(h)[,u,g,p,m]=h,m.startsWith("]")&&(p!=null&&p.includes("["))&&(p+="]",m=m.slice(1));else{let A=Kl.exec(f);A&&(d=!0,[,u,g,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&&d){s+=`[[${f}`;continue}let{ns:b,valid:S}=$.normalizeTitle(u,0,!1,n,{halfParsed:!0,temporary:!0,decode:!0,selfLink:!0});if(S){if(d){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=Xo(p,n,e,t),!A){s+=`[[${u}${g}${p}`;continue}}}else{s+=`[[${f}`;continue}p&&(p=$i(p,n,e,t));let w=sr;x||(b===6?(p&&(p=Ii(p,n,e,!0)),w=nr):b===14&&(w=xn)),p===void 0&&g&&(p=""),s+=`\0${e.length}l${m}`,new w(u,p,n,e,g)}return s}});var ta={};Y(ta,{parseMagicLinks:()=>Jl});var ea,Jo,Yo,Zo,Jl,ra=k(()=>{"use strict";te();un();ea=String.raw`[${Ae}\t]| |�*160;|�*a0;`,Jo=`(?:${ea})+`,Yo=`(?:${ea}|-)`,Zo=String.raw`(?:RFC|PMID)${Jo}\d+\b|ISBN${Jo}(?:97[89]${Yo}?)?(?:\d${Yo}?){9}[\dx]\b`,Jl=(a,n,e)=>{if(!n.regexMagicLinks)try{n.regexMagicLinks=new RegExp(String.raw`(^|[^\p{L}\p{N}_])(?:(?:${n.protocol})(${qe}${Oe})|${Zo})`,"giu")}catch(t){n.regexMagicLinks=new RegExp(String.raw`(^|\W)(?:(?:${n.protocol})(${qe}${Oe})|${Zo})`,"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 d=s.includes("(")?/[^,;\\.:!?][,;\\.:!?]+$/u:/[^,;\\.:!?)][,;\\.:!?)]+$/u,u=d.exec(s);if(u){let g=1;u[0][1]===";"&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(s.slice(0,u.index))&&(g=2),o=s.slice(u.index+g)+o,s=s.slice(0,u.index+g)}return o.length>=i.length?t:(new Ve(s,void 0,n,e),`${r}\0${e.length-1}w${o}`)}else if(!/^(?:RFC|PMID|ISBN)/u.test(s))return t;return new Ve(s,"magic-link",n,e),`${r}\0${e.length-1}i`})}});var na,ia=k(()=>{"use strict";na=(a,n)=>a.startsWith(n)?n.length:[...n].findIndex((e,t)=>e!==a[t])});var bn,sa=k(()=>{"use strict";Si();bn=class extends pr{get type(){return"list"}}});var oa={};Y(oa,{parseList:()=>Yl});var Yl,aa=k(()=>{"use strict";ia();sa();wi();Yl=(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,":"),d=na(l,n.lastPrefix),u=(d>1?o.slice(d-1):o).split(/(?=;)/u),g=u[0].startsWith(";"),p=u.length-(g?0:1);if(d>1){let F=o.slice(0,d-1);g?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 bn(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 ur(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: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:ne,selfClosing:se}=t[Number(F.slice(1,-2))];(!se||f.includes(V))&&M(ne)}else if(F.endsWith("q")){let{bold:V,italic:ne}=t[Number(F.slice(1,-2))];V&&(M(w),w=!w),ne&&(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 la,da,Ye,Li,Zl,Nt,ga=k(()=>{"use strict";_();re();Ir();O();Ue();la=new Set(["A","T","R","D","-","H","N"]);da=[nt()];Nt=class extends(Zl=v){constructor(e,t,r=[]){super(void 0,t,r,{});T(this,Ye);this.safeAppend(e.map(i=>new Q(i,"converter-flag",t,r)))}get type(){return"converter-flags"}afterBuild(){y(this,Ye,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,Ye).filter(e=>/\{{3}[^{}]+\}{3}/u.test(e)))}getVariantFlags(){let e=new Set(this.getAttribute("config").variants);return new Set(c(this,Ye).filter(t=>e.has(t)))}lint(e=this.getAbsoluteIndex(),t){let r=this.getVariantFlags(),i=this.getUnknownFlags(),s=new Set(c(this,Ye).filter(g=>la.has(g))),o=c(this,Ye).filter(g=>!g).length,l=c(this,Ye).length-i.size-o,d=super.lint(e,t);if(r.size===l||s.size===l)return d;let u=new R(this,e);for(let g=0;g<this.length;g++){let p=this.childNodes[g],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&&la.has(m.toUpperCase())?f.fix={range:[f.startIndex,f.endIndex],text:m.toUpperCase(),desc:"uppercase"}:f.suggestions=[{desc:"remove",range:[f.startIndex-(g&&1),f.endIndex],text:""}],d.push(f)}}return d}print(){return super.print({sep:";"})}};Li=P(Zl),Ye=new WeakMap,Nt=B(Li,0,"ConverterFlagsToken",da,Nt),j(Li,1,Nt)});var hr,pa=k(()=>{"use strict";X();O();Ue();hr=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 Q(o,"converter-rule-variant",t,r)),super.insertAt(new Q(n.slice(i+1),"converter-rule-to",t,r)),s!==-1&&super.insertAt(new Q(n.slice(0,s),"converter-rule-from",t,r),0)):super.insertAt(new Q(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 ua,Fi,ed,It,ca=k(()=>{"use strict";te();ze();O();ga();pa();ua=[pe("-{")];It=class extends(ed=v){get type(){return"converter"}constructor(n,e,t,r=[]){super(void 0,t,r),this.insertAt(new Nt(n,t,r));let[i]=e,s=i.includes(":"),o=new hr(i,s,t,r);s&&o.length===1||!s&&e.length===2&&!oe(e[1]).trim()?this.insertAt(new hr(e.join(";"),!1,t,r)):this.append(o,...e.slice(1).map(l=>new hr(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()}|${Te(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?"|":""}${Me(e,{sep:";"})}}-</span>`}};Fi=P(ed),It=B(Fi,0,"ConverterToken",ua,It),j(Fi,1,It)});var ha={};Y(ha,{parseConverter:()=>td});var td,ma=k(()=>{"use strict";ca();td=(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:d,index:u}=o;if(d==="}-"){let g=i.pop(),{length:p}=e,m=a.slice(g.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 It(h,S,n,e),a=`${a.slice(0,g.index)}\0${p}v${a.slice(u+2)}`,i.length===0&&(s=t),s.lastIndex=g.index+3+String(p).length}else i.push(o),s=r,s.lastIndex=u+2;o=s.exec(a)}return a}});var Tn={};Y(Tn,{Token:()=>v});var zr,be,W,J,Et,mr,Ur,D,fa,xa,ba,Ta,ya,ka,va,Aa,Sa,wa,Ca,$a,Ri,v,O=k(()=>{"use strict";te();_();ge();X();ns();as();Ri=class Ri extends Xr{constructor(e,t=$.getConfig(),r=[],i){super();T(this,D);T(this,zr,"plain");T(this,be,0);T(this,W);T(this,J);T(this,Et);T(this,mr,!1);T(this,Ur);typeof e=="string"&&this.insertAt(e),y(this,W,t),y(this,J,r),r.push(this)}get type(){return c(this,zr)}set type(e){y(this,zr,e)}parseOnce(e=c(this,be),t=!1,r){if(e<c(this,be)||this.length===0||!this.isPlain())return this;if(c(this,be)>=11)return this;switch(e){case 0:if(this.type==="root"){c(this,J).pop();let i=N(this,D,fa).call(this);t&&(t=!i)}y(this,Et,t),N(this,D,xa).call(this,t);break;case 1:N(this,D,ba).call(this);break;case 2:N(this,D,Ta).call(this);break;case 3:N(this,D,ya).call(this);break;case 4:N(this,D,ka).call(this);break;case 5:N(this,D,va).call(this,r);break;case 6:N(this,D,Aa).call(this,r);break;case 7:N(this,D,Sa).call(this);break;case 8:N(this,D,wa).call(this);break;case 9:N(this,D,Ca).call(this);break;case 10:N(this,D,$a).call(this)}if(this.type==="root")for(let i of c(this,J))i==null||i.parseOnce(e,t,r);return Gr(this,be)._++,this}buildFromStr(e,t){let r=e.split(/[\0\x7F]/u).map((i,s)=>{if(s%2===0)return new Cr(i);if(isNaN(i.slice(-1)))return c(this,J)[Number(i.slice(0,-1))];throw new Error(`Failed to build! Unrecognized token: ${i}`)});return t===0?r.map(String).join(""):t===1?Te(r):r}build(){y(this,be,11);let{length:e,firstChild:t}=this,r=t==null?void 0:t.toString();if(e===1&&t.type==="text"&&r.includes("\0")&&(wr(this,0,1,this.buildFromStr(r)),this.normalize(),this.type==="root"))for(let i of c(this,J))i==null||i.build()}afterBuild(){if(this.type==="root")for(let e of c(this,J))e==null||e.afterBuild();y(this,mr,!0)}parse(e=11,t,r){for(e=Math.min(e,11);c(this,be)<e;)this.parseOnce(c(this,be),t,r);return e&&(this.build(),this.afterBuild()),this}isPlain(){return this.constructor===Ri}getAttribute(e){var t;switch(e){case"config":return c(this,W);case"include":return(t=c(this,Et))!=null?t:!!c(this.getRootNode(),Et);case"accum":return c(this,J);case"built":return c(this,mr);case"stage":return c(this,be);default:return super.getAttribute(e)}}setAttribute(e,t){switch(e){case"stage":c(this,be)===0&&this.type==="root"&&c(this,J).shift(),y(this,be,t);break;default:super.setAttribute(e,t)}}insertAt(e,t=this.length){let r=typeof e=="string"?new Cr(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,Et),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,d=this.toString(),u=[],g=l.exec(d);for(;g;){let{1:p,index:m}=g,f=(i=g[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}),g=l.exec(d)}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):Se(c(this,Ur),()=>super.toString(!1,t),r=>{let i=this.getRootNode();i.type==="root"&&c(i,mr)&&y(this,Ur,r)})}};zr=new WeakMap,be=new WeakMap,W=new WeakMap,J=new WeakMap,Et=new WeakMap,mr=new WeakMap,Ur=new WeakMap,D=new WeakSet,fa=function(){let{parseRedirect:e}=(hs(),U(cs)),t=this.firstChild.toString(),r=e(t,c(this,W),c(this,J));return r&&this.setText(r),!!r},xa=function(e){let{parseCommentAndExt:t}=(Fr(),U(Io));this.setText(t(this.firstChild.toString(),c(this,W),c(this,J),e))},ba=function(){let{parseBraces:e}=(an(),U(to)),t=this.type==="root"?this.firstChild.toString():`\0${this.firstChild.toString()}`,r=e(t,c(this,W),c(this,J));this.setText(this.type==="root"?r:r.slice(1))},Ta=function(){if(c(this,W).excludes.includes("html"))return;let{parseHtml:e}=(Ro(),U(Fo));this.setText(e(this.firstChild.toString(),c(this,W),c(this,J)))},ya=function(){if(c(this,W).excludes.includes("table"))return;let{parseTable:e}=(Oo(),U(qo));this.setText(e(this,c(this,W),c(this,J)))},ka=function(){if(c(this,W).excludes.includes("hr"))return;let{parseHrAndDoubleUnderscore:e}=(Wo(),U(Uo));this.setText(e(this,c(this,W),c(this,J)))},va=function(e){let{parseLinks:t}=(Ko(),U(Qo));this.setText(t(this.firstChild.toString(),c(this,W),c(this,J),e))},Aa=function(e){if(c(this,W).excludes.includes("quote"))return;let{parseQuotes:t}=(Ni(),U(Ho)),r=this.firstChild.toString().split(`
|
|
25
|
-
`);for(let i=0;i<r.length;i++)r[i]=t(r[i],c(this,
|
|
26
|
-
`))},
|
|
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,
|
|
28
|
-
`))}
|
|
22
|
+
${g}${h}`,!0),d(S,i[i.length-1])}else if(x){l=qo(l,i),l.type==="tr"&&(l=i.pop());let C=new hn(`
|
|
23
|
+
${g}${x}`,S,t,r);i.push(l,C),l.insertAt(C)}else{l=qo(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
|
+
${g}${b}`,M=F=>{let G=new dr(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 mn,zo=k(()=>{"use strict";tt();mn=class extends ce{get type(){return"hr"}}});var Uo,Ci,Yl,$t,Wo=k(()=>{"use strict";ct();ze();tt();Uo=[ye(),ue("__")];$t=class extends(Yl=ce){get type(){return"double-underscore"}constructor(n,e,t,r){var l,d;super(n,t,r);let i=n.toLowerCase(),{doubleUnderscore:[,,s,o]}=t;this.setAttribute("name",(d=e?(l=o==null?void 0:o[n])==null?void 0:l.toLowerCase():s==null?void 0:s[i])!=null?d:i)}toString(){return`__${this.innerText}__`}print(){return super.print({pre:"__",post:"__"})}};Ci=P(Yl),$t=B(Ci,0,"DoubleUnderscoreToken",Uo,$t),j(Ci,1,$t)});var Do={};Y(Do,{parseHrAndDoubleUnderscore:()=>Zl});var Zl,Ho=k(()=>{"use strict";zo();Wo();Gn();Zl=({firstChild:{data:a},type:n,name:e},t,r)=>{var l,d,u;let{doubleUnderscore:[i,s,o]}=t;return(l=t.insensitiveDoubleUnderscore)!=null||(t.insensitiveDoubleUnderscore=new Set(i)),(d=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,(g,p,m)=>(new mn(m,t,r),`${p}\0${r.length-1}r`)).replace(t.regexHrAndDoubleUnderscore,(g,p)=>{var x;let m=t.sensitiveDoubleUnderscore.has(p),f=p.toLowerCase(),h=t.insensitiveDoubleUnderscore.has(f);return m||h?(new $t(p,m,t,r),`\0${r.length-1}${h&&((x=o==null?void 0:o[f])!=null?x:f)==="toc"?"u":"n"}`):g}).replace(/^((?:\0\d+[cn]\x7F)*)(={1,6})(.+)\2((?:\s|\0\d+[cn]\x7F)*)$/gmu,(g,p,m,f,h)=>{let x=`${p}\0${r.length}h`;return new Zt(m.length,[f,h],t,r),x}),n==="root"||n==="ext-inner"&&e==="poem"?a:a.slice(1)}});var cr,fn,Go=k(()=>{"use strict";_();re();W();tt();fn=class extends ce{constructor(e,t,r,i){super(e,r,i);T(this,cr);y(this,cr,t)}get type(){return"quote"}get bold(){return this.innerText.length!==2}get italic(){return this.innerText.length!==3}get closing(){return V(V({},this.bold?{bold:c(this,cr).bold}:void 0),this.italic?{italic:c(this,cr).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,d=w.msg('lonely "$1"',"'"),u=[],g=new R(this,e),p=(m,f,h)=>[{desc:"escape",range:[m,f],text:"'".repeat(h)},{desc:"remove",range:[m,f],text:""}];if(o!=null&&o.endsWith("'")){let m=L(this,g,"lonely-apos",d,(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(ie(V({},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,g,"lonely-apos",d),{endIndex:f,endLine:h,endCol:x}=m,[{length:b}]=/^'+/u.exec(l),S=f+b;u.push(ie(V({},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,g,"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}};cr=new WeakMap});var Vo={};Y(Vo,{parseQuotes:()=>$i});var $i,Ni=k(()=>{"use strict";Go();$i=(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,d,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(" ")?d===void 0&&u===void 0&&(u=f):r[f-1].slice(-2,-1)===" "?l=f:d!=null||(d=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:d)!=null?m:u;f!==void 0&&(r[f]="''",r[f-1]+="'")}let g=!0,p=!0;for(let f=1;f<i;f+=2){let h=r[f].length,x=h!==2,b=h!==3;x&&(g=!g),b&&(p=!p),new fn(r[f],{bold:x&&g,italic:b&&p},n,e),r[f]=`\0${e.length-1}q`}return r.join("")}});var Xo={};Y(Xo,{parseExternalLinks:()=>Ii});var Ii,Ei=k(()=>{"use strict";te();di();un();Ii=(a,n,e,t)=>{var r;return(r=n.regexExternalLinks)!=null||(n.regexExternalLinks=new RegExp(String.raw`\[(\0\d+f\x7F|(?:(?:${n.protocol}|//)${Oe}|\0\d+m\x7F)${qe}(?=[[\]<>"\t${Ae}]|\0\d))([${Ae}]*(?![${Ae}]))([^\]\x01-\x08\x0A-\x1F\uFFFD]*)\]`,"giu")),a.replace(n.regexExternalLinks,(i,s,o,l)=>{let{length:d}=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 Ve(s,"ext-link-url",n,e),`[\0${d}f${o}${l}]`):(new Qe(s,o,l,n,e),`\0${d}w`)})}});var xn,Qo=k(()=>{"use strict";te();Nr();xn=class extends xe{get type(){return"category"}get sortkey(){let{childNodes:[,n]}=this;return n&&ut(n.text())}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e),{sortkey:r}=this;return r&&(t.sortkey=r),t}}});var Jo={};Y(Jo,{parseLinks:()=>Ko});var ed,Ko,Yo=k(()=>{"use strict";W();Ni();Ei();ai();ri();Qo();ed=/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(\||\0\d+!\x7F)([\s\S]*)$/u,Ko=(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 d=!1,u,g,p,m,f=i[l],h=r.exec(f);if(h)[,u,g,p,m]=h,m.startsWith("]")&&(p!=null&&p.includes("["))&&(p+="]",m=m.slice(1));else{let A=ed.exec(f);A&&(d=!0,[,u,g,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&&d){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(d){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=Ko(p,n,e,t),!A){s+=`[[${u}${g}${p}`;continue}}}else{s+=`[[${f}`;continue}p&&(p=$i(p,n,e,t));let C=sr;x||(b===6?(p&&(p=Ii(p,n,e,!0)),C=nr):b===14&&(C=xn)),p===void 0&&g&&(p=""),s+=`\0${e.length}l${m}`,new C(u,p,n,e,g)}return s}});var na={};Y(na,{parseMagicLinks:()=>td});var ra,Zo,ea,ta,td,ia=k(()=>{"use strict";te();un();ra=String.raw`[${Ae}\t]| |�*160;|�*a0;`,Zo=`(?:${ra})+`,ea=`(?:${ra}|-)`,ta=String.raw`(?:RFC|PMID)${Zo}\d+\b|ISBN${Zo}(?:97[89]${ea}?)?(?:\d${ea}?){9}[\dx]\b`,td=(a,n,e)=>{if(!n.regexMagicLinks)try{n.regexMagicLinks=new RegExp(String.raw`(^|[^\p{L}\p{N}_])(?:(?:${n.protocol})(${Oe}${qe})|${ta})`,"giu")}catch(t){n.regexMagicLinks=new RegExp(String.raw`(^|\W)(?:(?:${n.protocol})(${Oe}${qe})|${ta})`,"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 d=s.includes("(")?/[^,;\\.:!?][,;\\.:!?]+$/u:/[^,;\\.:!?)][,;\\.:!?)]+$/u,u=d.exec(s);if(u){let g=1;u[0][1]===";"&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(s.slice(0,u.index))&&(g=2),o=s.slice(u.index+g)+o,s=s.slice(0,u.index+g)}return o.length>=i.length?t:(new Ve(s,void 0,n,e),`${r}\0${e.length-1}w${o}`)}else if(!/^(?:RFC|PMID|ISBN)/u.test(s))return t;return new Ve(s,"magic-link",n,e),`${r}\0${e.length-1}i`})}});var sa,oa=k(()=>{"use strict";sa=(a,n)=>a.startsWith(n)?n.length:[...n].findIndex((e,t)=>e!==a[t])});var bn,aa=k(()=>{"use strict";Si();bn=class extends pr{get type(){return"list"}}});var la={};Y(la,{parseList:()=>rd});var rd,da=k(()=>{"use strict";oa();aa();wi();rd=(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,":"),d=sa(l,n.lastPrefix),u=(d>1?o.slice(d-1):o).split(/(?=;)/u),g=u[0].startsWith(";"),p=u.length-(g?0:1);if(d>1){let F=o.slice(0,d-1);g?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 bn(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 ur(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:X}=x;x=/-\{|\}-/gu,x.lastIndex=X}I++}else if(F==="}-"){if(I--,!I){let{lastIndex:X}=x;x=h,x.lastIndex=X}}else if(F.endsWith("x")){let{name:X,closing:ne,selfClosing:se}=t[Number(F.slice(1,-2))];(!se||f.includes(X))&&M(ne)}else if(F.endsWith("q")){let{bold:X,italic:ne}=t[Number(F.slice(1,-2))];X&&(M(C),C=!C),ne&&(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 ga,pa,Ye,Li,nd,Nt,ua=k(()=>{"use strict";_();re();Ir();q();Ue();ga=new Set(["A","T","R","D","-","H","N"]);pa=[nt()];Nt=class extends(nd=v){constructor(e,t,r=[]){super(void 0,t,r,{});T(this,Ye);this.safeAppend(e.map(i=>new Q(i,"converter-flag",t,r)))}get type(){return"converter-flags"}afterBuild(){y(this,Ye,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,Ye).filter(e=>/\{{3}[^{}]+\}{3}/u.test(e)))}getVariantFlags(){let e=new Set(this.getAttribute("config").variants);return new Set(c(this,Ye).filter(t=>e.has(t)))}lint(e=this.getAbsoluteIndex(),t){let r=this.getVariantFlags(),i=this.getUnknownFlags(),s=new Set(c(this,Ye).filter(g=>ga.has(g))),o=c(this,Ye).filter(g=>!g).length,l=c(this,Ye).length-i.size-o,d=super.lint(e,t);if(r.size===l||s.size===l)return d;let u=new R(this,e);for(let g=0;g<this.length;g++){let p=this.childNodes[g],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&&ga.has(m.toUpperCase())?f.fix={range:[f.startIndex,f.endIndex],text:m.toUpperCase(),desc:"uppercase"}:f.suggestions=[{desc:"remove",range:[f.startIndex-(g&&1),f.endIndex],text:""}],d.push(f)}}return d}print(){return super.print({sep:";"})}};Li=P(nd),Ye=new WeakMap,Nt=B(Li,0,"ConverterFlagsToken",pa,Nt),j(Li,1,Nt)});var hr,ca=k(()=>{"use strict";W();q();Ue();hr=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 Q(o,"converter-rule-variant",t,r)),super.insertAt(new Q(n.slice(i+1),"converter-rule-to",t,r)),s!==-1&&super.insertAt(new Q(n.slice(0,s),"converter-rule-from",t,r),0)):super.insertAt(new Q(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 ha,Fi,id,It,ma=k(()=>{"use strict";te();ze();q();ua();ca();ha=[ue("-{")];It=class extends(id=v){get type(){return"converter"}constructor(n,e,t,r=[]){super(void 0,t,r),this.insertAt(new Nt(n,t,r));let[i]=e,s=i.includes(":"),o=new hr(i,s,t,r);s&&o.length===1||!s&&e.length===2&&!oe(e[1]).trim()?this.insertAt(new hr(e.join(";"),!1,t,r)):this.append(o,...e.slice(1).map(l=>new hr(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()}|${Te(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?"|":""}${Me(e,{sep:";"})}}-</span>`}};Fi=P(id),It=B(Fi,0,"ConverterToken",ha,It),j(Fi,1,It)});var fa={};Y(fa,{parseConverter:()=>sd});var sd,xa=k(()=>{"use strict";ma();sd=(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:d,index:u}=o;if(d==="}-"){let g=i.pop(),{length:p}=e,m=a.slice(g.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 It(h,S,n,e),a=`${a.slice(0,g.index)}\0${p}v${a.slice(u+2)}`,i.length===0&&(s=t),s.lastIndex=g.index+3+String(p).length}else i.push(o),s=r,s.lastIndex=u+2;o=s.exec(a)}return a}});var Tn={};Y(Tn,{Token:()=>v});var zr,be,D,J,Et,mr,Ur,H,ba,Ta,ya,ka,va,Aa,Sa,wa,Ca,$a,Na,Ia,Ri,v,q=k(()=>{"use strict";te();_();pe();W();is();ls();Ri=class Ri extends Xr{constructor(e,t=w.getConfig(),r=[],i){super();T(this,H);T(this,zr,"plain");T(this,be,0);T(this,D);T(this,J);T(this,Et);T(this,mr,!1);T(this,Ur);typeof e=="string"&&this.insertAt(e),y(this,D,t),y(this,J,r),r.push(this)}get type(){return c(this,zr)}set type(e){y(this,zr,e)}parseOnce(e=c(this,be),t=!1,r){if(e<c(this,be)||this.length===0||!this.isPlain())return this;if(c(this,be)>=11)return this;switch(e){case 0:if(this.type==="root"){c(this,J).pop();let i=N(this,H,ba).call(this);t&&(t=!i)}y(this,Et,t),N(this,H,Ta).call(this,t);break;case 1:N(this,H,ya).call(this);break;case 2:N(this,H,ka).call(this);break;case 3:N(this,H,va).call(this);break;case 4:N(this,H,Aa).call(this);break;case 5:N(this,H,Sa).call(this,r);break;case 6:N(this,H,wa).call(this,r);break;case 7:N(this,H,Ca).call(this);break;case 8:N(this,H,$a).call(this);break;case 9:N(this,H,Na).call(this);break;case 10:N(this,H,Ia).call(this)}if(this.type==="root")for(let i of c(this,J))i==null||i.parseOnce(e,t,r);return Gr(this,be)._++,this}buildFromStr(e,t){let r=e.split(/[\0\x7F]/u).map((i,s)=>{if(s%2===0)return new Cr(i);if(isNaN(i.slice(-1)))return c(this,J)[Number(i.slice(0,-1))];throw new Error(`Failed to build! Unrecognized token: ${i}`)});return t===0?r.map(String).join(""):t===1?Te(r):r}build(){y(this,be,11);let{length:e,firstChild:t}=this,r=t==null?void 0:t.toString();if(e===1&&t.type==="text"&&r.includes("\0")&&(wr(this,0,1,this.buildFromStr(r)),this.normalize(),this.type==="root"))for(let i of c(this,J))i==null||i.build()}afterBuild(){if(this.type==="root")for(let e of c(this,J))e==null||e.afterBuild();y(this,mr,!0)}parse(e=11,t,r){for(e=Math.min(e,11);c(this,be)<e;)this.parseOnce(c(this,be),t,r);return e&&(this.build(),this.afterBuild()),this}isPlain(){return this.constructor===Ri}getAttribute(e){var t;switch(e){case"config":return c(this,D);case"include":return(t=c(this,Et))!=null?t:!!c(this.getRootNode(),Et);case"accum":return c(this,J);case"built":return c(this,mr);case"stage":return c(this,be);default:return super.getAttribute(e)}}setAttribute(e,t){switch(e){case"stage":c(this,be)===0&&this.type==="root"&&c(this,J).shift(),y(this,be,t);break;default:super.setAttribute(e,t)}}insertAt(e,t=this.length){let r=typeof e=="string"?new Cr(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,Et),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,d=this.toString(),u=[],g=l.exec(d);for(;g;){let{1:p,index:m}=g,f=(i=g[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}),g=l.exec(d)}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):Se(c(this,Ur),()=>super.toString(!1,t),r=>{let i=this.getRootNode();i.type==="root"&&c(i,mr)&&y(this,Ur,r)})}};zr=new WeakMap,be=new WeakMap,D=new WeakMap,J=new WeakMap,Et=new WeakMap,mr=new WeakMap,Ur=new WeakMap,H=new WeakSet,ba=function(){let{parseRedirect:e}=(ms(),U(hs)),t=this.firstChild.toString(),r=e(t,c(this,D),c(this,J));return r&&this.setText(r),!!r},Ta=function(e){let{parseCommentAndExt:t}=(Fr(),U(Lo));this.setText(t(this.firstChild.toString(),c(this,D),c(this,J),e))},ya=function(){let{parseBraces:e}=(an(),U(ro)),t=this.type==="root"?this.firstChild.toString():`\0${this.firstChild.toString()}`,r=e(t,c(this,D),c(this,J));this.setText(this.type==="root"?r:r.slice(1))},ka=function(){if(c(this,D).excludes.includes("html"))return;let{parseHtml:e}=(jo(),U(Po));this.setText(e(this.firstChild.toString(),c(this,D),c(this,J)))},va=function(){if(c(this,D).excludes.includes("table"))return;let{parseTable:e}=(Mo(),U(_o));this.setText(e(this,c(this,D),c(this,J)))},Aa=function(){if(c(this,D).excludes.includes("hr"))return;let{parseHrAndDoubleUnderscore:e}=(Ho(),U(Do));this.setText(e(this,c(this,D),c(this,J)))},Sa=function(e){let{parseLinks:t}=(Yo(),U(Jo));this.setText(t(this.firstChild.toString(),c(this,D),c(this,J),e))},wa=function(e){if(c(this,D).excludes.includes("quote"))return;let{parseQuotes:t}=(Ni(),U(Vo)),r=this.firstChild.toString().split(`
|
|
25
|
+
`);for(let i=0;i<r.length;i++)r[i]=t(r[i],c(this,D),c(this,J),e);this.setText(r.join(`
|
|
26
|
+
`))},Ca=function(){if(c(this,D).excludes.includes("extLink"))return;let{parseExternalLinks:e}=(Ei(),U(Xo));this.setText(e(this.firstChild.toString(),c(this,D),c(this,J)))},$a=function(){if(c(this,D).excludes.includes("magicLink"))return;let{parseMagicLinks:e}=(ia(),U(na));this.setText(e(this.firstChild.toString(),c(this,D),c(this,J)))},Na=function(){if(c(this,D).excludes.includes("list"))return;let{parseList:e}=(da(),U(la)),{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,J));this.setText(s.join(`
|
|
28
|
+
`))},Ia=function(){if(c(this,D).variants.length>0){let{parseConverter:e}=(xa(),U(fa));this.setText(e(this.firstChild.toString(),c(this,D),c(this,J)))}};v=Ri});var ae,er,wr,Le,pe=k(()=>{"use strict";ae={running:!1,run(a){let{running:n}=this;this.running=!0;try{let{Token:e}=(q(),U(Tn)),t=a();return t instanceof e&&!t.getAttribute("built")&&t.afterBuild(),this.running=n,t}catch(e){throw this.running=n,e}},rev:0},er=a=>n=>n.type===a,wr=(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 d=t[l];d.setAttribute("parentNode",a),d.setAttribute("nextSibling",r[n+l+1]),d.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},Le=(a,n)=>{Object.defineProperty(a,"name",{value:n.name})}});var Ea={};Y(Ea,{Title:()=>Pi});var Wr,Dr,Lt,fr,Ft,Pi,La=k(()=>{"use strict";te();Pi=class{constructor(n,e,t,{temporary:r,decode:i,selfLink:s}={}){T(this,Wr);T(this,Dr);T(this,Lt);T(this,fr);T(this,Ft);ge(this,"valid");ge(this,"encoded",!1);let o=n.trim().startsWith("../");if(i&&n.includes("%"))try{let d=/%(?!21|3[ce]|5[bd]|7[b-d])[\da-f]{2}/iu.test(n);n=Ze(n),this.encoded=d}catch(d){}if(n=ut(n).replace(/[_ ]+/gu," ").trim(),o)y(this,fr,0);else{let d=e;n.startsWith(":")&&(d=0,n=n.slice(1).trim());let u=n.split(":");if(u.length>1){let g=_e(u[0]),p=Object.prototype.hasOwnProperty.call(t.nsid,g)&&t.nsid[g];p&&(d=p,n=u.slice(1).join(":").trim())}y(this,fr,d)}let l=n.indexOf("#");if(l!==-1){let d=n.slice(l).trim().slice(1);if(d.includes("%"))try{d=Ze(d)}catch(u){}y(this,Ft,d.replace(/ /gu,"_")),n=n.slice(0,l).trim()}this.valid=!!(n||s&&this.ns===0&&c(this,Ft)!==void 0)&&ut(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,Dr,t.namespaces),y(this,Lt,t.articlePath||"/wiki/$1"),c(this,Lt).includes("$1")||y(this,Lt,c(this,Lt)+`${c(this,Lt).endsWith("/")?"":"/"}$1`),r||Object.defineProperties(this,{encoded:{enumerable:!1,writable:!1}})}get ns(){return c(this,fr)}get fragment(){return c(this,Ft)}get main(){return c(this,Wr)}set main(n){n=n.replace(/_/gu," ").trim(),y(this,Wr,n&&n[0].toUpperCase()+n.slice(1))}get prefix(){let n=c(this,Dr)[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,Ft,n)}getUrl(n){}};Wr=new WeakMap,Dr=new WeakMap,Lt=new WeakMap,fr=new WeakMap,Ft=new WeakMap});var ji,Rt,Fa,od,w,W=k(()=>{Qi();pe();es();te();ji=!0,Rt={config:wn,i18n:void 0,rules:Xi,get viewOnly(){return ji},set viewOnly(a){ji&&!a&&ae.rev++,ji=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"),ie(V(V({},wn),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=Rt.getConfig(),r){let{Title:i}=(La(),U(Ea)),s;if(r!=null&&r.halfParsed)s=new i(a,n,t,r);else{let{Token:o}=(q(),U(Tn));s=ae.run(()=>{let l=new o(a,t);l.type="root",l.parseOnce(0,e).parseOnce();let d=new i(l.toString(),n,t,r);for(let u of["main","fragment"]){let g=d[u];if(g!=null&&g.includes("\0")){let p=l.buildFromStr(g,1);u==="main"?d.main=p:d.setFragment(p)}}return d})}return s},parse(a,n,e=11,t=Rt.getConfig()){a=Ji(a);let r;typeof e!="number"&&(r=Array.isArray(e)?e:[e],e=Math.max(...r.map(o=>Vi[o]||11)));let{Token:i}=(q(),U(Tn));return ae.run(()=>{let o=new i(a,t);return o.type="root",o.parse(e,n)})},partialParse(r,i,s){return Gi(this,arguments,function*(a,n,e,t=Rt.getConfig()){})},createLanguageService(a){}},Fa={},od=new Set(["normalizeTitle","parse","createLanguageService"]);for(let a in Rt)od.has(a)||(Fa[a]={enumerable:!1});Object.defineProperties(Rt,Fa);Object.assign(typeof globalThis=="object"?globalThis:self,{Parser:Rt});w=Rt});W();})();
|