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