wikiparser-node 1.20.1 → 1.20.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/bundle-es7.min.js +21 -21
- package/bundle/bundle-lsp.min.js +21 -21
- package/bundle/bundle.min.js +21 -21
- package/dist/addon/token.js +1 -1
- package/dist/bin/config.js +3 -1
- package/dist/index.js +10 -5
- package/dist/lib/element.js +1 -1
- package/dist/lib/lsp.js +1 -1
- package/dist/lib/node.js +4 -2
- package/dist/lib/text.js +30 -11
- package/dist/lib/title.js +0 -1
- package/dist/parser/externalLinks.js +1 -1
- package/dist/parser/magicLinks.js +1 -1
- package/dist/parser/selector.js +5 -5
- package/dist/src/arg.js +7 -7
- package/dist/src/attributes.js +1 -1
- package/dist/src/extLink.js +0 -1
- package/dist/src/html.js +3 -1
- package/dist/src/imageParameter.js +1 -1
- package/dist/src/link/base.js +1 -1
- package/dist/src/link/file.js +21 -10
- package/dist/src/magicLink.js +3 -3
- package/dist/src/parameter.js +1 -1
- package/dist/src/table/index.js +1 -1
- package/dist/src/transclude.js +3 -3
- package/dist/util/lint.js +3 -2
- package/extensions/dist/base.js +1 -1
- package/i18n/zh-hans.json +2 -2
- package/package.json +3 -5
package/bundle/bundle-lsp.min.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
"use strict";(()=>{var ul=Object.create;var Ut=Object.defineProperty;var hs=Object.getOwnPropertyDescriptor;var pl=Object.getOwnPropertyNames;var cl=Object.prototype.hasOwnProperty;var fs=(a,n)=>(n=Symbol[a])?n:Symbol.for("Symbol."+a),zt=a=>{throw TypeError(a)};var xs=(a,n,e)=>n in a?Ut(a,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[n]=e;var ms=(a,n)=>Ut(a,"name",{value:n,configurable:!0});var k=(a,n)=>()=>(a&&(n=a(a=0)),n);var ml=(a,n)=>()=>(n||a((n={exports:{}}).exports,n),n.exports),te=(a,n)=>{for(var e in n)Ut(a,e,{get:n[e],enumerable:!0})},hl=(a,n,e,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of pl(n))!cl.call(a,r)&&r!==e&&Ut(a,r,{get:()=>n[r],enumerable:!(t=hs(n,r))||t.enumerable});return a};var V=a=>hl(Ut({},"__esModule",{value:!0}),a);var q=a=>{var n;return[,,,ul((n=a==null?void 0:a[fs("metadata")])!=null?n:null)]},bs=["class","method","getter","setter","accessor","field","value","get","set"],Rr=a=>a!==void 0&&typeof a!="function"?zt("Function expected"):a,fl=(a,n,e,t,r)=>({kind:bs[a],name:n,metadata:t,addInitializer:i=>e._?zt("Already initialized"):r.push(Rr(i||null))}),xl=(a,n)=>xs(n,fs("metadata"),a[3]),O=(a,n,e,t)=>{for(var r=0,i=a[n>>1],s=i&&i.length;r<s;r++)n&1?i[r].call(e):t=i[r].call(e,t);return t},_=(a,n,e,t,r,i)=>{var s,o,l,d,p,g=n&7,u=!!(n&8),m=!!(n&16),f=g>3?a.length+1:g?u?1:2:0,h=bs[g+5],x=g>3&&(a[f-1]=[]),b=a[f]||(a[f]=[]),v=g&&(!m&&!u&&(r=r.prototype),g<5&&(g>3||!m)&&hs(g<4?r:{get[e](){return c(this,i)},set[e](A){return T(this,i,A)}},e));g?m&&g<4&&ms(i,(g>2?"set ":g>1?"get ":"")+e):ms(r,e);for(var C=t.length-1;C>=0;C--)d=fl(g,e,l={},a[3],b),g&&(d.static=u,d.private=m,p=d.access={has:m?A=>bl(r,A):A=>e in A},g^3&&(p.get=m?A=>(g^1?c:S)(A,r,g^4?i:v.get):A=>A[e]),g>2&&(p.set=m?(A,I)=>T(A,r,I,g^4?i:v.set):(A,I)=>A[e]=I)),o=(0,t[C])(g?g<4?m?i:v[h]:g>4?void 0:{get:v.get,set:v.set}:r,d),l._=1,g^4||o===void 0?Rr(o)&&(g>4?x.unshift(o):g?m?i=o:v[h]=o:r=o):typeof o!="object"||o===null?zt("Object expected"):(Rr(s=o.get)&&(v.get=s),Rr(s=o.set)&&(v.set=s),Rr(s=o.init)&&x.unshift(s));return g||xl(a,r),v&&Ut(r,e,v),m?g^4?i:v:r},ae=(a,n,e)=>xs(a,typeof n!="symbol"?n+"":n,e),Jn=(a,n,e)=>n.has(a)||zt("Cannot "+e),bl=(a,n)=>Object(n)!==n?zt('Cannot use the "in" operator on this value'):a.has(n),c=(a,n,e)=>(Jn(a,n,"read from private field"),e?e.call(a):n.get(a)),y=(a,n,e)=>n.has(a)?zt("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(a):n.set(a,e),T=(a,n,e,t)=>(Jn(a,n,"write to private field"),t?t.call(a,e):n.set(a,e),e),S=(a,n,e)=>(Jn(a,n,"access private method"),e);var hn=(a,n,e,t)=>({set _(r){T(a,n,r,e)},get _(){return c(a,n,t)}});var Ts,ys,ks=k(()=>{"use strict";Ts=(()=>{let a={redirect:1,onlyinclude:1,noinclude:1,include:1,comment:1,ext:1,arg:2,"magic-word":2,template:2,heading:2,html:3,table:4,hr:5,"double-underscore":5,link:6,category:6,file:6,quote:7,"ext-link":8,"free-ext-link":9,"magic-link":9,list:10,dd:10,converter:11,"list-range":11};return Object.setPrototypeOf(a,null),a})(),ys=(()=>{let a=["bold-header","format-leakage","fostered-content","h1","illegal-attr","insecure-style","invalid-gallery","invalid-imagemap","invalid-invoke","invalid-isbn","lonely-apos","lonely-bracket","lonely-http","nested-link","no-arg","no-duplicate","no-ignored","obsolete-attr","obsolete-tag","parsing-order","pipe-like","table-layout","tag-like","unbalanced-header","unclosed-comment","unclosed-quote","unclosed-table","unescaped","unknown-page","unmatched-tag","unterminated-url","url-encoding","var-anchor","void-ext"];return Object.freeze(a),a})()});function we(a){return n=>{let e=new(typeof n=="string"?Map:WeakMap);if(e.has(n)){let r=e.get(n);return r.lastIndex=0,r}let t=a(n);return e.set(n,t),t}}var st,jr,Tl,vs,Tt=k(()=>{"use strict";st=a=>decodeURIComponent(a.replace(/%(?![\da-f]{2})/giu,"%25")),jr=a=>Math.round(a*255).toString(16).padStart(2,"0"),Tl=(()=>{let a=String.raw`#(?:[\da-f]{3,4}|(?:[\da-f]{2}){3,4})(?![\p{L}\p{N}_])`,n=String.raw`(?:\d*\.)?\d+%?`,e=String.raw`(?:\d*\.)?\d+(?:deg|grad|rad|turn)?`,t=String.raw`rgba?\(\s*(?:${String.raw`${new Array(3).fill(n).join(String.raw`\s+`)}(?:\s*\/\s*${n})?`}|${String.raw`${new Array(3).fill(n).join(String.raw`\s*,\s*`)}(?:\s*,\s*${n})?`})\s*\)`,r=String.raw`hsla?\(\s*(?:${String.raw`${e}\s+${n}\s+${n}(?:\s*\/\s*${n})?`}|${String.raw`${e}${String.raw`\s*,\s*(?:\d*\.)?\d+%`.repeat(2)}(?:\s*,\s*${n})?`})\s*\)`;return{full:new RegExp(String.raw`(^|[^\p{L}\p{N}_])(${a}|${t}|${r})`,"giu"),rgb:new RegExp(String.raw`(^|[^\p{L}\p{N}_])(${a}|${t})`,"giu")}})(),vs=(a,n=!0)=>{let e=[],t=Tl[n?"full":"rgb"];t.lastIndex=0;let r=t.exec(a),i=0;for(;r;){let s=r.index+r[1].length;s>i&&e.push([a.slice(i,s),i,s,!1]),{lastIndex:i}=t,e.push([r[2],s,i,a[s-1]!=="&"||!/^#\d+$/u.test(r[2])]),r=t.exec(a)}return a.length>i&&e.push([a.slice(i),i,a.length,!1]),e}});var Ee,As,De,We,He,je,yt,Gt,ge,Qd,Ce,yl,kl,kt,Ss,Xd,vl,Al,Vt,Ue,ie=k(()=>{"use strict";Tt();Ee=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,As=String.raw`[^[\]<>"\0-\x1F\x7F${Ee}\uFFFD]`,De=String.raw`(?:\[[\da-f:.]+\]|${As})`,We=String.raw`(?:${As}|\0\d+[cn!~]\x7F)*`,He=a=>a.trim().toLowerCase(),je=(a,n)=>a.replace(/\0(\d+)\x7F/gu,(e,t)=>n[t]),yt=(a,n)=>e=>e.replace(a,n),Gt=yt(/[\0\x7F]|\r$/gmu,""),ge=yt(/\0\d+[cn]\x7F/gu,""),Qd=yt(/[\\{}()|.?*+^$[\]]/gu,String.raw`\$&`),Ce=(a,n="")=>a.map(e=>typeof e=="string"?e:e.text()).join(n),yl={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},kl=yt(/&(?:#(\d+|[Xx][\da-fA-F]+)|([lg]t|[LG]T|[lr]brac[ke]|nbsp|amp|AMP|quot|QUOT));/gu,(a,n,e)=>n?String.fromCodePoint(+((/^x/iu.test(n)?"0":"")+n)):yl[e.toLowerCase()]),kt=a=>kl(a),Ss=yt(/&#(\d+|x[\da-f]+);/giu,(a,n)=>String.fromCodePoint(+((/^x/iu.test(n)?"0":"")+n))),Xd=yt(/\n/gu,String.raw`\n`),vl={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},Al=a=>yt(a,n=>`&${vl[n]};`),Vt=Al(/[&<>]/gu),Ue=(a,n={})=>{let{pre:e="",post:t="",sep:r=""}=n;return e+a.map(i=>i.print()).join(r)+t}});var ws=ml((Yd,Sl)=>{Sl.exports={ext:[],html:[["b","bdi","del","i","ins","u","font","big","small","sub","sup","h1","h2","h3","h4","h5","h6","cite","code","em","s","strike","strong","tt","var","div","center","blockquote","ol","ul","dl","table","caption","pre","ruby","rb","rp","rt","rtc","p","span","abbr","dfn","kbd","samp","data","time","mark","tr","td","th","q","bdo"],["li","dt","dd"],["br","wbr","hr","meta","link"]],namespaces:{"0":"","6":"File","10":"Template","14":"Category","828":"Module"},nsid:{"":0,file:6,template:10,category:14,module:828},functionHook:["msgnw"],variable:["!","=","pageid","articlepath","server","servername","scriptpath","stylepath"],parserFunction:[{msgnw:"msgnw",pageid:"pageid",articlepath:"articlepath",server:"server",servername:"servername",scriptpath:"scriptpath",stylepath:"stylepath","#language":"language","#special":"special","#speciale":"speciale","#tag":"tag","#formatdate":"formatdate","#dateformat":"formatdate","#invoke":"invoke","#while":"while","#dowhile":"dowhile","#loop":"loop","#forargs":"forargs","#fornumargs":"fornumargs","#if":"if","#ifeq":"ifeq","#switch":"switch","#ifexist":"ifexist","#ifexpr":"ifexpr","#iferror":"iferror","#time":"time","#timel":"timel","#expr":"expr","#rel2abs":"rel2abs","#titleparts":"titleparts","#categorytree":"categorytree","#urldecode":"urldecode","#choose":"choose","#var":"var","#varexists":"varexists","#var_final":"var_final","#vardefine":"vardefine","#vardefineecho":"vardefineecho","#widget":"widget","#related":"related","#cscore":"cscore","#regex":"regex","#regex_var":"regex_var","#regexquote":"regexquote","#regexall":"regexall","#len":"len","#pos":"pos","#rpos":"rpos","#sub":"sub","#count":"count","#rmatch":"rmatch","#rreplace":"rreplace","#replace":"replace","#rsplit":"rsplit","#explode":"explode","#tab":"tab","#seo":"seo","#babel":"babel","#translation":"translation","#commaseparatedlist":"commaseparatedlist","#coordinates":"coordinates","#lst":"lst","#lsth":"lsth","#lstx":"lstx","#assessment":"assessment","#mentor":"mentor","#property":"property","#target":"target","#section":"lst","#section-x":"lstx","#section-h":"lsth","#statements":"statements","#useliquidthreads":"useliquidthreads","#lqtpagelimit":"lqtpagelimit","#chart":"chart"},{"!":"!","=":"=","#FORMAL":"formal","#bcp47":"bcp47","#dir":"dir","#interwikilink":"interwikilink","#interlanguagelink":"interlanguagelink","#timef":"timef","#timefl":"timefl"},["msg","raw"],["subst","safesubst"]],doubleUnderscore:[[],[]],protocol:"bitcoin:|ftp://|ftps://|geo:|git://|gopher://|http://|https://|irc://|ircs://|magnet:|mailto:|matrix:|mms://|news:|nntp://|redis://|sftp://|sip:|sips:|sms:|ssh://|svn://|tel:|telnet://|urn:|worldwind://|xmpp:",interwiki:[],img:{},redirection:["#redirect"],variants:[]}});var Yn,Cs=k(()=>{"use strict";Yn=ws()});var Br,Qt,qr,Or,Zn,j,le=k(()=>{"use strict";j=class{constructor(n,e){y(this,Or);y(this,Br);y(this,Qt);y(this,qr);T(this,Br,n),T(this,Qt,e)}get start(){return c(this,Qt)}get top(){return S(this,Or,Zn).call(this).top}get left(){return S(this,Or,Zn).call(this).left}};Br=new WeakMap,Qt=new WeakMap,qr=new WeakMap,Or=new WeakSet,Zn=function(){var n;return(n=c(this,qr))!=null||T(this,qr,c(this,Br).getRootNode().posFromIndex(c(this,Qt))),c(this,qr)}});var Xt,$s,E,P,Fe,fn,z=k(()=>{"use strict";ce();le();Z();Xt=(a,n,e,t)=>({line:a+e-1,character:(e===1?n:0)+t}),$s=a=>(n,e,t,r,i="error")=>{let{start:s}=e,{top:o,left:l}=e instanceof j?e:new j(n,s),{offsetHeight:d,offsetWidth:p}=n,{startIndex:g,startLine:u,startCol:m}=a(n,s,o,l),{line:f,character:h}=Xt(u,m,d,p);return{rule:t,message:$.msg(r),severity:i,startIndex:g,endIndex:g+n.toString().length,startLine:u,endLine:f,startCol:m,endCol:h}},E=$s((a,n,e,t)=>{let r=a.getRelativeIndex(),{top:i,left:s}=a.parentNode.posFromIndex(r);return{startIndex:n+r,startLine:e+i,startCol:i?s:t+s}}),P=$s((a,n,e,t)=>({startIndex:n,startLine:e,startCol:t})),Fe=(a,n,e)=>{if(a)return a[1];let t=n();return e([de.rev,t]),t},fn=(a,n)=>a==="ol"&&n==="type"?["1","a","A","i","I"]:a==="th"&&n==="scope"?["row","col","rowgroup","colgroup"]:n==="dir"?["ltr","rtl","auto"]:n==="aria-hidden"?["true","false"]:[]});var wl,xn,Ns=k(()=>{"use strict";wl=(a,n,e)=>{if(a.includes("#")){let[t,...r]=a.split("#");return(!t||t===n)&&r.every(i=>i===e)}return!a||a===n},xn=(a,n,e)=>({type:t,name:r})=>a.split(",").some(i=>wl(i.trim(),t,r))});var _r,Kt,Jt,Mr,Dr,Yt,Zt,er,bn,tr,ei=k(()=>{"use strict";z();ce();tr=class{constructor(){y(this,er);ae(this,"childNodes",[]);y(this,_r);y(this,Kt);y(this,Jt);y(this,Mr);y(this,Dr);y(this,Yt);y(this,Zt,{})}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get parentNode(){return c(this,_r)}get nextSibling(){return c(this,Kt)}get previousSibling(){return c(this,Jt)}get offsetHeight(){return S(this,er,bn).call(this).height}get offsetWidth(){return S(this,er,bn).call(this).width}getChildNodes(){let{childNodes:n}=this;return Object.isFrozen(n)?[...n]:n}getAttribute(n){return n==="padding"?0:this[n]}setAttribute(n,e){switch(n){case"parentNode":T(this,_r,e),e||(T(this,Kt,void 0),T(this,Jt,void 0));break;case"nextSibling":T(this,Kt,e);break;case"previousSibling":T(this,Jt,e);break;case"aIndex":T(this,Yt,[de.rev,e]);break;default:this[n]=e}}getRootNode(){return Fe(c(this,Dr),()=>{var n,e;return(e=(n=this.parentNode)==null?void 0:n.getRootNode())!=null?e:this},n=>{let[,e]=n;e.type==="root"&&T(this,Dr,n)})}indexFromPos(n,e){{if(n<0||e<0)return;let t=this.getLines();if(n>=t.length)return;let[,r,i]=t[n],s=r+e;return s>i?void 0:s}}posFromIndex(n){let{length:e}=String(this);if(n+=n<0?e:0,n>=0&&n<=e){let t=this.getLines(),r=t.findIndex(([,,i])=>n<=i);return{top:r,left:n-t[r][1]}}}getGaps(n){return 0}getRelativeIndex(n){if(n===void 0){let{parentNode:e}=this;return e?e.getRelativeIndex(e.childNodes.indexOf(this)):0}return Fe(c(this,Zt)[n],()=>{let{childNodes:e}=this,t=n+(n<0?e.length:0),r=this.getAttribute("padding");for(let i=0;i<t;i++)c(this,Zt)[i]=[de.rev,r],r+=e[i].toString().length+this.getGaps(i);return r},e=>{c(this,Zt)[n]=e})}getAbsoluteIndex(){return Fe(c(this,Yt),()=>{let{parentNode:n}=this;return n?n.getAbsoluteIndex()+this.getRelativeIndex():0},n=>{T(this,Yt,n)})}getBoundingClientRect(){return{...S(this,er,bn).call(this),...this.getRootNode().posFromIndex(this.getAbsoluteIndex())}}is(n){return this.type===n}getLines(){return Fe(c(this,Mr),()=>{let n=[],e=0;for(let t of String(this).split(`
|
|
2
|
-
`)){let r=e+t.length;n.push([t,e,r]),e=r+1}return n},n=>{T(this,Mr,n)})}seal(n,e){Object.defineProperty(this,n,{enumerable:!e&&!!this[n],configurable:!0})}};_r=new WeakMap,Kt=new WeakMap,Jt=new WeakMap,Mr=new WeakMap,Dr=new WeakMap,Yt=new WeakMap,Zt=new WeakMap,er=new WeakSet,bn=function(){let n=this.getLines(),e=n[n.length-1];return{height:n.length,width:e[2]-e[1]}}});var ot,ti,ri,Tn,Is=k(()=>{"use strict";ie();ce();Ns();ei();Tn=class extends tr{constructor(){super(...arguments);y(this,ot)}get length(){return this.childNodes.length}text(e){return Ce(this.childNodes,e)}normalize(){let e=this.getChildNodes(),t=r=>{var i,s;e.splice(r,1),(i=e[r-1])==null||i.setAttribute("nextSibling",e[r]),(s=e[r])==null||s.setAttribute("previousSibling",e[r-1])};for(let r=e.length-1;r>=0;r--){let{type:i,data:s}=e[r];i!=="text"||e.length===1||this.getGaps(r-(r&&1))||s===""&&t(r)}this.setAttribute("childNodes",e)}removeAt(e){return Wr(this,e,1)[0]}insertAt(e,t=this.length){return Wr(this,t,0,[e]),e}closest(e){let t=xn(e,this),{parentNode:r}=this;for(;r;){if(t(r))return r;({parentNode:r}=r)}}querySelector(e){let t=xn(e,this);return S(this,ot,ti).call(this,t)}querySelectorAll(e){let t=xn(e,this);return S(this,ot,ri).call(this,t)}append(...e){this.safeAppend(e)}safeAppend(e){for(let t of e)this.insertAt(t)}replaceChildren(...e){this.safeReplaceChildren(e)}safeReplaceChildren(e){for(let t=this.length-1;t>=0;t--)this.removeAt(t);this.safeAppend(e)}setText(e,t=0){t+=t<0?this.length:0;let r=this.childNodes[t],{data:i}=r;return r.replaceData(e),i}toString(e,t=""){return this.childNodes.map(r=>r.toString(e)).join(t)}caretPositionFromIndex(e){{if(e===void 0)return;let{length:t}=this.toString();if(e>t||e<-t)return;e+=e<0?t:0;let r=this,i=0,s=0;for(;r.type!=="text";){let{childNodes:o}=r;i+=r.getAttribute("padding");for(let l=0;i<=e&&l<o.length;l++){let d=o[l],{nextSibling:p}=d,g=d.toString(),u=g.length;if(d.setAttribute("aIndex",i),i+=u,i>e||i===e&&u>0&&(!p||p.type==="text"||d.type!=="text"&&(g.trim()||!p.toString().trim()))){r=d,i-=u,s=i;break}i+=r.getGaps(l)}if(r.childNodes===o)return{offsetNode:r,offset:e-s}}return{offsetNode:r,offset:e-s}}}elementFromIndex(e){var t;{let r=(t=this.caretPositionFromIndex(e))==null?void 0:t.offsetNode;return(r==null?void 0:r.type)==="text"?r.parentNode:r}}elementFromPoint(e,t){return this.elementFromIndex(this.indexFromPos(t,e))}lint(e=this.getAbsoluteIndex(),t){let r=[];for(let i=0,s=e+this.getAttribute("padding");i<this.length;i++){let o=this.childNodes[i];o.setAttribute("aIndex",s);let l=o.lint(s,t);l.length>0&&r.push(...l),s+=o.toString().length+this.getGaps(i)}return r}print(e={}){let t=e.class;return this.toString()?(t===""?"":`<span class="wpb-${t!=null?t:this.type}">`)+Ue(this.childNodes,e)+(t===""?"":"</span>"):""}json(e,t=this.getAbsoluteIndex()){let r={...this,type:this.type,range:[t,t+this.toString().length],childNodes:[]};for(let i=0,s=t+this.getAttribute("padding");i<this.length;i++){let o=this.childNodes[i],{length:l}=o.toString();o.setAttribute("aIndex",s),r.childNodes.push(o.type==="text"?{data:o.data,range:[s,s+l]}:o.json(void 0,s)),s+=l+this.getGaps(i)}return r}};ot=new WeakSet,ti=function(e){var t;for(let r of this.childNodes){if(r.type==="text")continue;if(e(r))return r;let i=S(t=r,ot,ti).call(t,e);if(i)return i}},ri=function(e){var r;let t=[];for(let i of this.childNodes)i.type!=="text"&&(e(i)&&t.push(i),t=[...t,...S(r=i,ot,ri).call(r,e)]);return t}});var ni,Es,Cl,$l,Nl,Il,Ll,Ls,ii,yn,Fs,Hr,Ps=k(()=>{"use strict";ie();z();Z();ei();ni=String.raw`[${Ee}\t]*`,Es=String.raw`<\s*(?:/\s*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+|(?:rfc|pmid)(?=[-::]?${ni}\d)|isbn(?=[-::]?${ni}(?:\d(?:${ni}|-)){6})`,Cl=new RegExp(String.raw`${Es}|https?[:/]/+`,"giu"),$l=new RegExp(Es,"giu"),Nl=new Set(["attr-value","ext-link-text","link-text"]),Il={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},Ll={"<":"tag-like","[":"lonely-bracket","{":"lonely-bracket","]":"lonely-bracket","}":"lonely-bracket",h:"lonely-http",r:"lonely-http",p:"lonely-http",i:"lonely-http"},Ls=new Set(["html","head","style","title","body","a","audio","img","video","embed","iframe","object","canvas","script","col","colgroup","tbody","tfoot","thead","button","input","label","option","select","textarea"]);try{ii=new RegExp(String.raw`[\p{L}\p{N}_]`,"u")}catch{ii=/\w/u}Hr=class extends tr{constructor(e){super();y(this,yn);ae(this,"data","");this.data=e}get type(){return"text"}toString(e){var t;return e&&!((t=this.parentNode)!=null&&t.getAttribute("built"))?ge(this.data):this.data}text(){return this.data}lint(e=this.getAbsoluteIndex(),t){var U,F,G;if(t===!1)return[];let{data:r,parentNode:i,nextSibling:s,previousSibling:o}=this;if(!i)throw new Error("An isolated text node cannot be linted!");let{type:l,name:d,parentNode:p}=i,g=!1;if(l==="attr-value"){let{type:Q,name:ne,tag:L}=p;if(Q!=="ext-attr")g=!0;else if(L==="ref"&&(ne==="name"||ne==="extends"||ne==="follow")||L==="choose"&&(ne==="before"||ne==="after"))return[]}if(t!=null||(t=l==="free-ext-link"||l==="ext-link-url"||l==="ext-link-text"||l==="image-parameter"&&d==="link"||g?$l:Cl),r.search(t)===-1)return[];t.lastIndex=0;let u=[],m=s==null?void 0:s.type,f=s==null?void 0:s.name,h=o==null?void 0:o.type,x=this.getRootNode(),b=x.toString(),{ext:v,html:C}=x.getAttribute("config"),{top:A,left:I}=x.posFromIndex(e),R=new Set(["onlyinclude","noinclude","includeonly",...v,...C[0],...C[1],...C[2],...Ls]);for(let Q=t.exec(r);Q;Q=t.exec(r)){let[,ne,L]=Q,{index:B,0:H}=Q;if(L&&L!=="]"){let{length:ke}=L;B+=ke,H=H.slice(ke)}H=H.toLowerCase();let{0:N,length:oe}=H,pe=N==="r"||N==="p"||N==="i";if(N==="<"&&!R.has(ne.toLowerCase())||N==="["&&l==="ext-link-text"&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(r.slice(B+1))||s!=null&&s.is("ext")&&f==="nowiki"&&((U=s.innerText)!=null&&U.includes("]")))||pe&&(!i.isPlain()||Nl.has(l)))continue;N==="]"&&(B||oe>1)&&t.lastIndex--;let X=e+B,xe=X+oe,M=b[xe],it=b[X-1],Wt=oe>1&&!(N==="<"&&(/^<\s/u.test(H)||!/[\s/>]/u.test(M!=null?M:"")||Ls.has(ne))||g&&(N==="["||N==="]")||pe&&l==="parameter-value"||/^(?:rfc|pmid|isbn)$/iu.test(H))||N==="{"&&(M===N||it==="-")||N==="}"&&(it===N||M==="-")||N==="["&&(l==="ext-link-text"||m==="free-ext-link"&&!r.slice(B+1).trim())||N==="]"&&h==="free-ext-link"&&!r.slice(0,B).includes("]")?"error":"warning",Xn=N==="{"||N==="[";if(Wt==="warning"&&(Xn||(N==="]"||N==="}"))){let ke=Il[N],Kn=Xn?r.slice(B+1):r.slice(0,B);if(N==="{"&&((F=ke.exec(Kn))==null?void 0:F[0])==="}"||N==="}"&&((G=ke.exec(Kn))==null?void 0:G[0])==="{")continue;if(!Kn.includes(N)){let cs=Xn?"nextSibling":"previousSibling",bt=this[cs];for(;bt&&(bt.type!=="text"||!ke.test(bt.data));)bt=bt[cs];if(bt&&ke.exec(bt.data)[0]!==N)continue}}pe&&(H=H.toUpperCase());let gs=this.posFromIndex(B),{line:us,character:ps}=Xt(A,I,gs.top+1,gs.left),Ht={rule:Ll[N],message:$.msg('lonely "$1"',pe||N==="h"?H:N),severity:Wt,startIndex:X,endIndex:xe,startLine:us,endLine:us,startCol:ps,endCol:ps+oe};if(N==="<")Ht.suggestions=[{desc:"escape",range:[X,X+1],text:"<"}];else if(N==="h"&&l!=="link-text"&&ii.test(it||""))Ht.suggestions=[{desc:"whitespace",range:[X,X],text:" "}];else if(N==="["&&l==="ext-link-text"){let ke=i.getAbsoluteIndex()+i.toString().length;Ht.suggestions=[{desc:"escape",range:[ke,ke+1],text:"]"}]}else if(N==="]"&&h==="free-ext-link"&&Wt==="error"){let ke=e-o.toString().length;Ht.fix={range:[ke,ke],text:"[",desc:"left bracket"}}else pe&&(Ht.suggestions=[...Q[0]===H?[]:[{desc:"uppercase",range:[X,xe],text:H}],...M===":"||M===":"?[{desc:"whitespace",range:[xe,xe+1],text:" "}]:[]]);u.push(Ht)}return u}replaceData(e){S(this,yn,Fs).call(this,e)}print(){return Vt(this.data)}};yn=new WeakSet,Fs=function(e){this.setAttribute("data",e)}});var $e,vt=k(()=>{"use strict";ce();$e=(a=!0,n=!0)=>e=>{class t extends e{text(){return""}lint(i){return a?[]:super.lint(i)}}return Be(t,e),t}});var Ur,be,At=k(()=>{"use strict";D();be=class extends w{constructor(e,t,r,i,s){super(e,r,i,s);y(this,Ur);T(this,Ur,t)}get type(){return c(this,Ur)}lint(e=this.getAbsoluteIndex()){return super.lint(e,!1)}};Ur=new WeakMap});var me,ze=k(()=>{"use strict";ce();me=({length:a})=>n=>{class e extends n{getAttribute(r){return r==="padding"?a:super.getAttribute(r)}}return Be(e,n),e}});var rr,ee,Ge=k(()=>{"use strict";D();ee=class extends w{constructor(e,t,r,i,s){super(e,r,i,s);y(this,rr);T(this,rr,t)}get type(){return c(this,rr)}set type(e){T(this,rr,e)}};rr=new WeakMap});var El,Rs,St,Pe,qe,si,Fl,ve,zr=k(()=>{"use strict";z();ie();le();ze();D();Ge();El=a=>a==="redirect-target"||a==="link";Rs=[me("[[")];ve=class extends(Fl=w){constructor(e,t,r,i=[],s="|"){super(void 0,r,i,{});y(this,St,!0);y(this,Pe);y(this,qe);if(this.insertAt(new ee(e,"link-target",r,i,{})),t!==void 0){let o=new w(t,r,i,{});o.type="link-text",o.setAttribute("stage",10),this.insertAt(o)}T(this,Pe,s)}get link(){return c(this,qe)}get fragment(){return c(this,qe).fragment}afterBuild(){T(this,qe,this.getTitle()),c(this,Pe).includes("\0")&&T(this,Pe,this.buildFromStr(c(this,Pe),0)),this.setAttribute("name",c(this,qe).title),super.afterBuild()}setAttribute(e,t){e==="bracket"?T(this,St,t):e==="title"?T(this,qe,t):super.setAttribute(e,t)}toString(e){let t=super.toString(e,c(this,Pe));return c(this,St)?`[[${t}]]`:t}text(){let e=super.text("|");return c(this,St)?`[[${e}]]`:e}getAttribute(e){return e==="title"?c(this,qe):super.getAttribute(e)}getGaps(e){return e===0?c(this,Pe).length:1}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{childNodes:[i,s],type:o}=this,{encoded:l,fragment:d}=c(this,qe),p=new j(this,e);if(i.childNodes.some(({type:g})=>g==="template")&&r.push(E(i,p,"unknown-page","template in an internal link target","warning")),l){let g=E(i,p,"url-encoding","unnecessary URL encoding in an internal link");g.suggestions=[{desc:"decode",range:[g.startIndex,g.endIndex],text:st(i.text())}],r.push(g)}if(o==="link"||o==="category"){let g=s==null?void 0:s.childNodes.findIndex(m=>m.type==="text"&&m.data.includes("|")),u=s==null?void 0:s.childNodes[g];if(u){let m=E(s,p,"pipe-like",'additional "|" in the link text',"warning"),f=m.startIndex+s.getRelativeIndex(g);m.suggestions=[{desc:"escape",range:[f,f+u.data.length],text:u.data.replace(/\|/gu,"|")}],r.push(m)}}if(d!==void 0&&!El(o)){let g=E(i,p,"no-ignored","useless fragment"),u=i.childNodes.findIndex(f=>f.type==="text"&&f.data.includes("#")),m=i.childNodes[u];m&&(g.fix={range:[g.startIndex+i.getRelativeIndex(u)+m.data.indexOf("#"),g.endIndex],text:"",desc:"remove"}),r.push(g)}return r}getTitle(e,t){return this.normalizeTitle(this.firstChild.text(),0,{halfParsed:t,temporary:e,decode:!0,selfLink:!0})}print(){return super.print(c(this,St)?{pre:"[[",post:"]]",sep:c(this,Pe)}:{sep:c(this,Pe)})}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t),{type:i,fragment:s}=this;return s!==void 0&&(i==="link"||i==="redirect-target")&&(r.fragment=s),r}};si=q(Fl),St=new WeakMap,Pe=new WeakMap,qe=new WeakMap,ve=_(si,0,"LinkBaseToken",Rs,ve),O(si,1,ve)});var he,at=k(()=>{"use strict";D();he=class extends w{get innerText(){return this.firstChild.data}constructor(n="",e,t){super(n,e,t)}}});var js,oi,Pl,K,Ve=k(()=>{"use strict";vt();at();js=[$e()];K=class extends(Pl=he){get type(){return"noinclude"}toString(n){return n?"":super.toString()}};oi=q(Pl),K=_(oi,0,"NoincludeToken",js,K),O(oi,1,K)});var kn,Bs=k(()=>{"use strict";z();zr();Ve();kn=class extends ve{get type(){return"redirect-target"}constructor(n,e,t,r){super(n,void 0,t,r),e!==void 0&&this.insertAt(new K(e,t,r))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,{halfParsed:!0,decode:!0})}lint(n=this.getAbsoluteIndex()){let e=super.lint(n,!1);if(this.length===2){let t=E(this.lastChild,{start:n},"no-ignored","useless link text","warning");t.startIndex--,t.startCol--,t.fix={range:[t.startIndex,t.endIndex],text:"",desc:"remove"},e.push(t)}return e}}});var qs,lt,nr,ai,Rl,wt,Os=k(()=>{"use strict";vt();D();At();Bs();qs=[$e(!1,!1)];wt=class extends(Rl=w){constructor(e,t,r,i,s,o,l=[]){super(void 0,o,l);y(this,lt);y(this,nr);T(this,lt,e),T(this,nr,s),this.append(new be(t,"redirect-syntax",o,l),new kn(r,i==null?void 0:i.slice(1),o,l))}get type(){return"redirect"}getAttribute(e){return e==="padding"?c(this,lt).length:super.getAttribute(e)}toString(e){return c(this,lt)+super.toString(e)+c(this,nr)}lint(e=this.getAbsoluteIndex()){let t=e+c(this,lt).length+this.firstChild.toString().length;return this.lastChild.setAttribute("aIndex",t),this.lastChild.lint(t)}print(){return super.print({pre:c(this,lt),post:c(this,nr)})}};ai=q(Rl),lt=new WeakMap,nr=new WeakMap,wt=_(ai,0,"RedirectToken",qs,wt),O(ai,1,wt)});var _s={};te(_s,{parseRedirect:()=>jl});var jl,Ms=k(()=>{"use strict";Z();Os();jl=(a,n,e)=>{var r;(r=n.regexRedirect)!=null||(n.regexRedirect=new RegExp(String.raw`^(\s*)((?:${n.redirection.join("|")})\s*(?::\s*)?)\[\[([^\n|\]]+)(\|.*?)?\]\](\s*)`,"iu"));let t=n.regexRedirect.exec(a);return t&&$.normalizeTitle(t[3],0,!1,n,{halfParsed:!0,temporary:!0,decode:!0}).valid?(a=`\0${e.length}o${a.slice(t[0].length)}`,new wt(...t.slice(1),n,e),a):!1}});var Ds,li,Bl,Ct,Ws=k(()=>{"use strict";ze();D();Ds=[me("<onlyinclude>")];Ct=class extends(Bl=w){get type(){return"onlyinclude"}toString(n){return`<onlyinclude>${super.toString(n)}</onlyinclude>`}isPlain(){return!0}print(){return super.print({pre:'<span class="wpb-ext"><onlyinclude></span>',post:'<span class="wpb-ext"></onlyinclude></span>'})}};li=q(Bl),Ct=_(li,0,"OnlyincludeToken",Ds,Ct),O(li,1,Ct)});var dt,Gr=k(()=>{"use strict";ce();dt=(a=1)=>n=>{class e extends n{getGaps(){return a}}return Be(e,n),e}});var Hs,gt,di,ql,Re,vn=k(()=>{"use strict";Gr();D();Hs=[dt()];Re=class extends(ql=w){constructor(e,t,r,i,s,o=[]){super(void 0,s);y(this,gt);ae(this,"closed");ae(this,"selfClosing");this.setAttribute("name",e.toLowerCase()),T(this,gt,[e,i||e]),this.closed=i!=="",this.selfClosing=i===void 0,this.append(t,r);let l=typeof t=="string"?-1:o.indexOf(t);o.splice(l===-1?1/0:l,0,this)}get innerText(){return this.selfClosing?void 0:this.lastChild.text()}toString(e){let{selfClosing:t,firstChild:r,lastChild:i}=this,[s,o]=c(this,gt);return t?`<${s}${r.toString(e)}/>`:`<${s}${r.toString(e)}>${i.toString(e)}${this.closed?`</${o}>`:""}`}text(){let[e,t]=c(this,gt);return this.selfClosing?`<${e}${this.firstChild.text()}/>`:`<${e}${super.text(">")}${this.closed?`</${t}>`:""}`}getAttribute(e){return e==="padding"?c(this,gt)[0].length+1:super.getAttribute(e)}print(){let[e,t]=c(this,gt);return super.print(this.selfClosing?{pre:`<${e}`,post:"/>"}:{pre:`<${e}`,sep:">",post:this.closed?`</${t}>`:""})}};di=q(ql),gt=new WeakMap,Re=_(di,0,"TagPairToken",Hs,Re),O(di,1,Re)});var Sn,Us,An,zs=k(()=>{"use strict";D();vn();At();Ve();An=class extends Re{constructor(e,t,r,i=[]){let s=new be(e,"translate-attr",r,i);t=t==null?void 0:t.replace(/(<tvar\|[^>]+>)([\s\S]*?)(<\/>)/gu,(l,d,p,g)=>(new K(d,r,i),new K(g,r,i),`\0${i.length-1}n${p}\0${i.length}n`)).replace(/(<tvar\s+name\s*=(?:\s*(?:(["'])[\s\S]*?\2|[^"'\s>]+))?\s*>)([\s\S]*?)(<\/tvar\s*>)/giu,(l,d,p,g,u)=>(new K(d,r,i),new K(u,r,i),`\0${i.length-1}n${g}\0${i.length}n`));let o=new w(t,r,i);o.type="translate-inner";super("translate",s,o,"translate",r,i);y(this,Sn);this.seal("closed",!0),this.seal("selfClosing",!0)}get type(){return"translate"}toString(e){return e?this.lastChild.toString(!0):super.toString()}text(){return this.lastChild.text()}print(){return`<span class="wpb-ext"><translate${S(this,Sn,Us).call(this)?'<span class="wpb-ext-attrs"> <span class="wpb-ext-attr"><span class="wpb-attr-key">nowrap</span></span></span>':""}>${this.lastChild.print({class:"ext-inner"})}</translate></span>`}};Sn=new WeakSet,Us=function(){return this.firstChild.toString()===" nowrap"}});var Gs,gi,Ol,$t,Vs=k(()=>{"use strict";z();le();vt();Z();vn();Gs=[$e(!1)];$t=class extends(Ol=Re){get type(){return"include"}constructor(n,e="",t,r,i,s){super(n,e,t!=null?t:"",t===void 0||r!=null?r:"",i,s)}toString(n){return n?"":super.toString()}lint(n=this.getAbsoluteIndex()){let e=[],{firstChild:t,closed:r,name:i}=this,s=new j(this,n);if(t.data.trim()){let o=E(t,s,"no-ignored","useless attribute","warning");o.suggestions=[{desc:"remove",range:[o.startIndex,o.endIndex],text:""}],e.push(o)}if(!r){let o=P(this,s,"unclosed-comment",$.msg("unclosed $1",`<${i}>`));o.suggestions=[{desc:"close",range:[o.endIndex,o.endIndex],text:`</${i}>`}],e.push(o)}return e}};gi=q(Ol),$t=_(gi,0,"IncludeToken",Gs,$t),O(gi,1,$t)});var ir,wn=k(()=>{"use strict";ce();ir=(a=0)=>n=>{var t,Qs;class e extends n{constructor(){super(...arguments);y(this,t)}getAttr(o){return S(this,t,Qs).call(this).getAttr(o)}}return t=new WeakSet,Qs=function(){return this.childNodes[a]},Be(e,n),e}});var se,Xs,Ks,Cn,pi,Js,sr,Zs,eo,to,ui,Ys,Oe,$n,Nn,In,ro,ci=k(()=>{"use strict";se=new Set(["align"]),Xs=new Set(["cite"]),Ks=new Set(["cite","datetime"]),Cn=new Set(["width"]),pi=new Set(["axis","align","bgcolor","height","width","valign"]),Js=new Set([...pi,"abbr","headers","scope","rowspan","colspan"]),sr=new Set(["type"]),Zs=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),eo=new Set(["clear"]),to=new Set(["bgcolor","align","valign"]),ui=new Set(["qid","forcemathmode","type","display"]),Ys=new Set(["enclose","inline","lang","line","linelinks","style","class","id","dir","copy","highlight","start"]),Oe=new Set,$n=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"]),Nn={div:se,h1:se,h2:se,h3:se,h4:se,h5:se,h6:se,blockquote:Xs,q:Xs,p:se,br:eo,pre:Cn,ins:Ks,del:Ks,ul:sr,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...Zs,"border"]),caption:se,tr:to,td:Js,th:Js,img:new Set(["alt","src","width","height","srcset"]),font:new Set(["size","color","face"]),hr:Cn,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:sr,poem:se,categorytree:se,combooption:se,math:Oe,chem:Oe,ce:Oe},In={gallery:new Set(["mode","showfilename","caption","perrow","widths","heights","showthumbnails"]),poem:new Set(["compact"]),categorytree:new Set(["hideroot","onlyroot","depth","mode","hideprefix","namespaces","showcount","notranslations"]),combooption:new Set(["name","for","inline"]),nowiki:Oe,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:Oe,inputbox:Oe,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:Oe,poll:new Set(["id","show-results-before-voting"]),sm2:sr,flashmp3:sr,score:new Set(["line_width_inches","lang","override_midi","raw","note-language","override_audio","override_ogg","sound","vorbis"]),seo:new Set(["title","title_mode","title_separator","keywords","description","robots","google_bot","image","image_width","image_height","image_alt","type","site_name","locale","section","author","published_time","twitter_site"]),tab:new Set(["nested","name","index","class","block","inline","openname","closename","collapsed","dropdown","style","bgcolor","container","id","title"]),tabs:new Set(["plain","class","container","id","title","style"]),combobox:new Set(["placeholder","value","id","class","text","dropdown","style"]),math:new Set([...ui,"chem"]),chem:ui,ce:ui,hiero:Oe,phonos:new Set(["ipa","class","text","lang","wikibase","file"]),section:new Set(["begin","end"]),source:Ys,syntaxhighlight:Ys,templatedata:Oe,timeline:new Set(["method","font"]),quiz:new Set(["display","shuffleanswers","points","shuffle","case"]),languages:Oe},ro={table:Zs,td:new Set([...pi,"scope"]),th:pi,br:eo,caption:se,div:se,hr:Cn,h1:se,h2:se,h3:se,h4:se,h5:se,h6:se,li:sr,p:se,pre:Cn,tr:to,ul:sr}});var _l,Ml,Vr,or,ue,_e,ar,no=k(()=>{"use strict";z();ie();ci();le();Z();D();Ge();_l=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,Ml=new Set(["ext","arg","magic-word","template"]),ar=class extends w{constructor(e,t,r,i="",s,o=[],l=$.getConfig(),d=[]){let p=new ee(r,"attr-key",l,d),g;if(r==="title"||t==="img"&&r==="alt")g=new w(s,l,d,{}),g.type="attr-value",g.setAttribute("stage",10);else if(t==="gallery"&&r==="caption"||t==="choose"&&(r==="before"||r==="after")){let u={...l,excludes:[...l.excludes,"heading","html","table","hr","list"]};g=new w(s,u,d,{}),g.type="attr-value",g.setAttribute("stage",1)}else g=new ee(s,"attr-value",l,d,{});super(void 0,l,d);y(this,Vr);y(this,or);y(this,ue);y(this,_e);T(this,Vr,e),this.append(p,g),T(this,ue,i),T(this,_e,[...o]),T(this,or,t),this.setAttribute("name",He(ge(r)))}get type(){return c(this,Vr)}get tag(){return c(this,or)}get balanced(){return!c(this,ue)||c(this,_e)[0]===c(this,_e)[1]}afterBuild(){c(this,ue).includes("\0")&&T(this,ue,this.buildFromStr(c(this,ue),0)),this.parentNode&&T(this,or,this.parentNode.name),this.setAttribute("name",He(this.firstChild.text())),super.afterBuild()}toString(e){let[t="",r=""]=c(this,_e);return c(this,ue)?super.toString(e,c(this,ue)+t)+r:this.firstChild.toString(e)}text(){return c(this,ue)?`${super.text(`${c(this,ue).trim()}"`)}"`:this.firstChild.text()}getGaps(){var e,t;return c(this,ue)?c(this,ue).length+((t=(e=c(this,_e)[0])==null?void 0:e.length)!=null?t:0):0}lint(e=this.getAbsoluteIndex(),t){var x;let r=super.lint(e,t),{balanced:i,firstChild:s,lastChild:o,type:l,name:d,tag:p}=this,g=this.getValue(),u=new j(this,e);if(!i){let b=E(o,u,"unclosed-quote",$.msg("unclosed $1","quotes"),"warning");b.startIndex--,b.startCol--,b.suggestions=[{range:[b.endIndex,b.endIndex],text:c(this,_e)[0],desc:"close"}],r.push(b)}let m=In[p],f=Nn[p],{length:h}=this.toString();if(!(m!=null&&m.has(d))&&!(f!=null&&f.has(d))&&(l==="ext-attr"?m||f:!/\{\{[^{]+\}\}/u.test(d))&&(l==="ext-attr"&&!f||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(d)&&(p==="meta"||p==="link"||!$n.has(d)))){let b=E(s,u,"illegal-attr","illegal attribute name");b.suggestions=[{desc:"remove",range:[e,e+h],text:""}],r.push(b)}else if(d==="style"&&typeof g=="string"&&_l.test(g))r.push(E(o,u,"insecure-style","insecure style"));else if(d==="tabindex"&&typeof g=="string"&&g!=="0"){let b=E(o,u,"illegal-attr","nonzero tabindex");b.suggestions=[{desc:"remove",range:[e,e+h],text:""},{desc:"0 tabindex",range:[b.startIndex,b.endIndex],text:"0"}],r.push(b)}else if(l!=="ext-attr"&&!o.childNodes.some(({type:b})=>Ml.has(b))){let b=fn(p,d),v=String(g).toLowerCase();b.length>0&&b.every(C=>C!==v)&&r.push(E(o,u,"illegal-attr","illegal attribute value","warning"))}return(x=ro[p])!=null&&x.has(d)&&r.push(E(s,u,"obsolete-attr","obsolete attribute","warning")),r}getValue(){return c(this,ue)?this.lastChild.text().trim():this.type==="ext-attr"||""}print(){let[e="",t=""]=c(this,_e);return c(this,ue)?super.print({sep:Vt(c(this,ue))+e,post:t}):super.print()}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return r.tag=this.tag,r}};Vr=new WeakMap,or=new WeakMap,ue=new WeakMap,_e=new WeakMap});var io,Dl,mi,Qr,ut,Ln=k(()=>{"use strict";z();ie();le();Z();D();Ge();no();io=a=>a.slice(0,-1),Dl=a=>`${io(a)}-dirty`;try{mi=new RegExp(String.raw`[\p{L}\p{N}]`,"u")}catch{mi=/[^\W_]/u}ut=class extends w{constructor(e,t,r,i,s=[]){super(void 0,i,s,{});y(this,Qr);if(T(this,Qr,t),this.setAttribute("name",r),e){let o=/([^\s/](?:(?!\0\d+~\x7F)[^\s/=])*)(?:((?:\s(?:\s|\0\d+[cn]\x7F)*)?(?:=|\0\d+~\x7F)(?:\s|\0\d+[cn]\x7F)*)(?:(["'])([\s\S]*?)(\3|$)|(\S*)))?/gu,l="",d=o.exec(e),p=0,g=()=>{l&&(super.insertAt(new ee(l,Dl(t),i,s,{})),l="")};for(;d;){let{index:u,0:m,1:f,2:h,3:x,4:b,5:v,6:C}=d;if(l+=e.slice(p,u),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(ge(f).trim())){let A=b!=null?b:C,I=[x,v],R=new ar(io(t),r,f,h,A,I,i,s);g(),super.insertAt(R)}else l+=m;({lastIndex:p}=o),d=o.exec(e)}l+=e.slice(p),g()}}get type(){return c(this,Qr)}afterBuild(){let{parentNode:e}=this;(e==null?void 0:e.type)==="td"&&this.setAttribute("name",e.subtype),super.afterBuild()}getAttrTokens(e){return this.childNodes.filter(t=>t instanceof ar&&(!e||t.name===He(e)))}getAttrToken(e){let t=this.getAttrTokens(e);return t[t.length-1]}getAttr(e){var t;return(t=this.getAttrToken(e))==null?void 0:t.getValue()}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{parentNode:i,childNodes:s}=this,o=new Map,l=new Set,d=new j(this,e);if((i==null?void 0:i.type)==="html"&&i.closing&&this.text().trim()){let p=P(this,d,"no-ignored","attributes of a closing tag"),g=i.getAbsoluteIndex();p.suggestions=[{desc:"remove",range:[e,p.endIndex],text:""},{desc:"open",range:[g+1,g+2],text:""}],r.push(p)}for(let p of s)if(p instanceof ar){let{name:g}=p;o.has(g)?(l.add(g),o.get(g).push(p)):o.set(g,[p])}else{let g=p.text().trim();if(g){let u=E(p,d,"no-ignored","containing invalid attribute",mi.test(g)?"error":"warning");u.suggestions=[{desc:"remove",range:[u.startIndex,u.endIndex],text:" "}],r.push(u)}}if(l.size>0)for(let p of l){let g=o.get(p).map(u=>{let m=u.getValue();return[u,m===!0?"":m]});r.push(...g.map(([u,m],f)=>{let h=E(u,d,"no-duplicate",$.msg("duplicated $1 attribute",p)),x={desc:"remove",range:[h.startIndex,h.endIndex],text:""};return!m||g.slice(0,f).some(([,b])=>b===m)?h.fix=x:h.suggestions=[x],h}))}return r}print(){return this.toString()?`<span class="wpb-${this.type}">${this.childNodes.map(e=>e.print(e instanceof ee?{class:e.toString().trim()&&"attr-dirty"}:void 0)).join("")}</span>`:""}};Qr=new WeakMap});var so={};te(so,{PreToken:()=>hi});var hi,oo=k(()=>{"use strict";D();Ve();hi=class extends w{get type(){return"ext-inner"}constructor(n,e,t=[]){if(n){let r=/<nowiki>/giu,i=/<\/nowiki>/giu,{length:s}=r.source,o=r.exec(n);o&&(i.lastIndex=o.index+s);let l=i.exec(n),d=0,p="";for(;o&&l;)new K(o[0],e,t),new K(l[0],e,t),p+=`${n.slice(d,o.index)}\0${t.length-1}n${n.slice(o.index+s,l.index)}\0${t.length}n`,d=l.index+s+1,r.lastIndex=d,o=r.exec(n),o&&(i.lastIndex=o.index+s),l=i.exec(n);n=p+n.slice(d)}super(n,e,t,{}),this.setAttribute("stage",10)}isPlain(){return!0}lint(n=this.getAbsoluteIndex()){return super.lint(n,/<\s*\/\s*(pre)\b/giu)}}});var lr,En=k(()=>{"use strict";ce();lr=a=>{class n extends a{toString(t){return super.toString(t,`
|
|
1
|
+
"use strict";(()=>{var ml=Object.create;var zt=Object.defineProperty;var xs=Object.getOwnPropertyDescriptor;var hl=Object.getOwnPropertyNames;var fl=Object.prototype.hasOwnProperty;var bs=(a,n)=>(n=Symbol[a])?n:Symbol.for("Symbol."+a),Gt=a=>{throw TypeError(a)};var Ts=(a,n,e)=>n in a?zt(a,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[n]=e;var fs=(a,n)=>zt(a,"name",{value:n,configurable:!0});var A=(a,n)=>()=>(a&&(n=a(a=0)),n);var xl=(a,n)=>()=>(n||a((n={exports:{}}).exports,n),n.exports),te=(a,n)=>{for(var e in n)zt(a,e,{get:n[e],enumerable:!0})},bl=(a,n,e,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of hl(n))!fl.call(a,r)&&r!==e&&zt(a,r,{get:()=>n[r],enumerable:!(t=xs(n,r))||t.enumerable});return a};var Q=a=>bl(zt({},"__esModule",{value:!0}),a);var q=a=>{var n;return[,,,ml((n=a==null?void 0:a[bs("metadata")])!=null?n:null)]},ys=["class","method","getter","setter","accessor","field","value","get","set"],jr=a=>a!==void 0&&typeof a!="function"?Gt("Function expected"):a,Tl=(a,n,e,t,r)=>({kind:ys[a],name:n,metadata:t,addInitializer:i=>e._?Gt("Already initialized"):r.push(jr(i||null))}),yl=(a,n)=>Ts(n,bs("metadata"),a[3]),O=(a,n,e,t)=>{for(var r=0,i=a[n>>1],s=i&&i.length;r<s;r++)n&1?i[r].call(e):t=i[r].call(e,t);return t},_=(a,n,e,t,r,i)=>{var s,o,l,d,p,g=n&7,u=!!(n&8),m=!!(n&16),f=g>3?a.length+1:g?u?1:2:0,h=ys[g+5],x=g>3&&(a[f-1]=[]),b=a[f]||(a[f]=[]),k=g&&(!m&&!u&&(r=r.prototype),g<5&&(g>3||!m)&&xs(g<4?r:{get[e](){return c(this,i)},set[e](v){return T(this,i,v)}},e));g?m&&g<4&&fs(i,(g>2?"set ":g>1?"get ":"")+e):fs(r,e);for(var C=t.length-1;C>=0;C--)d=Tl(g,e,l={},a[3],b),g&&(d.static=u,d.private=m,p=d.access={has:m?v=>kl(r,v):v=>e in v},g^3&&(p.get=m?v=>(g^1?c:w)(v,r,g^4?i:k.get):v=>v[e]),g>2&&(p.set=m?(v,I)=>T(v,r,I,g^4?i:k.set):(v,I)=>v[e]=I)),o=(0,t[C])(g?g<4?m?i:k[h]:g>4?void 0:{get:k.get,set:k.set}:r,d),l._=1,g^4||o===void 0?jr(o)&&(g>4?x.unshift(o):g?m?i=o:k[h]=o:r=o):typeof o!="object"||o===null?Gt("Object expected"):(jr(s=o.get)&&(k.get=s),jr(s=o.set)&&(k.set=s),jr(s=o.init)&&x.unshift(s));return g||yl(a,r),k&&zt(r,e,k),m?g^4?i:k:r},le=(a,n,e)=>Ts(a,typeof n!="symbol"?n+"":n,e),Yn=(a,n,e)=>n.has(a)||Gt("Cannot "+e),kl=(a,n)=>Object(n)!==n?Gt('Cannot use the "in" operator on this value'):a.has(n),c=(a,n,e)=>(Yn(a,n,"read from private field"),e?e.call(a):n.get(a)),y=(a,n,e)=>n.has(a)?Gt("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(a):n.set(a,e),T=(a,n,e,t)=>(Yn(a,n,"write to private field"),t?t.call(a,e):n.set(a,e),e),w=(a,n,e)=>(Yn(a,n,"access private method"),e);var fn=(a,n,e,t)=>({set _(r){T(a,n,r,e)},get _(){return c(a,n,t)}});var ks,vs,As=A(()=>{"use strict";ks=(()=>{let a={redirect:1,onlyinclude:1,noinclude:1,include:1,comment:1,ext:1,arg:2,"magic-word":2,template:2,heading:2,html:3,table:4,hr:5,"double-underscore":5,link:6,category:6,file:6,quote:7,"ext-link":8,"free-ext-link":9,"magic-link":9,list:10,dd:10,converter:11,"list-range":11};return Object.setPrototypeOf(a,null),a})(),vs=(()=>{let a=["bold-header","format-leakage","fostered-content","h1","illegal-attr","insecure-style","invalid-gallery","invalid-imagemap","invalid-invoke","invalid-isbn","lonely-apos","lonely-bracket","lonely-http","nested-link","no-arg","no-duplicate","no-ignored","obsolete-attr","obsolete-tag","parsing-order","pipe-like","table-layout","tag-like","unbalanced-header","unclosed-comment","unclosed-quote","unclosed-table","unescaped","unknown-page","unmatched-tag","unterminated-url","url-encoding","var-anchor","void-ext"];return Object.freeze(a),a})()});function Ce(a){return n=>{let e=new(typeof n=="string"?Map:WeakMap);if(e.has(n)){let r=e.get(n);return r.lastIndex=0,r}let t=a(n);return e.set(n,t),t}}var st,Br,vl,ws,kt=A(()=>{"use strict";st=a=>decodeURIComponent(a.replace(/%(?![\da-f]{2})/giu,"%25")),Br=a=>Math.round(a*255).toString(16).padStart(2,"0"),vl=(()=>{let a=String.raw`#(?:[\da-f]{3,4}|(?:[\da-f]{2}){3,4})(?![\p{L}\p{N}_])`,n=String.raw`(?:\d*\.)?\d+%?`,e=String.raw`(?:\d*\.)?\d+(?:deg|grad|rad|turn)?`,t=String.raw`rgba?\(\s*(?:${String.raw`${new Array(3).fill(n).join(String.raw`\s+`)}(?:\s*\/\s*${n})?`}|${String.raw`${new Array(3).fill(n).join(String.raw`\s*,\s*`)}(?:\s*,\s*${n})?`})\s*\)`,r=String.raw`hsla?\(\s*(?:${String.raw`${e}\s+${n}\s+${n}(?:\s*\/\s*${n})?`}|${String.raw`${e}${String.raw`\s*,\s*(?:\d*\.)?\d+%`.repeat(2)}(?:\s*,\s*${n})?`})\s*\)`;return{full:new RegExp(String.raw`(^|[^\p{L}\p{N}_])(${a}|${t}|${r})`,"giu"),rgb:new RegExp(String.raw`(^|[^\p{L}\p{N}_])(${a}|${t})`,"giu")}})(),ws=(a,n=!0)=>{let e=[],t=vl[n?"full":"rgb"];t.lastIndex=0;let r=t.exec(a),i=0;for(;r;){let s=r.index+r[1].length;s>i&&e.push([a.slice(i,s),i,s,!1]),{lastIndex:i}=t,e.push([r[2],s,i,a[s-1]!=="&"||!/^#\d+$/u.test(r[2])]),r=t.exec(a)}return a.length>i&&e.push([a.slice(i),i,a.length,!1]),e}});var Fe,Ss,We,He,Ue,Be,vt,Vt,ue,Zd,$e,Al,wl,At,Cs,eg,Sl,Cl,Qt,ze,se=A(()=>{"use strict";kt();Fe=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,Ss=String.raw`[^[\]<>"\0-\x1F\x7F${Fe}\uFFFD]`,We=String.raw`(?:\[[\da-f:.]+\]|${Ss})`,He=String.raw`(?:${Ss}|\0\d+[cn!~]\x7F)*`,Ue=a=>a.trim().toLowerCase(),Be=(a,n)=>a.replace(/\0(\d+)\x7F/gu,(e,t)=>n[t]),vt=(a,n)=>e=>e.replace(a,n),Vt=vt(/[\0\x7F]|\r$/gmu,""),ue=vt(/\0\d+[cn]\x7F/gu,""),Zd=vt(/[\\{}()|.?*+^$[\]]/gu,String.raw`\$&`),$e=(a,n="")=>a.map(e=>typeof e=="string"?e:e.text()).join(n),Al={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},wl=vt(/&(?:#(\d+|[Xx][\da-fA-F]+)|([lg]t|[LG]T|[lr]brac[ke]|nbsp|amp|AMP|quot|QUOT));/gu,(a,n,e)=>n?String.fromCodePoint(+((/^x/iu.test(n)?"0":"")+n)):Al[e.toLowerCase()]),At=a=>wl(a),Cs=vt(/&#(\d+|x[\da-f]+);/giu,(a,n)=>String.fromCodePoint(+((/^x/iu.test(n)?"0":"")+n))),eg=vt(/\n/gu,String.raw`\n`),Sl={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},Cl=a=>vt(a,n=>`&${Sl[n]};`),Qt=Cl(/[&<>]/gu),ze=(a,n={})=>{let{pre:e="",post:t="",sep:r=""}=n;return e+a.map(i=>i.print()).join(r)+t}});var $s=xl((ng,$l)=>{$l.exports={ext:[],html:[["b","bdi","del","i","ins","u","font","big","small","sub","sup","h1","h2","h3","h4","h5","h6","cite","code","em","s","strike","strong","tt","var","div","center","blockquote","ol","ul","dl","table","caption","pre","ruby","rb","rp","rt","rtc","p","span","abbr","dfn","kbd","samp","data","time","mark","tr","td","th","q","bdo"],["li","dt","dd"],["br","wbr","hr","meta","link"]],namespaces:{"0":"","6":"File","10":"Template","14":"Category","828":"Module"},nsid:{"":0,file:6,template:10,category:14,module:828},functionHook:["msgnw"],variable:["!","=","pageid","articlepath","server","servername","scriptpath","stylepath"],parserFunction:[{msgnw:"msgnw",pageid:"pageid",articlepath:"articlepath",server:"server",servername:"servername",scriptpath:"scriptpath",stylepath:"stylepath","#language":"language","#special":"special","#speciale":"speciale","#tag":"tag","#formatdate":"formatdate","#dateformat":"formatdate","#invoke":"invoke","#while":"while","#dowhile":"dowhile","#loop":"loop","#forargs":"forargs","#fornumargs":"fornumargs","#if":"if","#ifeq":"ifeq","#switch":"switch","#ifexist":"ifexist","#ifexpr":"ifexpr","#iferror":"iferror","#time":"time","#timel":"timel","#expr":"expr","#rel2abs":"rel2abs","#titleparts":"titleparts","#categorytree":"categorytree","#urldecode":"urldecode","#choose":"choose","#var":"var","#varexists":"varexists","#var_final":"var_final","#vardefine":"vardefine","#vardefineecho":"vardefineecho","#widget":"widget","#related":"related","#cscore":"cscore","#regex":"regex","#regex_var":"regex_var","#regexquote":"regexquote","#regexall":"regexall","#len":"len","#pos":"pos","#rpos":"rpos","#sub":"sub","#count":"count","#rmatch":"rmatch","#rreplace":"rreplace","#replace":"replace","#rsplit":"rsplit","#explode":"explode","#tab":"tab","#seo":"seo","#babel":"babel","#translation":"translation","#commaseparatedlist":"commaseparatedlist","#coordinates":"coordinates","#lst":"lst","#lsth":"lsth","#lstx":"lstx","#assessment":"assessment","#mentor":"mentor","#property":"property","#target":"target","#section":"lst","#section-x":"lstx","#section-h":"lsth","#statements":"statements","#useliquidthreads":"useliquidthreads","#lqtpagelimit":"lqtpagelimit","#chart":"chart"},{"!":"!","=":"=","#FORMAL":"formal","#bcp47":"bcp47","#dir":"dir","#interwikilink":"interwikilink","#interlanguagelink":"interlanguagelink","#timef":"timef","#timefl":"timefl"},["msg","raw"],["subst","safesubst"]],doubleUnderscore:[[],[]],protocol:"bitcoin:|ftp://|ftps://|geo:|git://|gopher://|http://|https://|irc://|ircs://|magnet:|mailto:|matrix:|mms://|news:|nntp://|redis://|sftp://|sip:|sips:|sms:|ssh://|svn://|tel:|telnet://|urn:|worldwind://|xmpp:",interwiki:[],img:{},redirection:["#redirect"],variants:[]}});var Zn,Ns=A(()=>{"use strict";Zn=$s()});var qr,Xt,Or,_r,ei,B,de=A(()=>{"use strict";B=class{constructor(n,e){y(this,_r);y(this,qr);y(this,Xt);y(this,Or);T(this,qr,n),T(this,Xt,e)}get start(){return c(this,Xt)}get top(){return w(this,_r,ei).call(this).top}get left(){return w(this,_r,ei).call(this).left}};qr=new WeakMap,Xt=new WeakMap,Or=new WeakMap,_r=new WeakSet,ei=function(){var n;return(n=c(this,Or))!=null||T(this,Or,c(this,qr).getRootNode().posFromIndex(c(this,Xt))),c(this,Or)}});var Kt,Is,L,R,Pe,xn,G=A(()=>{"use strict";me();de();X();Kt=(a,n,e,t)=>({line:a+e-1,character:(e===1?n:0)+t}),Is=a=>(n,e,t,r,i="error")=>{let{start:s}=e,{top:o,left:l}=e instanceof B?e:new B(n,s),{offsetHeight:d,offsetWidth:p}=n,{startIndex:g,startLine:u,startCol:m}=a(n,s,o,l),{line:f,character:h}=Kt(u,m,d,p);return{rule:t,message:$.msg(r),severity:i,startIndex:g,endIndex:g+n.toString().length,startLine:u,endLine:f,startCol:m,endCol:h}},L=Is((a,n,e,t)=>{let r=a.getRelativeIndex(),{top:i,left:s}=a.parentNode.posFromIndex(r);return{startIndex:n+r,startLine:e+i,startCol:i?s:t+s}}),R=Is((a,n,e,t)=>({startIndex:n,startLine:e,startCol:t})),Pe=(a,n,e)=>{if(a&&$.viewOnly&&a[0]===oe.rev)return a[1];let t=n();return $.viewOnly&&e([oe.rev,t]),t},xn=(a,n)=>a==="ol"&&n==="type"?["1","a","A","i","I"]:a==="th"&&n==="scope"?["row","col","rowgroup","colgroup"]:n==="dir"?["ltr","rtl","auto"]:n==="aria-hidden"?["true","false"]:[]});var Nl,bn,Ls=A(()=>{"use strict";Nl=(a,n,e)=>{if(a.includes("#")){let[t,...r]=a.split("#");return(!t||t===n)&&r.every(i=>i===e)}return!a||a===n},bn=(a,n,e)=>({type:t,name:r})=>a.split(",").some(i=>Nl(i.trim(),t,r))});var Mr,Jt,Yt,Dr,Wr,Zt,er,tr,Tn,rr,ti=A(()=>{"use strict";G();me();X();rr=class{constructor(){y(this,tr);le(this,"childNodes",[]);y(this,Mr);y(this,Jt);y(this,Yt);y(this,Dr);y(this,Wr);y(this,Zt);y(this,er,{})}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get parentNode(){return c(this,Mr)}get nextSibling(){return c(this,Jt)}get previousSibling(){return c(this,Yt)}get offsetHeight(){return w(this,tr,Tn).call(this).height}get offsetWidth(){return w(this,tr,Tn).call(this).width}getChildNodes(){let{childNodes:n}=this;return Object.isFrozen(n)?[...n]:n}getAttribute(n){return n==="padding"?0:this[n]}setAttribute(n,e){switch(n){case"parentNode":T(this,Mr,e),e||(T(this,Jt,void 0),T(this,Yt,void 0));break;case"nextSibling":T(this,Jt,e);break;case"previousSibling":T(this,Yt,e);break;case"aIndex":$.viewOnly&&T(this,Zt,[oe.rev,e]);break;default:this[n]=e}}getRootNode(){return Pe(c(this,Wr),()=>{var n,e;return(e=(n=this.parentNode)==null?void 0:n.getRootNode())!=null?e:this},n=>{let[,e]=n;e.type==="root"&&T(this,Wr,n)})}indexFromPos(n,e){{if(n<0||e<0)return;let t=this.getLines();if(n>=t.length)return;let[,r,i]=t[n],s=r+e;return s>i?void 0:s}}posFromIndex(n){let{length:e}=String(this);if(n+=n<0?e:0,n>=0&&n<=e){let t=this.getLines(),r=t.findIndex(([,,i])=>n<=i);return{top:r,left:n-t[r][1]}}}getGaps(n){return 0}getRelativeIndex(n){if(n===void 0){let{parentNode:e}=this;return e?e.getRelativeIndex(e.childNodes.indexOf(this)):0}return Pe(c(this,er)[n],()=>{let{childNodes:e}=this,t=n+(n<0?e.length:0),r=this.getAttribute("padding");for(let i=0;i<t;i++)$.viewOnly&&(c(this,er)[i]=[oe.rev,r]),r+=e[i].toString().length+this.getGaps(i);return r},e=>{c(this,er)[n]=e})}getAbsoluteIndex(){return Pe(c(this,Zt),()=>{let{parentNode:n}=this;return n?n.getAbsoluteIndex()+this.getRelativeIndex():0},n=>{T(this,Zt,n)})}getBoundingClientRect(){return{...w(this,tr,Tn).call(this),...this.getRootNode().posFromIndex(this.getAbsoluteIndex())}}is(n){return this.type===n}getLines(){return Pe(c(this,Dr),()=>{let n=[],e=0;for(let t of String(this).split(`
|
|
2
|
+
`)){let r=e+t.length;n.push([t,e,r]),e=r+1}return n},n=>{T(this,Dr,n)})}seal(n,e){Object.defineProperty(this,n,{enumerable:!e&&!!this[n],configurable:!0})}};Mr=new WeakMap,Jt=new WeakMap,Yt=new WeakMap,Dr=new WeakMap,Wr=new WeakMap,Zt=new WeakMap,er=new WeakMap,tr=new WeakSet,Tn=function(){let n=this.getLines(),e=n[n.length-1];return{height:n.length,width:e[2]-e[1]}}});var ot,ri,ni,yn,Es=A(()=>{"use strict";se();me();Ls();ti();yn=class extends rr{constructor(){super(...arguments);y(this,ot)}get length(){return this.childNodes.length}text(e){return $e(this.childNodes,e)}normalize(){let e=this.getChildNodes(),t=r=>{var i,s;e.splice(r,1),(i=e[r-1])==null||i.setAttribute("nextSibling",e[r]),(s=e[r])==null||s.setAttribute("previousSibling",e[r-1])};for(let r=e.length-1;r>=0;r--){let{type:i,data:s}=e[r];i!=="text"||e.length===1||this.getGaps(r-(r&&1))||s===""&&t(r)}this.setAttribute("childNodes",e)}removeAt(e){return Hr(this,e,1)[0]}insertAt(e,t=this.length){return Hr(this,t,0,[e]),e}closest(e){let t=bn(e,this),{parentNode:r}=this;for(;r;){if(t(r))return r;({parentNode:r}=r)}}querySelector(e){let t=bn(e,this);return w(this,ot,ri).call(this,t)}querySelectorAll(e){let t=bn(e,this);return w(this,ot,ni).call(this,t)}append(...e){this.safeAppend(e)}safeAppend(e){for(let t of e)this.insertAt(t)}replaceChildren(...e){this.safeReplaceChildren(e)}safeReplaceChildren(e){for(let t=this.length-1;t>=0;t--)this.removeAt(t);this.safeAppend(e)}setText(e,t=0){t+=t<0?this.length:0;let r=this.childNodes[t],{data:i}=r;return r.replaceData(e),i}toString(e,t=""){return this.childNodes.map(r=>r.toString(e)).join(t)}caretPositionFromIndex(e){{if(e===void 0)return;let{length:t}=this.toString();if(e>t||e<-t)return;e+=e<0?t:0;let r=this,i=0,s=0;for(;r.type!=="text";){let{childNodes:o}=r;i+=r.getAttribute("padding");for(let l=0;i<=e&&l<o.length;l++){let d=o[l],{nextSibling:p}=d,g=d.toString(),u=g.length;if(d.setAttribute("aIndex",i),i+=u,i>e||i===e&&u>0&&(!p||p.type==="text"||d.type!=="text"&&(g.trim()||!p.toString().trim()))){r=d,i-=u,s=i;break}i+=r.getGaps(l)}if(r.childNodes===o)return{offsetNode:r,offset:e-s}}return{offsetNode:r,offset:e-s}}}elementFromIndex(e){var t;{let r=(t=this.caretPositionFromIndex(e))==null?void 0:t.offsetNode;return(r==null?void 0:r.type)==="text"?r.parentNode:r}}elementFromPoint(e,t){return this.elementFromIndex(this.indexFromPos(t,e))}lint(e=this.getAbsoluteIndex(),t){let r=[];for(let i=0,s=e+this.getAttribute("padding");i<this.length;i++){let o=this.childNodes[i];o.setAttribute("aIndex",s);let l=o.lint(s,t);l.length>0&&r.push(...l),s+=o.toString().length+this.getGaps(i)}return r}print(e={}){let t=e.class;return this.toString()?(t===""?"":`<span class="wpb-${t!=null?t:this.type}">`)+ze(this.childNodes,e)+(t===""?"":"</span>"):""}json(e,t=this.getAbsoluteIndex()){let r={...this,type:this.type,range:[t,t+this.toString().length],childNodes:[]};for(let i=0,s=t+this.getAttribute("padding");i<this.length;i++){let o=this.childNodes[i],{length:l}=o.toString();o.setAttribute("aIndex",s),r.childNodes.push(o.type==="text"?{data:o.data,range:[s,s+l]}:o.json(void 0,s)),s+=l+this.getGaps(i)}return r}};ot=new WeakSet,ri=function(e){var t;for(let r of this.childNodes){if(r.type==="text")continue;if(e(r))return r;let i=w(t=r,ot,ri).call(t,e);if(i)return i}},ni=function(e){var r;let t=[];for(let i of this.childNodes)i.type!=="text"&&(e(i)&&t.push(i),t=[...t,...w(r=i,ot,ni).call(r,e)]);return t}});var ii,Ps,Il,Ll,El,Fl,Pl,Fs,si,kn,Rs,Ur,js=A(()=>{"use strict";se();G();X();ti();ii=String.raw`[${Fe}\t]*`,Ps=String.raw`<\s*(?:/\s*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+|(?:rfc|pmid)(?=[-::]?${ii}\d)|isbn(?=[-::]?${ii}(?:\d(?:${ii}|-)){6})`,Il=new RegExp(String.raw`${Ps}|https?[:/]/+`,"giu"),Ll=new RegExp(Ps,"giu"),El=new Set(["attr-value","ext-link-text","link-text"]),Fl={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},Pl={"<":"tag-like","[":"lonely-bracket","{":"lonely-bracket","]":"lonely-bracket","}":"lonely-bracket",h:"lonely-http",r:"lonely-http",p:"lonely-http",i:"lonely-http"},Fs=new Set(["html","head","style","title","body","a","audio","img","video","embed","iframe","object","canvas","script","col","colgroup","tbody","tfoot","thead","button","input","label","option","select","textarea"]);try{si=new RegExp(String.raw`[\p{L}\p{N}_]`,"u")}catch{si=/\w/u}Ur=class extends rr{constructor(e){super();y(this,kn);le(this,"data","");this.data=e}get type(){return"text"}toString(e){var t;return e&&!((t=this.parentNode)!=null&&t.getAttribute("built"))?ue(this.data):this.data}text(){return this.data}lint(e=this.getAbsoluteIndex(),t){var P,V,ne;if(t===!1)return[];let{data:r,parentNode:i,nextSibling:s,previousSibling:o}=this;if(!i)throw new Error("An isolated text node cannot be linted!");let{type:l,name:d,parentNode:p}=i,g=!1;if(l==="attr-value"){let{type:ie,name:N,tag:M}=p;if(ie!=="ext-attr")g=!0;else if(M==="ref"&&(N==="name"||N==="extends"||N==="follow")||N==="group"&&(M==="ref"||M==="references")||M==="choose"&&(N==="before"||N==="after"))return[]}if(t!=null||(t=l==="free-ext-link"||l==="ext-link-url"||l==="ext-link-text"||l==="image-parameter"&&d==="link"||g?Ll:Il),r.search(t)===-1)return[];t.lastIndex=0;let u=[],m=s==null?void 0:s.type,f=s==null?void 0:s.name,h=o==null?void 0:o.type,x=this.getRootNode(),b=x.toString(),{ext:k,html:C,variants:v}=x.getAttribute("config"),{top:I,left:j}=x.posFromIndex(e),z=new Set(["onlyinclude","noinclude","includeonly",...k,...C[0],...C[1],...C[2],...Fs]);for(let ie=t.exec(r);ie;ie=t.exec(r)){let[,N,M]=ie,{index:U,0:E}=ie;if(M&&M!=="]"){let{length:ve}=M;U+=ve,E=E.slice(ve)}E=E.toLowerCase();let[F]=E,ce=F==="r"||F==="p"||F==="i",{length:Z}=E;if(F==="<"&&!z.has(N.toLowerCase())||F==="["&&l==="ext-link-text"&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(r.slice(U+1))||s!=null&&s.is("ext")&&f==="nowiki"&&((P=s.innerText)!=null&&P.includes("]")))||ce&&(!i.isPlain()||El.has(l)))continue;F==="]"&&(U||Z>1)&&t.lastIndex--;let ge=e+U,W=ge+Z,ke=b[W],bt=b[ge-1],Tt=Z>1&&!(F==="<"&&(/^<\s/u.test(E)||!/[\s/>]/u.test(ke!=null?ke:"")||Fs.has(N))||g&&(F==="["||F==="]")||ce&&l==="parameter-value"||/^(?:rfc|pmid|isbn)$/iu.test(E))||F==="{"&&(ke===F||bt==="-"&&v.length>0)||F==="}"&&(bt===F||ke==="-"&&v.length>0)||F==="["&&(l==="ext-link-text"||m==="free-ext-link"&&!r.slice(U+1).trim())||F==="]"&&h==="free-ext-link"&&!r.slice(0,U).includes("]")?"error":"warning",Kn=F==="{"||F==="[";if(Tt==="warning"&&(Kn||(F==="]"||F==="}"))){let ve=Fl[F],Jn=Kn?r.slice(U+1):r.slice(0,U);if(F==="{"&&((V=ve.exec(Jn))==null?void 0:V[0])==="}"||F==="}"&&((ne=ve.exec(Jn))==null?void 0:ne[0])==="{")continue;if(!Jn.includes(F)){let hs=Kn?"nextSibling":"previousSibling",yt=this[hs];for(;yt&&(yt.type!=="text"||!ve.test(yt.data));)yt=yt[hs];if(yt&&ve.exec(yt.data)[0]!==F)continue}}ce?E=E.toUpperCase():E==="{"&&bt==="-"&&Tt==="error"?(Tt="warning",U>0&&(E="-{",U--,ge--,Z=2)):E==="}"&&ke==="-"&&Tt==="error"&&(Tt="warning",U<r.length-1&&(E="}-",W++,Z=2));let ps=this.posFromIndex(U),{line:cs,character:ms}=Kt(I,j,ps.top+1,ps.left),Ut={rule:Pl[F],message:$.msg('lonely "$1"',ce||F==="h"||E==="-{"||E==="}-"?E:F),severity:Tt,startIndex:ge,endIndex:W,startLine:cs,endLine:cs,startCol:ms,endCol:ms+Z};if(F==="<")Ut.suggestions=[{desc:"escape",range:[ge,ge+1],text:"<"}];else if(F==="h"&&l!=="link-text"&&si.test(bt||""))Ut.suggestions=[{desc:"whitespace",range:[ge,ge],text:" "}];else if(F==="["&&l==="ext-link-text"){let ve=i.getAbsoluteIndex()+i.toString().length;Ut.suggestions=[{desc:"escape",range:[ve,ve+1],text:"]"}]}else if(F==="]"&&h==="free-ext-link"&&Tt==="error"){let ve=e-o.toString().length;Ut.fix={range:[ve,ve],text:"[",desc:"left bracket"}}else ce&&(Ut.suggestions=[...ie[0]===E?[]:[{desc:"uppercase",range:[ge,W],text:E}],...ke===":"||ke===":"?[{desc:"whitespace",range:[W,W+1],text:" "}]:[]]);u.push(Ut)}return u}replaceData(e){w(this,kn,Rs).call(this,e)}print(){return Qt(this.data)}};kn=new WeakSet,Rs=function(e){this.setAttribute("data",e)}});var Ne,wt=A(()=>{"use strict";me();Ne=(a=!0,n=!0)=>e=>{class t extends e{text(){return""}lint(i){return a?[]:super.lint(i)}}return qe(t,e),t}});var zr,be,St=A(()=>{"use strict";D();be=class extends S{constructor(e,t,r,i,s){super(e,r,i,s);y(this,zr);T(this,zr,t)}get type(){return c(this,zr)}lint(e=this.getAbsoluteIndex()){return super.lint(e,!1)}};zr=new WeakMap});var he,Ge=A(()=>{"use strict";me();he=({length:a})=>n=>{class e extends n{getAttribute(r){return r==="padding"?a:super.getAttribute(r)}}return qe(e,n),e}});var nr,ee,Ve=A(()=>{"use strict";D();ee=class extends S{constructor(e,t,r,i,s){super(e,r,i,s);y(this,nr);T(this,nr,t)}get type(){return c(this,nr)}set type(e){T(this,nr,e)}};nr=new WeakMap});var Rl,Bs,Ct,Re,Oe,oi,jl,Ae,Gr=A(()=>{"use strict";G();se();de();Ge();D();Ve();Rl=a=>a==="redirect-target"||a==="link";Bs=[he("[[")];Ae=class extends(jl=S){constructor(e,t,r,i=[],s="|"){super(void 0,r,i,{});y(this,Ct,!0);y(this,Re);y(this,Oe);if(this.insertAt(new ee(e,"link-target",r,i,{})),t!==void 0){let o=new S(t,r,i,{});o.type="link-text",o.setAttribute("stage",10),this.insertAt(o)}T(this,Re,s)}get link(){return c(this,Oe)}get fragment(){return c(this,Oe).fragment}afterBuild(){T(this,Oe,this.getTitle()),c(this,Re).includes("\0")&&T(this,Re,this.buildFromStr(c(this,Re),0)),this.setAttribute("name",c(this,Oe).title),super.afterBuild()}setAttribute(e,t){e==="bracket"?T(this,Ct,t):e==="title"?T(this,Oe,t):super.setAttribute(e,t)}toString(e){let t=super.toString(e,c(this,Re));return c(this,Ct)?`[[${t}]]`:t}text(){let e=super.text("|");return c(this,Ct)?`[[${e}]]`:e}getAttribute(e){return e==="title"?c(this,Oe):super.getAttribute(e)}getGaps(e){return e===0?c(this,Re).length:1}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{childNodes:[i,s],type:o}=this,{encoded:l,fragment:d}=c(this,Oe),p=new B(this,e);if(i.childNodes.some(({type:g})=>g==="template")&&r.push(L(i,p,"unknown-page","template in an internal link target","warning")),l){let g=L(i,p,"url-encoding","unnecessary URL encoding in an internal link");g.suggestions=[{desc:"decode",range:[g.startIndex,g.endIndex],text:st(i.text())}],r.push(g)}if(o==="link"||o==="category"){let g=s==null?void 0:s.childNodes.findIndex(m=>m.type==="text"&&m.data.includes("|")),u=s==null?void 0:s.childNodes[g];if(u){let m=L(s,p,"pipe-like",'additional "|" in the link text',"warning"),f=m.startIndex+s.getRelativeIndex(g);m.suggestions=[{desc:"escape",range:[f,f+u.data.length],text:u.data.replace(/\|/gu,"|")}],r.push(m)}}if(d!==void 0&&!Rl(o)){let g=L(i,p,"no-ignored","useless fragment","warning"),u=i.childNodes.findIndex(f=>f.type==="text"&&f.data.includes("#")),m=i.childNodes[u];m&&(g.fix={range:[g.startIndex+i.getRelativeIndex(u)+m.data.indexOf("#"),g.endIndex],text:"",desc:"remove"}),r.push(g)}return r}getTitle(e,t){return this.normalizeTitle(this.firstChild.text(),0,{halfParsed:t,temporary:e,decode:!0,selfLink:!0})}print(){return super.print(c(this,Ct)?{pre:"[[",post:"]]",sep:c(this,Re)}:{sep:c(this,Re)})}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t),{type:i,fragment:s}=this;return s!==void 0&&(i==="link"||i==="redirect-target")&&(r.fragment=s),r}};oi=q(jl),Ct=new WeakMap,Re=new WeakMap,Oe=new WeakMap,Ae=_(oi,0,"LinkBaseToken",Bs,Ae),O(oi,1,Ae)});var fe,at=A(()=>{"use strict";D();fe=class extends S{get innerText(){return this.firstChild.data}constructor(n="",e,t){super(n,e,t)}}});var qs,ai,Bl,K,Qe=A(()=>{"use strict";wt();at();qs=[Ne()];K=class extends(Bl=fe){get type(){return"noinclude"}toString(n){return n?"":super.toString()}};ai=q(Bl),K=_(ai,0,"NoincludeToken",qs,K),O(ai,1,K)});var vn,Os=A(()=>{"use strict";G();Gr();Qe();vn=class extends Ae{get type(){return"redirect-target"}constructor(n,e,t,r){super(n,void 0,t,r),e!==void 0&&this.insertAt(new K(e,t,r))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,{halfParsed:!0,decode:!0})}lint(n=this.getAbsoluteIndex()){let e=super.lint(n,!1);if(this.length===2){let t=L(this.lastChild,{start:n},"no-ignored","useless link text","warning");t.startIndex--,t.startCol--,t.fix={range:[t.startIndex,t.endIndex],text:"",desc:"remove"},e.push(t)}return e}}});var _s,lt,ir,li,ql,$t,Ms=A(()=>{"use strict";wt();D();St();Os();_s=[Ne(!1,!1)];$t=class extends(ql=S){constructor(e,t,r,i,s,o,l=[]){super(void 0,o,l);y(this,lt);y(this,ir);T(this,lt,e),T(this,ir,s),this.append(new be(t,"redirect-syntax",o,l),new vn(r,i==null?void 0:i.slice(1),o,l))}get type(){return"redirect"}getAttribute(e){return e==="padding"?c(this,lt).length:super.getAttribute(e)}toString(e){return c(this,lt)+super.toString(e)+c(this,ir)}lint(e=this.getAbsoluteIndex()){let t=e+c(this,lt).length+this.firstChild.toString().length;return this.lastChild.setAttribute("aIndex",t),this.lastChild.lint(t)}print(){return super.print({pre:c(this,lt),post:c(this,ir)})}};li=q(ql),lt=new WeakMap,ir=new WeakMap,$t=_(li,0,"RedirectToken",_s,$t),O(li,1,$t)});var Ds={};te(Ds,{parseRedirect:()=>Ol});var Ol,Ws=A(()=>{"use strict";X();Ms();Ol=(a,n,e)=>{var r;(r=n.regexRedirect)!=null||(n.regexRedirect=new RegExp(String.raw`^(\s*)((?:${n.redirection.join("|")})\s*(?::\s*)?)\[\[([^\n|\]]+)(\|.*?)?\]\](\s*)`,"iu"));let t=n.regexRedirect.exec(a);return t&&$.normalizeTitle(t[3],0,!1,n,{halfParsed:!0,temporary:!0,decode:!0}).valid?(a=`\0${e.length}o${a.slice(t[0].length)}`,new $t(...t.slice(1),n,e),a):!1}});var Hs,di,_l,Nt,Us=A(()=>{"use strict";Ge();D();Hs=[he("<onlyinclude>")];Nt=class extends(_l=S){get type(){return"onlyinclude"}toString(n){return`<onlyinclude>${super.toString(n)}</onlyinclude>`}isPlain(){return!0}print(){return super.print({pre:'<span class="wpb-ext"><onlyinclude></span>',post:'<span class="wpb-ext"></onlyinclude></span>'})}};di=q(_l),Nt=_(di,0,"OnlyincludeToken",Hs,Nt),O(di,1,Nt)});var dt,Vr=A(()=>{"use strict";me();dt=(a=1)=>n=>{class e extends n{getGaps(){return a}}return qe(e,n),e}});var zs,gt,gi,Ml,je,An=A(()=>{"use strict";Vr();D();zs=[dt()];je=class extends(Ml=S){constructor(e,t,r,i,s,o=[]){super(void 0,s);y(this,gt);le(this,"closed");le(this,"selfClosing");this.setAttribute("name",e.toLowerCase()),T(this,gt,[e,i||e]),this.closed=i!=="",this.selfClosing=i===void 0,this.append(t,r);let l=typeof t=="string"?-1:o.indexOf(t);o.splice(l===-1?1/0:l,0,this)}get innerText(){return this.selfClosing?void 0:this.lastChild.text()}toString(e){let{selfClosing:t,firstChild:r,lastChild:i}=this,[s,o]=c(this,gt);return t?`<${s}${r.toString(e)}/>`:`<${s}${r.toString(e)}>${i.toString(e)}${this.closed?`</${o}>`:""}`}text(){let[e,t]=c(this,gt);return this.selfClosing?`<${e}${this.firstChild.text()}/>`:`<${e}${super.text(">")}${this.closed?`</${t}>`:""}`}getAttribute(e){return e==="padding"?c(this,gt)[0].length+1:super.getAttribute(e)}print(){let[e,t]=c(this,gt);return super.print(this.selfClosing?{pre:`<${e}`,post:"/>"}:{pre:`<${e}`,sep:">",post:this.closed?`</${t}>`:""})}};gi=q(Ml),gt=new WeakMap,je=_(gi,0,"TagPairToken",zs,je),O(gi,1,je)});var Sn,Gs,wn,Vs=A(()=>{"use strict";D();An();St();Qe();wn=class extends je{constructor(e,t,r,i=[]){let s=new be(e,"translate-attr",r,i);t=t==null?void 0:t.replace(/(<tvar\|[^>]+>)([\s\S]*?)(<\/>)/gu,(l,d,p,g)=>(new K(d,r,i),new K(g,r,i),`\0${i.length-1}n${p}\0${i.length}n`)).replace(/(<tvar\s+name\s*=(?:\s*(?:(["'])[\s\S]*?\2|[^"'\s>]+))?\s*>)([\s\S]*?)(<\/tvar\s*>)/giu,(l,d,p,g,u)=>(new K(d,r,i),new K(u,r,i),`\0${i.length-1}n${g}\0${i.length}n`));let o=new S(t,r,i);o.type="translate-inner";super("translate",s,o,"translate",r,i);y(this,Sn);this.seal("closed",!0),this.seal("selfClosing",!0)}get type(){return"translate"}toString(e){return e?this.lastChild.toString(!0):super.toString()}text(){return this.lastChild.text()}print(){return`<span class="wpb-ext"><translate${w(this,Sn,Gs).call(this)?'<span class="wpb-ext-attrs"> <span class="wpb-ext-attr"><span class="wpb-attr-key">nowrap</span></span></span>':""}>${this.lastChild.print({class:"ext-inner"})}</translate></span>`}};Sn=new WeakSet,Gs=function(){return this.firstChild.toString()===" nowrap"}});var Qs,ui,Dl,It,Xs=A(()=>{"use strict";G();de();wt();X();An();Qs=[Ne(!1)];It=class extends(Dl=je){get type(){return"include"}constructor(n,e="",t,r,i,s){super(n,e,t!=null?t:"",t===void 0||r!=null?r:"",i,s)}toString(n){return n?"":super.toString()}lint(n=this.getAbsoluteIndex()){let e=[],{firstChild:t,closed:r,name:i}=this,s=new B(this,n);if(t.data.trim()){let o=L(t,s,"no-ignored","useless attribute","warning");o.suggestions=[{desc:"remove",range:[o.startIndex,o.endIndex],text:""}],e.push(o)}if(!r){let o=R(this,s,"unclosed-comment",$.msg("unclosed $1",`<${i}>`));o.suggestions=[{desc:"close",range:[o.endIndex,o.endIndex],text:`</${i}>`}],e.push(o)}return e}};ui=q(Dl),It=_(ui,0,"IncludeToken",Qs,It),O(ui,1,It)});var sr,Cn=A(()=>{"use strict";me();sr=(a=0)=>n=>{var t,Ks;class e extends n{constructor(){super(...arguments);y(this,t)}getAttr(o){return w(this,t,Ks).call(this).getAttr(o)}}return t=new WeakSet,Ks=function(){return this.childNodes[a]},qe(e,n),e}});var ae,Js,Ys,$n,ci,Zs,or,to,ro,no,pi,eo,_e,Nn,In,Ln,io,mi=A(()=>{"use strict";ae=new Set(["align"]),Js=new Set(["cite"]),Ys=new Set(["cite","datetime"]),$n=new Set(["width"]),ci=new Set(["axis","align","bgcolor","height","width","valign"]),Zs=new Set([...ci,"abbr","headers","scope","rowspan","colspan"]),or=new Set(["type"]),to=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),ro=new Set(["clear"]),no=new Set(["bgcolor","align","valign"]),pi=new Set(["qid","forcemathmode","type","display"]),eo=new Set(["enclose","inline","lang","line","linelinks","style","class","id","dir","copy","highlight","start"]),_e=new Set,Nn=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"]),In={div:ae,h1:ae,h2:ae,h3:ae,h4:ae,h5:ae,h6:ae,blockquote:Js,q:Js,p:ae,br:ro,pre:$n,ins:Ys,del:Ys,ul:or,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...to,"border"]),caption:ae,tr:no,td:Zs,th:Zs,img:new Set(["alt","src","width","height","srcset"]),font:new Set(["size","color","face"]),hr:$n,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:or,poem:ae,categorytree:ae,combooption:ae,math:_e,chem:_e,ce:_e},Ln={gallery:new Set(["mode","showfilename","caption","perrow","widths","heights","showthumbnails"]),poem:new Set(["compact"]),categorytree:new Set(["hideroot","onlyroot","depth","mode","hideprefix","namespaces","showcount","notranslations"]),combooption:new Set(["name","for","inline"]),nowiki:_e,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:_e,inputbox:_e,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:_e,poll:new Set(["id","show-results-before-voting"]),sm2:or,flashmp3:or,score:new Set(["line_width_inches","lang","override_midi","raw","note-language","override_audio","override_ogg","sound","vorbis"]),seo:new Set(["title","title_mode","title_separator","keywords","description","robots","google_bot","image","image_width","image_height","image_alt","type","site_name","locale","section","author","published_time","twitter_site"]),tab:new Set(["nested","name","index","class","block","inline","openname","closename","collapsed","dropdown","style","bgcolor","container","id","title"]),tabs:new Set(["plain","class","container","id","title","style"]),combobox:new Set(["placeholder","value","id","class","text","dropdown","style"]),math:new Set([...pi,"chem"]),chem:pi,ce:pi,hiero:_e,phonos:new Set(["ipa","class","text","lang","wikibase","file"]),section:new Set(["begin","end"]),source:eo,syntaxhighlight:eo,templatedata:_e,timeline:new Set(["method","font"]),quiz:new Set(["display","shuffleanswers","points","shuffle","case"]),languages:_e},io={table:to,td:new Set([...ci,"scope"]),th:ci,br:ro,caption:ae,div:ae,hr:$n,h1:ae,h2:ae,h3:ae,h4:ae,h5:ae,h6:ae,li:or,p:ae,pre:$n,tr:no,ul:or}});var Wl,Hl,Qr,ar,pe,Me,lr,so=A(()=>{"use strict";G();se();mi();de();X();D();Ve();Wl=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,Hl=new Set(["ext","arg","magic-word","template"]),lr=class extends S{constructor(e,t,r,i="",s,o=[],l=$.getConfig(),d=[]){let p=new ee(r,"attr-key",l,d),g;if(r==="title"||t==="img"&&r==="alt")g=new S(s,l,d,{}),g.type="attr-value",g.setAttribute("stage",10);else if(t==="gallery"&&r==="caption"||t==="choose"&&(r==="before"||r==="after")){let u={...l,excludes:[...l.excludes,"heading","html","table","hr","list"]};g=new S(s,u,d,{}),g.type="attr-value",g.setAttribute("stage",1)}else g=new ee(s,"attr-value",l,d,{});super(void 0,l,d);y(this,Qr);y(this,ar);y(this,pe);y(this,Me);T(this,Qr,e),this.append(p,g),T(this,pe,i),T(this,Me,[...o]),T(this,ar,t),this.setAttribute("name",Ue(ue(r)))}get type(){return c(this,Qr)}get tag(){return c(this,ar)}get balanced(){return!c(this,pe)||c(this,Me)[0]===c(this,Me)[1]}afterBuild(){c(this,pe).includes("\0")&&T(this,pe,this.buildFromStr(c(this,pe),0)),this.parentNode&&T(this,ar,this.parentNode.name),this.setAttribute("name",Ue(this.firstChild.text())),super.afterBuild()}toString(e){let[t="",r=""]=c(this,Me);return c(this,pe)?super.toString(e,c(this,pe)+t)+r:this.firstChild.toString(e)}text(){return c(this,pe)?`${super.text(`${c(this,pe).trim()}"`)}"`:this.firstChild.text()}getGaps(){var e,t;return c(this,pe)?c(this,pe).length+((t=(e=c(this,Me)[0])==null?void 0:e.length)!=null?t:0):0}lint(e=this.getAbsoluteIndex(),t){var x;let r=super.lint(e,t),{balanced:i,firstChild:s,lastChild:o,type:l,name:d,tag:p}=this,g=this.getValue(),u=new B(this,e);if(!i){let b=L(o,u,"unclosed-quote",$.msg("unclosed $1","quotes"),"warning");b.startIndex--,b.startCol--,b.suggestions=[{range:[b.endIndex,b.endIndex],text:c(this,Me)[0],desc:"close"}],r.push(b)}let m=Ln[p],f=In[p],{length:h}=this.toString();if(!(m!=null&&m.has(d))&&!(f!=null&&f.has(d))&&(l==="ext-attr"?m||f:!/\{\{[^{]+\}\}/u.test(d))&&(l==="ext-attr"&&!f||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(d)&&(p==="meta"||p==="link"||!Nn.has(d)))){let b=L(s,u,"illegal-attr","illegal attribute name");b.suggestions=[{desc:"remove",range:[e,e+h],text:""}],r.push(b)}else if(d==="style"&&typeof g=="string"&&Wl.test(g))r.push(L(o,u,"insecure-style","insecure style"));else if(d==="tabindex"&&typeof g=="string"&&g!=="0"){let b=L(o,u,"illegal-attr","nonzero tabindex");b.suggestions=[{desc:"remove",range:[e,e+h],text:""},{desc:"0 tabindex",range:[b.startIndex,b.endIndex],text:"0"}],r.push(b)}else if(l!=="ext-attr"&&!o.childNodes.some(({type:b})=>Hl.has(b))){let b=xn(p,d),k=String(g).toLowerCase();b.length>0&&b.every(C=>C!==k)&&r.push(L(o,u,"illegal-attr","illegal attribute value","warning"))}return(x=io[p])!=null&&x.has(d)&&r.push(L(s,u,"obsolete-attr","obsolete attribute","warning")),r}getValue(){return c(this,pe)?this.lastChild.text().trim():this.type==="ext-attr"||""}print(){let[e="",t=""]=c(this,Me);return c(this,pe)?super.print({sep:Qt(c(this,pe))+e,post:t}):super.print()}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return r.tag=this.tag,r}};Qr=new WeakMap,ar=new WeakMap,pe=new WeakMap,Me=new WeakMap});var oo,Ul,hi,Xr,ut,En=A(()=>{"use strict";G();se();de();X();D();Ve();so();oo=a=>a.slice(0,-1),Ul=a=>`${oo(a)}-dirty`;try{hi=new RegExp(String.raw`[\p{L}\p{N}]`,"u")}catch{hi=/[^\W_]/u}ut=class extends S{constructor(e,t,r,i,s=[]){super(void 0,i,s,{});y(this,Xr);if(T(this,Xr,t),this.setAttribute("name",r),e){let o=/([^\s/](?:(?!\0\d+~\x7F)[^\s/=])*)(?:((?:\s(?:\s|\0\d+[cn]\x7F)*)?(?:=|\0\d+~\x7F)(?:\s|\0\d+[cn]\x7F)*)(?:(["'])([\s\S]*?)(\3|$)|(\S*)))?/gu,l="",d=o.exec(e),p=0,g=()=>{l&&(super.insertAt(new ee(l,Ul(t),i,s,{})),l="")};for(;d;){let{index:u,0:m,1:f,2:h,3:x,4:b,5:k,6:C}=d;if(l+=e.slice(p,u),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(ue(f).trim())){let v=b!=null?b:C,I=[x,k],j=new lr(oo(t),r,f,h,v,I,i,s);g(),super.insertAt(j)}else l+=m;({lastIndex:p}=o),d=o.exec(e)}l+=e.slice(p),g()}}get type(){return c(this,Xr)}afterBuild(){let{parentNode:e}=this;(e==null?void 0:e.type)==="td"&&this.setAttribute("name",e.subtype),super.afterBuild()}getAttrTokens(e){return this.childNodes.filter(t=>t instanceof lr&&(!e||t.name===Ue(e)))}getAttrToken(e){let t=this.getAttrTokens(e);return t[t.length-1]}getAttr(e){var t;return(t=this.getAttrToken(e))==null?void 0:t.getValue()}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{parentNode:i,childNodes:s}=this,o=new Map,l=new Set,d=new B(this,e);if((i==null?void 0:i.type)==="html"&&i.closing&&this.text().trim()){let p=R(this,d,"no-ignored","attributes of a closing tag"),g=i.getAbsoluteIndex();p.suggestions=[{desc:"remove",range:[e,p.endIndex],text:""},{desc:"open",range:[g+1,g+2],text:""}],r.push(p)}for(let p of s)if(p instanceof lr){let{name:g}=p;o.has(g)?(l.add(g),o.get(g).push(p)):o.set(g,[p])}else{let g=p.text().trim();if(g){let u=L(p,d,"no-ignored","containing invalid attribute",hi.test(g)?"error":"warning");u.suggestions=[{desc:"remove",range:[u.startIndex,u.endIndex],text:" "}],r.push(u)}}if(l.size>0)for(let p of l){let g=o.get(p).map(u=>{let m=u.getValue();return[u,m===!0?"":m]});r.push(...g.map(([u,m],f)=>{let h=L(u,d,"no-duplicate",$.msg("duplicated $1 attribute",p)),x={desc:"remove",range:[h.startIndex,h.endIndex],text:""};return!m||g.slice(0,f).some(([,b])=>b===m)?h.fix=x:h.suggestions=[x],h}))}return r}print(){return this.toString()?`<span class="wpb-${this.type}">${this.childNodes.map(e=>e.print(e instanceof ee?{class:e.toString().trim()&&"attr-dirty"}:void 0)).join("")}</span>`:""}};Xr=new WeakMap});var ao={};te(ao,{PreToken:()=>fi});var fi,lo=A(()=>{"use strict";D();Qe();fi=class extends S{get type(){return"ext-inner"}constructor(n,e,t=[]){if(n){let r=/<nowiki>/giu,i=/<\/nowiki>/giu,{length:s}=r.source,o=r.exec(n);o&&(i.lastIndex=o.index+s);let l=i.exec(n),d=0,p="";for(;o&&l;)new K(o[0],e,t),new K(l[0],e,t),p+=`${n.slice(d,o.index)}\0${t.length-1}n${n.slice(o.index+s,l.index)}\0${t.length}n`,d=l.index+s+1,r.lastIndex=d,o=r.exec(n),o&&(i.lastIndex=o.index+s),l=i.exec(n);n=p+n.slice(d)}super(n,e,t,{}),this.setAttribute("stage",10)}isPlain(){return!0}lint(n=this.getAbsoluteIndex()){return super.lint(n,/<\s*\/\s*(pre)\b/giu)}}});var dr,Fn=A(()=>{"use strict";me();dr=a=>{class n extends a{toString(t){return super.toString(t,`
|
|
3
3
|
`)}text(){return super.text(`
|
|
4
4
|
`).replace(/\n\s*\n/gu,`
|
|
5
5
|
`)}getGaps(){return 1}print(){return super.print({sep:`
|
|
6
|
-
`})}}return
|
|
7
|
-
`).map(o=>i?o:Nt(o,t,r,n)).map(o=>new s(o,"param-line",t,r,{})))}r.splice(r.indexOf(this),1),r.push(this)}lint(n=this.getAbsoluteIndex()){let e=new j(this,n),t=$.msg("invalid parameter of <$1>",this.name),r=[];for(let i of this.childNodes){i.setAttribute("aIndex",n);let s=i.childNodes.filter(({type:o})=>o!=="comment"&&o!=="include"&&o!=="noinclude");if(s.some(({type:o})=>o==="ext"))r.push(E(i,e,"no-ignored",t));else{let o=s.findIndex(({type:d})=>d!=="text"),l=s.slice(0,o===-1?void 0:o).map(String).join("");if(l&&!(o===-1?/^[a-z]+(?:\[\])?\s*=/iu:/^[a-z]+(?:\[\])?\s*(?:=|$)/iu).test(l)){let d=E(i,e,"no-ignored",t);d.suggestions=[{desc:"remove",range:[d.startIndex,d.endIndex],text:""}],r.push(d)}else{let d=i.lint(n,!1);d.length>0&&r.push(...d)}}n+=i.toString().length+1}return r}};fi=q(Wl),pt=_(fi,0,"ParamTagToken",ao,pt),O(fi,1,pt)});var Kr,dr,Fn,gr,bi=k(()=>{"use strict";z();ce();le();Z();D();At();gr=class extends w{constructor(e,t,r,i=[]){super(void 0,r,i);y(this,dr);y(this,Kr);T(this,Kr,e);let s=new w(t[0],r,i);s.type="heading-title",s.setAttribute("stage",2);let o=new be(t[1],"heading-trail",r,i);this.append(s,o)}get type(){return"heading"}get level(){return c(this,Kr)}toString(e){let t=S(this,dr,Fn).call(this);return t+this.firstChild.toString(e)+t+this.lastChild.toString(e)}text(){let e=S(this,dr,Fn).call(this);return e+this.firstChild.text()+e}getAttribute(e){return e==="padding"?this.level:super.getAttribute(e)}getGaps(){return this.level}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{firstChild:i,level:s}=this,o=i.toString(),l=o.startsWith("="),d=l||o.endsWith("="),p=i.childNodes.filter(ur("quote")),g=p.filter(({bold:h})=>h),u=p.filter(({italic:h})=>h),m=new j(this,e);if(this.level===1){let h=E(i,m,"h1","<h1>");d||(h.suggestions=[{desc:"h2",range:[h.startIndex,h.endIndex],text:`=${o}=`}]),r.push(h)}if(d){let h=E(i,m,"unbalanced-header",$.msg("unbalanced $1 in a section header",'"="'));if(o!=="=")if(l){let[x]=/^=+/u.exec(o),b=s+x.length;h.suggestions=[{desc:`h${s}`,range:[h.startIndex,h.startIndex+x.length],text:""}],b<7&&h.suggestions.push({desc:`h${b}`,range:[h.endIndex,h.endIndex],text:x})}else{let x=/[^=](=+)$/u.exec(o)[1],b=s+x.length;h.suggestions=[{desc:`h${s}`,range:[h.endIndex-x.length,h.endIndex],text:""}],b<7&&h.suggestions.push({desc:`h${b}`,range:[h.startIndex,h.startIndex],text:x})}r.push(h)}this.closest("html-attrs,table-attrs")&&r.push(P(this,m,"parsing-order","section header in an HTML tag"));let f=this.getRootNode().toString();if(g.length%2){let h=E(g[g.length-1],{...m,start:e+s,left:m.left+s},"format-leakage",$.msg("unbalanced $1 in a section header","bold apostrophes")),x=e+s+o.length;f.slice(h.endIndex,x).trim()?h.suggestions=[{desc:"close",range:[x,x],text:"'''"}]:h.fix={desc:"remove",range:[h.startIndex,h.endIndex],text:""},r.push(h)}if(u.length%2){let h=E(u[u.length-1],{start:e+s},"format-leakage",$.msg("unbalanced $1 in a section header","italic apostrophes")),x=e+s+o.length;h.fix=f.slice(h.endIndex,x).trim()?{desc:"close",range:[x,x],text:"''"}:{desc:"remove",range:[h.startIndex,h.endIndex],text:""},r.push(h)}return r}print(){let e=S(this,dr,Fn).call(this);return super.print({pre:e,sep:e})}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return r.level=this.level,r}};Kr=new WeakMap,dr=new WeakSet,Fn=function(){return"=".repeat(this.level)}});var Hl,Pn,go=k(()=>{"use strict";ie();z();D();Hl=new RegExp(`https?://${De}${We}$`,"iu"),Pn=class extends w{get type(){return"parameter"}get anon(){return this.firstChild.length===0}get duplicated(){var n;try{return!!((n=this.parentNode)!=null&&n.getDuplicatedArgs().some(([e])=>e===this.name))}catch{return!1}}constructor(n,e,t,r=[]){super(void 0,t,r);let i=new w(typeof n=="number"?void 0:n,t,r,{}),s=new w(e,t,r);i.type="parameter-key",i.setAttribute("stage",2),s.type="parameter-value",s.setAttribute("stage",2),this.append(i,s)}trimName(n,e=!0){let t=(typeof n=="string"?n:n.toString(!0)).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1");return this.setAttribute("name",t),t}afterBuild(){if(!this.anon){let{parentNode:n,firstChild:e}=this,t=this.trimName(e);n&&n.getArgs(t,!1,!1).add(this)}super.afterBuild()}toString(n){return this.anon?this.lastChild.toString(n):super.toString(n,"=")}text(){return this.anon?this.lastChild.text():super.text("=")}getGaps(){return this.anon?0:1}lint(n=this.getAbsoluteIndex(),e){var s;let t=super.lint(n,e),{firstChild:r}=this,i=(s=Hl.exec(r.text()))==null?void 0:s[0];if(i&&new URL(i).search){let o=E(r,{start:n},"unescaped","unescaped query string in an anonymous parameter");o.startIndex=o.endIndex,o.startLine=o.endLine,o.startCol=o.endCol,o.endIndex++,o.endCol++,o.fix={range:[o.startIndex,o.endIndex],text:"{{=}}",desc:"escape"},t.push(o)}return t}print(){return super.print({sep:this.anon?"":"="})}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return Object.assign(t,{anon:this.anon},this.duplicated&&{duplicated:!0}),t}}});var uo,Jr,mt,It,Lt,pr,ht,Rn,po,Ti,Ul,ct,co=k(()=>{"use strict";ie();z();ce();le();Gr();D();go();Ge();At();uo=[dt()];ct=class extends(Ul=w){constructor(e,t,r,i=[]){var v,C;let s,o=/^(?:\s|\0\d+[cn]\x7F)*\0(\d+)h\x7F(?:\s|\0\d+[cn]\x7F)*/u.exec(e);o&&(s=Number(o[1]),e=e.replace(`\0${s}h`,i[s].toString().replace(/^\n/u,"")));super(void 0,r,i,{});y(this,ht);ae(this,"modifier","");y(this,Jr,"template");y(this,mt,":");y(this,It,!1);y(this,Lt,new Map);y(this,pr);let{parserFunction:[l,d],variable:p,functionHook:g}=r,u=(v=/^(?:\s|\0\d+[cn]\x7F)*\0\d+s\x7F/u.exec(e))==null?void 0:v[0];if(u)this.setAttribute("modifier",u),e=e.slice(u.length);else if(e.includes(":")){let[A,...I]=e.split(":"),[R]=/^(?:\s|\0\d+[cn]\x7F)*/u.exec((C=I[0])!=null?C:"");this.setModifier(`${A}:${R}`)&&(e=I.join(":").slice(R.length))}let m=e.search(/[::]/u),f=e[m]===":",h=m!==-1;if(h||t.length===0&&!c(this,It)){let A=h?e.slice(0,m):e,I=h&&e.slice(m+1),R=ge(A),U=h?R.slice(R.search(/\S/u))+(f?":":""):R.trim(),F=U.toLowerCase(),G=Array.isArray(d),Q=G?d.includes(U):Object.prototype.hasOwnProperty.call(d,U),ne=!G&&Q?d[U]:Object.prototype.hasOwnProperty.call(l,F)&&l[F],L=G&&Q||!("functionHook"in r)||g.includes(ne),B=G&&Q||p.includes(ne);if(h?ne&&L:B){this.setAttribute("name",ne||F.replace(/^#|:$/u,"")),T(this,Jr,"magic-word"),f&&T(this,mt,":");let H=new be(A,"magic-word-name",r,i);if(super.insertAt(H),I!==!1&&t.unshift([I]),this.name==="invoke")for(let N=0;N<2;N++){let oe=t.shift();if(!oe)break;let pe=new ee(oe.join("="),`invoke-${N?"function":"module"}`,r,i);super.insertAt(pe)}}}if(this.type==="template"){let A=ge(e).trim();if(!this.normalizeTitle(A,10,{halfParsed:!0,temporary:!0}).valid)throw i.pop(),new SyntaxError("Invalid template name");let I=new ee(e,"template-name",r,i,{});super.insertAt(I)}typeof s=="number"&&(i[s]=void 0);let x=this.isTemplate(),b=1;for(let A=0;A<t.length;A++){let I=t[A];x||this.name==="switch"&&A>0||this.name==="tag"&&A>1||(I[0]=I.join("="),I.length=1),I.length===1&&(I.unshift(b),b++),this.insertAt(new Pn(...I,r,i))}this.seal("modifier")}get type(){return c(this,Jr)}setModifier(e){let{parserFunction:[,,t,r]}=this.getAttribute("config"),i=ge(e).trim();if(e&&!i.endsWith(":"))return!1;let s=i.slice(0,-1).toLowerCase(),o=t.includes(s),l=r.includes(s);return c(this,It)&&o||!c(this,It)&&(l||e==="")||(de.running||this.length>1)&&(o||l||e==="")?(this.setAttribute("modifier",e),T(this,It,o),!!e):!1}isTemplate(){return this.type==="template"||this.name==="invoke"}getModule(){var e;if(this.type!=="magic-word"||this.name!=="invoke")throw new Error("TranscludeToken.getModule method is only for modules!");return[S(this,ht,Rn).call(this).title,(e=this.childNodes[2])==null?void 0:e.text().trim()]}afterBuild(){this.modifier.includes("\0")&&this.setAttribute("modifier",this.buildFromStr(this.modifier,0)),super.afterBuild(),this.isTemplate()&&this.type==="template"&&(T(this,pr,S(this,ht,Rn).call(this)),this.setAttribute("name",c(this,pr).title))}toString(e){return`{{${this.modifier}${this.type==="magic-word"?this.firstChild.toString(e)+(this.length===1?"":c(this,mt))+this.childNodes.slice(1).map(t=>t.toString(e)).join("|"):super.toString(e,"|")}}}`}text(){let{childNodes:e,length:t,firstChild:r,modifier:i,type:s,name:o}=this;return s==="magic-word"&&o==="vardefine"?"":`{{${i}${s==="magic-word"?r.text()+(t===1?"":c(this,mt))+Ce(e.slice(1),"|"):super.text("|")}}}`}getAttribute(e){switch(e){case"padding":return this.modifier.length+2;case"title":return c(this,pr);case"colon":return c(this,mt);default:return super.getAttribute(e)}}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t);if(!this.isTemplate())return r;let{type:i,childNodes:s,length:o}=this,l=new j(this,e),d=i==="magic-word";if(d&&!S(this,ht,Rn).call(this).valid)r.push(E(s[1],l,"invalid-invoke","illegal module name"));else{let g=s[d?1:0],u=g.childNodes.findIndex(f=>f.type==="text"&&kt(f.data).includes("#")),m=g.childNodes[u];if(m){let f=E(g,l,"no-ignored","useless fragment");f.fix={range:[f.startIndex+g.getRelativeIndex(u)+m.data.indexOf("#"),f.endIndex],text:"",desc:"remove"},r.push(f)}}if(d&&o===2)return r.push(P(this,l,"invalid-invoke","missing module function")),r;let p=this.getDuplicatedArgs().filter(([,g])=>!g[0].querySelector("ext"));if(p.length>0)for(let[,g]of p)r.push(...g.map(u=>{let m=E(u,l,"no-duplicate","duplicated parameter");return m.suggestions=[{desc:"remove",range:[m.startIndex-1,m.endIndex],text:""}],m}));return r}insertAt(e,t=this.length){return super.insertAt(e,t),e.anon?S(this,ht,po).call(this,e):e.name&&this.getArgs(e.name,!1,!1).add(e),e}getAllArgs(){return this.childNodes.filter(ur("parameter"))}getAnonArgs(){return this.getAllArgs().filter(({anon:e})=>e)}getArgs(e,t,r=!0){let i=String(e).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1"),s;return c(this,Lt).has(i)?s=c(this,Lt).get(i):(s=new Set(this.getAllArgs().filter(({name:o})=>i===o)),c(this,Lt).set(i,s)),s}getDuplicatedArgs(){return[...c(this,Lt)].filter(([,{size:e}])=>e>1).map(([e,t])=>[e,[...t]])}getPossibleValues(){let{type:e,name:t,childNodes:r}=this;if(e==="template")throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!");let i,s;switch(t){case"if":case"ifexist":case"ifexpr":case"iferror":i=2;break;case"ifeq":i=3;break;case"switch":{let o=r.slice(2),l=o[o.length-1];s=[...o.filter(({anon:d})=>!d),...l!=null&&l.anon?[l]:[]].map(({lastChild:d})=>d);break}default:throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!")}s!=null||(s=r.slice(i,i+2).map(({lastChild:o})=>o));for(let o=0;o<s.length;){let{length:l,0:d}=s[o].childNodes.filter(p=>p.text().trim());if(l===0)s.splice(o,1);else if(l>1||d.type!=="magic-word")o++;else try{let p=d.getPossibleValues();s.splice(o,1,...p),o+=p.length}catch{o++}}return s}print(){let{childNodes:e,length:t,firstChild:r,modifier:i,type:s}=this;return`<span class="wpb-${s}">{{${Vt(i)}${s==="magic-word"?r.print()+(t===1?"":c(this,mt))+Ue(e.slice(1),{sep:"|"}):Ue(e,{sep:"|"})}}}</span>`}};Ti=q(Ul),Jr=new WeakMap,mt=new WeakMap,It=new WeakMap,Lt=new WeakMap,pr=new WeakMap,ht=new WeakSet,Rn=function(){let e=this.type==="template";return this.normalizeTitle(this.childNodes[e?0:1].text(),e?10:828,{temporary:!0})},po=function(e){let t=this.getAnonArgs(),r=typeof e!="number";for(let i=r?t.indexOf(e):e-1;i<t.length;i++){let s=t[i],{name:o}=s,l=String(i+1);(o!==l||s===e)&&(s.setAttribute("name",l),this.getArgs(l,!1,!1).add(s))}},ct=_(Ti,0,"TranscludeToken",uo,ct),O(Ti,1,ct)});var mo,yi,zl,Et,ho=k(()=>{"use strict";vt();D();mo=[$e()];Et=class extends(zl=w){get type(){return"hidden"}};yi=q(zl),Et=_(yi,0,"HiddenToken",mo,Et),O(yi,1,Et)});var fo,jn,xo,ki,Gl,Ft,bo=k(()=>{"use strict";ie();z();le();ze();Gr();D();Ge();ho();fo=[me("{{{"),dt()];Ft=class extends(Gl=w){constructor(e,t,r=[]){super(void 0,t,r,{});y(this,jn);for(let i=0;i<e.length;i++){let s=e[i];if(i===0){let o=new ee(s,"arg-name",t,r,{});super.insertAt(o)}else if(i>1){let o=new Et(s,t,r);super.insertAt(o)}else{let o=new w(s,t,r);o.type="arg-default",o.setAttribute("stage",2),super.insertAt(o)}}}get type(){return"arg"}get default(){var e,t;return(t=(e=this.childNodes[1])==null?void 0:e.text())!=null?t:!1}toString(e){return`{{{${super.toString(e,"|")}}}}`}text(){return`{{{${Ce(this.childNodes.slice(0,2),"|")}}}}`}afterBuild(){S(this,jn,xo).call(this),super.afterBuild()}lint(e=this.getAbsoluteIndex(),t){let{childNodes:[r,i,...s]}=this;if(!this.getAttribute("include")){let l=P(this,{start:e},"no-arg","unexpected template argument");return i&&(l.suggestions=[{range:[e,l.endIndex],text:i.text(),desc:"expand"}]),[l]}r.setAttribute("aIndex",e+3);let o=r.lint(e+3,t);if(i){let l=e+4+r.toString().length;i.setAttribute("aIndex",l);let d=i.lint(l,t);d.length>0&&o.push(...d)}if(s.length>0){let l=new j(this,e);o.push(...s.map(d=>{let p=E(d,l,"no-ignored","invisible content inside triple braces");return p.startIndex--,p.startCol--,p.suggestions=[{desc:"remove",range:[p.startIndex,p.endIndex],text:""},{desc:"escape",range:[p.startIndex,p.startIndex+1],text:"{{!}}"}],p}))}return o}print(){return super.print({pre:"{{{",post:"}}}",sep:"|"})}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return r.default=this.default,r}};ki=q(Gl),jn=new WeakSet,xo=function(){this.setAttribute("name",this.firstChild.text().trim())},Ft=_(ki,0,"ArgToken",fo,Ft),O(ki,1,Ft)});var wo={};te(wo,{parseBraces:()=>Yr});var Vl,To,vi,yo,ko,vo,So,Ao,Yr,Bn=k(()=>{"use strict";Tt();ie();bi();co();bo();Vl={"=":String.raw`\n(?!(?:[^\S\n]|\0\d+[cn]\x7F)*\n)`,"{":String.raw`\}{2,}|\|`,"-":String.raw`\}-`,"[":String.raw`\]\]`},To=String.raw`\[(?!\[)`,vi=String.raw`\n(?![=\0])`,yo=String.raw`|\{{2,}`,ko=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"],["server","m"]]),vo=we(a=>new RegExp(a,"gmu"));So=new RegExp(String.raw`\{\{((?:[^\n{}[]|${To}|${vi})*)\}\}(?!\})`+"|"+String.raw`\[\[(?:[^\n[\]{]|${vi})*\]\]`+"|"+String.raw`-\{(?:[^\n{}[]|${To}|${vi})*\}-`,"gu");Ao=a=>{let n=He(ge(a));return ko.has(n)?ko.get(n):/^(?:filepath|(?:full|canonical)urle?):./u.test(n)?"m":/^#vardefine:./u.test(n)?"n":"t"},Yr=(a,n,e)=>{var f,h,x,b,v;let t=String.raw`${n.excludes.includes("heading")?"":String.raw`^((?:\0\d+[cno]\x7F)*)={1,6}|`}\[\[|-\{(?!\{)`,{parserFunction:[,,,r]}=n,i=[],s=[],o=(C,A,I,R)=>{A[A.length-1].push(je(C.slice(I,R),s))},l;do l!==void 0&&(a=l),l=a.replace(So,(C,A,I)=>{if(A!==void 0||typeof I=="string")try{let{length:R}=e,U=(A!=null?A:I).split("|");return new ct(je(U[0],s),U.slice(1).map(F=>{let G=F.indexOf("=");return(G===-1?[F]:[F.slice(0,G),F.slice(G+1)]).map(Q=>je(Q,s))}),n,e),`\0${R}${Ao(U[0])}`}catch(R){if(!(R instanceof SyntaxError)||R.message!=="Invalid template name")throw R}return s.push(je(C,s)),`\0${s.length-1}`});while(l!==a);a=l;let d=a.lastIndexOf("}}")-a.length,p=d+a.length!==-1,g=vo(t+(p?yo:"")),u=g.exec(a),m;for(;u||m!==void 0&&m<=a.length&&((h=(f=i[i.length-1])==null?void 0:f[0])!=null&&h.startsWith("="));){if(u!=null&&u[1]){let[,{length:B}]=u;u[0]=u[0].slice(B),u.index+=B}let{0:C,index:A}=u!=null?u:{0:`
|
|
8
|
-
`,index:a.length},I=(x=i.pop())!=null?x:{},{0:
|
|
9
|
-
`){m=
|
|
10
|
-
`)||(a=`${a.slice(0,
|
|
11
|
-
)`:""}(\s*)$`,"u")),
|
|
12
|
-
`))!=null?i:[]){let o=/^([^|]+)(?:\|(.*))?/u.exec(s);if(!o){super.insertAt(s.trim()?new K(s,t,r):s);continue}let[,l,d]=o;
|
|
13
|
-
`),i=new Set(e.protocol.split("|")),s=K,o=!0,l=!1;for(let d of r){let p=d.trim();if(!(l||!p||p.startsWith("#"))){if(o){let g=d.indexOf("|"),u=g===-1?d:d.slice(0,g),{valid:m,ns:f}=this.normalizeTitle(u,0,{halfParsed:!0,temporary:!0});if(m&&f===6){let h=new Xe("imagemap",u,g===-1?void 0:d.slice(g+1),e,t);super.insertAt(h),o=!1;continue}else l=!0}else if(d.trim().split(/[\t ]/u,1)[0]==="desc"){super.insertAt(d);continue}else if(d.includes("[")){let g=d.indexOf("["),u=d.slice(g),m=/^\[\[([^|]+)(?:\|([^\]]*))?\]\][\w\s]*$/u.exec(u);if(m){if(this.normalizeTitle(m[1],0,{halfParsed:!0,temporary:!0,selfLink:!0}).valid){super.insertAt(new tn(d.slice(0,g),m.slice(1),u.slice(u.indexOf("]]")+2),e,t));continue}}else if(u.startsWith("[//")||i.has(u.slice(1,u.indexOf(":")+1))||i.has(u.slice(1,u.indexOf("//")+2))){let f=/^\[([^\]\s]+)(?:(\s+(?!\s))([^\]]*))?\][\w\s]*$/u.exec(u);if(f){super.insertAt(new tn(d.slice(0,g),f.slice(1),u.slice(u.indexOf("]")+1),e,t));continue}}}}super.insertAt(new s(d,e,t))}}lint(n=this.getAbsoluteIndex(),e){let t=super.lint(n,e),r=new j(this,n);return this.image?t.push(...this.childNodes.filter(i=>{let s=i.toString().trim();return i.type==="noinclude"&&s&&!s.startsWith("#")}).map(i=>{let s=E(i,r,"invalid-imagemap","invalid link in <imagemap>");return s.suggestions=[{desc:"remove",range:[s.startIndex-1,s.endIndex],text:""},{desc:"comment",range:[s.startIndex,s.startIndex],text:"# "}],s})):t.push(P(this,r,"invalid-imagemap","<imagemap> without an image")),t}};Ri=q(ad),xr=_(Ri,0,"ImagemapToken",Do,xr),O(Ri,1,xr)});var Uo,ji,ld,Ze,Bi=k(()=>{"use strict";z();vt();ze();Z();at();Uo=[$e(!1),me("<!--")];Ze=class extends(ld=he){constructor(e,t,r,i){super(e,r,i);ae(this,"closed");this.closed=t}get type(){return"comment"}lint(e=this.getAbsoluteIndex()){if(this.closed)return[];let t=P(this,{start:e},"unclosed-comment",$.msg("unclosed $1","HTML comment"));return t.suggestions=[{range:[t.endIndex,t.endIndex],text:"-->",desc:"close"}],[t]}toString(e){return e?"":`<!--${this.innerText}${this.closed?"-->":""}`}print(){return super.print({pre:"<!--",post:this.closed?"-->":""})}};ji=q(ld),Ze=_(ji,0,"CommentToken",Uo,Ze),O(ji,1,Ze)});var zo={};te(zo,{CommentedToken:()=>qi});var qi,Go=k(()=>{"use strict";D();Bi();qi=class extends w{get type(){return"ext-inner"}constructor(n,e,t=[]){if(super(void 0,e,t,{AstText:":",CommentToken:":"}),n){let r=n.indexOf("<!--"),i=r!==-1&&n.indexOf("-->",r+4),s=0;for(;i!==!1&&i!==-1;)r>s&&this.insertAt(n.slice(s,r)),this.insertAt(new Ze(n.slice(r+4,i),!0,e,t)),s=i+3,r=n.indexOf("<!--",s),i=r!==-1&&n.indexOf("-->",r+4);s<n.length&&this.insertAt(n.slice(s))}}lint(n=this.getAbsoluteIndex()){return super.lint(n,/<\s*(?:\/\s*)?(hiero)\b/giu)}}});var Vo={};te(Vo,{NowikiToken:()=>Oi});var dd,gd,Oi,Qo=k(()=>{"use strict";Tt();z();Z();at();dd=we(a=>new RegExp(String.raw`<\s*(?:/\s*)${a==="nowiki"?"":"?"}(${a})\b`,"giu")),gd=new Set(["templatestyles","section","languages"]),Oi=class extends he{get type(){return"ext-inner"}lint(n=this.getAbsoluteIndex()){let{name:e,firstChild:{data:t}}=this;if(gd.has(e)&&t){let r=P(this,{start:n},"void-ext",$.msg("nothing should be in <$1>",e));return r.fix={range:[n,r.endIndex],text:"",desc:"empty"},[r]}return super.lint(n,dd(e))}}});var Xo,_i,ud,Qe,wi=k(()=>{"use strict";z();le();Z();wn();D();vn();Ln();Xo=[ir()];Qe=class extends(ud=Re){get type(){return"ext"}constructor(n,e,t,r,i=$.getConfig(),s=!1,o=[]){let l=n.toLowerCase(),d=new ut(!e||/^\s/u.test(e)?e:` ${e}`,"ext-attrs",l,i,o),p={...i,ext:i.ext.filter(u=>u!==l),excludes:[...i.excludes]},g;switch(p.inExt=!0,l){case"tab":p.ext=p.ext.filter(u=>u!=="tabs");case"indicator":case"poem":case"ref":case"option":case"combooption":case"tabs":case"poll":case"seo":case"langconvert":case"phonos":l==="poem"&&p.excludes.push("heading"),g=new w(t,p,o);break;case"pre":{let{PreToken:u}=(oo(),V(so));g=new u(t,p,o);break}case"dynamicpagelist":{let{ParamTagToken:u}=(xi(),V(lo));g=new u(s,t,p,o);break}case"inputbox":{let{InputboxToken:u}=($o(),V(Co));g=new u(s,t,p,o);break}case"references":{let{NestedToken:u}=(On(),V(qn));p.excludes.push("heading"),g=new u(t,s,["ref"],p,o);break}case"choose":{let{NestedToken:u}=(On(),V(qn));g=new u(t,/<(option|choicetemplate)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(\1)>)/gu,["option","choicetemplate"],p,o);break}case"combobox":{let{NestedToken:u}=(On(),V(qn));g=new u(t,/<(combooption)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(combooption\s*)>)/giu,["combooption"],p,o);break}case"gallery":{let{GalleryToken:u}=(Oo(),V(qo));g=new u(t,p,o);break}case"imagemap":{let{ImagemapToken:u}=(Ho(),V(Wo));g=new u(t,p,o);break}case"hiero":{let{CommentedToken:u}=(Go(),V(zo));g=new u(t,p,o);break}default:{let{NowikiToken:u}=(Qo(),V(Vo));g=new u(t,p,o)}}g.setAttribute("name",l),g.type==="plain"&&(g.type="ext-inner"),super(n,d,g,r,i,o),this.seal("closed",!0)}lint(n=this.getAbsoluteIndex(),e){let t=super.lint(n,e),r=new j(this,n);return this.name!=="nowiki"&&this.closest("html-attrs,table-attrs")&&t.push(P(this,r,"parsing-order","extension tag in HTML tag attributes")),this.name==="ref"&&this.closest("heading-title")&&t.push(P(this,r,"var-anchor","variable anchor in a section header")),t}};_i=q(ud),Qe=_(_i,0,"ExtToken",Xo,Qe),O(_i,1,Qe)});var Yo={};te(Yo,{parseCommentAndExt:()=>Nt});var Jo,pd,Mi,cd,Ko,Nt,Xr=k(()=>{"use strict";Tt();ie();Ws();Ve();zs();Vs();wi();Bi();Jo="<onlyinclude>",pd="</onlyinclude>",{length:Mi}=Jo,cd=[!1,!0].map(a=>{let n=a?"includeonly":"(?:no|only)include",e=a?"noinclude":"includeonly";return we(t=>new RegExp(String.raw`<!--[\s\S]*?(?:-->|$)|<${n}(?:\s[^>]*)?/?>|</${n}\s*>|<(${t.join("|")})(\s[^>]*?)?(?:/>|>([\s\S]*?)</(\1\s*)>)|<(${e})(\s[^>]*?)?(?:/>|>([\s\S]*?)(?:</(${e}\s*)>|$))`,"giu"))}),Ko=a=>{let n=a.indexOf(Jo);return{i:n,j:a.indexOf(pd,n+Mi)}},Nt=(a,n,e,t)=>{if(t){let{i:o,j:l}=Ko(a);if(o!==-1&&l!==-1){let d="",p=g=>{new K(g,n,e),d+=`\0${e.length-1}n`};for(;o!==-1&&l!==-1;){let g=`\0${e.length}e`;new Ct(a.slice(o+Mi,l),n,e),o>0&&p(a.slice(0,o)),d+=g,a=a.slice(l+Mi+1),{i:o,j:l}=Ko(a)}return a&&p(a),d}}let{ext:r}=n,i=r.filter(o=>o!=="translate"&&o!=="tvar"),s={...n,ext:i};if(r.includes("translate")){let o=[];a=a.replace(/<nowiki>[\s\S]*?<\/nowiki>/giu,l=>(o.push(l),`\0${o.length-1}`)).replace(/<translate( nowrap)?>([\s\S]+?)?<\/translate>/gu,(l,d,p)=>{let g=e.length;return new An(d,p&&je(p,o),s,e),`\0${g}g`}),a=je(a,o)}return a.replace(cd[t?1:0](i),(o,l,d,p,g,u,m,f,h)=>{let x=e.length,b="n";if(l)b="e",new Qe(l,d,p,g,s,u,e);else if(o.startsWith("<!--")){b="c";let v=o.endsWith("-->");new Ze(o.slice(4,v?-3:void 0),v,n,e)}else u?new $t(u,m,f,h,n,e):new K(o,n,e);return`\0${x}${b}`})}});var md,hd,fd,Zo,br,Me,ft,et,Di,xd,Rt,ea=k(()=>{"use strict";z();ce();le();wn();D();md=new Set(["if","ifeq","ifexpr","ifexist","iferror","switch"]),hd=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"]),fd=new Set(["strike","big","center","font","tt"]);Zo=[ir()];Rt=class extends(xd=w){constructor(e,t,r,i,s,o){super(void 0,s,o);y(this,br);y(this,Me);y(this,ft);y(this,et);this.insertAt(t),this.setAttribute("name",e.toLowerCase()),T(this,br,r),T(this,Me,i),T(this,ft,e)}get type(){return"html"}get selfClosing(){return c(this,Me)}get closing(){return c(this,br)}toString(e){return`<${this.closing?"/":""}${c(this,ft)}${super.toString(e)}${c(this,Me)?"/":""}>`}text(){let{closing:e}=this,t=c(this,ft)+(e?"":super.text());return`<${e?"/":""}${t}${c(this,Me)?"/":""}>`}getAttribute(e){return e==="padding"?c(this,ft).length+(this.closing?2:1):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{name:i,parentNode:s,closing:o,selfClosing:l}=this,d=new j(this,e);if(i==="h1"&&!o){let h=P(this,d,"h1","<h1>");h.suggestions=[{desc:"h2",range:[e+2,e+3],text:"2"}],r.push(h)}if(this.closest("table-attrs")){let h=P(this,d,"parsing-order","HTML tag in table attributes");h.fix={desc:"remove",range:[e,h.endIndex],text:""},r.push(h)}fd.has(i)&&r.push(P(this,d,"obsolete-tag","obsolete HTML tag","warning")),(i==="b"||i==="strong")&&this.closest("heading-title")&&r.push(P(this,d,"bold-header","bold in section header","warning"));let{html:[,p,g]}=this.getAttribute("config"),u=g.includes(i),m=p.includes(i);if(o&&(l||u)||l&&(!u&&!m)){let h=P(this,d,"unmatched-tag",o?"tag that is both closing and self-closing":"invalid self-closing tag"),x={desc:"open",range:[e+1,e+2],text:""},b={desc:"no self-closing",range:[h.endIndex-2,h.endIndex-1],text:""};m?h.suggestions=[x,b]:o?h.fix=u?x:b:h.suggestions=[b,{desc:"close",range:[h.endIndex-2,h.endIndex],text:`></${i}>`}],r.push(h)}else if(!this.findMatchingTag()){let h=P(this,d,"unmatched-tag",o?"unmatched closing tag":"unclosed tag");if(o){let x=this.closest("magic-word");x&&md.has(x.name)?h.severity="warning":h.suggestions=[{desc:"remove",range:[e,h.endIndex],text:""}]}else{let x=s==null?void 0:s.childNodes;hd.has(i)&&(x!=null&&x.slice(0,x.indexOf(this)).some(({type:b,name:v})=>b==="html"&&v===i))?h.suggestions=[{desc:"close",range:[e+1,e+1],text:"/"}]:this.closest("heading-title")||(h.severity="warning")}r.push(h)}return r}findMatchingTag(){return Fe(c(this,et),()=>{let{name:e,parentNode:t,closing:r,selfClosing:i}=this,{html:[,s,o]}=this.getAttribute("config"),l=o.includes(e),d=s.includes(e);if(l||d&&i)return this;if(!t)return;let{childNodes:p}=t,g=p.indexOf(this),u=r?p.slice(0,g).reverse():p.slice(g+1),m=[this],{rev:f}=de;for(let h of u)if(!(!h.is("html")||h.name!==e||d&&c(h,Me)))if(c(h,br)===r)m.push(h);else{let x=m.pop();if(x===this)return h;T(x,et,[f,h]),T(h,et,[f,x])}for(let h of m)T(h,et,[f,void 0])},e=>{T(this,et,e),e[1]&&e[1]!==this&&T(e[1],et,[de.rev,this])})}print(){return super.print({pre:`<${this.closing?"/":""}${c(this,ft)}`,post:`${c(this,Me)?"/":""}>`})}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return Object.assign(r,{closing:this.closing,selfClosing:c(this,Me)}),r}};Di=q(xd),br=new WeakMap,Me=new WeakMap,ft=new WeakMap,et=new WeakMap,Rt=_(Di,0,"HtmlToken",Zo,Rt),O(Di,1,Rt)});var ta={};te(ta,{parseHtml:()=>Td});var bd,Td,ra=k(()=>{"use strict";Ln();ea();bd=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,Td=(a,n,e)=>{var s;let{html:t}=n;(s=n.htmlElements)!=null||(n.htmlElements=new Set([...t[0],...t[1],...t[2]]));let r=a.split("<"),i=r.shift();for(let o of r){let l=bd.exec(o),d=l==null?void 0:l[2],p=d==null?void 0:d.toLowerCase();if(!l||!n.htmlElements.has(p)){i+=`<${o}`;continue}let[,g,,u="",m,f]=l,{length:h}=e,x=new ut(u,"html-attrs",p,n,e),b=x.getAttr("itemprop");if(p==="meta"&&(b===void 0||x.getAttr("content")===void 0)||p==="link"&&(b===void 0||x.getAttr("href")===void 0)){i+=`<${o}`,e.length=h;continue}i+=`\0${e.length}x${f}`,new Rt(d,x,g==="/",m==="/>",n,e)}return i}});var Tr,Wi=k(()=>{"use strict";wn();D();At();Ln();Tr=class extends ir(1)(w){constructor(n,e,t,r,i,s=[],o){super(void 0,i,s,o),this.append(new be(e,"table-syntax",i,s),new ut(r,"table-attrs",t,i,s))}}});var Ne,rn,nn,Hi,yr,Ui=k(()=>{"use strict";z();le();D();Wi();yr=class extends Tr{constructor(e,t,r,i=[]){var d;let s=/\||\0\d+!\x7F/u.exec(t!=null?t:""),o=s?t.slice(0,s.index):"";/\[\[|-\{/u.test(o)&&(s=null,o="");super(/^(?:\n[^\S\n]*(?:[|!]|\|\+|\{\{\s*!\s*\}\}\+?)|(?:\||\{\{\s*!\s*\}\}){2}|!!|\{\{\s*!!\s*\}\})$/u,e,"td",o,r,i);y(this,nn);y(this,Ne,"");y(this,rn);s&&([hn(this,Ne)._]=s);let l=new w(t==null?void 0:t.slice(((d=s==null?void 0:s.index)!=null?d:NaN)+c(this,Ne).length),r,i);l.type="td-inner",l.setAttribute("stage",4),this.insertAt(l)}get type(){return"td"}get rowspan(){return this.getAttr("rowspan")}get colspan(){return this.getAttr("colspan")}get subtype(){return S(this,nn,Hi).call(this).subtype}afterBuild(){c(this,Ne).includes("\0")&&T(this,Ne,this.buildFromStr(c(this,Ne),0)),super.afterBuild()}toString(e){let{childNodes:[t,r,i]}=this;return t.toString(e)+r.toString(e)+c(this,Ne)+i.toString(e)}text(){let{childNodes:[e,t,r]}=this;return e.text()+t.text()+c(this,Ne)+r.text()}getGaps(e){return e===1?c(this,Ne).length:0}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),i=new j(this,e+this.getRelativeIndex(this.length-1));for(let s of this.lastChild.childNodes)if(s.type==="text"){let{data:o}=s;if(o.includes("|")){let l=o.includes("||"),d=E(s,i,"pipe-like",'additional "|" in a table cell',l?"error":"warning");if(l){let p={caption:"|+",td:"|",th:"!"}[this.subtype];d.fix={range:[d.startIndex,d.endIndex],text:o.replace(/\|\|/gu,`
|
|
6
|
+
`})}}return qe(n,a),n}});var uo={};te(uo,{ParamTagToken:()=>pt});var go,xi,zl,pt,bi=A(()=>{"use strict";G();de();Kr();Fn();X();D();Ve();go=[dr];pt=class extends(zl=S){get type(){return"ext-inner"}constructor(n,e,t=$.getConfig(),r=[],i){if(super(void 0,t,r,{}),e){let s=ee;this.append(...e.split(`
|
|
7
|
+
`).map(o=>i?o:Lt(o,t,r,n)).map(o=>new s(o,"param-line",t,r,{})))}r.splice(r.indexOf(this),1),r.push(this)}lint(n=this.getAbsoluteIndex()){let e=new B(this,n),t=$.msg("invalid parameter of <$1>",this.name),r=[];for(let i of this.childNodes){i.setAttribute("aIndex",n);let s=i.childNodes.filter(({type:o})=>o!=="comment"&&o!=="include"&&o!=="noinclude");if(s.some(({type:o})=>o==="ext"))r.push(L(i,e,"no-ignored",t));else{let o=s.findIndex(({type:d})=>d!=="text"),l=s.slice(0,o===-1?void 0:o).map(String).join("");if(l&&!(o===-1?/^[a-z]+(?:\[\])?\s*=/iu:/^[a-z]+(?:\[\])?\s*(?:=|$)/iu).test(l)){let d=L(i,e,"no-ignored",t);d.suggestions=[{desc:"remove",range:[d.startIndex,d.endIndex],text:""}],r.push(d)}else{let d=i.lint(n,!1);d.length>0&&r.push(...d)}}n+=i.toString().length+1}return r}};xi=q(zl),pt=_(xi,0,"ParamTagToken",go,pt),O(xi,1,pt)});var Jr,gr,Pn,ur,Ti=A(()=>{"use strict";G();me();de();X();D();St();ur=class extends S{constructor(e,t,r,i=[]){super(void 0,r,i);y(this,gr);y(this,Jr);T(this,Jr,e);let s=new S(t[0],r,i);s.type="heading-title",s.setAttribute("stage",2);let o=new be(t[1],"heading-trail",r,i);this.append(s,o)}get type(){return"heading"}get level(){return c(this,Jr)}toString(e){let t=w(this,gr,Pn).call(this);return t+this.firstChild.toString(e)+t+this.lastChild.toString(e)}text(){let e=w(this,gr,Pn).call(this);return e+this.firstChild.text()+e}getAttribute(e){return e==="padding"?this.level:super.getAttribute(e)}getGaps(){return this.level}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{firstChild:i,level:s}=this,o=i.toString(),l=o.startsWith("="),d=l||o.endsWith("="),p=i.childNodes.filter(pr("quote")),g=p.filter(({bold:h})=>h),u=p.filter(({italic:h})=>h),m=new B(this,e);if(this.level===1){let h=L(i,m,"h1","<h1>");d||(h.suggestions=[{desc:"h2",range:[h.startIndex,h.endIndex],text:`=${o}=`}]),r.push(h)}if(d){let h=L(i,m,"unbalanced-header",$.msg("unbalanced $1 in a section header",'"="'));if(o!=="=")if(l){let[x]=/^=+/u.exec(o),b=s+x.length;h.suggestions=[{desc:`h${s}`,range:[h.startIndex,h.startIndex+x.length],text:""}],b<7&&h.suggestions.push({desc:`h${b}`,range:[h.endIndex,h.endIndex],text:x})}else{let x=/[^=](=+)$/u.exec(o)[1],b=s+x.length;h.suggestions=[{desc:`h${s}`,range:[h.endIndex-x.length,h.endIndex],text:""}],b<7&&h.suggestions.push({desc:`h${b}`,range:[h.startIndex,h.startIndex],text:x})}r.push(h)}this.closest("html-attrs,table-attrs")&&r.push(R(this,m,"parsing-order","section header in an HTML tag"));let f=this.getRootNode().toString();if(g.length%2){let h=L(g[g.length-1],{...m,start:e+s,left:m.left+s},"format-leakage",$.msg("unbalanced $1 in a section header","bold apostrophes")),x=e+s+o.length;f.slice(h.endIndex,x).trim()?h.suggestions=[{desc:"close",range:[x,x],text:"'''"}]:h.fix={desc:"remove",range:[h.startIndex,h.endIndex],text:""},r.push(h)}if(u.length%2){let h=L(u[u.length-1],{start:e+s},"format-leakage",$.msg("unbalanced $1 in a section header","italic apostrophes")),x=e+s+o.length;h.fix=f.slice(h.endIndex,x).trim()?{desc:"close",range:[x,x],text:"''"}:{desc:"remove",range:[h.startIndex,h.endIndex],text:""},r.push(h)}return r}print(){let e=w(this,gr,Pn).call(this);return super.print({pre:e,sep:e})}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return r.level=this.level,r}};Jr=new WeakMap,gr=new WeakSet,Pn=function(){return"=".repeat(this.level)}});var Gl,Rn,po=A(()=>{"use strict";se();G();D();Gl=new RegExp(`https?://${We}${He}$`,"iu"),Rn=class extends S{get type(){return"parameter"}get anon(){return this.firstChild.length===0}get duplicated(){var n;try{return!!((n=this.parentNode)!=null&&n.getDuplicatedArgs().some(([e])=>e===this.name))}catch{return!1}}constructor(n,e,t,r=[]){super(void 0,t,r);let i=new S(typeof n=="number"?void 0:n,t,r,{}),s=new S(e,t,r);i.type="parameter-key",i.setAttribute("stage",2),s.type="parameter-value",s.setAttribute("stage",2),this.append(i,s)}trimName(n,e=!0){let t=(typeof n=="string"?n:n.toString(!0)).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1");return this.setAttribute("name",t),t}afterBuild(){if(!this.anon){let{parentNode:n,firstChild:e}=this,t=this.trimName(e);n&&n.getArgs(t,!1,!1).add(this)}super.afterBuild()}toString(n){return this.anon?this.lastChild.toString(n):super.toString(n,"=")}text(){return this.anon?this.lastChild.text():super.text("=")}getGaps(){return this.anon?0:1}lint(n=this.getAbsoluteIndex(),e){var s;let t=super.lint(n,e),{firstChild:r}=this,i=(s=Gl.exec(r.text()))==null?void 0:s[0];if(i&&new URL(i).search){let o=L(r,{start:n},"unescaped","unescaped query string in an anonymous parameter");o.startIndex=o.endIndex,o.startLine=o.endLine,o.startCol=o.endCol,o.endIndex++,o.endCol++,o.fix={range:[o.startIndex,o.endIndex],text:"{{=}}",desc:"escape"},t.push(o)}return t}print(){return super.print({sep:this.anon?"":"="})}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return Object.assign(t,{anon:this.anon},this.duplicated&&{duplicated:!0}),t}}});var co,Yr,mt,Et,Ft,cr,ht,jn,mo,yi,Vl,ct,ho=A(()=>{"use strict";se();G();me();de();Vr();D();po();Ve();St();co=[dt()];ct=class extends(Vl=S){constructor(e,t,r,i=[]){var k,C;let s,o=/^(?:\s|\0\d+[cn]\x7F)*\0(\d+)h\x7F(?:\s|\0\d+[cn]\x7F)*/u.exec(e);o&&(s=Number(o[1]),e=e.replace(`\0${s}h`,i[s].toString().replace(/^\n/u,"")));super(void 0,r,i,{});y(this,ht);le(this,"modifier","");y(this,Yr,"template");y(this,mt,":");y(this,Et,!1);y(this,Ft,new Map);y(this,cr);let{parserFunction:[l,d],variable:p,functionHook:g}=r,u=(k=/^(?:\s|\0\d+[cn]\x7F)*\0\d+s\x7F/u.exec(e))==null?void 0:k[0];if(u)this.setAttribute("modifier",u),e=e.slice(u.length);else if(e.includes(":")){let[v,...I]=e.split(":"),[j]=/^(?:\s|\0\d+[cn]\x7F)*/u.exec((C=I[0])!=null?C:"");this.setModifier(`${v}:${j}`)&&(e=I.join(":").slice(j.length))}let m=e.search(/[::]/u),f=e[m]===":",h=m!==-1;if(h||t.length===0&&!c(this,Et)){let v=h?e.slice(0,m):e,I=h&&e.slice(m+1),j=ue(v),z=h?j.slice(j.search(/\S/u))+(f?":":""):j.trim(),P=z.toLowerCase(),V=Array.isArray(d),ne=V?d.includes(z):Object.prototype.hasOwnProperty.call(d,z),ie=!V&&ne?d[z]:Object.prototype.hasOwnProperty.call(l,P)&&l[P],N=V&&ne||!("functionHook"in r)||g.includes(ie),M=V&&ne||p.includes(ie);if(h?ie&&N:M){this.setAttribute("name",ie||P.replace(/^#|:$/u,"")),T(this,Yr,"magic-word"),f&&T(this,mt,":");let U=new be(v,"magic-word-name",r,i);if(super.insertAt(U),I!==!1&&t.unshift([I]),this.name==="invoke")for(let E=0;E<2;E++){let F=t.shift();if(!F)break;let ce=new ee(F.join("="),`invoke-${E?"function":"module"}`,r,i);super.insertAt(ce)}}}if(this.type==="template"){let v=ue(e).trim();if(!this.normalizeTitle(v,10,{halfParsed:!0,temporary:!0}).valid)throw i.pop(),new SyntaxError("Invalid template name");let I=new ee(e,"template-name",r,i,{});super.insertAt(I)}typeof s=="number"&&(i[s]=void 0);let x=this.isTemplate(),b=1;for(let v=0;v<t.length;v++){let I=t[v];x||this.name==="switch"&&v>0||this.name==="tag"&&v>1||(I[0]=I.join("="),I.length=1),I.length===1&&(I.unshift(b),b++),this.insertAt(new Rn(...I,r,i))}this.seal("modifier")}get type(){return c(this,Yr)}setModifier(e){let{parserFunction:[,,t,r]}=this.getAttribute("config"),i=ue(e).trim();if(e&&!i.endsWith(":"))return!1;let s=i.slice(0,-1).toLowerCase(),o=t.includes(s),l=r.includes(s);return c(this,Et)&&o||!c(this,Et)&&(l||!e)||(oe.running||this.length>1)&&(o||l||!e)?(this.setAttribute("modifier",e),T(this,Et,o),!!e):!1}isTemplate(){return this.type==="template"||this.name==="invoke"}getModule(){var e;if(this.type!=="magic-word"||this.name!=="invoke")throw new Error("TranscludeToken.getModule method is only for modules!");return[w(this,ht,jn).call(this).title,(e=this.childNodes[2])==null?void 0:e.text().trim()]}afterBuild(){this.modifier.includes("\0")&&this.setAttribute("modifier",this.buildFromStr(this.modifier,0)),super.afterBuild(),this.isTemplate()&&this.type==="template"&&(T(this,cr,w(this,ht,jn).call(this)),this.setAttribute("name",c(this,cr).title))}toString(e){return`{{${this.modifier}${this.type==="magic-word"?this.firstChild.toString(e)+(this.length===1?"":c(this,mt))+this.childNodes.slice(1).map(t=>t.toString(e)).join("|"):super.toString(e,"|")}}}`}text(){let{childNodes:e,length:t,firstChild:r,modifier:i,type:s,name:o}=this;return s==="magic-word"&&o==="vardefine"?"":`{{${i}${s==="magic-word"?r.text()+(t===1?"":c(this,mt))+$e(e.slice(1),"|"):super.text("|")}}}`}getAttribute(e){switch(e){case"padding":return this.modifier.length+2;case"title":return c(this,cr);case"colon":return c(this,mt);default:return super.getAttribute(e)}}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t);if(!this.isTemplate())return r;let{type:i,childNodes:s,length:o}=this,l=new B(this,e),d=i==="magic-word";if(d&&!w(this,ht,jn).call(this).valid)r.push(L(s[1],l,"invalid-invoke","illegal module name"));else{let g=s[d?1:0],u=g.childNodes.findIndex(f=>f.type==="text"&&At(f.data).includes("#")),m=g.childNodes[u];if(m){let f=L(g,l,"no-ignored","useless fragment","warning");f.fix={range:[f.startIndex+g.getRelativeIndex(u)+m.data.indexOf("#"),f.endIndex],text:"",desc:"remove"},r.push(f)}}if(d&&o===2)return r.push(R(this,l,"invalid-invoke","missing module function")),r;let p=this.getDuplicatedArgs().filter(([,g])=>!g[0].querySelector("ext"));if(p.length>0)for(let[,g]of p)r.push(...g.map(u=>{let m=L(u,l,"no-duplicate","duplicated parameter");return m.suggestions=[{desc:"remove",range:[m.startIndex-1,m.endIndex],text:""}],m}));return r}insertAt(e,t=this.length){return super.insertAt(e,t),e.anon?w(this,ht,mo).call(this,e):e.name&&this.getArgs(e.name,!1,!1).add(e),e}getAllArgs(){return this.childNodes.filter(pr("parameter"))}getAnonArgs(){return this.getAllArgs().filter(({anon:e})=>e)}getArgs(e,t,r=!0){let i=String(e).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1"),s;return c(this,Ft).has(i)?s=c(this,Ft).get(i):(s=new Set(this.getAllArgs().filter(({name:o})=>i===o)),c(this,Ft).set(i,s)),s}getDuplicatedArgs(){return[...c(this,Ft)].filter(([,{size:e}])=>e>1).map(([e,t])=>[e,[...t]])}getPossibleValues(){let{type:e,name:t,childNodes:r}=this;if(e==="template")throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!");let i,s;switch(t){case"if":case"ifexist":case"ifexpr":case"iferror":i=2;break;case"ifeq":i=3;break;case"switch":{let o=r.slice(2),l=o[o.length-1];s=[...o.filter(({anon:d})=>!d),...l!=null&&l.anon?[l]:[]].map(({lastChild:d})=>d);break}default:throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!")}s!=null||(s=r.slice(i,i+2).map(({lastChild:o})=>o));for(let o=0;o<s.length;){let{length:l,0:d}=s[o].childNodes.filter(p=>p.text().trim());if(l===0)s.splice(o,1);else if(l>1||d.type!=="magic-word")o++;else try{let p=d.getPossibleValues();s.splice(o,1,...p),o+=p.length}catch{o++}}return s}print(){let{childNodes:e,length:t,firstChild:r,modifier:i,type:s}=this;return`<span class="wpb-${s}">{{${Qt(i)}${s==="magic-word"?r.print()+(t===1?"":c(this,mt))+ze(e.slice(1),{sep:"|"}):ze(e,{sep:"|"})}}}</span>`}};yi=q(Vl),Yr=new WeakMap,mt=new WeakMap,Et=new WeakMap,Ft=new WeakMap,cr=new WeakMap,ht=new WeakSet,jn=function(){let e=this.type==="template";return this.normalizeTitle(this.childNodes[e?0:1].text(),e?10:828,{temporary:!0})},mo=function(e){let t=this.getAnonArgs(),r=typeof e!="number";for(let i=r?t.indexOf(e):e-1;i<t.length;i++){let s=t[i],{name:o}=s,l=String(i+1);(o!==l||s===e)&&(s.setAttribute("name",l),this.getArgs(l,!1,!1).add(s))}},ct=_(yi,0,"TranscludeToken",co,ct),O(yi,1,ct)});var fo,ki,Ql,Pt,xo=A(()=>{"use strict";wt();D();fo=[Ne()];Pt=class extends(Ql=S){get type(){return"hidden"}};ki=q(Ql),Pt=_(ki,0,"HiddenToken",fo,Pt),O(ki,1,Pt)});var bo,Bn,To,vi,Xl,Rt,yo=A(()=>{"use strict";se();G();de();Ge();Vr();D();Ve();xo();bo=[he("{{{"),dt()];Rt=class extends(Xl=S){constructor(e,t,r=[]){super(void 0,t,r,{});y(this,Bn);for(let i=0;i<e.length;i++){let s=e[i];if(i===0){let o=new ee(s,"arg-name",t,r,{});super.insertAt(o)}else if(i>1){let o=new Pt(s,t,r);super.insertAt(o)}else{let o=new S(s,t,r);o.type="arg-default",o.setAttribute("stage",2),super.insertAt(o)}}}get type(){return"arg"}get default(){var e,t;return(t=(e=this.childNodes[1])==null?void 0:e.text())!=null?t:!1}toString(e){return`{{{${super.toString(e,"|")}}}}`}text(){return`{{{${$e(this.childNodes.slice(0,2),"|")}}}}`}afterBuild(){w(this,Bn,To).call(this),super.afterBuild()}lint(e=this.getAbsoluteIndex(),t){let{childNodes:[r,i,...s]}=this;r.setAttribute("aIndex",e+3);let o=r.lint(e+3,t);if(i){let l=e+4+r.toString().length;i.setAttribute("aIndex",l);let d=i.lint(l,t);d.length>0&&o.push(...d)}if(s.length>0){let l=new B(this,e);o.push(...s.map(d=>{let p=L(d,l,"no-ignored","invisible content inside triple braces");return p.startIndex--,p.startCol--,p.suggestions=[{desc:"remove",range:[p.startIndex,p.endIndex],text:""},{desc:"escape",range:[p.startIndex,p.startIndex+1],text:"{{!}}"}],p}))}if(!this.getAttribute("include")){let l=R(this,{start:e},"no-arg","unexpected template argument","warning");i&&(l.suggestions=[{range:[e,l.endIndex],text:i.text(),desc:"expand"}]),o.push(l)}return o}print(){return super.print({pre:"{{{",post:"}}}",sep:"|"})}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return r.default=this.default,r}};vi=q(Xl),Bn=new WeakSet,To=function(){this.setAttribute("name",this.firstChild.text().trim())},Rt=_(vi,0,"ArgToken",bo,Rt),O(vi,1,Rt)});var $o={};te($o,{parseBraces:()=>Zr});var Kl,ko,Ai,vo,Ao,wo,Co,So,Zr,qn=A(()=>{"use strict";kt();se();Ti();ho();yo();Kl={"=":String.raw`\n(?!(?:[^\S\n]|\0\d+[cn]\x7F)*\n)`,"{":String.raw`\}{2,}|\|`,"-":String.raw`\}-`,"[":String.raw`\]\]`},ko=String.raw`\[(?!\[)`,Ai=String.raw`\n(?![=\0])`,vo=String.raw`|\{{2,}`,Ao=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"],["server","m"]]),wo=Ce(a=>new RegExp(a,"gmu"));Co=new RegExp(String.raw`\{\{((?:[^\n{}[]|${ko}|${Ai})*)\}\}(?!\})`+"|"+String.raw`\[\[(?:[^\n[\]{]|${Ai})*\]\]`+"|"+String.raw`-\{(?:[^\n{}[]|${ko}|${Ai})*\}-`,"gu");So=a=>{let n=Ue(ue(a));return Ao.has(n)?Ao.get(n):/^(?:filepath|(?:full|canonical)urle?):./u.test(n)?"m":/^#vardefine:./u.test(n)?"n":"t"},Zr=(a,n,e)=>{var f,h,x,b,k;let t=String.raw`${n.excludes.includes("heading")?"":String.raw`^((?:\0\d+[cno]\x7F)*)={1,6}|`}\[\[|-\{(?!\{)`,{parserFunction:[,,,r]}=n,i=[],s=[],o=(C,v,I,j)=>{v[v.length-1].push(Be(C.slice(I,j),s))},l;do l!==void 0&&(a=l),l=a.replace(Co,(C,v,I)=>{if(v!==void 0||typeof I=="string")try{let{length:j}=e,z=(v!=null?v:I).split("|");return new ct(Be(z[0],s),z.slice(1).map(P=>{let V=P.indexOf("=");return(V===-1?[P]:[P.slice(0,V),P.slice(V+1)]).map(ne=>Be(ne,s))}),n,e),`\0${j}${So(z[0])}`}catch(j){if(!(j instanceof SyntaxError)||j.message!=="Invalid template name")throw j}return s.push(Be(C,s)),`\0${s.length-1}`});while(l!==a);a=l;let d=a.lastIndexOf("}}")-a.length,p=d+a.length!==-1,g=wo(t+(p?vo:"")),u=g.exec(a),m;for(;u||m!==void 0&&m<=a.length&&((h=(f=i[i.length-1])==null?void 0:f[0])!=null&&h.startsWith("="));){if(u!=null&&u[1]){let[,{length:M}]=u;u[0]=u[0].slice(M),u.index+=M}let{0:C,index:v}=u!=null?u:{0:`
|
|
8
|
+
`,index:a.length},I=(x=i.pop())!=null?x:{},{0:j,index:z,parts:P,findEqual:V,pos:ne}=I,ie=C==="="&&V;if(C==="]]"||C==="}-")m=v+2;else if(C===`
|
|
9
|
+
`){m=v+1;let{pos:M,findEqual:U}=(b=i[i.length-1])!=null?b:{};if(M===void 0||U||ue(a.slice(M,z))!==""){let E=/^(={1,6})(.+)\1((?:\s|\0\d+[cn]\x7F)*)$/u.exec(a.slice(z,v));E&&(E[2]=Be(E[2],s),E[2].includes(`
|
|
10
|
+
`)||(a=`${a.slice(0,z)}\0${e.length}h${a.slice(v)}`,m=z+4+String(e.length).length,new ur(E[1].length,E.slice(2),n,e)))}}else if(C==="|"||ie)m=v+1,o(a,P,ne,v),C==="|"&&P.push([]),I.pos=m,I.findEqual=C==="|",i.push(I);else if(C.startsWith("}}")){let M=C.slice(0,Math.min(j.length,3)),U=j.length-M.length,{length:E}=e;m=v+M.length,o(a,P,ne,v);let F=!1,ce="t";if(M.length===3){let Z=P.map(W=>W.join("=")),ge=Z.length>1&&ue(Z[1]).trim();new Rt(Z,n,e),ge&&ge.endsWith(":")&&r.includes(ge.slice(0,-1).toLowerCase())&&(ce="s")}else try{new ct(P[0][0],P.slice(1),n,e),ce=So(P[0][0])}catch(Z){if(Z instanceof SyntaxError&&Z.message==="Invalid template name")F=!0;else throw Z}F||(a=`${a.slice(0,z+U)}\0${E}${ce}${a.slice(m)}`,m=z+U+3+String(E).length,U>1?i.push({0:j.slice(0,U),index:z,pos:z+U,parts:[[]]}):U===1&&a[z-1]==="-"&&i.push({0:"-{",index:z-1,pos:z+1,parts:[[]]}))}else m=v+C.length,C.startsWith("{")&&(u.pos=m,u.parts=[[]]),i.push(..."0"in I?[I]:[],u);let N=i[i.length-1];if(p&&d+a.length<m)for(p=!1;(k=N==null?void 0:N[0])!=null&&k.startsWith("{");)i.pop(),N=i[i.length-1];g=wo(t+(p?vo:"")+(N?`|${Kl[N[0][0]]}${N.findEqual?"|=":""}`:"")),g.lastIndex=m,u=g.exec(a)}return Be(a,s)}});var No={};te(No,{InputboxToken:()=>wi});var wi,Io=A(()=>{"use strict";Kr();qn();X();bi();wi=class extends pt{constructor(n,e,t=$.getConfig(),r=[]){let i=Symbol("InputboxToken"),s=t.excludes.includes("heading")?t:{...t,excludes:[...t.excludes,"heading"]},{length:o}=r;r.push(i),e&&(e=Lt(e,s,r,n)),e&&(e=Zr(e,s,r)),r.splice(o,1),super(n,e,s,r,{})}}});var On={};te(On,{NestedToken:()=>Si});var Jl,Yl,en,mr,Si,_n=A(()=>{"use strict";G();de();Kr();qn();X();D();Ci();Qe();Jl=new Set(["comment","include","arg","template","magic-word"]),Yl=[!1,!0].map(a=>{let n=a?"includeonly":"noinclude";return new RegExp(String.raw`^(?:<${n}(?:\s[^>]*)?/?>|</${n}\s*>)$`,"iu")}),Si=class extends S{constructor(e,t,r,i,s=[]){if(typeof t=="boolean"){let o=Symbol("InputboxToken"),{length:l}=s;s.push(o),e&&(e=Lt(e,i,s,t)),e&&(e=Zr(e,i,s)),s.splice(l,1)}else e&&(e=e.replace(t,(o,l,d,p,g)=>{let u=`\0${s.length+1}e`;return new Xe(l,d,p,g,i,!1,s),u}));e&&(e=e.replace(/(^|\0\d+.\x7F)([^\0]+)(?=$|\0\d+.\x7F)/gu,(o,l,d)=>(new K(d,i,s),`${l}\0${s.length}n`)));super(e,i,s);y(this,en);y(this,mr);T(this,en,[...r]),T(this,mr,t)}get type(){return"ext-inner"}lint(e=this.getAbsoluteIndex(),t){let r=new B(this,e),i=typeof c(this,mr)=="boolean"?Yl[c(this,mr)?1:0]:/^<!--[\s\S]*-->$/u;return[...super.lint(e,t),...this.childNodes.filter(s=>{let{type:o,name:l}=s;if(o==="ext")return!c(this,en).includes(l);if(Jl.has(o))return!1;let d=s.toString().trim();return d&&!i.test(d)}).map(s=>{let o=L(s,r,"no-ignored",$.msg("invalid content in <$1>",this.name));return o.suggestions=[{desc:"remove",range:[o.startIndex,o.endIndex],text:""},{desc:"comment",range:[o.startIndex,o.endIndex],text:`<!--${s.toString()}-->`}],o})]}};en=new WeakMap,mr=new WeakMap});function Lo(a,n,e,t,r){n=ue(n).trim();let i=n.replace(a==="link"?/\0\d+[tq]\x7F/gu:/\0\d+t\x7F/gu,"").trim();switch(a){case"width":return!i&&!!n||/^(?:\d+x?|\d*x\d+)(?:\s*px)?$/u.test(i);case"link":{if(i){if(Zl(e.protocol).test(i))return ed(e.protocol).test(i)&&n;i.startsWith("[[")&&i.endsWith("]]")&&(i=i.slice(2,-2))}else return n;let s=$.normalizeTitle(i,0,!1,e,{halfParsed:t,decode:!0,selfLink:!0});return s.valid&&s}case"lang":return(r==="svg"||r==="svgz")&&!/[^a-z\d-]/u.test(i);case"alt":case"class":case"manualthumb":return!0;case"page":return(r==="djvu"||r==="djv"||r==="pdf")&&Number(i)>0;default:return!!i&&!isNaN(i)}}var Zl,ed,td,rd,Te,Dn,Eo,Mn,Fo=A(()=>{"use strict";kt();se();G();X();D();Zl=Ce(a=>new RegExp(String.raw`^(?:${a}|//|\0\d+m\x7F)`,"iu")),ed=Ce(a=>new RegExp(String.raw`^(?:(?:${a}|//)${We}|\0\d+m\x7F)${He}$`,"iu")),td=Ce(a=>new RegExp(String.raw`^(\s*(?!\s))${a.replace("$1","(.*)")}${a.endsWith("$1")?`(?=$|
|
|
11
|
+
)`:""}(\s*)$`,"u")),rd=new Set(["alt","link","lang","page","caption"]);Mn=class extends S{constructor(e,t,r,i){var n=(...kc)=>(super(...kc),y(this,Dn),y(this,Te,""),this);let s,o=Object.entries(r.img).map(([d,p])=>[d,p,td(d)]),l=o.find(([,d,p])=>(s=p.exec(e),s&&(s.length!==4||Lo(d,s[2],r,!0,t)!==!1)));if(l&&s){s.length===3?(n(void 0,r,i),T(this,Te,e)):(n(s[2],r,i,{}),T(this,Te,s[1]+l[0]+s[3])),this.setAttribute("name",l[1]);return}n(e,r.excludes.includes("list")?r:{...r,excludes:[...r.excludes,"list"]},i),this.setAttribute("name","caption"),this.setAttribute("stage",7)}get type(){return"image-parameter"}get link(){return this.name==="link"?Lo("link",super.text(),this.getAttribute("config")):void 0}afterBuild(){var e;((e=this.parentNode)==null?void 0:e.type)==="gallery-image"&&!rd.has(this.name)&&this.setAttribute("name","invalid"),super.afterBuild()}toString(e){return c(this,Te)?c(this,Te).replace("$1",super.toString(e)):super.toString(e)}text(){return c(this,Te)?c(this,Te).replace("$1",super.text()).trim():super.text().trim()}isPlain(){return this.name==="caption"}getAttribute(e){return e==="padding"?Math.max(0,c(this,Te).indexOf("$1")):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{link:i,name:s}=this;if(s==="invalid"){let o=R(this,{start:e},"invalid-gallery","invalid image parameter");o.fix={range:[e-1,o.endIndex],text:"",desc:"remove"},r.push(o)}else if(typeof i=="object"&&i.encoded){let o=R(this,{start:e},"url-encoding","unnecessary URL encoding in an internal link");o.suggestions=[{desc:"decode",range:[e,o.endIndex],text:st(this.text())}],r.push(o)}return r}getValue(){return this.name==="invalid"?this.text():w(this,Dn,Eo).call(this)||super.text()}print(){return c(this,Te)?`<span class="wpb-image-parameter">${c(this,Te).replace("$1",`<span class="wpb-image-caption">${ze(this.childNodes)}</span>`)}</span>`:super.print({class:"image-caption"})}};Te=new WeakMap,Dn=new WeakSet,Eo=function(){return c(this,Te)&&!c(this,Te).includes("$1")}});var Po,nd,id,Ro,jo,sd,od,Bo,hr,$i=A(()=>{"use strict";G();de();X();Gr();Fo();Po=new Map([["manualthumb","Thumb"],["frameless","Frameless"],["framed","Frame"],["thumbnail","Thumb"]]),nd=new Set(["arg"]),id=new Set(["template","magic-word"]),Ro=new Set(["left","right","center","none"]),jo=new Set(["baseline","sub","super","top","text-top","middle","bottom","text-bottom"]),sd=new Set(["tiff","tif","png","gif","jpg","jpeg","webp","xcf","pdf","svg","djvu"]),od=a=>{if(a===void 0)return[];let n=/-\{|\}-|\|/gu,e=[],t=n.exec(a),r=0,i=0;for(;t;){let{0:s,index:o}=t;s!=="|"?r+=s==="-{"?1:-1:r===0&&(e.push(a.slice(i,o)),{lastIndex:i}=n),t=n.exec(a)}return e.push(a.slice(i)),e},Bo=(a,n)=>a.filter(({childNodes:e})=>{let t=e.filter(r=>r.text().trim());return t.length!==1||!n.has(t[0].type)}),hr=class extends Ae{get type(){return"file"}get extension(){return this.getAttribute("title").extension}constructor(n,e,t,r=[],i="|"){super(n,void 0,t,r,i);let{extension:s}=this.getTitle(!0,!0);this.safeAppend(od(e).map(o=>new Mn(o,s,t,r)))}lint(n=this.getAbsoluteIndex(),e){var f;let t=super.lint(n,e),r=Bo(this.getAllArgs(),nd),i=[...new Set(r.map(({name:h})=>h))],s=i.filter(h=>Po.has(h)),o=i.filter(h=>Ro.has(h)),l=i.filter(h=>jo.has(h)),[d]=s,p=d==="framed"||d==="manualthumb",g=new B(this,n);if(this.closest("ext-link-text")&&((f=this.getValue("link"))==null?void 0:f.trim())!==""&&t.push(R(this,g,"nested-link","internal link in an external link")),p)for(let h of r.filter(({name:x})=>x==="width")){let x=L(h,g,"invalid-gallery","invalid image parameter");x.fix={range:[x.startIndex-1,x.endIndex],text:"",desc:"remove"},t.push(x)}if(r.length===i.length&&s.length<2&&o.length<2&&l.length<2)return t;let u=(h,x,b=!0)=>k=>{let C=typeof b=="function"?b(k):b,v=L(k,g,"no-duplicate",$.msg(`${h} image $1 parameter`,x),C?"error":"warning");return v.suggestions=[{desc:"remove",range:[v.startIndex-1,v.endIndex],text:""}],v},{extension:m}=this;for(let h of i){if(h==="invalid"||h==="width"&&p)continue;let x=h==="caption",b=r.filter(({name:k})=>k===h);if(x&&(b=[...b.slice(0,-1).filter(k=>k.text()),...b.slice(-1)]),b.length>1){let k=!x||!m||sd.has(m);if(x&&k){let C=Bo(b,id);k=C.length>1&&(v=>C.includes(v))}t.push(...b.map(u("duplicated",h,k)))}}return s.length>1&&t.push(...r.filter(({name:h})=>Po.has(h)).map(u("conflicting","frame"))),o.length>1&&t.push(...r.filter(({name:h})=>Ro.has(h)).map(u("conflicting","horizontal-alignment"))),l.length>1&&t.push(...r.filter(({name:h})=>jo.has(h)).map(u("conflicting","vertical-alignment"))),t}getAllArgs(){return this.childNodes.slice(1)}getArgs(n){return this.getAllArgs().filter(({name:e})=>n===e)}getArg(n){let e=this.getArgs(n);return e[n==="manualthumb"?0:e.length-1]}getValue(n){var e;return(e=this.getArg(n))==null?void 0:e.getValue()}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e),{extension:r}=this;return r&&(t.extension=r),t}}});var qo,Ni,ad,Ke,Ii=A(()=>{"use strict";G();Ge();D();$i();qo=[he("")];Ke=class extends(ad=hr){constructor(e,t,r,i,s=[]){let o;if(r!==void 0){let{length:l}=s;o=new S(r,i,s);for(let d=1;d<11;d++)o.parseOnce();s.splice(l,1)}super(t,o==null?void 0:o.toString(),i,s);le(this,"privateType","imagemap-image");this.setAttribute("bracket",!1),this.privateType=`${e}-image`,this.seal("privateType",!0)}get type(){return this.privateType}getTitle(e){let t=this.type==="imagemap-image";return this.normalizeTitle(this.firstChild.toString(),t?0:6,{halfParsed:!0,temporary:e,decode:!t})}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{ns:i}=this.getAttribute("title");if(i!==6){let s=R(this,{start:e},"invalid-gallery","invalid gallery image");s.suggestions=[{desc:"prefix",range:[e,e],text:"File:"}],r.push(s)}return r}};Ni=q(ad),Ke=_(Ni,0,"GalleryImageToken",qo,Ke),O(Ni,1,Ke)});var Mo={};te(Mo,{GalleryToken:()=>fr});var Oo,jt,_o,Ei,Li,ld,fr,Do=A(()=>{"use strict";Fn();X();D();Ii();Qe();Oo=[dr];fr=class extends(ld=S){constructor(e,t,r=[]){var i;super(void 0,t,r,{});y(this,jt);for(let s of(i=e==null?void 0:e.split(`
|
|
12
|
+
`))!=null?i:[]){let o=/^([^|]+)(?:\|(.*))?/u.exec(s);if(!o){super.insertAt(s.trim()?new K(s,t,r):s);continue}let[,l,d]=o;w(this,jt,_o).call(this,l)?super.insertAt(new Ke("gallery",l,d,t,r)):super.insertAt(new K(s,t,r))}}get type(){return"ext-inner"}get widths(){return w(this,jt,Ei).call(this,"widths")}get heights(){return w(this,jt,Ei).call(this,"heights")}lint(e=this.getAbsoluteIndex(),t){let{top:r,left:i}=this.getRootNode().posFromIndex(e),s=[];for(let o=0;o<this.length;o++){let l=this.childNodes[o],d=l.toString(),{length:p}=d,g=d.trim(),{type:u}=l,m=r+o,f=o?0:i;if(l.setAttribute("aIndex",e),u==="noinclude"&&g&&!/^<!--.*-->$/u.test(g)){let h=e+p;s.push({rule:"no-ignored",message:$.msg("invalid content in <$1>","gallery"),severity:g.endsWith("-->")||/^(?:\||<!--)/u.test(g)?"warning":"error",startIndex:e,endIndex:h,startLine:m,endLine:m,startCol:f,endCol:f+p,suggestions:[{desc:"remove",range:[e,h],text:""},{desc:"comment",range:[e,h],text:`<!--${d}-->`}]})}else if(u!=="noinclude"&&u!=="text"){let h=l.lint(e,t);h.length>0&&s.push(...h)}e+=p+1}return s}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return Object.assign(r,{widths:this.widths,heights:this.heights}),r}};Li=q(ld),jt=new WeakSet,_o=function(e){return this.normalizeTitle(e,6,{halfParsed:!0,temporary:!0,decode:!0}).valid},Ei=function(e){var i,s;let t=(i=this.parentNode)==null?void 0:i.getAttr(e),r=typeof t=="string"&&((s=/^(\d+)\s*(?:px)?$/u.exec(t))==null?void 0:s[1]);return r&&Number(r)||120},fr=_(Li,0,"GalleryToken",Oo,fr),O(Li,1,fr)});var xr,Fi=A(()=>{"use strict";G();Gr();xr=class extends Ae{get type(){return"link"}lint(n=this.getAbsoluteIndex(),e){let t=super.lint(n,e);return this.closest("ext-link-text")&&t.push(R(this,{start:n},"nested-link","internal link in an external link")),t}}});var dd,gd,tn,Je,Wn=A(()=>{"use strict";G();se();de();X();D();dd=String.raw`(?:[${Fe}\t]| |�*160;|&#[xX]0*[aA]0;)`,gd=new RegExp(`${dd}+`,"gu"),Je=class extends S{constructor(e,t="free-ext-link",r=$.getConfig(),i){super(e,r,i,{});y(this,tn);T(this,tn,t)}get type(){return c(this,tn)}get innerText(){let e=new Map([["!","|"],["=","="]]),t=$e(this.childNodes.map(r=>{let{type:i}=r,s=String(r.name);return i==="magic-word"&&e.has(s)?e.get(s):r}));return this.type==="magic-link"&&(t=t.replace(gd," ")),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:Cs(e)}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),i=new B(this,e),{type:s,childNodes:o}=this;if(s==="magic-link"){let{link:g}=this;if(g.startsWith("ISBN")){let u=[...g.slice(5)].map(m=>m==="X"?10:Number(m));(u.length===10&&u.reduce((m,f,h)=>m+f*(10-h),0)%11||u.length===13&&(u[12]===10||u.reduce((m,f,h)=>m+f*(h%2?3:1),0)%10))&&r.push(R(this,i,"invalid-isbn","invalid ISBN"))}return r}let l=s==="ext-link-url",d=l?/\|/u:/[,;。:!?()]+/u,p=o.find(g=>g.type==="text"&&d.test(g.data));if(p){let{data:g}=p,u=L(p,i,"unterminated-url",$.msg("$1 in URL",l?'"|"':"full-width punctuation"),"warning"),{index:m,0:f}=d.exec(g),h=u.startIndex+m;u.suggestions=l?[{desc:"whitespace",range:[h,h+1],text:" "}]:[{desc:"whitespace",range:[h,h],text:" "},{desc:"escape",range:[h,h+f.length],text:encodeURI(f)}],r.push(u)}return r}getUrl(e){{let{type:t}=this,{link:r}=this;if(t==="magic-link"){if(r.startsWith("ISBN"))return this.normalizeTitle(`BookSources/${r.slice(5)}`,-1,{temporary:!0}).getUrl(e);r=r.startsWith("RFC")?`https://tools.ietf.org/html/rfc${r.slice(4)}`:`https://pubmed.ncbi.nlm.nih.gov/${r.slice(5)}`}else r.startsWith("//")&&(r=`https:${r}`);return new URL(r)}}};tn=new WeakMap});var Wo,Ye,Pi,ud,Ze,Ri=A(()=>{"use strict";G();Ge();D();Wn();Wo=[he("[")];Ze=class extends(ud=S){constructor(e,t="",r="",i,s=[]){super(void 0,i,s,{});y(this,Ye);let o=e&&/^\0\d+f\x7F$/u.test(e)?s[Number(e.slice(1,-2))]:new Je(e,"ext-link-url",i,s);if(this.insertAt(o),T(this,Ye,t),r){let l=new S(r,i,s,{});l.type="ext-link-text",l.setAttribute("stage",10),this.insertAt(l)}}get type(){return"ext-link"}toString(e){return this.length===1?`[${super.toString(e)}${c(this,Ye)}]`:`[${super.toString(e,c(this,Ye))}]`}text(){return`[${super.text(" ")}]`}getGaps(){return c(this,Ye).length}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t);return this.length===1&&this.closest("heading-title")&&r.push(R(this,{start:e},"var-anchor","variable anchor in a section header")),r}print(){return super.print(this.length===1?{pre:"[",post:`${c(this,Ye)}]`}:{pre:"[",sep:c(this,Ye),post:"]"})}};Pi=q(ud),Ye=new WeakMap,Ze=_(Pi,0,"ExtLinkToken",Wo,Ze),O(Pi,1,Ze)});var rn,Ho=A(()=>{"use strict";D();Qe();Fi();Ri();rn=class extends S{get type(){return"imagemap-link"}constructor(n,e,t,r,i=[]){super(void 0,r,i),this.append(n,e.length===2?new xr(...e,r,i):new Ze(...e,r,i),new K(t,r,i))}}});var zo={};te(zo,{ImagemapToken:()=>br});var Uo,ji,pd,br,Go=A(()=>{"use strict";G();me();de();Fn();X();D();Qe();Ii();Ho();Uo=[dr];br=class extends(pd=S){get type(){return"ext-inner"}get image(){return this.childNodes.find(pr("imagemap-image"))}constructor(n,e=$.getConfig(),t=[]){if(super(void 0,e,t,{}),!n)return;let r=n.split(`
|
|
13
|
+
`),i=new Set(e.protocol.split("|")),s=K,o=!0,l=!1;for(let d of r){let p=d.trim();if(!(l||!p||p.startsWith("#"))){if(o){let g=d.indexOf("|"),u=g===-1?d:d.slice(0,g),{valid:m,ns:f}=this.normalizeTitle(u,0,{halfParsed:!0,temporary:!0});if(m&&f===6){let h=new Ke("imagemap",u,g===-1?void 0:d.slice(g+1),e,t);super.insertAt(h),o=!1;continue}else l=!0}else if(d.trim().split(/[\t ]/u,1)[0]==="desc"){super.insertAt(d);continue}else if(d.includes("[")){let g=d.indexOf("["),u=d.slice(g),m=/^\[\[([^|]+)(?:\|([^\]]*))?\]\][\w\s]*$/u.exec(u);if(m){if(this.normalizeTitle(m[1],0,{halfParsed:!0,temporary:!0,selfLink:!0}).valid){super.insertAt(new rn(d.slice(0,g),m.slice(1),u.slice(u.indexOf("]]")+2),e,t));continue}}else if(u.startsWith("[//")||i.has(u.slice(1,u.indexOf(":")+1))||i.has(u.slice(1,u.indexOf("//")+2))){let f=/^\[([^\]\s]+)(?:(\s+(?!\s))([^\]]*))?\][\w\s]*$/u.exec(u);if(f){super.insertAt(new rn(d.slice(0,g),f.slice(1),u.slice(u.indexOf("]")+1),e,t));continue}}}}super.insertAt(new s(d,e,t))}}lint(n=this.getAbsoluteIndex(),e){let t=super.lint(n,e),r=new B(this,n);return this.image?t.push(...this.childNodes.filter(i=>{let s=i.toString().trim();return i.type==="noinclude"&&s&&!s.startsWith("#")}).map(i=>{let s=L(i,r,"invalid-imagemap","invalid link in <imagemap>");return s.suggestions=[{desc:"remove",range:[s.startIndex-1,s.endIndex],text:""},{desc:"comment",range:[s.startIndex,s.startIndex],text:"# "}],s})):t.push(R(this,r,"invalid-imagemap","<imagemap> without an image")),t}};ji=q(pd),br=_(ji,0,"ImagemapToken",Uo,br),O(ji,1,br)});var Vo,Bi,cd,et,qi=A(()=>{"use strict";G();wt();Ge();X();at();Vo=[Ne(!1),he("<!--")];et=class extends(cd=fe){constructor(e,t,r,i){super(e,r,i);le(this,"closed");this.closed=t}get type(){return"comment"}lint(e=this.getAbsoluteIndex()){if(this.closed)return[];let t=R(this,{start:e},"unclosed-comment",$.msg("unclosed $1","HTML comment"));return t.suggestions=[{range:[t.endIndex,t.endIndex],text:"-->",desc:"close"}],[t]}toString(e){return e?"":`<!--${this.innerText}${this.closed?"-->":""}`}print(){return super.print({pre:"<!--",post:this.closed?"-->":""})}};Bi=q(cd),et=_(Bi,0,"CommentToken",Vo,et),O(Bi,1,et)});var Qo={};te(Qo,{CommentedToken:()=>Oi});var Oi,Xo=A(()=>{"use strict";D();qi();Oi=class extends S{get type(){return"ext-inner"}constructor(n,e,t=[]){if(super(void 0,e,t,{AstText:":",CommentToken:":"}),n){let r=n.indexOf("<!--"),i=r!==-1&&n.indexOf("-->",r+4),s=0;for(;i!==!1&&i!==-1;)r>s&&this.insertAt(n.slice(s,r)),this.insertAt(new et(n.slice(r+4,i),!0,e,t)),s=i+3,r=n.indexOf("<!--",s),i=r!==-1&&n.indexOf("-->",r+4);s<n.length&&this.insertAt(n.slice(s))}}lint(n=this.getAbsoluteIndex()){return super.lint(n,/<\s*(?:\/\s*)?(hiero)\b/giu)}}});var Ko={};te(Ko,{NowikiToken:()=>_i});var md,hd,_i,Jo=A(()=>{"use strict";kt();G();X();at();md=Ce(a=>new RegExp(String.raw`<\s*(?:/\s*)${a==="nowiki"?"":"?"}(${a})\b`,"giu")),hd=new Set(["templatestyles","section","languages"]),_i=class extends fe{get type(){return"ext-inner"}lint(n=this.getAbsoluteIndex()){let{name:e,firstChild:{data:t}}=this;if(hd.has(e)&&t){let r=R(this,{start:n},"void-ext",$.msg("nothing should be in <$1>",e));return r.fix={range:[n,r.endIndex],text:"",desc:"empty"},[r]}return super.lint(n,md(e))}}});var Yo,Mi,fd,Xe,Ci=A(()=>{"use strict";G();de();X();Cn();D();An();En();Yo=[sr()];Xe=class extends(fd=je){get type(){return"ext"}constructor(n,e,t,r,i=$.getConfig(),s=!1,o=[]){let l=n.toLowerCase(),d=new ut(!e||/^\s/u.test(e)?e:` ${e}`,"ext-attrs",l,i,o),p={...i,ext:i.ext.filter(u=>u!==l),excludes:[...i.excludes]},g;switch(p.inExt=!0,l){case"tab":p.ext=p.ext.filter(u=>u!=="tabs");case"indicator":case"poem":case"ref":case"option":case"combooption":case"tabs":case"poll":case"seo":case"langconvert":case"phonos":l==="poem"&&p.excludes.push("heading"),g=new S(t,p,o);break;case"pre":{let{PreToken:u}=(lo(),Q(ao));g=new u(t,p,o);break}case"dynamicpagelist":{let{ParamTagToken:u}=(bi(),Q(uo));g=new u(s,t,p,o);break}case"inputbox":{let{InputboxToken:u}=(Io(),Q(No));g=new u(s,t,p,o);break}case"references":{let{NestedToken:u}=(_n(),Q(On));p.excludes.push("heading"),g=new u(t,s,["ref"],p,o);break}case"choose":{let{NestedToken:u}=(_n(),Q(On));g=new u(t,/<(option|choicetemplate)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(\1)>)/gu,["option","choicetemplate"],p,o);break}case"combobox":{let{NestedToken:u}=(_n(),Q(On));g=new u(t,/<(combooption)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(combooption\s*)>)/giu,["combooption"],p,o);break}case"gallery":{let{GalleryToken:u}=(Do(),Q(Mo));g=new u(t,p,o);break}case"imagemap":{let{ImagemapToken:u}=(Go(),Q(zo));g=new u(t,p,o);break}case"hiero":{let{CommentedToken:u}=(Xo(),Q(Qo));g=new u(t,p,o);break}default:{let{NowikiToken:u}=(Jo(),Q(Ko));g=new u(t,p,o)}}g.setAttribute("name",l),g.type==="plain"&&(g.type="ext-inner"),super(n,d,g,r,i,o),this.seal("closed",!0)}lint(n=this.getAbsoluteIndex(),e){let t=super.lint(n,e),r=new B(this,n);return this.name!=="nowiki"&&this.closest("html-attrs,table-attrs")&&t.push(R(this,r,"parsing-order","extension tag in HTML tag attributes")),this.name==="ref"&&this.closest("heading-title")&&t.push(R(this,r,"var-anchor","variable anchor in a section header")),t}};Mi=q(fd),Xe=_(Mi,0,"ExtToken",Yo,Xe),O(Mi,1,Xe)});var ta={};te(ta,{parseCommentAndExt:()=>Lt});var ea,xd,Di,bd,Zo,Lt,Kr=A(()=>{"use strict";kt();se();Us();Qe();Vs();Xs();Ci();qi();ea="<onlyinclude>",xd="</onlyinclude>",{length:Di}=ea,bd=[!1,!0].map(a=>{let n=a?"includeonly":"(?:no|only)include",e=a?"noinclude":"includeonly";return Ce(t=>new RegExp(String.raw`<!--[\s\S]*?(?:-->|$)|<${n}(?:\s[^>]*)?/?>|</${n}\s*>|<(${t.join("|")})(\s[^>]*?)?(?:/>|>([\s\S]*?)</(\1\s*)>)|<(${e})(\s[^>]*?)?(?:/>|>([\s\S]*?)(?:</(${e}\s*)>|$))`,"giu"))}),Zo=a=>{let n=a.indexOf(ea);return{i:n,j:a.indexOf(xd,n+Di)}},Lt=(a,n,e,t)=>{if(t){let{i:o,j:l}=Zo(a);if(o!==-1&&l!==-1){let d="",p=g=>{new K(g,n,e),d+=`\0${e.length-1}n`};for(;o!==-1&&l!==-1;){let g=`\0${e.length}e`;new Nt(a.slice(o+Di,l),n,e),o>0&&p(a.slice(0,o)),d+=g,a=a.slice(l+Di+1),{i:o,j:l}=Zo(a)}return a&&p(a),d}}let{ext:r}=n,i=r.filter(o=>o!=="translate"&&o!=="tvar"),s={...n,ext:i};if(r.includes("translate")){let o=[];a=a.replace(/<nowiki>[\s\S]*?<\/nowiki>/giu,l=>(o.push(l),`\0${o.length-1}`)).replace(/<translate( nowrap)?>([\s\S]+?)?<\/translate>/gu,(l,d,p)=>{let g=e.length;return new wn(d,p&&Be(p,o),s,e),`\0${g}g`}),a=Be(a,o)}return a.replace(bd[t?1:0](i),(o,l,d,p,g,u,m,f,h)=>{let x=e.length,b="n";if(l)b="e",new Xe(l,d,p,g,s,u,e);else if(o.startsWith("<!--")){b="c";let k=o.endsWith("-->");new et(o.slice(4,k?-3:void 0),k,n,e)}else u?new It(u,m,f,h,n,e):new K(o,n,e);return`\0${x}${b}`})}});var Td,yd,kd,ra,Tr,De,ft,tt,Wi,vd,Bt,na=A(()=>{"use strict";G();me();de();Cn();D();X();Td=new Set(["if","ifeq","ifexpr","ifexist","iferror","switch"]),yd=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"]),kd=new Set(["strike","big","center","font","tt"]);ra=[sr()];Bt=class extends(vd=S){constructor(e,t,r,i,s,o){super(void 0,s,o);y(this,Tr);y(this,De);y(this,ft);y(this,tt);this.insertAt(t),this.setAttribute("name",e.toLowerCase()),T(this,Tr,r),T(this,De,i),T(this,ft,e)}get type(){return"html"}get selfClosing(){return c(this,De)}get closing(){return c(this,Tr)}toString(e){return`<${this.closing?"/":""}${c(this,ft)}${super.toString(e)}${c(this,De)?"/":""}>`}text(){let{closing:e}=this,t=c(this,ft)+(e?"":super.text());return`<${e?"/":""}${t}${c(this,De)?"/":""}>`}getAttribute(e){return e==="padding"?c(this,ft).length+(this.closing?2:1):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{name:i,parentNode:s,closing:o,selfClosing:l}=this,d=new B(this,e);if(i==="h1"&&!o){let h=R(this,d,"h1","<h1>");h.suggestions=[{desc:"h2",range:[e+2,e+3],text:"2"}],r.push(h)}if(this.closest("table-attrs")){let h=R(this,d,"parsing-order","HTML tag in table attributes");h.fix={desc:"remove",range:[e,h.endIndex],text:""},r.push(h)}kd.has(i)&&r.push(R(this,d,"obsolete-tag","obsolete HTML tag","warning")),(i==="b"||i==="strong")&&this.closest("heading-title")&&r.push(R(this,d,"bold-header","bold in section header","warning"));let{html:[,p,g]}=this.getAttribute("config"),u=g.includes(i),m=p.includes(i);if(o&&(l||u)||l&&(!u&&!m)){let h=R(this,d,"unmatched-tag",o?"tag that is both closing and self-closing":"invalid self-closing tag"),x={desc:"open",range:[e+1,e+2],text:""},b={desc:"no self-closing",range:[h.endIndex-2,h.endIndex-1],text:""};m?h.suggestions=[x,b]:o?h.fix=u?x:b:h.suggestions=[b,{desc:"close",range:[h.endIndex-2,h.endIndex],text:`></${i}>`}],r.push(h)}else if(!this.findMatchingTag()){let h=R(this,d,"unmatched-tag",o?"unmatched closing tag":"unclosed tag");if(o){let x=this.closest("magic-word");x&&Td.has(x.name)?h.severity="warning":h.suggestions=[{desc:"remove",range:[e,h.endIndex],text:""}]}else{let x=s==null?void 0:s.childNodes;yd.has(i)&&(x!=null&&x.slice(0,x.indexOf(this)).some(({type:b,name:k})=>b==="html"&&k===i))?h.suggestions=[{desc:"close",range:[e+1,e+1],text:"/"}]:this.closest("heading-title")||(h.severity="warning")}r.push(h)}return r}findMatchingTag(){return Pe(c(this,tt),()=>{let{name:e,parentNode:t,closing:r,selfClosing:i}=this,{html:[,s,o]}=this.getAttribute("config"),l=o.includes(e),d=s.includes(e);if(l||d&&i)return this;if(!t)return;let{childNodes:p}=t,g=p.indexOf(this),u=r?p.slice(0,g).reverse():p.slice(g+1),m=[this],{rev:f}=oe;for(let h of u)if(!(!h.is("html")||h.name!==e||d&&c(h,De)))if(c(h,Tr)===r)m.push(h);else{let x=m.pop();if(x===this)return h;$.viewOnly&&(T(x,tt,[f,h]),T(h,tt,[f,x]))}if($.viewOnly)for(let h of m)T(h,tt,[f,void 0])},e=>{T(this,tt,e),e[1]&&e[1]!==this&&T(e[1],tt,[oe.rev,this])})}print(){return super.print({pre:`<${this.closing?"/":""}${c(this,ft)}`,post:`${c(this,De)?"/":""}>`})}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return Object.assign(r,{closing:this.closing,selfClosing:c(this,De)}),r}};Wi=q(vd),Tr=new WeakMap,De=new WeakMap,ft=new WeakMap,tt=new WeakMap,Bt=_(Wi,0,"HtmlToken",ra,Bt),O(Wi,1,Bt)});var ia={};te(ia,{parseHtml:()=>wd});var Ad,wd,sa=A(()=>{"use strict";En();na();Ad=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,wd=(a,n,e)=>{var s;let{html:t}=n;(s=n.htmlElements)!=null||(n.htmlElements=new Set([...t[0],...t[1],...t[2]]));let r=a.split("<"),i=r.shift();for(let o of r){let l=Ad.exec(o),d=l==null?void 0:l[2],p=d==null?void 0:d.toLowerCase();if(!l||!n.htmlElements.has(p)){i+=`<${o}`;continue}let[,g,,u="",m,f]=l,{length:h}=e,x=new ut(u,"html-attrs",p,n,e),b=x.getAttr("itemprop");if(p==="meta"&&(b===void 0||x.getAttr("content")===void 0)||p==="link"&&(b===void 0||x.getAttr("href")===void 0)){i+=`<${o}`,e.length=h;continue}i+=`\0${e.length}x${f}`,new Bt(d,x,g==="/",m==="/>",n,e)}return i}});var yr,Hi=A(()=>{"use strict";Cn();D();St();En();yr=class extends sr(1)(S){constructor(n,e,t,r,i,s=[],o){super(void 0,i,s,o),this.append(new be(e,"table-syntax",i,s),new ut(r,"table-attrs",t,i,s))}}});var Ie,nn,sn,Ui,kr,zi=A(()=>{"use strict";G();de();D();Hi();kr=class extends yr{constructor(e,t,r,i=[]){var d;let s=/\||\0\d+!\x7F/u.exec(t!=null?t:""),o=s?t.slice(0,s.index):"";/\[\[|-\{/u.test(o)&&(s=null,o="");super(/^(?:\n[^\S\n]*(?:[|!]|\|\+|\{\{\s*!\s*\}\}\+?)|(?:\||\{\{\s*!\s*\}\}){2}|!!|\{\{\s*!!\s*\}\})$/u,e,"td",o,r,i);y(this,sn);y(this,Ie,"");y(this,nn);s&&([fn(this,Ie)._]=s);let l=new S(t==null?void 0:t.slice(((d=s==null?void 0:s.index)!=null?d:NaN)+c(this,Ie).length),r,i);l.type="td-inner",l.setAttribute("stage",4),this.insertAt(l)}get type(){return"td"}get rowspan(){return this.getAttr("rowspan")}get colspan(){return this.getAttr("colspan")}get subtype(){return w(this,sn,Ui).call(this).subtype}afterBuild(){c(this,Ie).includes("\0")&&T(this,Ie,this.buildFromStr(c(this,Ie),0)),super.afterBuild()}toString(e){let{childNodes:[t,r,i]}=this;return t.toString(e)+r.toString(e)+c(this,Ie)+i.toString(e)}text(){let{childNodes:[e,t,r]}=this;return e.text()+t.text()+c(this,Ie)+r.text()}getGaps(e){return e===1?c(this,Ie).length:0}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),i=new B(this,e+this.getRelativeIndex(this.length-1));for(let s of this.lastChild.childNodes)if(s.type==="text"){let{data:o}=s;if(o.includes("|")){let l=o.includes("||"),d=L(s,i,"pipe-like",'additional "|" in a table cell',l?"error":"warning");if(l){let p={caption:"|+",td:"|",th:"!"}[this.subtype];d.fix={range:[d.startIndex,d.endIndex],text:o.replace(/\|\|/gu,`
|
|
14
14
|
${p}`),desc:"newline"}}else d.suggestions=[{desc:"escape",range:[d.startIndex,d.endIndex],text:o.replace(/\|/gu,"|")}];r.push(d)}}return r}isIndependent(){return this.firstChild.text().startsWith(`
|
|
15
|
-
`)}getAttr(e){let t=super.getAttr(e);return e==="rowspan"||e==="colspan"?parseInt(t)||1:t}print(){let{childNodes:[e,t,r]}=this;return`<span class="wpb-td">${e.print()}${t.print()}${c(this,
|
|
16
|
-
|}`,e){let t=this.getAttribute("config"),r=this.getAttribute("accum"),i=[n];
|
|
15
|
+
`)}getAttr(e){let t=super.getAttr(e);return e==="rowspan"||e==="colspan"?parseInt(t)||1:t}print(){let{childNodes:[e,t,r]}=this;return`<span class="wpb-td">${e.print()}${t.print()}${c(this,Ie)}${r.print()}</span>`}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t),{rowspan:i,colspan:s}=this;return Object.assign(r,{subtype:this.subtype},i!==1&&{rowspan:i},s!==1&&{colspan:s}),r}};Ie=new WeakMap,nn=new WeakMap,sn=new WeakSet,Ui=function(){return Pe(c(this,nn),()=>{var o;let e=this.firstChild.text(),t=e.slice(-1),r="td";if(t==="!"?r="th":t==="+"&&(r="caption"),this.isIndependent())return{subtype:r};let{previousSibling:i}=this;return{...w(o=i,sn,Ui).call(o)}},e=>{T(this,nn,e)})}});var Sd,Cd,Gi,vr,Vi=A(()=>{"use strict";G();Hi();zi();Sd=new Set(["tr","td","th","caption"]),Cd=new Set(["Template:!!","Template:!-"]),Gi=a=>{let n=a.childNodes.find(e=>e.text().trim());if(!n||n.type==="text"&&n.data.trim().startsWith("!")||n.type==="magic-word"&&n.name==="!"||n.type==="template"&&Cd.has(n.name)||n.is("html")&&Sd.has(n.name))return!1;if(n.is("arg"))return n.length>1&&Gi(n.childNodes[1]);if(n.is("magic-word"))try{let e=n.getPossibleValues().map(Gi);return e.includes("error")?"error":e.includes("warning")&&"warning"}catch{}return n.type==="template"||n.type==="magic-word"&&n.name==="invoke"?"warning":"error"},vr=class extends yr{lint(n=this.getAbsoluteIndex(),e){let t=super.lint(n,e),r=this.childNodes.find(({type:o})=>o==="table-inter");if(!r)return t;let i=Gi(r);if(!i)return t;let s=L(r,{start:n},"fostered-content","content to be moved out from the table",i);return s.startIndex++,s.startLine++,s.startCol=0,t.push(s),t}getRowCount(){return Number(this.childNodes.some(n=>n instanceof kr&&n.isIndependent()&&!n.firstChild.text().endsWith("+")))}}});var $d,Nd,Qi,Hn,oa=A(()=>{"use strict";G();me();de();X();Vi();St();$d=(a,n)=>new Array(a).fill(void 0).map((e,t)=>n(t)),Nd=({type:a})=>a==="tr"||a==="table-syntax",Qi=class extends Array{},Hn=class extends vr{get type(){return"table"}get closed(){return this.lastChild.type==="table-syntax"}constructor(n,e,t,r){super(/^(?:\{\||\{\{\{\s*!\s*\}\}|\{\{\s*\(!\s*\}\})$/u,n,"table",e,t,r,{})}lint(n=this.getAbsoluteIndex(),e){let t=super.lint(n,e),r=new B(this,n);this.closed||t.push(L(this.firstChild,r,"unclosed-table",$.msg("unclosed $1","table")));let i=this.getLayout(),{length:s}=i;if(s>1){let o=1,l=1/0,d=0;for(;d<s;d++){let p=i[d],g=p.length;if(g<o)break;g<l&&(l=g);let u=p.indexOf(p[g-1])+1;if(u>l)break;u>o&&(o=u)}if(d<s){let p=L(this.getNthRow(d),r,"table-layout","inconsistent table layout","warning");p.startIndex++,p.startLine++,p.startCol=0,t.push(p)}}return t}close(n=`
|
|
16
|
+
|}`,e){let t=this.getAttribute("config"),r=this.getAttribute("accum"),i=[n];oe.run(()=>{let s=new be(void 0,"table-syntax",t,r);super.insertAt(s)}),this.lastChild.safeReplaceChildren(i)}getLayout(n){let e=this.getAllRows(),{length:t}=e,r=Qi.from($d(t,()=>[]));for(let i=0;i<r.length;i++){let s=r[i],o=0,l=0,d;for(let p of e[i].childNodes.slice(2))if(p.type==="td"){if(p.isIndependent()&&(d=p.subtype!=="caption"),d){let g={row:i,column:o},{rowspan:u,colspan:m}=p;for(o++;s[l];)l++;for(let f=i;f<Math.min(i+u,t);f++)for(let h=l;h<l+m;h++)r[f][h]=g;l+=m}}else if(Nd(p))break}return r}getAllRows(){return[...super.getRowCount()?[this]:[],...this.childNodes.slice(1).filter(n=>n.type==="tr"&&n.getRowCount()>0)]}getNthRow(n,e,t){let r=super.getRowCount();if(n===0&&r)return this;r&&n--;for(let i of this.childNodes.slice(2)){let{type:s}=i;if(s==="tr"&&i.getRowCount()&&(n--,n<0))return i}}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return t.closed=this.closed,t}}});var Un,aa=A(()=>{"use strict";Vi();Un=class extends vr{get type(){return"tr"}constructor(n,e,t,r){super(/^\n[^\S\n]*(?:\|-+|\{\{\s*!\s*\}\}-+|\{\{\s*!-\s*\}\}-*)$/u,n,"tr",e,t,r)}}});var Ar,Xi=A(()=>{"use strict";at();Ar=class extends fe{get indent(){return this.innerText.split(":").length-1}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e),{indent:r}=this;return r&&(t.indent=r),t}}});var wr,Ki=A(()=>{"use strict";Xi();wr=class extends Ar{get type(){return"dd"}}});var da={};te(da,{parseTable:()=>Ld});var Id,la,Ld,ga=A(()=>{"use strict";D();oa();aa();zi();Ki();Id=a=>a.lastChild.constructor!==S,la=(a,n)=>a.type==="td"?n.pop():a,Ld=({firstChild:{data:a},type:n,name:e},t,r)=>{let i=[],s=a.split(`
|
|
17
17
|
`),o=n==="root"||n==="parameter-value"||n==="ext-inner"&&e==="poem"?"":`
|
|
18
|
-
${s.shift()}`,l,d=(p,g)=>{if(!g){o+=p;return}let{lastChild:u}=g;if(
|
|
19
|
-
${g}${C&&`\0${r.length-1}d`}${
|
|
18
|
+
${s.shift()}`,l,d=(p,g)=>{if(!g){o+=p;return}let{lastChild:u}=g;if(Id(g)){let m=new S(p,t,r);m.type="table-inter",m.setAttribute("stage",3),g.insertAt(m)}else u.setText(u.toString()+p)};for(let p of s){l=i.pop();let[g]=/^(?:\s|\0\d+[cno]\x7F)*/u.exec(p),u=p.slice(g.length),m=/^(:*)((?:\s|\0\d+[cn]\x7F)*)(\{\||\{(?:\0\d+[cn]\x7F)*\0\d+!\x7F|\0\d+\{\x7F)(.*)$/u.exec(u);if(m){for(;l&&l.type!=="td";)l=i.pop();let[,C,v,I,j]=m;C&&new wr(C,t,r),d(`
|
|
19
|
+
${g}${C&&`\0${r.length-1}d`}${v}\0${r.length}b`,l),i.push(...l?[l]:[],new Hn(I,j,t,r));continue}else if(!l){o+=`
|
|
20
20
|
${p}`;continue}let f=/^(?:(\|\}|\0\d+!\x7F\}|\0\d+\}\x7F)|(\|-+|\0\d+!\x7F-+|\0\d+-\x7F-*)(?!-)|(!|(?:\||\0\d+!\x7F)\+?))(.*)$/u.exec(u);if(!f){d(`
|
|
21
|
-
${p}`,l),i.push(l);continue}let[,h,x,b,
|
|
22
|
-
${g}${h}`,!0),d(
|
|
23
|
-
${g}${x}`,
|
|
24
|
-
${g}${b}`,U=F=>{let G=new yr(R,v.slice(I,A==null?void 0:A.index),t,r);return F.insertAt(G),G};for(;A;)U(l),{lastIndex:I}=C,[R]=A,A=C.exec(v);i.push(l,U(l))}}return o.slice(1)}});var Un,la=k(()=>{"use strict";at();Un=class extends he{get type(){return"hr"}}});var da,Ki,Cd,jt,ga=k(()=>{"use strict";vt();ze();at();da=[$e(),me("__")];jt=class extends(Cd=he){get type(){return"double-underscore"}constructor(n,e,t,r){var l,d;super(n,t,r);let i=n.toLowerCase(),{doubleUnderscore:[,,s,o]}=t;this.setAttribute("name",(d=e?(l=o==null?void 0:o[n])==null?void 0:l.toLowerCase():s==null?void 0:s[i])!=null?d:i)}toString(){return`__${this.innerText}__`}print(){return super.print({pre:"__",post:"__"})}};Ki=q(Cd),jt=_(Ki,0,"DoubleUnderscoreToken",da,jt),O(Ki,1,jt)});var ua={};te(ua,{parseHrAndDoubleUnderscore:()=>$d});var $d,pa=k(()=>{"use strict";la();ga();bi();$d=({firstChild:{data:a},type:n,name:e},t,r)=>{var l,d,p;let{doubleUnderscore:[i,s,o]}=t;return(l=t.insensitiveDoubleUnderscore)!=null||(t.insensitiveDoubleUnderscore=new Set(i)),(d=t.sensitiveDoubleUnderscore)!=null||(t.sensitiveDoubleUnderscore=new Set(s)),(p=t.regexHrAndDoubleUnderscore)!=null||(t.regexHrAndDoubleUnderscore=new RegExp(`__(${[...i,...s].join("|")})__`,"giu")),n!=="root"&&(n!=="ext-inner"||e!=="poem")&&(a=`\0${a}`),a=a.replace(/^((?:\0\d+[cno]\x7F)*)(-{4,})/gmu,(g,u,m)=>(new Un(m,t,r),`${u}\0${r.length-1}r`)).replace(t.regexHrAndDoubleUnderscore,(g,u)=>{var x;let m=t.sensitiveDoubleUnderscore.has(u),f=u.toLowerCase(),h=t.insensitiveDoubleUnderscore.has(f);return m||h?(new jt(u,m,t,r),`\0${r.length-1}${h&&((x=o==null?void 0:o[f])!=null?x:f)==="toc"?"u":"n"}`):g}).replace(/^((?:\0\d+[cn]\x7F)*)(={1,6})(.+)\2((?:\s|\0\d+[cn]\x7F)*)$/gmu,(g,u,m,f,h)=>{let x=`${u}\0${r.length}h`;return new gr(m.length,[f,h],t,r),x}),n==="root"||n==="ext-inner"&&e==="poem"?a:a.slice(1)}});var Sr,zn,ca=k(()=>{"use strict";z();le();Z();at();zn=class extends he{constructor(e,t,r,i){super(e,r,i);y(this,Sr);T(this,Sr,t)}get type(){return"quote"}get bold(){return this.innerText.length!==2}get italic(){return this.innerText.length!==3}get closing(){return{...this.bold?{bold:c(this,Sr).bold}:void 0,...this.italic?{italic:c(this,Sr).italic}:void 0}}text(){let{parentNode:e,innerText:t}=this;return(e==null?void 0:e.type)==="image-parameter"&&e.name!=="caption"?"":t}lint(e=this.getAbsoluteIndex()){let{previousSibling:t,nextSibling:r,bold:i,closing:s}=this,o=(t==null?void 0:t.type)==="text"?t.data:void 0,l=(r==null?void 0:r.type)==="text"?r.data:void 0,d=$.msg('lonely "$1"',"'"),p=[],g=new j(this,e),u=(m,f,h)=>[{desc:"escape",range:[m,f],text:"'".repeat(h)},{desc:"remove",range:[m,f],text:""}];if(o!=null&&o.endsWith("'")){let m=P(this,g,"lonely-apos",d,(s.bold||s.italic)&&(/[a-z\d]'$/iu.test(o)||l&&/^[a-z\d]/iu.test(l))?"warning":"error"),{startIndex:f,startLine:h,startCol:x}=m,[,{length:b}]=/(?:^|[^'])('+)$/u.exec(o),v=e-b;p.push({...m,startIndex:v,endIndex:f,endLine:h,startCol:x-b,endCol:x,suggestions:u(v,f,b)})}if(l!=null&&l.startsWith("'")){let m=P(this,g,"lonely-apos",d),{endIndex:f,endLine:h,endCol:x}=m,[{length:b}]=/^'+/u.exec(l),v=f+b;p.push({...m,startIndex:f,endIndex:v,startLine:h,startCol:x,endCol:x+b,suggestions:u(f,v,b)})}if(i&&this.closest("heading-title")){let m=P(this,g,"bold-header","bold in section header","warning");m.suggestions=[{desc:"remove",range:[e,e+3],text:""}],p.push(m)}return p}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return Object.assign(r,{bold:this.bold,italic:this.italic}),r}};Sr=new WeakMap});var ma={};te(ma,{parseQuotes:()=>Ji});var Ji,Yi=k(()=>{"use strict";ca();Ji=(a,n,e,t)=>{var m;let r=a.split(/('{2,})/u),{length:i}=r;if(i===1)return a;let s=0,o=0,l,d,p;for(let f=1;f<i;f+=2){let h=r[f].length;switch(h){case 2:o++;break;case 4:r[f-1]+="'",r[f]="'''";case 3:if(s++,l!==void 0)break;r[f-1].endsWith(" ")?d===void 0&&p===void 0&&(p=f):r[f-1].slice(-2,-1)===" "?l=f:d!=null||(d=f);break;default:r[f-1]+="'".repeat(h-5),r[f]="'''''",o++,s++}}if(o%2===1&&s%2===1){let f=(m=l!=null?l:d)!=null?m:p;f!==void 0&&(r[f]="''",r[f-1]+="'")}let g=!0,u=!0;for(let f=1;f<i;f+=2){let h=r[f].length,x=h!==2,b=h!==3;x&&(g=!g),b&&(u=!u),new zn(r[f],{bold:x&&g,italic:b&&u},n,e),r[f]=`\0${e.length-1}q`}return r.join("")}});var ha={};te(ha,{parseExternalLinks:()=>Zi});var Zi,es=k(()=>{"use strict";ie();Pi();Dn();Zi=(a,n,e,t)=>{var r;return(r=n.regexExternalLinks)!=null||(n.regexExternalLinks=new RegExp(String.raw`\[(\0\d+f\x7F|(?:(?:${n.protocol}|//)${De}|\0\d+m\x7F)${We}(?=[[\]<>"\t${Ee}]|\0\d))([${Ee}]*(?![${Ee}]))([^\]\x01-\x08\x0A-\x1F\uFFFD]*)\]`,"giu")),a.replace(n.regexExternalLinks,(i,s,o,l)=>{let{length:d}=e,p=/&[lg]t;/u.exec(s);return p&&(o="",l=s.slice(p.index)+o+l,s=s.slice(0,p.index)),t?(new Ke(s,"ext-link-url",n,e),`[\0${d}f${o}${l}]`):(new Ye(s,o,l,n,e),`\0${d}w`)})}});var Gn,fa=k(()=>{"use strict";ie();zr();Gn=class extends ve{get type(){return"category"}get sortkey(){let{childNodes:[,n]}=this;return n&&kt(n.text())}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e),{sortkey:r}=this;return r&&(t.sortkey=r),t}}});var ba={};te(ba,{parseLinks:()=>xa});var Nd,xa,Ta=k(()=>{"use strict";Z();Yi();es();Ei();Ci();fa();Nd=/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(\||\0\d+!\x7F)([\s\S]*)$/u,xa=(a,n,e,t)=>{var o;(o=n.regexLinks)!=null||(n.regexLinks=new RegExp(String.raw`^\s*(?:${n.protocol}|//)`,"iu"));let r=n.inExt?/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(?:(\||\0\d+!\x7F)([\s\S]*?[^\]]))?\]\]([\s\S]*)$/u:/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(?:(\||\0\d+!\x7F)([\s\S]*?[^\]])?)?\]\]([\s\S]*)$/u,i=a.split("[["),s=i.shift();for(let l=0;l<i.length;l++){let d=!1,p,g,u,m,f=i[l],h=r.exec(f);if(h)[,p,g,u,m]=h,m.startsWith("]")&&(u!=null&&u.includes("["))&&(u+="]",m=m.slice(1));else{let A=Nd.exec(f);A&&(d=!0,[,p,g,u]=A)}if(p===void 0||n.regexLinks.test(p)||/\0\d+[exhbru]\x7F/u.test(p)){s+=`[[${f}`;continue}let x=p.trim().startsWith(":");if(x&&d){s+=`[[${f}`;continue}let{ns:b,valid:v}=$.normalizeTitle(p,0,!1,n,{halfParsed:!0,temporary:!0,decode:!0,selfLink:!0});if(v){if(d){if(b!==6){s+=`[[${f}`;continue}let A=!1;for(l++;l<i.length;l++){let I=i[l],R=I.split("]]");if(R.length>2){A=!0,u+=`[[${R[0]}]]${R[1]}`,m=R.slice(2).join("]]");break}else if(R.length===2)u+=`[[${R[0]}]]${R[1]}`;else{u+=`[[${I}`;break}}if(u=xa(u,n,e,t),!A){s+=`[[${p}${g}${u}`;continue}}}else{s+=`[[${f}`;continue}u&&(u=Ji(u,n,e,t));let C=fr;x||(b===6?(u&&(u=Zi(u,n,e,!0)),C=mr):b===14&&(C=Gn)),u===void 0&&g&&(u=""),s+=`\0${e.length}l${m}`,new C(p,u,n,e,g)}return s}});var Sa={};te(Sa,{parseMagicLinks:()=>Id});var Aa,ya,ka,va,Id,wa=k(()=>{"use strict";ie();Dn();Aa=String.raw`[${Ee}\t]| |�*160;|�*a0;`,ya=`(?:${Aa})+`,ka=`(?:${Aa}|-)`,va=String.raw`(?:RFC|PMID)${ya}\d+\b|ISBN${ya}(?:97[89]${ka}?)?(?:\d${ka}?){9}[\dx]\b`,Id=(a,n,e)=>{if(!n.regexMagicLinks)try{n.regexMagicLinks=new RegExp(String.raw`(^|[^\p{L}\p{N}_])(?:(?:${n.protocol})(${De}${We})|${va})`,"giu")}catch{n.regexMagicLinks=new RegExp(String.raw`(^|\W)(?:(?:${n.protocol})(${De}${We})|${va})`,"giu")}return a.replace(n.regexMagicLinks,(t,r,i)=>{let s=r?t.slice(r.length):t;if(i){let o="",l=/&(?:lt|gt|nbsp|#x0*(?:3[ce]|a0)|#0*(?:6[02]|160));/iu.exec(s);l&&(o=s.slice(l.index),s=s.slice(0,l.index));let d=s.includes("(")?/[^,;\\.:!?][,;\\.:!?]+$/u:/[^,;\\.:!?)][,;\\.:!?)]+$/u,p=d.exec(s);if(p){let g=1;p[0][1]===";"&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(s.slice(0,p.index))&&(g=2),o=s.slice(p.index+g)+o,s=s.slice(0,p.index+g)}return o.length>=i.length?t:(new Ke(s,void 0,n,e),`${r}\0${e.length-1}w${o}`)}else if(!/^(?:RFC|PMID|ISBN)/u.test(s))return t;return new Ke(s,"magic-link",n,e),`${r}\0${e.length-1}i`})}});var Ca,$a=k(()=>{"use strict";Ca=(a,n)=>a.startsWith(n)?n.length:[...n].findIndex((e,t)=>e!==a[t])});var Vn,Na=k(()=>{"use strict";Qi();Vn=class extends vr{get type(){return"list"}}});var Ia={};te(Ia,{parseList:()=>Ld});var Ld,La=k(()=>{"use strict";$a();Na();Xi();Ld=(a,n,e,t)=>{let r=/^((?:\0\d+[cno]\x7F)*)([;:*#]+\s*)/u.exec(a);if(!r)return n.lastPrefix="",a;let[i,s,o]=r,l=o.replace(/;/gu,":"),d=Ca(l,n.lastPrefix),p=(d>1?o.slice(d-1):o).split(/(?=;)/u),g=p[0].startsWith(";"),u=p.length-(g?0:1);if(d>1){let F=o.slice(0,d-1);g?p.unshift(F):p[0]=F+p[0]}n.lastPrefix=l;let m=s+p.map((F,G)=>`\0${t.length+G}d`).join("")+a.slice(i.length);for(let F of p)new Vn(F,e,t);if(!u)return m;let{html:[f]}=e,h=/:+|-\{|\0\d+[xq]\x7F/gu,x=h,b=x.exec(m),v=0,C=!1,A=!1,I=0,R=(F,G)=>(new Ar(F,e,t),`${m.slice(0,G)}\0${t.length-1}d${m.slice(G+F.length)}`),U=F=>{F?v&&v--:v++};for(;b&&u;){let{0:F,index:G}=b;if(F==="-{"){if(!I){let{lastIndex:Q}=x;x=/-\{|\}-/gu,x.lastIndex=Q}I++}else if(F==="}-"){if(I--,!I){let{lastIndex:Q}=x;x=h,x.lastIndex=Q}}else if(F.endsWith("x")){let{name:Q,closing:ne,selfClosing:L}=t[Number(F.slice(1,-2))];(!L||f.includes(Q))&&U(ne)}else if(F.endsWith("q")){let{bold:Q,italic:ne}=t[Number(F.slice(1,-2))];Q&&(U(C),C=!C),ne&&(U(A),A=!A)}else if(v===0){if(F.length>=u)return R(F.slice(0,u),G);u-=F.length,x.lastIndex=G+4+String(t.length).length,m=R(F,G)}b=x.exec(m)}return m}});var Ea,Fa,tt,ts,Ed,Bt,Pa=k(()=>{"use strict";z();le();Gr();D();Ge();Ea=new Set(["A","T","R","D","-","H","N"]);Fa=[dt()];Bt=class extends(Ed=w){constructor(e,t,r=[]){super(void 0,t,r,{});y(this,tt);this.safeAppend(e.map(i=>new ee(i,"converter-flag",t,r)))}get type(){return"converter-flags"}afterBuild(){T(this,tt,this.childNodes.map(e=>e.text().trim())),super.afterBuild()}toString(e){return super.toString(e,";")}text(){return super.text(";")}getUnknownFlags(){return new Set(c(this,tt).filter(e=>/\{{3}[^{}]+\}{3}/u.test(e)))}getVariantFlags(){let e=new Set(this.getAttribute("config").variants);return new Set(c(this,tt).filter(t=>e.has(t)))}lint(e=this.getAbsoluteIndex(),t){let r=this.getVariantFlags(),i=this.getUnknownFlags(),s=new Set(c(this,tt).filter(g=>Ea.has(g))),o=c(this,tt).filter(g=>!g).length,l=c(this,tt).length-i.size-o,d=super.lint(e,t);if(r.size===l||s.size===l)return d;let p=new j(this,e);for(let g=0;g<this.length;g++){let u=this.childNodes[g],m=u.text().trim();if(m&&!r.has(m)&&!i.has(m)&&(r.size>0||!s.has(m))){let f=E(u,p,"no-ignored","invalid conversion flag");r.size===0&&Ea.has(m.toUpperCase())?f.fix={range:[f.startIndex,f.endIndex],text:m.toUpperCase(),desc:"uppercase"}:f.suggestions=[{desc:"remove",range:[f.startIndex-(g&&1),f.endIndex],text:""}],d.push(f)}}return d}print(){return super.print({sep:";"})}};ts=q(Ed),tt=new WeakMap,Bt=_(ts,0,"ConverterFlagsToken",Fa,Bt),O(ts,1,Bt)});var wr,Ra=k(()=>{"use strict";Z();D();Ge();wr=class extends w{get type(){return"converter-rule"}get variant(){var n,e;return(e=(n=this.childNodes[this.length-2])==null?void 0:n.text().trim())!=null?e:""}constructor(n,e=!0,t=$.getConfig(),r=[]){super(void 0,t,r);let i=n.indexOf(":"),s=n.slice(0,i).indexOf("=>"),o=s===-1?n.slice(0,i):n.slice(s+2,i);e&&t.variants.includes(o.trim())?(super.insertAt(new ee(o,"converter-rule-variant",t,r)),super.insertAt(new ee(n.slice(i+1),"converter-rule-to",t,r)),s!==-1&&super.insertAt(new ee(n.slice(0,s),"converter-rule-from",t,r),0)):super.insertAt(new ee(n,"converter-rule-to",t,r))}toString(n){let{childNodes:e,firstChild:t,lastChild:r}=this;return e.length===3?`${t.toString(n)}=>${e[1].toString(n)}:${r.toString(n)}`:super.toString(n,":")}text(){let{childNodes:n,firstChild:e,lastChild:t}=this;return n.length===3?`${e.text()}=>${n[1].text()}:${t.text()}`:super.text(":")}getGaps(n){return n===0&&this.length===3?2:1}print(){let{childNodes:n}=this;if(n.length===3){let[e,t,r]=n;return`<span class="wpb-converter-rule">${e.print()}=>${t.print()}:${r.print()}</span>`}return super.print({sep:":"})}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return t.variant=this.variant,t}}});var ja,rs,Fd,qt,Ba=k(()=>{"use strict";ie();ze();D();Pa();Ra();ja=[me("-{")];qt=class extends(Fd=w){get type(){return"converter"}constructor(n,e,t,r=[]){super(void 0,t,r),this.insertAt(new Bt(n,t,r));let[i]=e,s=i.includes(":"),o=new wr(i,s,t,r);s&&o.length===1||!s&&e.length===2&&!ge(e[1]).trim()?this.insertAt(new wr(e.join(";"),!1,t,r)):this.append(o,...e.slice(1).map(l=>new wr(l,!0,t,r)))}toString(n){let{childNodes:[e,...t]}=this;return`-{${e.toString(n)}${e.length>0?"|":""}${t.map(r=>r.toString(n)).join(";")}}-`}text(){let{childNodes:[n,...e]}=this;return`-{${n.text()}|${Ce(e,";")}}-`}getGaps(n){return n||this.firstChild.length>0?1:0}print(){let{childNodes:[n,...e]}=this;return`<span class="wpb-converter">-{${n.print()}${n.length>0?"|":""}${Ue(e,{sep:";"})}}-</span>`}};rs=q(Fd),qt=_(rs,0,"ConverterToken",ja,qt),O(rs,1,qt)});var qa={};te(qa,{parseConverter:()=>Pd});var Pd,Oa=k(()=>{"use strict";Ba();Pd=(a,n,e)=>{var l;(l=n.regexConverter)!=null||(n.regexConverter=new RegExp(String.raw`;(?=(?:[^;]*?=>)?\s*(?:${n.variants.join("|")})\s*:|(?:\s|\0\d+[cn]\x7F)*$)`,"u"));let t=/-\{/gu,r=/-\{|\}-/gu,i=[],s=t,o=s.exec(a);for(;o;){let{0:d,index:p}=o;if(d==="}-"){let g=i.pop(),{length:u}=e,m=a.slice(g.index+2,p),f=m.indexOf("|"),[h,x]=f===-1?[[],m]:[m.slice(0,f).split(";"),m.slice(f+1)],b=x.replace(/(&[#a-z\d]+);/giu,"$1"),v=b.split(n.regexConverter).map(C=>C.replace(/\x01/gu,";"));new qt(h,v,n,e),a=`${a.slice(0,g.index)}\0${u}v${a.slice(p+2)}`,i.length===0&&(s=t),s.lastIndex=g.index+3+String(u).length}else i.push(o),s=r,s.lastIndex=p+2;o=s.exec(a)}return a}});var an={};te(an,{Token:()=>w});var sn,Se,J,re,Ot,Cr,on,Y,_a,Ma,Da,Wa,Ha,Ua,za,Ga,Va,Qa,Xa,Ka,ns,w,D=k(()=>{"use strict";ie();z();ce();Z();Is();Ps();ns=class ns extends Tn{constructor(e,t=$.getConfig(),r=[],i){super();y(this,Y);y(this,sn,"plain");y(this,Se,0);y(this,J);y(this,re);y(this,Ot);y(this,Cr,!1);y(this,on);typeof e=="string"&&this.insertAt(e),T(this,J,t),T(this,re,r),r.push(this)}get type(){return c(this,sn)}set type(e){T(this,sn,e)}parseOnce(e=c(this,Se),t=!1,r){if(e<c(this,Se)||this.length===0||!this.isPlain())return this;if(c(this,Se)>=11)return this;switch(e){case 0:if(this.type==="root"){c(this,re).pop();let i=S(this,Y,_a).call(this);t&&(t=!i)}T(this,Ot,t),S(this,Y,Ma).call(this,t);break;case 1:S(this,Y,Da).call(this);break;case 2:S(this,Y,Wa).call(this);break;case 3:S(this,Y,Ha).call(this);break;case 4:S(this,Y,Ua).call(this);break;case 5:S(this,Y,za).call(this,r);break;case 6:S(this,Y,Ga).call(this,r);break;case 7:S(this,Y,Va).call(this);break;case 8:S(this,Y,Qa).call(this);break;case 9:S(this,Y,Xa).call(this);break;case 10:S(this,Y,Ka).call(this)}if(this.type==="root")for(let i of c(this,re))i==null||i.parseOnce(e,t,r);return hn(this,Se)._++,this}buildFromStr(e,t){let r=e.split(/[\0\x7F]/u).map((i,s)=>{if(s%2===0)return new Hr(i);if(isNaN(i.slice(-1)))return c(this,re)[Number(i.slice(0,-1))];throw new Error(`Failed to build! Unrecognized token: ${i}`)});return t===0?r.map(String).join(""):t===1?Ce(r):r}build(){T(this,Se,11);let{length:e,firstChild:t}=this,r=t==null?void 0:t.toString();if(e===1&&t.type==="text"&&r.includes("\0")&&(Wr(this,0,1,this.buildFromStr(r)),this.normalize(),this.type==="root"))for(let i of c(this,re))i==null||i.build()}afterBuild(){if(this.type==="root")for(let e of c(this,re))e==null||e.afterBuild();T(this,Cr,!0)}parse(e=11,t,r){for(e=Math.min(e,11);c(this,Se)<e;)this.parseOnce(c(this,Se),t,r);return e&&(this.build(),this.afterBuild()),this}isPlain(){return this.constructor===ns}getAttribute(e){var t;switch(e){case"config":return c(this,J);case"include":return(t=c(this,Ot))!=null?t:!!c(this.getRootNode(),Ot);case"accum":return c(this,re);case"built":return c(this,Cr);case"stage":return c(this,Se);default:return super.getAttribute(e)}}setAttribute(e,t){switch(e){case"stage":c(this,Se)===0&&this.type==="root"&&c(this,re).shift(),T(this,Se,t);break;default:super.setAttribute(e,t)}}insertAt(e,t=this.length){let r=typeof e=="string"?new Hr(e):e;super.insertAt(r,t);let{type:i}=r;return i==="root"&&(r.type="plain"),r}normalizeTitle(e,t=0,r){return $.normalizeTitle(e,t,c(this,Ot),c(this,J),r)}lint(e=this.getAbsoluteIndex(),t){var i;let r=super.lint(e,t);if(this.type==="root"){let s=new Map,o="category,html-attr#id,ext-attr#id,table-attr#id";for(let u of this.querySelectorAll(o)){let m;if(u.type==="category")m=u.name;else{let f=u.getValue();f&&f!==!0&&(m=`#${f}`)}if(m){let f=s.get(m);f?f.add(u):s.set(m,new Set([u]))}}for(let[u,m]of s)if(m.size>1&&!u.startsWith("#mw-customcollapsible-")){let f=!u.startsWith("#"),h=`duplicated ${f?"category":"id"}`,x=f?"error":"warning";r.push(...[...m].map(b=>{let v=P(b,{start:b.getAbsoluteIndex()},"no-duplicate",h,x);return f&&(v.suggestions=[{desc:"remove",range:[v.startIndex,v.endIndex],text:""}]),v}))}let l=/<!--\s*lint-(disable(?:(?:-next)?-line)?|enable)(\s[\sa-z,-]*)?-->/gu,d=this.toString(),p=[],g=l.exec(d);for(;g;){let{1:u,index:m}=g,f=(i=g[2])==null?void 0:i.trim();p.push({line:this.posFromIndex(m).top+(u==="disable-line"?0:1),from:u==="disable"?l.lastIndex:void 0,to:u==="enable"?l.lastIndex:void 0,rules:f?new Set(f.split(",").map(h=>h.trim())):void 0}),g=l.exec(d)}r=r.filter(({rule:u,startLine:m,startIndex:f})=>{let h={pos:0};for(let{line:x,from:b,to:v,rules:C}of p){if(x>m+1)break;if(C&&!C.has(u))continue;if(x===m&&b===void 0&&v===void 0)return!1;b<=f&&b>h.pos?(h.pos=b,h.type="from"):v<=f&&v>h.pos&&(h.pos=v,h.type="to")}return h.type!=="from"})}return r}toString(e,t){return e?super.toString(!0,t):Fe(c(this,on),()=>super.toString(!1,t),r=>{let i=this.getRootNode();i.type==="root"&&c(i,Cr)&&T(this,on,r)})}};sn=new WeakMap,Se=new WeakMap,J=new WeakMap,re=new WeakMap,Ot=new WeakMap,Cr=new WeakMap,on=new WeakMap,Y=new WeakSet,_a=function(){let{parseRedirect:e}=(Ms(),V(_s)),t=this.firstChild.toString(),r=e(t,c(this,J),c(this,re));return r&&this.setText(r),!!r},Ma=function(e){let{parseCommentAndExt:t}=(Xr(),V(Yo));this.setText(t(this.firstChild.toString(),c(this,J),c(this,re),e))},Da=function(){let{parseBraces:e}=(Bn(),V(wo)),t=this.type==="root"?this.firstChild.toString():`\0${this.firstChild.toString()}`,r=e(t,c(this,J),c(this,re));this.setText(this.type==="root"?r:r.slice(1))},Wa=function(){if(c(this,J).excludes.includes("html"))return;let{parseHtml:e}=(ra(),V(ta));this.setText(e(this.firstChild.toString(),c(this,J),c(this,re)))},Ha=function(){if(c(this,J).excludes.includes("table"))return;let{parseTable:e}=(aa(),V(oa));this.setText(e(this,c(this,J),c(this,re)))},Ua=function(){if(c(this,J).excludes.includes("hr"))return;let{parseHrAndDoubleUnderscore:e}=(pa(),V(ua));this.setText(e(this,c(this,J),c(this,re)))},za=function(e){let{parseLinks:t}=(Ta(),V(ba));this.setText(t(this.firstChild.toString(),c(this,J),c(this,re),e))},Ga=function(e){if(c(this,J).excludes.includes("quote"))return;let{parseQuotes:t}=(Yi(),V(ma)),r=this.firstChild.toString().split(`
|
|
21
|
+
${p}`,l),i.push(l);continue}let[,h,x,b,k]=f;if(h){for(;l.type!=="table";)l=i.pop();l.close(`
|
|
22
|
+
${g}${h}`,!0),d(k,i[i.length-1])}else if(x){l=la(l,i),l.type==="tr"&&(l=i.pop());let C=new Un(`
|
|
23
|
+
${g}${x}`,k,t,r);i.push(l,C),l.insertAt(C)}else{l=la(l,i);let C=b==="!"?/!!|(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu:/(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu,v=C.exec(k),I=0,j=`
|
|
24
|
+
${g}${b}`,z=P=>{let V=new kr(j,k.slice(I,v==null?void 0:v.index),t,r);return P.insertAt(V),V};for(;v;)z(l),{lastIndex:I}=C,[j]=v,v=C.exec(k);i.push(l,z(l))}}return o.slice(1)}});var zn,ua=A(()=>{"use strict";at();zn=class extends fe{get type(){return"hr"}}});var pa,Ji,Ed,qt,ca=A(()=>{"use strict";wt();Ge();at();pa=[Ne(),he("__")];qt=class extends(Ed=fe){get type(){return"double-underscore"}constructor(n,e,t,r){var l,d;super(n,t,r);let i=n.toLowerCase(),{doubleUnderscore:[,,s,o]}=t;this.setAttribute("name",(d=e?(l=o==null?void 0:o[n])==null?void 0:l.toLowerCase():s==null?void 0:s[i])!=null?d:i)}toString(){return`__${this.innerText}__`}print(){return super.print({pre:"__",post:"__"})}};Ji=q(Ed),qt=_(Ji,0,"DoubleUnderscoreToken",pa,qt),O(Ji,1,qt)});var ma={};te(ma,{parseHrAndDoubleUnderscore:()=>Fd});var Fd,ha=A(()=>{"use strict";ua();ca();Ti();Fd=({firstChild:{data:a},type:n,name:e},t,r)=>{var l,d,p;let{doubleUnderscore:[i,s,o]}=t;return(l=t.insensitiveDoubleUnderscore)!=null||(t.insensitiveDoubleUnderscore=new Set(i)),(d=t.sensitiveDoubleUnderscore)!=null||(t.sensitiveDoubleUnderscore=new Set(s)),(p=t.regexHrAndDoubleUnderscore)!=null||(t.regexHrAndDoubleUnderscore=new RegExp(`__(${[...i,...s].join("|")})__`,"giu")),n!=="root"&&(n!=="ext-inner"||e!=="poem")&&(a=`\0${a}`),a=a.replace(/^((?:\0\d+[cno]\x7F)*)(-{4,})/gmu,(g,u,m)=>(new zn(m,t,r),`${u}\0${r.length-1}r`)).replace(t.regexHrAndDoubleUnderscore,(g,u)=>{var x;let m=t.sensitiveDoubleUnderscore.has(u),f=u.toLowerCase(),h=t.insensitiveDoubleUnderscore.has(f);return m||h?(new qt(u,m,t,r),`\0${r.length-1}${h&&((x=o==null?void 0:o[f])!=null?x:f)==="toc"?"u":"n"}`):g}).replace(/^((?:\0\d+[cn]\x7F)*)(={1,6})(.+)\2((?:\s|\0\d+[cn]\x7F)*)$/gmu,(g,u,m,f,h)=>{let x=`${u}\0${r.length}h`;return new ur(m.length,[f,h],t,r),x}),n==="root"||n==="ext-inner"&&e==="poem"?a:a.slice(1)}});var Sr,Gn,fa=A(()=>{"use strict";G();de();X();at();Gn=class extends fe{constructor(e,t,r,i){super(e,r,i);y(this,Sr);T(this,Sr,t)}get type(){return"quote"}get bold(){return this.innerText.length!==2}get italic(){return this.innerText.length!==3}get closing(){return{...this.bold?{bold:c(this,Sr).bold}:void 0,...this.italic?{italic:c(this,Sr).italic}:void 0}}text(){let{parentNode:e,innerText:t}=this;return(e==null?void 0:e.type)==="image-parameter"&&e.name!=="caption"?"":t}lint(e=this.getAbsoluteIndex()){let{previousSibling:t,nextSibling:r,bold:i,closing:s}=this,o=(t==null?void 0:t.type)==="text"?t.data:void 0,l=(r==null?void 0:r.type)==="text"?r.data:void 0,d=$.msg('lonely "$1"',"'"),p=[],g=new B(this,e),u=(m,f,h)=>[{desc:"escape",range:[m,f],text:"'".repeat(h)},{desc:"remove",range:[m,f],text:""}];if(o!=null&&o.endsWith("'")){let m=R(this,g,"lonely-apos",d,(s.bold||s.italic)&&(/[a-z\d]'$/iu.test(o)||l&&/^[a-z\d]/iu.test(l))?"warning":"error"),{startIndex:f,startLine:h,startCol:x}=m,[,{length:b}]=/(?:^|[^'])('+)$/u.exec(o),k=e-b;p.push({...m,startIndex:k,endIndex:f,endLine:h,startCol:x-b,endCol:x,suggestions:u(k,f,b)})}if(l!=null&&l.startsWith("'")){let m=R(this,g,"lonely-apos",d),{endIndex:f,endLine:h,endCol:x}=m,[{length:b}]=/^'+/u.exec(l),k=f+b;p.push({...m,startIndex:f,endIndex:k,startLine:h,startCol:x,endCol:x+b,suggestions:u(f,k,b)})}if(i&&this.closest("heading-title")){let m=R(this,g,"bold-header","bold in section header","warning");m.suggestions=[{desc:"remove",range:[e,e+3],text:""}],p.push(m)}return p}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return Object.assign(r,{bold:this.bold,italic:this.italic}),r}};Sr=new WeakMap});var xa={};te(xa,{parseQuotes:()=>Yi});var Yi,Zi=A(()=>{"use strict";fa();Yi=(a,n,e,t)=>{var m;let r=a.split(/('{2,})/u),{length:i}=r;if(i===1)return a;let s=0,o=0,l,d,p;for(let f=1;f<i;f+=2){let h=r[f].length;switch(h){case 2:o++;break;case 4:r[f-1]+="'",r[f]="'''";case 3:if(s++,l!==void 0)break;r[f-1].endsWith(" ")?d===void 0&&p===void 0&&(p=f):r[f-1].slice(-2,-1)===" "?l=f:d!=null||(d=f);break;default:r[f-1]+="'".repeat(h-5),r[f]="'''''",o++,s++}}if(o%2===1&&s%2===1){let f=(m=l!=null?l:d)!=null?m:p;f!==void 0&&(r[f]="''",r[f-1]+="'")}let g=!0,u=!0;for(let f=1;f<i;f+=2){let h=r[f].length,x=h!==2,b=h!==3;x&&(g=!g),b&&(u=!u),new Gn(r[f],{bold:x&&g,italic:b&&u},n,e),r[f]=`\0${e.length-1}q`}return r.join("")}});var ba={};te(ba,{parseExternalLinks:()=>es});var es,ts=A(()=>{"use strict";se();Ri();Wn();es=(a,n,e,t)=>{var r;return(r=n.regexExternalLinks)!=null||(n.regexExternalLinks=new RegExp(String.raw`\[(\0\d+f\x7F|(?:(?:${n.protocol}|//)${We}|\0\d+m\x7F)${He}(?=[[\]<>"\t${Fe}]|\0\d))([${Fe}]*(?![${Fe}]))([^\]\x01-\x08\x0A-\x1F\uFFFD]*)\]`,"giu")),a.replace(n.regexExternalLinks,(i,s,o,l)=>{let{length:d}=e,p=/&[lg]t;/u.exec(s);return p&&(o="",l=s.slice(p.index)+o+l,s=s.slice(0,p.index)),t?(new Je(s,"ext-link-url",n,e),`[\0${d}f${o}${l}]`):(new Ze(s,o,l,n,e),`\0${d}w`)})}});var Vn,Ta=A(()=>{"use strict";se();Gr();Vn=class extends Ae{get type(){return"category"}get sortkey(){let{childNodes:[,n]}=this;return n&&At(n.text())}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e),{sortkey:r}=this;return r&&(t.sortkey=r),t}}});var ka={};te(ka,{parseLinks:()=>ya});var Pd,ya,va=A(()=>{"use strict";X();Zi();ts();Fi();$i();Ta();Pd=/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(\||\0\d+!\x7F)([\s\S]*)$/u,ya=(a,n,e,t)=>{var o;(o=n.regexLinks)!=null||(n.regexLinks=new RegExp(String.raw`^\s*(?:${n.protocol}|//)`,"iu"));let r=n.inExt?/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(?:(\||\0\d+!\x7F)([\s\S]*?[^\]]))?\]\]([\s\S]*)$/u:/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(?:(\||\0\d+!\x7F)([\s\S]*?[^\]])?)?\]\]([\s\S]*)$/u,i=a.split("[["),s=i.shift();for(let l=0;l<i.length;l++){let d=!1,p,g,u,m,f=i[l],h=r.exec(f);if(h)[,p,g,u,m]=h,m.startsWith("]")&&(u!=null&&u.includes("["))&&(u+="]",m=m.slice(1));else{let v=Pd.exec(f);v&&(d=!0,[,p,g,u]=v)}if(p===void 0||n.regexLinks.test(p)||/\0\d+[exhbru]\x7F/u.test(p)){s+=`[[${f}`;continue}let x=p.trim().startsWith(":");if(x&&d){s+=`[[${f}`;continue}let{ns:b,valid:k}=$.normalizeTitle(p,0,!1,n,{halfParsed:!0,temporary:!0,decode:!0,selfLink:!0});if(k){if(d){if(b!==6){s+=`[[${f}`;continue}let v=!1;for(l++;l<i.length;l++){let I=i[l],j=I.split("]]");if(j.length>2){v=!0,u+=`[[${j[0]}]]${j[1]}`,m=j.slice(2).join("]]");break}else if(j.length===2)u+=`[[${j[0]}]]${j[1]}`;else{u+=`[[${I}`;break}}if(u=ya(u,n,e,t),!v){s+=`[[${p}${g}${u}`;continue}}}else{s+=`[[${f}`;continue}u&&(u=Yi(u,n,e,t));let C=xr;x||(b===6?(u&&(u=es(u,n,e,!0)),C=hr):b===14&&(C=Vn)),u===void 0&&g&&(u=""),s+=`\0${e.length}l${m}`,new C(p,u,n,e,g)}return s}});var $a={};te($a,{parseMagicLinks:()=>Rd});var Ca,Aa,wa,Sa,Rd,Na=A(()=>{"use strict";se();Wn();Ca=String.raw`[${Fe}\t]| |�*160;|�*a0;`,Aa=`(?:${Ca})+`,wa=`(?:${Ca}|-)`,Sa=String.raw`(?:RFC|PMID)${Aa}\d+\b|ISBN${Aa}(?:97[89]${wa}?)?(?:\d${wa}?){9}[\dx]\b`,Rd=(a,n,e)=>{if(!n.regexMagicLinks)try{n.regexMagicLinks=new RegExp(String.raw`(^|[^\p{L}\p{N}_])(?:(?:${n.protocol})(${We}${He})|${Sa})`,"giu")}catch{n.regexMagicLinks=new RegExp(String.raw`(^|\W)(?:(?:${n.protocol})(${We}${He})|${Sa})`,"giu")}return a.replace(n.regexMagicLinks,(t,r,i)=>{let s=r?t.slice(r.length):t;if(i){let o="",l=/&(?:lt|gt|nbsp|#x0*(?:3[ce]|a0)|#0*(?:6[02]|160));/iu.exec(s);l&&(o=s.slice(l.index),s=s.slice(0,l.index));let d=s.includes("(")?/[^,;\\.:!?][,;\\.:!?]+$/u:/[^,;\\.:!?)][,;\\.:!?)]+$/u,p=d.exec(s);if(p){let g=1;p[0][1]===";"&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(s.slice(0,p.index))&&(g=2),o=s.slice(p.index+g)+o,s=s.slice(0,p.index+g)}return o.length>=i.length?t:(new Je(s,void 0,n,e),`${r}\0${e.length-1}w${o}`)}else if(!/^(?:RFC|PMID|ISBN)/u.test(s))return t;return new Je(s,"magic-link",n,e),`${r}\0${e.length-1}i`})}});var Ia,La=A(()=>{"use strict";Ia=(a,n)=>a.startsWith(n)?n.length:[...n].findIndex((e,t)=>e!==a[t])});var Qn,Ea=A(()=>{"use strict";Xi();Qn=class extends Ar{get type(){return"list"}}});var Fa={};te(Fa,{parseList:()=>jd});var jd,Pa=A(()=>{"use strict";La();Ea();Ki();jd=(a,n,e,t)=>{let r=/^((?:\0\d+[cno]\x7F)*)([;:*#]+\s*)/u.exec(a);if(!r)return n.lastPrefix="",a;let[i,s,o]=r,l=o.replace(/;/gu,":"),d=Ia(l,n.lastPrefix),p=(d>1?o.slice(d-1):o).split(/(?=;)/u),g=p[0].startsWith(";"),u=p.length-(g?0:1);if(d>1){let P=o.slice(0,d-1);g?p.unshift(P):p[0]=P+p[0]}n.lastPrefix=l;let m=s+p.map((P,V)=>`\0${t.length+V}d`).join("")+a.slice(i.length);for(let P of p)new Qn(P,e,t);if(!u)return m;let{html:[f]}=e,h=/:+|-\{|\0\d+[xq]\x7F/gu,x=h,b=x.exec(m),k=0,C=!1,v=!1,I=0,j=(P,V)=>(new wr(P,e,t),`${m.slice(0,V)}\0${t.length-1}d${m.slice(V+P.length)}`),z=P=>{P?k&&k--:k++};for(;b&&u;){let{0:P,index:V}=b;if(P==="-{"){if(!I){let{lastIndex:ne}=x;x=/-\{|\}-/gu,x.lastIndex=ne}I++}else if(P==="}-"){if(I--,!I){let{lastIndex:ne}=x;x=h,x.lastIndex=ne}}else if(P.endsWith("x")){let{name:ne,closing:ie,selfClosing:N}=t[Number(P.slice(1,-2))];(!N||f.includes(ne))&&z(ie)}else if(P.endsWith("q")){let{bold:ne,italic:ie}=t[Number(P.slice(1,-2))];ne&&(z(C),C=!C),ie&&(z(v),v=!v)}else if(k===0){if(P.length>=u)return j(P.slice(0,u),V);u-=P.length,x.lastIndex=V+4+String(t.length).length,m=j(P,V)}b=x.exec(m)}return m}});var Ra,ja,rt,rs,Bd,Ot,Ba=A(()=>{"use strict";G();de();Vr();D();Ve();Ra=new Set(["A","T","R","D","-","H","N"]);ja=[dt()];Ot=class extends(Bd=S){constructor(e,t,r=[]){super(void 0,t,r,{});y(this,rt);this.safeAppend(e.map(i=>new ee(i,"converter-flag",t,r)))}get type(){return"converter-flags"}afterBuild(){T(this,rt,this.childNodes.map(e=>e.text().trim())),super.afterBuild()}toString(e){return super.toString(e,";")}text(){return super.text(";")}getUnknownFlags(){return new Set(c(this,rt).filter(e=>/\{{3}[^{}]+\}{3}/u.test(e)))}getVariantFlags(){let e=new Set(this.getAttribute("config").variants);return new Set(c(this,rt).filter(t=>e.has(t)))}lint(e=this.getAbsoluteIndex(),t){let r=this.getVariantFlags(),i=this.getUnknownFlags(),s=new Set(c(this,rt).filter(g=>Ra.has(g))),o=c(this,rt).filter(g=>!g).length,l=c(this,rt).length-i.size-o,d=super.lint(e,t);if(r.size===l||s.size===l)return d;let p=new B(this,e);for(let g=0;g<this.length;g++){let u=this.childNodes[g],m=u.text().trim();if(m&&!r.has(m)&&!i.has(m)&&(r.size>0||!s.has(m))){let f=L(u,p,"no-ignored","invalid conversion flag");r.size===0&&Ra.has(m.toUpperCase())?f.fix={range:[f.startIndex,f.endIndex],text:m.toUpperCase(),desc:"uppercase"}:f.suggestions=[{desc:"remove",range:[f.startIndex-(g&&1),f.endIndex],text:""}],d.push(f)}}return d}print(){return super.print({sep:";"})}};rs=q(Bd),rt=new WeakMap,Ot=_(rs,0,"ConverterFlagsToken",ja,Ot),O(rs,1,Ot)});var Cr,qa=A(()=>{"use strict";X();D();Ve();Cr=class extends S{get type(){return"converter-rule"}get variant(){var n,e;return(e=(n=this.childNodes[this.length-2])==null?void 0:n.text().trim())!=null?e:""}constructor(n,e=!0,t=$.getConfig(),r=[]){super(void 0,t,r);let i=n.indexOf(":"),s=n.slice(0,i).indexOf("=>"),o=s===-1?n.slice(0,i):n.slice(s+2,i);e&&t.variants.includes(o.trim())?(super.insertAt(new ee(o,"converter-rule-variant",t,r)),super.insertAt(new ee(n.slice(i+1),"converter-rule-to",t,r)),s!==-1&&super.insertAt(new ee(n.slice(0,s),"converter-rule-from",t,r),0)):super.insertAt(new ee(n,"converter-rule-to",t,r))}toString(n){let{childNodes:e,firstChild:t,lastChild:r}=this;return e.length===3?`${t.toString(n)}=>${e[1].toString(n)}:${r.toString(n)}`:super.toString(n,":")}text(){let{childNodes:n,firstChild:e,lastChild:t}=this;return n.length===3?`${e.text()}=>${n[1].text()}:${t.text()}`:super.text(":")}getGaps(n){return n===0&&this.length===3?2:1}print(){let{childNodes:n}=this;if(n.length===3){let[e,t,r]=n;return`<span class="wpb-converter-rule">${e.print()}=>${t.print()}:${r.print()}</span>`}return super.print({sep:":"})}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return t.variant=this.variant,t}}});var Oa,ns,qd,_t,_a=A(()=>{"use strict";se();Ge();D();Ba();qa();Oa=[he("-{")];_t=class extends(qd=S){get type(){return"converter"}constructor(n,e,t,r=[]){super(void 0,t,r),this.insertAt(new Ot(n,t,r));let[i]=e,s=i.includes(":"),o=new Cr(i,s,t,r);s&&o.length===1||!s&&e.length===2&&!ue(e[1]).trim()?this.insertAt(new Cr(e.join(";"),!1,t,r)):this.append(o,...e.slice(1).map(l=>new Cr(l,!0,t,r)))}toString(n){let{childNodes:[e,...t]}=this;return`-{${e.toString(n)}${e.length>0?"|":""}${t.map(r=>r.toString(n)).join(";")}}-`}text(){let{childNodes:[n,...e]}=this;return`-{${n.text()}|${$e(e,";")}}-`}getGaps(n){return n||this.firstChild.length>0?1:0}print(){let{childNodes:[n,...e]}=this;return`<span class="wpb-converter">-{${n.print()}${n.length>0?"|":""}${ze(e,{sep:";"})}}-</span>`}};ns=q(qd),_t=_(ns,0,"ConverterToken",Oa,_t),O(ns,1,_t)});var Ma={};te(Ma,{parseConverter:()=>Od});var Od,Da=A(()=>{"use strict";_a();Od=(a,n,e)=>{var l;(l=n.regexConverter)!=null||(n.regexConverter=new RegExp(String.raw`;(?=(?:[^;]*?=>)?\s*(?:${n.variants.join("|")})\s*:|(?:\s|\0\d+[cn]\x7F)*$)`,"u"));let t=/-\{/gu,r=/-\{|\}-/gu,i=[],s=t,o=s.exec(a);for(;o;){let{0:d,index:p}=o;if(d==="}-"){let g=i.pop(),{length:u}=e,m=a.slice(g.index+2,p),f=m.indexOf("|"),[h,x]=f===-1?[[],m]:[m.slice(0,f).split(";"),m.slice(f+1)],b=x.replace(/(&[#a-z\d]+);/giu,"$1"),k=b.split(n.regexConverter).map(C=>C.replace(/\x01/gu,";"));new _t(h,k,n,e),a=`${a.slice(0,g.index)}\0${u}v${a.slice(p+2)}`,i.length===0&&(s=t),s.lastIndex=g.index+3+String(u).length}else i.push(o),s=r,s.lastIndex=p+2;o=s.exec(a)}return a}});var ln={};te(ln,{Token:()=>S});var on,Se,J,re,Mt,$r,an,Y,Wa,Ha,Ua,za,Ga,Va,Qa,Xa,Ka,Ja,Ya,Za,is,S,D=A(()=>{"use strict";se();G();me();X();Es();js();is=class is extends yn{constructor(e,t=$.getConfig(),r=[],i){super();y(this,Y);y(this,on,"plain");y(this,Se,0);y(this,J);y(this,re);y(this,Mt);y(this,$r,!1);y(this,an);typeof e=="string"&&this.insertAt(e),T(this,J,t),T(this,re,r),r.push(this)}get type(){return c(this,on)}set type(e){T(this,on,e)}parseOnce(e=c(this,Se),t=!1,r){if(e<c(this,Se)||this.length===0||!this.isPlain())return this;if(c(this,Se)>=11)return this;switch(e){case 0:if(this.type==="root"){c(this,re).pop();let i=w(this,Y,Wa).call(this);t&&(t=!i)}T(this,Mt,t),w(this,Y,Ha).call(this,t);break;case 1:w(this,Y,Ua).call(this);break;case 2:w(this,Y,za).call(this);break;case 3:w(this,Y,Ga).call(this);break;case 4:w(this,Y,Va).call(this);break;case 5:w(this,Y,Qa).call(this,r);break;case 6:w(this,Y,Xa).call(this,r);break;case 7:w(this,Y,Ka).call(this);break;case 8:w(this,Y,Ja).call(this);break;case 9:w(this,Y,Ya).call(this);break;case 10:w(this,Y,Za).call(this)}if(this.type==="root")for(let i of c(this,re))i==null||i.parseOnce(e,t,r);return fn(this,Se)._++,this}buildFromStr(e,t){let r=e.split(/[\0\x7F]/u).map((i,s)=>{if(s%2===0)return new Ur(i);if(isNaN(i.slice(-1)))return c(this,re)[Number(i.slice(0,-1))];throw new Error(`Failed to build! Unrecognized token: ${i}`)});return t===0?r.map(String).join(""):t===1?$e(r):r}build(){T(this,Se,11);let{length:e,firstChild:t}=this,r=t==null?void 0:t.toString();if(e===1&&t.type==="text"&&r.includes("\0")&&(Hr(this,0,1,this.buildFromStr(r)),this.normalize(),this.type==="root"))for(let i of c(this,re))i==null||i.build()}afterBuild(){if(this.type==="root")for(let e of c(this,re))e==null||e.afterBuild();T(this,$r,!0)}parse(e=11,t,r){for(e=Math.min(e,11);c(this,Se)<e;)this.parseOnce(c(this,Se),t,r);return e&&(this.build(),this.afterBuild()),this}isPlain(){return this.constructor===is}getAttribute(e){var t;switch(e){case"config":return c(this,J);case"include":return(t=c(this,Mt))!=null?t:!!c(this.getRootNode(),Mt);case"accum":return c(this,re);case"built":return c(this,$r);case"stage":return c(this,Se);default:return super.getAttribute(e)}}setAttribute(e,t){switch(e){case"stage":c(this,Se)===0&&this.type==="root"&&c(this,re).shift(),T(this,Se,t);break;default:super.setAttribute(e,t)}}insertAt(e,t=this.length){let r=typeof e=="string"?new Ur(e):e;super.insertAt(r,t);let{type:i}=r;return i==="root"&&(r.type="plain"),r}normalizeTitle(e,t=0,r){return $.normalizeTitle(e,t,c(this,Mt),c(this,J),r)}lint(e=this.getAbsoluteIndex(),t){var i;let r=super.lint(e,t);if(this.type==="root"){let s=new Map,o="category,html-attr#id,ext-attr#id,table-attr#id";for(let u of this.querySelectorAll(o)){let m;if(u.type==="category")m=u.name;else{let f=u.getValue();f&&f!==!0&&(m=`#${f}`)}if(m){let f=s.get(m);f?f.add(u):s.set(m,new Set([u]))}}for(let[u,m]of s)if(m.size>1&&!u.startsWith("#mw-customcollapsible-")){let f=!u.startsWith("#"),h=`duplicated ${f?"category":"id"}`,x=f?"error":"warning";r.push(...[...m].map(b=>{let k=R(b,{start:b.getAbsoluteIndex()},"no-duplicate",h,x);return f&&(k.suggestions=[{desc:"remove",range:[k.startIndex,k.endIndex],text:""}]),k}))}let l=/<!--\s*lint-(disable(?:(?:-next)?-line)?|enable)(\s[\sa-z,-]*)?-->/gu,d=this.toString(),p=[],g=l.exec(d);for(;g;){let{1:u,index:m}=g,f=(i=g[2])==null?void 0:i.trim();p.push({line:this.posFromIndex(m).top+(u==="disable-line"?0:1),from:u==="disable"?l.lastIndex:void 0,to:u==="enable"?l.lastIndex:void 0,rules:f?new Set(f.split(",").map(h=>h.trim())):void 0}),g=l.exec(d)}r=r.filter(({rule:u,startLine:m,startIndex:f})=>{let h={pos:0};for(let{line:x,from:b,to:k,rules:C}of p){if(x>m+1)break;if(C&&!C.has(u))continue;if(x===m&&b===void 0&&k===void 0)return!1;b<=f&&b>h.pos?(h.pos=b,h.type="from"):k<=f&&k>h.pos&&(h.pos=k,h.type="to")}return h.type!=="from"})}return r}toString(e,t){return e?super.toString(!0,t):Pe(c(this,an),()=>super.toString(!1,t),r=>{let i=this.getRootNode();i.type==="root"&&c(i,$r)&&T(this,an,r)})}};on=new WeakMap,Se=new WeakMap,J=new WeakMap,re=new WeakMap,Mt=new WeakMap,$r=new WeakMap,an=new WeakMap,Y=new WeakSet,Wa=function(){let{parseRedirect:e}=(Ws(),Q(Ds)),t=this.firstChild.toString(),r=e(t,c(this,J),c(this,re));return r&&this.setText(r),!!r},Ha=function(e){let{parseCommentAndExt:t}=(Kr(),Q(ta));this.setText(t(this.firstChild.toString(),c(this,J),c(this,re),e))},Ua=function(){let{parseBraces:e}=(qn(),Q($o)),t=this.type==="root"?this.firstChild.toString():`\0${this.firstChild.toString()}`,r=e(t,c(this,J),c(this,re));this.setText(this.type==="root"?r:r.slice(1))},za=function(){if(c(this,J).excludes.includes("html"))return;let{parseHtml:e}=(sa(),Q(ia));this.setText(e(this.firstChild.toString(),c(this,J),c(this,re)))},Ga=function(){if(c(this,J).excludes.includes("table"))return;let{parseTable:e}=(ga(),Q(da));this.setText(e(this,c(this,J),c(this,re)))},Va=function(){if(c(this,J).excludes.includes("hr"))return;let{parseHrAndDoubleUnderscore:e}=(ha(),Q(ma));this.setText(e(this,c(this,J),c(this,re)))},Qa=function(e){let{parseLinks:t}=(va(),Q(ka));this.setText(t(this.firstChild.toString(),c(this,J),c(this,re),e))},Xa=function(e){if(c(this,J).excludes.includes("quote"))return;let{parseQuotes:t}=(Zi(),Q(xa)),r=this.firstChild.toString().split(`
|
|
25
25
|
`);for(let i=0;i<r.length;i++)r[i]=t(r[i],c(this,J),c(this,re),e);this.setText(r.join(`
|
|
26
|
-
`))},
|
|
26
|
+
`))},Ka=function(){if(c(this,J).excludes.includes("extLink"))return;let{parseExternalLinks:e}=(ts(),Q(ba));this.setText(e(this.firstChild.toString(),c(this,J),c(this,re)))},Ja=function(){if(c(this,J).excludes.includes("magicLink"))return;let{parseMagicLinks:e}=(Na(),Q($a));this.setText(e(this.firstChild.toString(),c(this,J),c(this,re)))},Ya=function(){if(c(this,J).excludes.includes("list"))return;let{parseList:e}=(Pa(),Q(Fa)),{firstChild:t,type:r,name:i}=this,s=t.toString().split(`
|
|
27
27
|
`),o={lastPrefix:""},l=r==="root"||r==="ext-inner"&&i==="poem"?0:1;for(;l<s.length;l++)s[l]=e(s[l],o,c(this,J),c(this,re));this.setText(s.join(`
|
|
28
|
-
`))},Ka=function(){if(c(this,J).variants.length>0){let{parseConverter:e}=(Oa(),V(qa));this.setText(e(this.firstChild.toString(),c(this,J),c(this,re)))}};w=ns});var de,ur,Wr,Be,ce=k(()=>{"use strict";de={running:!1,run(a){let{running:n}=this;this.running=!0;try{let{Token:e}=(D(),V(an)),t=a();return t instanceof e&&!t.getAttribute("built")&&t.afterBuild(),this.running=n,t}catch(e){throw this.running=n,e}},rev:0},ur=a=>n=>n.type===a,Wr=(a,n,e,t=[])=>{var s,o;let r=a.getChildNodes(),i;r.length===e?(i=r,r=t):i=r.splice(n,e,...t);for(let l=0;l<t.length;l++){let d=t[l];d.setAttribute("parentNode",a),d.setAttribute("nextSibling",r[n+l+1]),d.setAttribute("previousSibling",r[n+l-1])}return(s=r[n-1])==null||s.setAttribute("nextSibling",r[n]),(o=r[n+t.length])==null||o.setAttribute("previousSibling",r[n+t.length-1]),r===t&&a.setAttribute("childNodes",r),i},Be=(a,n)=>{Object.defineProperty(a,"name",{value:n.name})}});var Ja={};te(Ja,{Title:()=>is});var ln,dn,Ie,$r,_t,is,Ya=k(()=>{"use strict";ie();is=class{constructor(n,e,t,{temporary:r,decode:i,selfLink:s}={}){y(this,ln);y(this,dn);y(this,Ie);y(this,$r);y(this,_t);ae(this,"valid");ae(this,"encoded",!1);let o=n.trim().startsWith("../");if(i&&n.includes("%"))try{let d=/%(?!21|3[ce]|5[bd]|7[b-d])[\da-f]{2}/iu.test(n);n=st(n),this.encoded=d}catch{}if(n=kt(n).replace(/[_ ]+/gu," ").trim(),o)T(this,$r,0);else{let d=e;n.startsWith(":")&&(d=0,n=n.slice(1).trim());let p=n.split(":");if(p.length>1){let g=He(p[0]),u=Object.prototype.hasOwnProperty.call(t.nsid,g)&&t.nsid[g];u&&(d=u,n=p.slice(1).join(":").trim())}T(this,$r,d)}let l=n.indexOf("#");if(l!==-1){let d=n.slice(l).trim().slice(1);if(d.includes("%"))try{d=st(d)}catch{}T(this,_t,d.replace(/ /gu,"_")),n=n.slice(0,l).trim()}this.valid=!!(n||s&&this.ns===0&&c(this,_t)!==void 0)&&kt(n)===n&&!/^:|\0\d+[eh!+-]\x7F|[<>[\]{}|\n]|%[\da-f]{2}|(?:^|\/)\.{1,2}(?:$|\/)/iu.test(o?/^(?:\.\.\/)+(.*)/u.exec(n)[1]:n),this.main=n,T(this,dn,t.namespaces),T(this,Ie,t.articlePath||"/wiki/$1"),c(this,Ie).includes("$1")||T(this,Ie,c(this,Ie)+`${c(this,Ie).endsWith("/")?"":"/"}$1`),r||Object.defineProperties(this,{encoded:{enumerable:!1,writable:!1}})}get ns(){return c(this,$r)}get fragment(){return c(this,_t)}get main(){return c(this,ln)}set main(n){n=n.replace(/_/gu," ").trim(),T(this,ln,n&&n[0].toUpperCase()+n.slice(1))}get prefix(){let n=c(this,dn)[this.ns];return n+(n&&":")}get title(){return this.getRedirection()[1]}get extension(){let{main:n}=this,e=n.lastIndexOf(".");return e===-1?void 0:n.slice(e+1).toLowerCase()}getRedirection(){return[!1,(this.prefix+this.main).replace(/ /gu,"_")]}setFragment(n){T(this,_t,n)}getUrl(n){{typeof n=="string"&&(T(this,Ie,n||"/wiki/$1"),c(this,Ie).includes("$1")||T(this,Ie,c(this,Ie)+`${c(this,Ie).endsWith("/")?"":"/"}$1`));let{title:e,fragment:t}=this;return e?c(this,Ie).replace("$1",encodeURIComponent(e)+(t?`#${encodeURIComponent(t)}`:"")):t===void 0?"":`#${encodeURIComponent(t)}`}}};ln=new WeakMap,dn=new WeakMap,Ie=new WeakMap,$r=new WeakMap,_t=new WeakMap});var ll={};te(ll,{LanguageService:()=>os,isAttr:()=>ss,tasks:()=>rl});var rl,Rd,jd,Bd,qd,nl,Od,_d,Md,Dd,ss,Wd,Za,cn,il,Nr,fe,el,sl,gn,un,Ir,Qn,tl,ye,xt,rt,nt,Er,mn,Fr,Pr,Mt,W,pn,Le,as,ol,ls,al,ds,Lr,os,dl=k(()=>{"use strict";Tt();ci();z();ie();Z();rl=new WeakMap,Rd=new Set(["ref"]),jd=new Set(["ref","references"]),Bd=new Set(["name","extends","follow"]),qd=new Set(["group"]),nl=new Set(["arg-name","template-name","link-target","parameter-key"]),Od=new Set(["ext","html","attr-key","image-parameter","heading-title","heading","magic-word-name",...nl]),_d=new Set(["text","comment","noinclude","include"]),Md=["ext","html","table"].map(a=>`${a}-attr#style`).join(),Dd=we(a=>new RegExp(`^(?:${a}|//)`,"iu")),ss=({type:a,parentNode:n,length:e,firstChild:t},r)=>a==="attr-value"&&e===1&&t.type==="text"&&(!r||n.name==="style"),Wd=a=>a.type==="html-attr"||a.type==="table-attr",Za=a=>a.childNodes.every(({type:n})=>_d.has(n)),cn=(a,n)=>{let{top:e,left:t}=a.posFromIndex(n);return{line:e,character:t}},il=(a,n,e)=>({start:cn(a,n),end:cn(a,e)}),Nr=a=>{let{top:n,left:e,height:t,width:r}=a.getBoundingClientRect();return{start:{line:n,character:e},end:Xt(n,e,t,r)}},fe=(a,n,e,{line:t,character:r},i,s)=>[...new Set(a)].map(o=>{var d;let l=(d=s==null?void 0:s(o))==null?void 0:d.description;return{label:o,kind:n,textEdit:{range:{start:{line:t,character:r-e.length},end:{line:t,character:r}},newText:o+(i!=null?i:"")},...l&&{documentation:{kind:"markdown",value:l}}}}),el=(a,n,{line:e,character:t})=>{let r=a.indexFromPos(e,t);return a.caretPositionFromIndex(r+Number(/\w/u.test(n.charAt(r))))},sl=(a,n,e)=>{let{type:t,parentNode:r={}}=a,{name:i,tag:s}=r;return t==="attr-value"&&n.has(s)&&e.has(i)?a.toString().trim():NaN},gn=a=>sl(a,Rd,Bd),un=a=>sl(a,jd,qd),Ir=(a,n)=>{let e=a==null?void 0:a.getAttr(n);return e!==!0&&e||!1},Qn=a=>{let{type:n,name:e,parentNode:t}=a;switch(n){case"heading":return a.level;case"heading-title":return t.level;case"parameter-key":return`${t.parentNode.name}|${t.name}`;case"ext":case"html":case"image-parameter":return e;default:return t.name}},tl=(a,n,e=!1)=>({range:il(a,...n.range),newText:n.text,title:`${e?"Fix":"Suggestion"}: ${n.desc}`,fix:e}),os=class{constructor(n){y(this,W);y(this,ye);y(this,xt);y(this,rt);y(this,nt);y(this,Er);y(this,mn);y(this,Fr);y(this,Pr);y(this,Mt);ae(this,"include",!0);ae(this,"config");ae(this,"data");rl.set(n,this),Object.defineProperties(this,{config:{enumerable:!1},data:{enumerable:!1}})}destroy(){Object.setPrototypeOf(this,null)}async provideDocumentColors(n,e,t=!0){let r=await S(this,W,Le).call(this,e);return r.querySelectorAll("attr-value,parameter-value,arg-default").reverse().flatMap(i=>{let{type:s,childNodes:o}=i;return s!=="attr-value"&&!Za(i)?[]:o.filter(l=>l.type==="text").reverse().flatMap(l=>{let{data:d}=l,p=vs(d,t).filter(([,,,u])=>u);if(p.length===0)return[];let g=l.getAbsoluteIndex();return p.map(([u,m,f])=>{let h=n(u);return h.length===4&&{color:{red:h[0]/255,green:h[1]/255,blue:h[2]/255,alpha:h[3]},range:il(r,g+m,g+f)}}).filter(Boolean)})})}provideColorPresentations(n){let{color:{red:e,green:t,blue:r,alpha:i},range:s}=n,o=`#${jr(e)}${jr(t)}${jr(r)}${i<1?jr(i):""}`;return[{label:o,textEdit:{range:s,newText:o}}]}async provideCompletionItems(n,e){var I,R,U,F,G,Q,ne;let{re:t,allTags:r,functions:i,switches:s,protocols:o,params:l,tags:d,ext:p}=S(this,W,al).call(this),{line:g,character:u}=e,m=n.split(/\r?\n/u,g+1)[g],f=t.exec((I=m==null?void 0:m.slice(0,u))!=null?I:""),[,,h={},x={}]=this.config.doubleUnderscore;if((f==null?void 0:f[1])!==void 0){let L=f[1].startsWith("/");return fe(r,"Class",f[1].slice(L?1:0),e,L&&!(m!=null&&m.slice(u).trim().startsWith(">"))?">":"")}else{if(f!=null&&f[4])return fe(s,"Constant",f[4],e,"",L=>{if(this.data)return L=L.slice(2,-2),L in h?L=h[L]:L in x&&(L=x[L]),S(this,W,ds).call(this,L.toLowerCase())});if((f==null?void 0:f[5])!==void 0)return fe(o,"Reference",f[5],e)}let b=await S(this,W,Le).call(this,n),v;if(f!=null&&f[2]){v=b.elementFromPoint(f.index+f[2].length-1,g);let L=(R=f[3])!=null?R:"";if(f[2]==="{{{")return fe(b.querySelectorAll("arg").filter(M=>M.name&&M!==v).map(({name:M})=>M),"Variable",L,e);let[B,H]=this.config.parserFunction,N=Array.isArray(H),oe=m.charAt(u),pe=L.startsWith(":"),X=pe?L.slice(1).trimStart():L;if(f[2]==="[[")return fe(b.querySelectorAll("link,file,category,redirect-target").filter(M=>M!==v).map(({name:M})=>M),"Folder",X,e);let xe=i;return oe===":"?xe=i.filter(M=>!M.endsWith(":")):oe===":"&&(xe=i.filter(M=>M.endsWith(":")).map(M=>M.slice(0,-1))),[...fe(xe,"Function",L,e,"",M=>{if(this.data)M in B?M=B[M]:!N&&M in H&&(M=H[M]);else return;return S(this,W,Lr).call(this,M.toLowerCase())}),...L.startsWith("#")?[]:fe(b.querySelectorAll("template").filter(M=>M!==v).map(M=>{let{name:it}=M;if(pe)return it;let{ns:Wt}=M.getAttribute("title");return Wt===0?`:${it}`:Wt===10?it.slice(9):it}),"Folder",X,e)]}let C,A;if((f==null?void 0:f[7])===void 0&&(v=b.elementFromPoint(u,g),{type:C,parentNode:A}=v),(f==null?void 0:f[6])!==void 0||C==="image-parameter"){let L=b.indexFromPos(g,u),B=(F=(U=f==null?void 0:f[6])==null?void 0:U.trimStart())!=null?F:c(this,ye).slice(v.getAbsoluteIndex(),L).trimStart(),H=c(this,ye)[L]==="=";return[...fe(l,"Property",B,e).filter(({label:N})=>!H||!/[= ]$/u.test(N)),...fe(b.querySelectorAll("image-parameter#width").filter(N=>N!==v).map(N=>N.text()),"Unit",B,e)]}else if((f==null?void 0:f[7])!==void 0||C==="attr-key"){let L=(Q=(G=f==null?void 0:f[7])==null?void 0:G.toLowerCase())!=null?Q:A.tag,B=(ne=f==null?void 0:f[9])!=null?ne:v.toString().slice(0,u-b.posFromIndex(v.getAbsoluteIndex()).left);if(!d.has(L))return;let H=Nn[L],N=In[L],oe=N&&fe(N,"Field",B,e);return p.includes(L)&&!H?oe:[...oe!=null?oe:[],...L==="meta"||L==="link"?[]:fe($n,"Property",B,e),...H?fe(H,"Property",B,e):[],...fe(["data-"],"Variable",B,e),...fe(["xmlns:"],"Interface",B,e)]}else if(C==="parameter-key"||C==="parameter-value"&&A.anon){let L=A.parentNode,{type:B,name:H}=L;if(B==="magic-word"&&H!=="invoke")return;let N=c(this,ye).slice(v.getAbsoluteIndex(),b.indexFromPos(g,u)).trimStart(),[oe,pe]=B==="magic-word"?L.getModule():[];return N?fe(b.querySelectorAll("parameter").filter(X=>{if(X===A||X.anon||X.parentNode.type!==B||X.parentNode.name!==H)return!1;if(B==="template")return!0;let[xe,M]=X.parentNode.getModule();return xe===oe&&M===pe}).map(({name:X})=>X),"Variable",N,e,C==="parameter-value"?"=":""):void 0}else if(ss(v)&&Wd(A)){let L=fn(A.tag,A.name);if(L.length===0)return;let B=c(this,ye).slice(v.getAbsoluteIndex(),b.indexFromPos(g,u)).trimStart();return fe(L,"Value",B,e)}}async provideDiagnostics(n,e=!0){let t=await S(this,W,Le).call(this,n),r=t.lint();return[(e?r:r.filter(({severity:l})=>l==="error")).map(({startLine:l,startCol:d,endLine:p,endCol:g,severity:u,rule:m,message:f,fix:h,suggestions:x})=>({range:{start:{line:l,character:d},end:{line:p,character:g}},severity:u==="error"?1:2,source:"WikiLint",code:m,message:f,data:[...h?[tl(t,h,!0)]:[],...x?x.map(b=>tl(t,b)):[]]})),[],[]].flat(2)}async provideFoldingRanges(n){let e=await S(this,W,Le).call(this,n),{length:t}=e.getLines(),r=[],i=new Array(6),s=e.querySelectorAll("heading-title,table,template,magic-word");for(let o of[...s].reverse())o.getRelativeIndex();for(let o of s){let{offsetHeight:l}=o;if(o.type==="heading-title"||l>2){let{top:d}=e.posFromIndex(o.getAbsoluteIndex());if(o.type==="heading-title"){let{level:p}=o.parentNode;for(let g=p-1;g<6;g++){let u=i[g];u!==void 0&&u<d-1&&r.push({startLine:u,endLine:d-1,kind:"region"}),i[g]=void 0}i[p-1]=d+l-1}else r.push({startLine:d,endLine:d+l-2,kind:"region"})}}for(let o of i)o!==void 0&&o<t-1&&r.push({startLine:o,endLine:t-1,kind:"region"});return r}async provideLinks(n){var s;(s=this.config)!=null||(this.config=$.getConfig());let{articlePath:e,protocol:t}=this.config,r=e==null?void 0:e.includes("//"),i=Dd(t);return(await S(this,W,Le).call(this,n)).querySelectorAll(`magic-link,ext-link-url,free-ext-link,attr-value,image-parameter#link${r?",link-target,template-name,invoke-module,magic-word#filepath,magic-word#widget":""}`).reverse().map(o=>{let l;o.is("magic-word")&&({name:l}=o,o=o.childNodes[1].lastChild);let{type:d,parentNode:p,firstChild:g,lastChild:u,childNodes:m,length:f}=o,{tag:h}=p;if(l!=null||(l=p.name),!(d!=="attr-value"||l==="src"&&["templatestyles","img"].includes(h)||l==="cite"&&["blockquote","del","ins","q"].includes(h))||!Za(o))return!1;let x=m.filter(b=>b.type==="text").map(({data:b})=>b).join("").trim();if(!x)return!1;try{if(o.is("magic-link")||o.is("ext-link-url")||o.is("free-ext-link"))x=o.getUrl(e);else if(d==="link-target"&&(p.is("link")||p.is("redirect-target")||p.is("category"))){if(x.startsWith("/"))return!1;x=p.link.getUrl(e)}else if(d==="template-name")x=p.getAttribute("title").getUrl(e);else if(["link-target","invoke-module","parameter-value"].includes(d)||d==="attr-value"&&l==="src"&&h==="templatestyles"||d==="image-parameter"&&!i.test(x)){if(!r||x.startsWith("/"))return!1;let b=0;switch(d){case"attr-value":b=10;break;case"invoke-module":b=828;break;case"parameter-value":b=l==="filepath"?6:274}let v=$.normalizeTitle(x,b,!1,this.config,{temporary:!0});if(!v.valid)return!1;x=v.getUrl()}if(typeof x=="string"&&x.startsWith("//")&&(x=`https:${x}`),x=new URL(x).href,d==="image-parameter"){let b=g.getBoundingClientRect(),{top:v,left:C,height:A,width:I}=f===1?b:u.getBoundingClientRect();return{range:{start:{line:b.top,character:b.left},end:Xt(v,C,A,I)},target:x}}return{range:Nr(o),target:x}}catch{return!1}}).filter(Boolean)}async provideReferences(n,e){let t=await S(this,W,Le).call(this,n),{offsetNode:r,offset:i}=el(t,c(this,ye),e),s=r.type==="text"?r.parentNode:r,o=i===0&&(s.type==="ext-attr-dirty"||s.type==="html-attr-dirty")?s.parentNode.parentNode:s,{type:l}=o,d=gn(o),p=un(o);if(!d&&!p&&!Od.has(l))return;let g=Qn(o),u=t.querySelectorAll(l==="heading-title"?"heading":l).filter(m=>l==="attr-value"?gn(m)===d||un(m)===p:Qn(m)===g).reverse().map(m=>({range:Nr(m.type==="parameter-key"?m.parentNode:m)}));return u.length===0?void 0:u}async provideDefinition(n,e){let t=await S(this,W,Le).call(this,n),r=t.elementFromPoint(e.character,e.line),i=r.is("ext")&&r.name==="ref"?r:r.closest("ext#ref"),s=Ir(i,"name");if(!s)return;let o=Ir(i,"group"),l=t.querySelectorAll("ext#ref").filter(d=>d.innerText&&Ir(d,"name")===s&&Ir(d,"group")===o).reverse().map(({lastChild:d})=>({range:Nr(d)}));return l.length===0?void 0:l}async resolveRenameLocation(n,e){let t=await S(this,W,Le).call(this,n),r=t.elementFromPoint(e.character,e.line),{type:i}=r,s=gn(r),o=un(r);return!s&&!o&&(!nl.has(i)||i==="parameter-key"&&/^[1-9]\d*$/u.test(r.parentNode.name)||i==="link-target"&&!["link","redirect-target"].includes(r.parentNode.type))?void 0:Nr(r)}async provideRenameEdits(n,e,t){let r=await S(this,W,Le).call(this,n),i=r.elementFromPoint(e.character,e.line),{type:s}=i,o=gn(i),l=o&&Ir(i.parentNode.parentNode,"group"),d=un(i),p=Qn(i),g=r.querySelectorAll(s).filter(u=>{let{type:m}=u.parentNode;return s==="link-target"&&m!=="link"&&m!=="redirect-target"?!1:s==="attr-value"?un(u)===d||gn(u)===o&&Ir(u.parentNode.parentNode,"group")===l:Qn(u)===p});return g.length===0?void 0:{changes:{"":g.reverse().map(u=>({range:Nr(u),newText:t}))}}}async provideHover(n,e){if(!this.data)return;let t=await S(this,W,Le).call(this,n),{offsetNode:r,offset:i}=el(t,c(this,ye),e);r.type==="text"&&(i+=r.getRelativeIndex(),r=r.parentNode);let{type:s,parentNode:o,length:l,name:d}=r,p,g,u,m;if(r.is("double-underscore")&&i>0)p=S(this,W,ds).call(this,r.name);else if(s==="magic-word-name")p=S(this,W,Lr).call(this,o.name),g=r.text().trim(),u=o.getAttribute("colon");else if(r.is("magic-word")&&!r.modifier&&l===1&&(i>0||t.posFromIndex(r.getAbsoluteIndex()).left===e.character))p=S(this,W,Lr).call(this,d),g=r.firstChild.text().trim(),u=r.getAttribute("colon");else if((r.is("magic-word")||r.is("template"))&&r.modifier&&i>=2&&r.getRelativeIndex(0)>i&&(g=r.modifier.trim().slice(0,-1),p=S(this,W,Lr).call(this,g.toLowerCase()),u=":",p)){let f=r.getAbsoluteIndex();m={start:cn(t,f+2),end:cn(t,f+r.modifier.trimEnd().length+1)}}return p&&{contents:{kind:"markdown",value:(p.signatures?`${p.signatures.map(f=>`- **{{ ${g}${f.length===0?"**":`${u}** `}${f.map(({label:h,const:x})=>x?h:`*${h}*`).join(" **|** ")} **}}**`).join(`
|
|
28
|
+
`))},Za=function(){if(c(this,J).variants.length>0){let{parseConverter:e}=(Da(),Q(Ma));this.setText(e(this.firstChild.toString(),c(this,J),c(this,re)))}};S=is});var oe,pr,Hr,qe,me=A(()=>{"use strict";oe={running:!1,run(a){let{running:n}=this;this.running=!0;try{let{Token:e}=(D(),Q(ln)),t=a();return t instanceof e&&!t.getAttribute("built")&&t.afterBuild(),this.running=n,t}catch(e){throw this.running=n,e}},rev:0},pr=a=>n=>n.type===a,Hr=(a,n,e,t=[])=>{var s,o;let r=a.getChildNodes(),i;r.length===e?(i=r,r=t):i=r.splice(n,e,...t);for(let l=0;l<t.length;l++){let d=t[l];d.setAttribute("parentNode",a),d.setAttribute("nextSibling",r[n+l+1]),d.setAttribute("previousSibling",r[n+l-1])}return(s=r[n-1])==null||s.setAttribute("nextSibling",r[n]),(o=r[n+t.length])==null||o.setAttribute("previousSibling",r[n+t.length-1]),r===t&&a.setAttribute("childNodes",r),i},qe=(a,n)=>{Object.defineProperty(a,"name",{value:n.name})}});var el={};te(el,{Title:()=>ss});var dn,gn,Le,Nr,Dt,ss,tl=A(()=>{"use strict";se();ss=class{constructor(n,e,t,{temporary:r,decode:i,selfLink:s}={}){y(this,dn);y(this,gn);y(this,Le);y(this,Nr);y(this,Dt);le(this,"valid");le(this,"encoded",!1);let o=n.trim().startsWith("../");if(i&&n.includes("%"))try{let d=/%(?!21|3[ce]|5[bd]|7[b-d])[\da-f]{2}/iu.test(n);n=st(n),this.encoded=d}catch{}if(n=At(n).replace(/[_ ]+/gu," ").trim(),o)T(this,Nr,0);else{let d=e;n.startsWith(":")&&(d=0,n=n.slice(1).trim());let p=n.split(":");if(p.length>1){let g=Ue(p[0]),u=Object.prototype.hasOwnProperty.call(t.nsid,g)&&t.nsid[g];u&&(d=u,n=p.slice(1).join(":").trim())}T(this,Nr,d)}let l=n.indexOf("#");if(l!==-1){let d=n.slice(l).trim().slice(1);if(d.includes("%"))try{d=st(d)}catch{}T(this,Dt,d.replace(/ /gu,"_")),n=n.slice(0,l).trim()}this.valid=!!(n||s&&this.ns===0&&c(this,Dt)!==void 0)&&At(n)===n&&!/^:|\0\d+[eh!+-]\x7F|[<>[\]{}|\n]|%[\da-f]{2}|(?:^|\/)\.{1,2}(?:$|\/)/iu.test(o?/^(?:\.\.\/)+(.*)/u.exec(n)[1]:n),this.main=n,T(this,gn,t.namespaces),T(this,Le,t.articlePath||"/wiki/$1"),c(this,Le).includes("$1")||T(this,Le,c(this,Le)+`${c(this,Le).endsWith("/")?"":"/"}$1`),r||Object.defineProperties(this,{encoded:{enumerable:!1,writable:!1}})}get ns(){return c(this,Nr)}get fragment(){return c(this,Dt)}get main(){return c(this,dn)}set main(n){n=n.replace(/_/gu," ").trim(),T(this,dn,n&&n[0].toUpperCase()+n.slice(1))}get prefix(){let n=c(this,gn)[this.ns];return n+(n&&":")}get title(){return this.getRedirection()[1]}get extension(){let{main:n}=this,e=n.lastIndexOf(".");return e===-1?void 0:n.slice(e+1).toLowerCase()}getRedirection(){return[!1,(this.prefix+this.main).replace(/ /gu,"_")]}setFragment(n){T(this,Dt,n)}getUrl(n){{typeof n=="string"&&(T(this,Le,n||"/wiki/$1"),c(this,Le).includes("$1")||T(this,Le,c(this,Le)+`${c(this,Le).endsWith("/")?"":"/"}$1`));let{title:e,fragment:t}=this;return e?c(this,Le).replace("$1",encodeURIComponent(e)+(t?`#${encodeURIComponent(t)}`:"")):t===void 0?"":`#${encodeURIComponent(t)}`}}};dn=new WeakMap,gn=new WeakMap,Le=new WeakMap,Nr=new WeakMap,Dt=new WeakMap});var ul={};te(ul,{LanguageService:()=>as,isAttr:()=>os,tasks:()=>sl});var sl,_d,Md,Dd,Wd,ol,Hd,Ud,zd,Gd,os,Vd,rl,mn,al,Ir,xe,nl,ll,un,pn,Lr,Xn,il,ye,xt,nt,it,Fr,hn,Pr,Rr,Wt,H,cn,Ee,ls,dl,ds,gl,gs,Er,as,pl=A(()=>{"use strict";kt();mi();G();se();X();sl=new WeakMap,_d=new Set(["ref"]),Md=new Set(["ref","references"]),Dd=new Set(["name","extends","follow"]),Wd=new Set(["group"]),ol=new Set(["arg-name","template-name","link-target","parameter-key"]),Hd=new Set(["ext","html","attr-key","image-parameter","heading-title","heading","magic-word-name",...ol]),Ud=new Set(["text","comment","noinclude","include"]),zd=["ext","html","table"].map(a=>`${a}-attr#style`).join(),Gd=Ce(a=>new RegExp(`^(?:${a}|//)`,"iu")),os=({type:a,parentNode:n,length:e,firstChild:t},r)=>a==="attr-value"&&e===1&&t.type==="text"&&(!r||n.name==="style"),Vd=a=>a.type==="html-attr"||a.type==="table-attr",rl=a=>a.childNodes.every(({type:n})=>Ud.has(n)),mn=(a,n)=>{let{top:e,left:t}=a.posFromIndex(n);return{line:e,character:t}},al=(a,n,e)=>({start:mn(a,n),end:mn(a,e)}),Ir=a=>{let{top:n,left:e,height:t,width:r}=a.getBoundingClientRect();return{start:{line:n,character:e},end:Kt(n,e,t,r)}},xe=(a,n,e,{line:t,character:r},i,s)=>[...new Set(a)].map(o=>{var d;let l=(d=s==null?void 0:s(o))==null?void 0:d.description;return{label:o,kind:n,textEdit:{range:{start:{line:t,character:r-e.length},end:{line:t,character:r}},newText:o+(i!=null?i:"")},...l&&{documentation:{kind:"markdown",value:l}}}}),nl=(a,n,{line:e,character:t})=>{let r=a.indexFromPos(e,t);return a.caretPositionFromIndex(r+Number(/\w/u.test(n.charAt(r))))},ll=(a,n,e)=>{let{type:t,parentNode:r={}}=a,{name:i,tag:s}=r;return t==="attr-value"&&n.has(s)&&e.has(i)?a.toString().trim():NaN},un=a=>ll(a,_d,Dd),pn=a=>ll(a,Md,Wd),Lr=(a,n)=>{let e=a==null?void 0:a.getAttr(n);return e!==!0&&e||!1},Xn=a=>{let{type:n,name:e,parentNode:t}=a;switch(n){case"heading":return a.level;case"heading-title":return t.level;case"parameter-key":return`${t.parentNode.name}|${t.name}`;case"ext":case"html":case"image-parameter":return e;default:return t.name}},il=(a,n,e=!1)=>({range:al(a,...n.range),newText:n.text,title:`${e?"Fix":"Suggestion"}: ${n.desc}`,fix:e}),as=class{constructor(n){y(this,H);y(this,ye);y(this,xt);y(this,nt);y(this,it);y(this,Fr);y(this,hn);y(this,Pr);y(this,Rr);y(this,Wt);le(this,"include",!0);le(this,"config");le(this,"data");sl.set(n,this),Object.defineProperties(this,{config:{enumerable:!1},data:{enumerable:!1}})}destroy(){Object.setPrototypeOf(this,null)}async provideDocumentColors(n,e,t=!0){let r=await w(this,H,Ee).call(this,e);return r.querySelectorAll("attr-value,parameter-value,arg-default").reverse().flatMap(i=>{let{type:s,childNodes:o}=i;return s!=="attr-value"&&!rl(i)?[]:o.filter(l=>l.type==="text").reverse().flatMap(l=>{let{data:d}=l,p=ws(d,t).filter(([,,,u])=>u);if(p.length===0)return[];let g=l.getAbsoluteIndex();return p.map(([u,m,f])=>{let h=n(u);return h.length===4&&{color:{red:h[0]/255,green:h[1]/255,blue:h[2]/255,alpha:h[3]},range:al(r,g+m,g+f)}}).filter(Boolean)})})}provideColorPresentations(n){let{color:{red:e,green:t,blue:r,alpha:i},range:s}=n,o=`#${Br(e)}${Br(t)}${Br(r)}${i<1?Br(i):""}`;return[{label:o,textEdit:{range:s,newText:o}}]}async provideCompletionItems(n,e){var I,j,z,P,V,ne,ie;let{re:t,allTags:r,functions:i,switches:s,protocols:o,params:l,tags:d,ext:p}=w(this,H,gl).call(this),{line:g,character:u}=e,m=n.split(/\r?\n/u,g+1)[g],f=t.exec((I=m==null?void 0:m.slice(0,u))!=null?I:""),[,,h={},x={}]=this.config.doubleUnderscore;if((f==null?void 0:f[1])!==void 0){let N=f[1].startsWith("/");return xe(r,"Class",f[1].slice(N?1:0),e,N&&!(m!=null&&m.slice(u).trim().startsWith(">"))?">":"")}else{if(f!=null&&f[4])return xe(s,"Constant",f[4],e,"",N=>{if(this.data)return N=N.slice(2,-2),N in h?N=h[N]:N in x&&(N=x[N]),w(this,H,gs).call(this,N.toLowerCase())});if((f==null?void 0:f[5])!==void 0)return xe(o,"Reference",f[5],e)}let b=await w(this,H,Ee).call(this,n),k;if(f!=null&&f[2]){k=b.elementFromPoint(f.index+f[2].length-1,g);let N=(j=f[3])!=null?j:"";if(f[2]==="{{{")return xe(b.querySelectorAll("arg").filter(W=>W.name&&W!==k).map(({name:W})=>W),"Variable",N,e);let[M,U]=this.config.parserFunction,E=Array.isArray(U),F=m.charAt(u),ce=N.startsWith(":"),Z=ce?N.slice(1).trimStart():N;if(f[2]==="[[")return xe(b.querySelectorAll("link,file,category,redirect-target").filter(W=>W!==k).map(({name:W})=>W),"Folder",Z,e);let ge=i;return F===":"?ge=i.filter(W=>!W.endsWith(":")):F===":"&&(ge=i.filter(W=>W.endsWith(":")).map(W=>W.slice(0,-1))),[...xe(ge,"Function",N,e,"",W=>{if(this.data)W in M?W=M[W]:!E&&W in U&&(W=U[W]);else return;return w(this,H,Er).call(this,W.toLowerCase())}),...N.startsWith("#")?[]:xe(b.querySelectorAll("template").filter(W=>W!==k).map(W=>{let{name:ke}=W;if(ce)return ke;let{ns:bt}=W.getAttribute("title");return bt===0?`:${ke}`:bt===10?ke.slice(9):ke}),"Folder",Z,e)]}let C,v;if((f==null?void 0:f[7])===void 0&&(k=b.elementFromPoint(u,g),{type:C,parentNode:v}=k),(f==null?void 0:f[6])!==void 0||C==="image-parameter"){let N=b.indexFromPos(g,u),M=(P=(z=f==null?void 0:f[6])==null?void 0:z.trimStart())!=null?P:c(this,ye).slice(k.getAbsoluteIndex(),N).trimStart(),U=c(this,ye)[N]==="=";return[...xe(l,"Property",M,e).filter(({label:E})=>!U||!/[= ]$/u.test(E)),...xe(b.querySelectorAll("image-parameter#width").filter(E=>E!==k).map(E=>E.text()),"Unit",M,e)]}else if((f==null?void 0:f[7])!==void 0||C==="attr-key"){let N=(ne=(V=f==null?void 0:f[7])==null?void 0:V.toLowerCase())!=null?ne:v.tag,M=(ie=f==null?void 0:f[9])!=null?ie:k.toString().slice(0,u-b.posFromIndex(k.getAbsoluteIndex()).left);if(!d.has(N))return;let U=In[N],E=Ln[N],F=E&&xe(E,"Field",M,e);return p.includes(N)&&!U?F:[...F!=null?F:[],...N==="meta"||N==="link"?[]:xe(Nn,"Property",M,e),...U?xe(U,"Property",M,e):[],...xe(["data-"],"Variable",M,e),...xe(["xmlns:"],"Interface",M,e)]}else if(C==="parameter-key"||C==="parameter-value"&&v.anon){let N=v.parentNode,{type:M,name:U}=N;if(M==="magic-word"&&U!=="invoke")return;let E=c(this,ye).slice(k.getAbsoluteIndex(),b.indexFromPos(g,u)).trimStart(),[F,ce]=M==="magic-word"?N.getModule():[];return E?xe(b.querySelectorAll("parameter").filter(Z=>{if(Z===v||Z.anon||Z.parentNode.type!==M||Z.parentNode.name!==U)return!1;if(M==="template")return!0;let[ge,W]=Z.parentNode.getModule();return ge===F&&W===ce}).map(({name:Z})=>Z),"Variable",E,e,C==="parameter-value"?"=":""):void 0}else if(os(k)&&Vd(v)){let N=xn(v.tag,v.name);if(N.length===0)return;let M=c(this,ye).slice(k.getAbsoluteIndex(),b.indexFromPos(g,u)).trimStart();return xe(N,"Value",M,e)}}async provideDiagnostics(n,e=!0){let t=await w(this,H,Ee).call(this,n),r=t.lint();return[(e?r:r.filter(({severity:l})=>l==="error")).map(({startLine:l,startCol:d,endLine:p,endCol:g,severity:u,rule:m,message:f,fix:h,suggestions:x})=>({range:{start:{line:l,character:d},end:{line:p,character:g}},severity:u==="error"?1:2,source:"WikiLint",code:m,message:f,data:[...h?[il(t,h,!0)]:[],...x?x.map(b=>il(t,b)):[]]})),[],[]].flat(2)}async provideFoldingRanges(n){let e=await w(this,H,Ee).call(this,n),{length:t}=e.getLines(),r=[],i=new Array(6),s=e.querySelectorAll("heading-title,table,template,magic-word");for(let o of[...s].reverse())o.getRelativeIndex();for(let o of s){let{offsetHeight:l}=o;if(o.type==="heading-title"||l>2){let{top:d}=e.posFromIndex(o.getAbsoluteIndex());if(o.type==="heading-title"){let{level:p}=o.parentNode;for(let g=p-1;g<6;g++){let u=i[g];u!==void 0&&u<d-1&&r.push({startLine:u,endLine:d-1,kind:"region"}),i[g]=void 0}i[p-1]=d+l-1}else r.push({startLine:d,endLine:d+l-2,kind:"region"})}}for(let o of i)o!==void 0&&o<t-1&&r.push({startLine:o,endLine:t-1,kind:"region"});return r}async provideLinks(n){var s;(s=this.config)!=null||(this.config=$.getConfig());let{articlePath:e,protocol:t}=this.config,r=e==null?void 0:e.includes("//"),i=Gd(t);return(await w(this,H,Ee).call(this,n)).querySelectorAll(`magic-link,ext-link-url,free-ext-link,attr-value,image-parameter#link${r?",link-target,template-name,invoke-module,magic-word#filepath,magic-word#widget":""}`).reverse().map(o=>{let l;o.is("magic-word")&&({name:l}=o,o=o.childNodes[1].lastChild);let{type:d,parentNode:p,firstChild:g,lastChild:u,childNodes:m,length:f}=o,{tag:h}=p;if(l!=null||(l=p.name),!(d!=="attr-value"||l==="src"&&["templatestyles","img"].includes(h)||l==="cite"&&["blockquote","del","ins","q"].includes(h))||!rl(o))return!1;let x=m.filter(b=>b.type==="text").map(({data:b})=>b).join("").trim();if(!x)return!1;try{if(o.is("magic-link")||o.is("ext-link-url")||o.is("free-ext-link"))x=o.getUrl(e);else if(d==="link-target"&&(p.is("link")||p.is("redirect-target")||p.is("category"))){if(x.startsWith("/"))return!1;x=p.link.getUrl(e)}else if(d==="template-name")x=p.getAttribute("title").getUrl(e);else if(["link-target","invoke-module","parameter-value"].includes(d)||d==="attr-value"&&l==="src"&&h==="templatestyles"||d==="image-parameter"&&!i.test(x)){if(!r||x.startsWith("/"))return!1;let b=0;switch(d){case"attr-value":b=10;break;case"invoke-module":b=828;break;case"parameter-value":b=l==="filepath"?6:274}let k=$.normalizeTitle(x,b,!1,this.config,{temporary:!0});if(!k.valid)return!1;x=k.getUrl()}if(typeof x=="string"&&x.startsWith("//")&&(x=`https:${x}`),x=new URL(x).href,d==="image-parameter"){let b=g.getBoundingClientRect(),{top:k,left:C,height:v,width:I}=f===1?b:u.getBoundingClientRect();return{range:{start:{line:b.top,character:b.left},end:Kt(k,C,v,I)},target:x}}return{range:Ir(o),target:x}}catch{return!1}}).filter(Boolean)}async provideReferences(n,e){let t=await w(this,H,Ee).call(this,n),{offsetNode:r,offset:i}=nl(t,c(this,ye),e),s=r.type==="text"?r.parentNode:r,o=i===0&&(s.type==="ext-attr-dirty"||s.type==="html-attr-dirty")?s.parentNode.parentNode:s,{type:l}=o,d=un(o),p=pn(o);if(!d&&!p&&!Hd.has(l))return;let g=Xn(o),u=t.querySelectorAll(l==="heading-title"?"heading":l).filter(m=>l==="attr-value"?un(m)===d||pn(m)===p:Xn(m)===g).reverse().map(m=>({range:Ir(m.type==="parameter-key"?m.parentNode:m)}));return u.length===0?void 0:u}async provideDefinition(n,e){let t=await w(this,H,Ee).call(this,n),r=t.elementFromPoint(e.character,e.line),i=r.is("ext")&&r.name==="ref"?r:r.closest("ext#ref"),s=Lr(i,"name");if(!s)return;let o=Lr(i,"group"),l=t.querySelectorAll("ext#ref").filter(d=>d.innerText&&Lr(d,"name")===s&&Lr(d,"group")===o).reverse().map(({lastChild:d})=>({range:Ir(d)}));return l.length===0?void 0:l}async resolveRenameLocation(n,e){let t=await w(this,H,Ee).call(this,n),r=t.elementFromPoint(e.character,e.line),{type:i}=r,s=un(r),o=pn(r);return!s&&!o&&(!ol.has(i)||i==="parameter-key"&&/^[1-9]\d*$/u.test(r.parentNode.name)||i==="link-target"&&!["link","redirect-target"].includes(r.parentNode.type))?void 0:Ir(r)}async provideRenameEdits(n,e,t){let r=await w(this,H,Ee).call(this,n),i=r.elementFromPoint(e.character,e.line),{type:s}=i,o=un(i),l=o&&Lr(i.parentNode.parentNode,"group"),d=pn(i),p=Xn(i),g=r.querySelectorAll(s).filter(u=>{let{type:m}=u.parentNode;return s==="link-target"&&m!=="link"&&m!=="redirect-target"?!1:s==="attr-value"?pn(u)===d||un(u)===o&&Lr(u.parentNode.parentNode,"group")===l:Xn(u)===p});return g.length===0?void 0:{changes:{"":g.reverse().map(u=>({range:Ir(u),newText:t}))}}}async provideHover(n,e){if(!this.data)return;let t=await w(this,H,Ee).call(this,n),{offsetNode:r,offset:i}=nl(t,c(this,ye),e);r.type==="text"&&(i+=r.getRelativeIndex(),r=r.parentNode);let{type:s,parentNode:o,length:l,name:d}=r,p,g,u,m;if(r.is("double-underscore")&&i>0)p=w(this,H,gs).call(this,r.name);else if(s==="magic-word-name")p=w(this,H,Er).call(this,o.name),g=r.text().trim(),u=o.getAttribute("colon");else if(r.is("magic-word")&&!r.modifier&&l===1&&(i>0||t.posFromIndex(r.getAbsoluteIndex()).left===e.character))p=w(this,H,Er).call(this,d),g=r.firstChild.text().trim(),u=r.getAttribute("colon");else if((r.is("magic-word")||r.is("template"))&&r.modifier&&i>=2&&r.getRelativeIndex(0)>i&&(g=r.modifier.trim().slice(0,-1),p=w(this,H,Er).call(this,g.toLowerCase()),u=":",p)){let f=r.getAbsoluteIndex();m={start:mn(t,f+2),end:mn(t,f+r.modifier.trimEnd().length+1)}}return p&&{contents:{kind:"markdown",value:(p.signatures?`${p.signatures.map(f=>`- **{{ ${g}${f.length===0?"**":`${u}** `}${f.map(({label:h,const:x})=>x?h:`*${h}*`).join(" **|** ")} **}}**`).join(`
|
|
29
29
|
`)}
|
|
30
30
|
|
|
31
|
-
`:"")+p.description},range:m!=null?m:
|
|
31
|
+
`:"")+p.description},range:m!=null?m:Ir(r)}}async provideSignatureHelp(n,e){if(!this.data)return;let{line:t,character:r}=e,i=n.split(/\r?\n/u,t+1)[t],{lastChild:s}=await w(this,H,dl).call(this,`${i.slice(0,r+/^[^{}<]*/u.exec(i.slice(r))[0].length)}}}`);if(!s.is("magic-word")||s.length===1)return;let{name:o,childNodes:l,firstChild:d}=s,p=w(this,H,Er).call(this,o);if(!(p!=null&&p.signatures))return;let g=l.length-1,u=p.signatures.filter(x=>{var b;return(x.length>=g||((b=x[x.length-1])==null?void 0:b.rest))&&x.every(({label:k,const:C},v)=>{var j;let I=C&&v<g&&((j=l[v+1])==null?void 0:j.text().trim());return!I||k.toLowerCase().includes(I.toLowerCase())})});if(u.length===0)return;let m=-1;for(let x=s.getAbsoluteIndex()+s.getAttribute("padding");m<g&&(x+=l[m+1].toString().length+1,!(x>r));m++);let f=d.text().trim(),h=s.getAttribute("colon");return{signatures:u.map(x=>({label:`{{${f}${x.length===0?"":h}${x.map(({label:b})=>b).join("|")}}}`,parameters:x.map(({label:b,const:k})=>({label:b,...k?{documentation:"Predefined parameter"}:void 0})),...x.length<g?{activeParameter:Math.min(m,x.length-1)}:void 0})),activeParameter:m}}async provideInlayHints(n){let e=await w(this,H,Ee).call(this,n),t=[];for(let r of e.querySelectorAll("template,magic-word#invoke").reverse()){let{type:i,childNodes:s}=r;t=[...t,...s.slice(i==="template"?1:3).filter(({anon:o})=>o).reverse().map(o=>({position:mn(e,o.getAbsoluteIndex()),label:`${o.name}=`,kind:2}))]}return t}findStyleTokens(){return c(this,Fr).querySelectorAll(zd).filter(({lastChild:n})=>os(n))}};ye=new WeakMap,xt=new WeakMap,nt=new WeakMap,it=new WeakMap,Fr=new WeakMap,hn=new WeakMap,Pr=new WeakMap,Rr=new WeakMap,Wt=new WeakMap,H=new WeakSet,cn=function(){return c(this,Pr)===this.config&&c(this,Rr)===this.include},Ee=async function(n){var e;return n=Vt(n),!c(this,nt)&&w(this,H,cn).call(this)&&c(this,ye)===n?c(this,Fr):(T(this,ye,n),(e=c(this,nt))!=null||T(this,nt,w(this,H,ls).call(this)),c(this,nt))},ls=async function(){var t;(t=this.config)!=null||(this.config=$.getConfig()),T(this,Pr,this.config),T(this,Rr,this.include);let n=c(this,ye),e=await $.partialParse(n,()=>c(this,ye),this.include,this.config);return w(this,H,cn).call(this)&&c(this,ye)===n?(T(this,Fr,e),T(this,nt,void 0),e):(T(this,nt,w(this,H,ls).call(this)),c(this,nt))},dl=async function(n){var e;return n=Vt(n),!c(this,it)&&w(this,H,cn).call(this)&&c(this,xt)===n?c(this,hn):(T(this,xt,n),(e=c(this,it))!=null||T(this,it,w(this,H,ds).call(this)),c(this,it))},ds=async function(){var t;(t=this.config)!=null||(this.config=$.getConfig()),T(this,Pr,this.config),T(this,Rr,this.include);let n=c(this,xt),e=await $.partialParse(n,()=>c(this,xt),this.include,this.config);return w(this,H,cn).call(this)&&c(this,xt)===n?(T(this,hn,e),T(this,it,void 0),e):(T(this,it,w(this,H,ds).call(this)),c(this,it))},gl=function(){var n;if(!c(this,Wt)||c(this,Wt)[1]!==this.config){(n=this.config)!=null||(this.config=$.getConfig());let{nsid:e,ext:t,html:r,parserFunction:[i,s,...o],doubleUnderscore:l,protocol:d,img:p}=this.config,g=new Set([t,r].flat(2)),u=new RegExp("(?:"+String.raw`<(\/?\w*)`+"|"+String.raw`(\{{2,4}|\[\[)\s*([^|{}<>[\]\s][^|{}<>[\]#]*)?`+"|"+String.raw`(__(?:(?!__)[\p{L}\p{N}_])*)`+"|"+String.raw`(?<!\[)\[([a-z:/]*)`+"|"+String.raw`\[\[\s*(?:${Object.entries(e).filter(([,m])=>m===6).map(([m])=>m).join("|")})\s*:[^[\]{}<>]+\|([^[\]{}<>|=]*)`+"|"+String.raw`<(\w+)(?:\s(?:[^<>{}|=\s]+(?:\s*=\s*(?:[^\s"']\S*|(["']).*?\8))?(?=\s))*)?\s(\w*)`+")$","iu");T(this,Wt,[{re:u,ext:t,tags:g,allTags:[...g,"onlyinclude","includeonly","noinclude"],functions:[Object.keys(i),Array.isArray(s)?s:Object.keys(s),o].flat(2),switches:l.slice(0,2).flat().map(m=>`__${m}__`),protocols:d.split("|"),params:Object.keys(p).filter(m=>m.endsWith("$1")||!m.includes("$1")).map(m=>m.replace(/\$1$/u,""))},this.config])}return c(this,Wt)[0]},gs=function(n){return this.data.behaviorSwitches.find(({aliases:e})=>e.includes(n))},Er=function(n){return this.data.parserFunctions.find(({aliases:e})=>e.some(t=>t.replace(/^#/u,"")===n))}});var us,Ht,cl,Qd,$,X=A(()=>{As();me();Ns();se();us=!0,Ht={config:Zn,i18n:void 0,rules:vs,get viewOnly(){return us},set viewOnly(a){us&&!a&&oe.rev++,us=a},getConfig(a){let n=a!=null?a:this.config,{doubleUnderscore:e,ext:t,parserFunction:r,variable:i}=n;for(let s=0;s<2;s++)e.length>s+2&&e[s].length===0&&(e[s]=Object.keys(e[s+2]));return t.includes("translate")&&!i.includes("translationlanguage")&&(i.push("translationlanguage"),Array.isArray(r[1])?r[1].push("TRANSLATIONLANGUAGE"):r[1].TRANSLATIONLANGUAGE="translationlanguage"),{...Zn,...n,excludes:[]}},msg(a,n=""){var e,t;return a&&((t=(e=this.i18n)==null?void 0:e[a])!=null?t:a).replace("$1",this.msg(n))},normalizeTitle(a,n=0,e,t=Ht.getConfig(),r){let{Title:i}=(tl(),Q(el)),s;if(r!=null&&r.halfParsed)s=new i(a,n,t,r);else{let{Token:o}=(D(),Q(ln));s=oe.run(()=>{let l=new o(a,t);l.type="root",l.parseOnce(0,e).parseOnce();let d=new i(l.toString(),n,t,r);for(let p of["main","fragment"]){let g=d[p];if(g!=null&&g.includes("\0")){let u=l.buildFromStr(g,1);p==="main"?d.main=u:d.setFragment(u)}}return d})}return s},parse(a,n,e=11,t=Ht.getConfig()){a=Vt(a);let r;typeof e!="number"&&(r=Array.isArray(e)?e:[e],e=Math.max(...r.map(o=>ks[o]||11)));let{Token:i}=(D(),Q(ln));return oe.run(()=>{let o=new i(a,t);return o.type="root",o.parse(e,n)})},async partialParse(a,n,e,t=Ht.getConfig()){{let{Token:r}=(D(),Q(ln)),i=typeof setImmediate=="function"?setImmediate:setTimeout,{running:s}=oe;oe.running=!0;let o=new r(Vt(a),t);o.type="root";let l=0;try{await new Promise(d=>{let p=()=>{n()===a?(l++,i(g,0)):d()},g=()=>{l===12?(o.afterBuild(),d()):(o[l===11?"build":"parseOnce"](l,e),p())};i(g,0)})}catch(d){throw oe.running=s,d}return oe.running=s,o}},createLanguageService(a){var n;{let e=(pl(),Q(ul)),{LanguageService:t,tasks:r}=e;return(n=r.get(a))!=null?n:new t(a)}}},cl={},Qd=new Set(["normalizeTitle","parse","createLanguageService"]);for(let a in Ht)Qd.has(a)||(cl[a]={enumerable:!1});Object.defineProperties(Ht,cl);Object.assign(typeof globalThis=="object"?globalThis:self,{Parser:Ht});$=Ht});X();})();
|
|
32
32
|
//# sourceMappingURL=bundle-lsp.min.js.map
|