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