wikiparser-node 1.43.0 → 1.44.0

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.
Files changed (43) hide show
  1. package/README.md +10 -7
  2. package/bundle/bundle-es8.min.js +40 -31
  3. package/bundle/bundle-lsp.min.js +35 -26
  4. package/bundle/bundle.min.js +22 -22
  5. package/config/default.json +31 -0
  6. package/config/moegirl.json +39 -1
  7. package/dist/base.d.mts +4 -4
  8. package/dist/base.d.ts +4 -4
  9. package/dist/base.js +1 -0
  10. package/dist/base.mjs +1 -0
  11. package/dist/bin/config.js +6 -5
  12. package/dist/index.js +8 -5
  13. package/dist/lib/document.d.ts +17 -14
  14. package/dist/lib/lintConfig.js +4 -1
  15. package/dist/lib/title.d.ts +4 -1
  16. package/dist/lib/title.js +5 -1
  17. package/dist/mixin/attributesParent.js +1 -1
  18. package/dist/parser/converter.js +1 -1
  19. package/dist/render/extension.js +30 -24
  20. package/dist/render/magicWords.js +1 -1
  21. package/dist/render/math.js +31 -0
  22. package/dist/render/syntaxhighlight.js +3 -0
  23. package/dist/src/attributes.d.ts +1 -0
  24. package/dist/src/attributes.js +27 -3
  25. package/dist/src/converterFlags.js +10 -5
  26. package/dist/src/converterRule.js +2 -2
  27. package/dist/src/imageParameter.d.ts +4 -3
  28. package/dist/src/imageParameter.js +15 -7
  29. package/dist/src/link/file.d.ts +5 -4
  30. package/dist/src/link/file.js +12 -9
  31. package/dist/src/nowiki/index.d.ts +1 -0
  32. package/dist/src/nowiki/index.js +40 -28
  33. package/dist/src/tagPair/ext.d.ts +1 -0
  34. package/dist/src/tagPair/ext.js +36 -3
  35. package/dist/src/transclude.js +1 -1
  36. package/dist/util/search.js +24 -6
  37. package/dist/util/string.js +7 -1
  38. package/extensions/dist/base.js +1 -1
  39. package/extensions/dist/codejar.js +1 -1
  40. package/i18n/en.json +7 -0
  41. package/i18n/zh-hans.json +7 -0
  42. package/i18n/zh-hant.json +7 -0
  43. package/package.json +19 -12
@@ -1,43 +1,52 @@
1
- "use strict";(()=>{var Oo=Object.create;var Wt=Object.defineProperty;var qo=Object.getOwnPropertyDescriptor;var Ru=Object.getOwnPropertyNames;var Pu=Object.getPrototypeOf,Bu=Object.prototype.hasOwnProperty;var Mo=(o,t)=>(t=Symbol[o])?t:Symbol.for("Symbol."+o),xr=o=>{throw TypeError(o)};var _o=(o,t,e)=>t in o?Wt(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e;var jo=(o,t)=>Wt(o,"name",{value:t,configurable:!0});var L=(o,t)=>()=>(o&&(t=o(o=0)),t);var Qi=(o,t)=>()=>(t||o((t={exports:{}}).exports,t),t.exports),re=(o,t)=>{for(var e in t)Wt(o,e,{get:t[e],enumerable:!0})},Wo=(o,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Ru(t))!Bu.call(o,n)&&n!==e&&Wt(o,n,{get:()=>t[n],enumerable:!(r=qo(t,n))||r.enumerable});return o};var ju=(o,t,e)=>(e=o!=null?Oo(Pu(o)):{},Wo(t||!o||!o.__esModule?Wt(e,"default",{value:o,enumerable:!0}):e,o)),X=o=>Wo(Wt({},"__esModule",{value:!0}),o);var O=o=>{var t;return[,,,Oo((t=o==null?void 0:o[Mo("metadata")])!=null?t:null)]},Do=["class","method","getter","setter","accessor","field","value","get","set"],an=o=>o!==void 0&&typeof o!="function"?xr("Function expected"):o,Ou=(o,t,e,r,n)=>({kind:Do[o],name:t,metadata:r,addInitializer:i=>e._?xr("Already initialized"):n.push(an(i||null))}),ln=(o,t)=>_o(t,Mo("metadata"),o[3]),B=(o,t,e,r)=>{for(var n=0,i=o[t>>1],s=i&&i.length;n<s;n++)t&1?i[n].call(e):r=i[n].call(e,r);return r},j=(o,t,e,r,n,i)=>{var s,a,l,g,u,d=t&7,p=!!(t&8),f=!!(t&16),c=d>3?o.length+1:d?p?1:2:0,h=Do[d+5],b=d>3&&(o[c-1]=[]),T=o[c]||(o[c]=[]),x=d&&(!f&&!p&&(n=n.prototype),d<5&&(d>3||!f)&&qo(d<4?n:{get[e](){return m(this,i)},set[e](k){return S(this,i,k)}},e));d?f&&d<4&&jo(i,(d>2?"set ":d>1?"get ":"")+e):jo(n,e);for(var y=r.length-1;y>=0;y--)g=Ou(d,e,l={},o[3],T),d&&(g.static=p,g.private=f,u=g.access={has:f?k=>qu(n,k):k=>e in k},d^3&&(u.get=f?k=>(d^1?m:C)(k,n,d^4?i:x.get):k=>k[e]),d>2&&(u.set=f?(k,A)=>S(k,n,A,d^4?i:x.set):(k,A)=>k[e]=A)),a=(0,r[y])(d?d<4?f?i:x[h]:d>4?void 0:{get:x.get,set:x.set}:n,g),l._=1,d^4||a===void 0?an(a)&&(d>4?b.unshift(a):d?f?i=a:x[h]=a:n=a):typeof a!="object"||a===null?xr("Object expected"):(an(s=a.get)&&(x.get=s),an(s=a.set)&&(x.set=s),an(s=a.init)&&b.unshift(s));return d||ln(o,n),x&&Wt(n,e,x),f?d^4?i:x:n},ge=(o,t,e)=>_o(o,typeof t!="symbol"?t+"":t,e),Ji=(o,t,e)=>t.has(o)||xr("Cannot "+e),qu=(o,t)=>Object(t)!==t?xr('Cannot use the "in" operator on this value'):o.has(t),m=(o,t,e)=>(Ji(o,t,"read from private field"),e?e.call(o):t.get(o)),w=(o,t,e)=>t.has(o)?xr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(o):t.set(o,e),S=(o,t,e,r)=>(Ji(o,t,"write to private field"),r?r.call(o,e):t.set(o,e),e),C=(o,t,e)=>(Ji(o,t,"access private method"),e);var Yn=(o,t,e,r)=>({set _(n){S(o,t,n,e)},get _(){return m(o,t,r)}});var Uo,Dt,Zn=L(()=>{"use strict";Uo=(()=>{let o={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};return Object.setPrototypeOf(o,null),o})(),Dt=(()=>{let o=["arg-in-ext","blank-alt","bold-header","format-leakage","fostered-content","h1","illegal-attr","insecure-style","invalid-gallery","invalid-imagemap","invalid-invoke","invalid-isbn","invalid-json","invalid-url","lonely-apos","lonely-bracket","lonely-http","nested-link","no-arg","no-duplicate","no-ignored","obsolete-attr","obsolete-tag","parsing-order","pipe-like","required-attr","syntax-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(o),o})()});function $e(o,t,e){return e===1?o.replace(/\0(\d+)g\x7F/gu,(r,n)=>$e(String(t[n]),t,2)):e===2?o.replace(/\0(\d+)n\x7F/gu,(r,n)=>String(t[n])):o.replace(/\0(\d+)\x7F/gu,(r,n)=>t[n])}var _e,Ho,tt,rt,nt,dn,yr,se,Pe,Mu,_u,ei,Ut,zo,Wu,Du,Ht,it,ae=L(()=>{"use strict";_e=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,Ho=String.raw`[^[\]<>"\0-\x1F\x7F${_e}\uFFFD]`,tt=String.raw`(?:\[[\da-f:.]+\]|${Ho})`,rt=String.raw`(?:${Ho}|\0\d+[cn!~]\x7F)*`,nt=o=>o.trim().toLowerCase();dn=(o,t)=>e=>e.replace(o,t),yr=dn(/[\0\x7F]|\r$/gmu,""),se=dn(/\0\d+[cn]\x7F/gu,""),Pe=(o,t="")=>o.map(e=>typeof e=="string"?e:e.text()).join(t),Mu={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},_u=dn(/&(?:#(\d+|[Xx][\da-fA-F]+)|([lg]t|[LG]T|[lr]brac[ke]|nbsp|amp|AMP|quot|QUOT));/gu,(o,t,e)=>t?String.fromCodePoint(+((/^x/iu.test(t)?"0":"")+t)):Mu[e.toLowerCase()]),Ut=o=>(ei!=null||(ei=_u),ei(o)),zo=dn(/&#(\d+|x[\da-f]+);/giu,(o,t)=>String.fromCodePoint(+((/^x/iu.test(t)?"0":"")+t))),Wu={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},Du=(o=/[&<>"{}[\]|]/gu)=>dn(o,t=>`&${Wu[t]};`),Ht=Du(/[&<>]/gu),it=(o,t={})=>{let{pre:e="",post:r="",sep:n=""}=t;return e+o.map(i=>i.print()).join(n)+r}});var Go=Qi((Ep,Uu)=>{Uu.exports={"argument-in-ext":"template argument inside an extension tag","attributes-of-closing-tag":"attributes of a closing tag","blank-alt":"blank alt attribute","bold-apostrophes":"bold apostrophes","bold-in-header":"bold text in a section header",close:null,"closing-and-self-closing":"tag that is both closing and self-closing",comment:null,"conflicting-image-parameter":"conflicting image $1 parameter","content-outside-table":"content to be moved outside the table",decode:null,delink:null,"duplicate-attribute":"duplicate $1 attribute","duplicate-category":"duplicate category","duplicate-id":"duplicate HTML id","duplicate-image-parameter":"duplicate image $1 parameter","duplicate-parameter":"duplicate template parameter",encode:null,escape:null,expand:null,"ext-in-html":"extension tag in HTML tag attributes",frame:null,"full-width-punctuation":"full-width punctuation","header-in-html":"section header in HTML tag attributes","header-like":"header-like syntax in plain text","horizontal-alignment":null,"html-in-table":"HTML tag in table attributes","illegal-attribute-name":"invalid attribute name","illegal-attribute-value":"invalid attribute value","illegal-module":"invalid Scribunto module name","imagemap-without-image":"<imagemap> without an image","in-url":"$1 in URL","inconsistent-table":"inconsistent table layout","insecure-style":"insecure style","invalid-attribute":"element containing an invalid attribute name","invalid-category":"invalid category name","invalid-content":"invalid content in <$1>","invalid-conversion-flag":"invalid conversion flag","invalid-gallery":"invalid gallery image","invalid-gallery-link":"invalid link in gallery image","invalid-image-parameter":"invalid image parameter","invalid-imagemap-link":"invalid link in <imagemap>","invalid-isbn":"invalid ISBN","invalid-parameter":"invalid parameter of <$1>","invalid-self-closing":"invalid self-closing tag","invalid-thumb":"invalid thumbnail filename","invalid-url":"invalid URL","invisible-triple-braces":"invisible content inside triple braces","italic-apostrophes":"italic apostrophes","left-bracket":"opening bracket","link-in-extlink":"internal link in an external link",lonely:'lonely "$1"',"missing-extension":"missing file extension","missing-function":"missing Scribunto module function name",newline:null,"no-self-closing":"no self-closing","nonzero-tabindex":"nonzero tabindex","nothing-in":"nothing should be in <$1>","obsolete-attribute":"obsolete attribute","obsolete-tag":"obsolete HTML tag",open:null,prefix:null,"pipe-in-link":'additional "|" in the link text',"pipe-in-table":'additional "|" in a table cell',"redirect-like":"redirect-like syntax in a list item","ref-in-link":"<ref> in an internal or external link",remove:null,"required-attribute":"required $1 attribute is missing","template-in-link":"template in an internal link target","unbalanced-in-section-header":"unbalanced $1 in a section header",unclosed:"unclosed $1","unclosed-comment":"unclosed HTML comment","unclosed-quotes":"unclosed quotes","unclosed-table":"unclosed table","unclosed-tag":"unclosed tag","unescaped-query":"unescaped query string in an anonymous parameter","unexpected-argument":"unexpected template argument","unmatched-closing":"unmatched closing tag","unnecessary-encoding":"unnecessary percent-encoding in an internal link",uppercase:null,"useless-attribute":"useless attribute","useless-fragment":"useless fragment","useless-link-text":"useless link text","variable-anchor":"variable anchor in a section header","vertical-alignment":null,whitespace:null}});var Vo=Qi(($p,Hu)=>{Hu.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"},{"!":"!","=":"="},["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:|wikipedia://|worldwind://|xmpp:|commonsfinder://",interwiki:[],img:{},redirection:["#redirect"],variants:[]}});var Ko,Qo,un,Jo,Xi,gn=L(()=>{"use strict";Ko=Go(),Qo=new Set(["alt","link","lang","page","caption"]),un=new Set(["tiff","tif","png","gif","jpg","jpeg","webp","xcf","pdf","svg","djvu"]),Jo=["templatedata","mapframe","maplink"],Xi=Vo()});var Xo,zu,pn,Yo,Zo,ea,ta=L(()=>{"use strict";Xo={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
1
+ "use strict";(()=>{var Ru=Object.create;var br=Object.defineProperty;var Mo=Object.getOwnPropertyDescriptor;var Fu=Object.getOwnPropertyNames;var Pu=Object.prototype.hasOwnProperty;var _o=(o,t)=>(t=Symbol[o])?t:Symbol.for("Symbol."+o),xr=o=>{throw TypeError(o)};var Wo=(o,t,e)=>t in o?br(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e;var qo=(o,t)=>br(o,"name",{value:t,configurable:!0});var L=(o,t)=>()=>(o&&(t=o(o=0)),t);var Do=(o,t)=>()=>(t||o((t={exports:{}}).exports,t),t.exports),re=(o,t)=>{for(var e in t)br(o,e,{get:t[e],enumerable:!0})},Bu=(o,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Fu(t))!Pu.call(o,n)&&n!==e&&br(o,n,{get:()=>t[n],enumerable:!(r=Mo(t,n))||r.enumerable});return o};var X=o=>Bu(br({},"__esModule",{value:!0}),o);var O=o=>{var t;return[,,,Ru((t=o==null?void 0:o[_o("metadata")])!=null?t:null)]},Uo=["class","method","getter","setter","accessor","field","value","get","set"],an=o=>o!==void 0&&typeof o!="function"?xr("Function expected"):o,ju=(o,t,e,r,n)=>({kind:Uo[o],name:t,metadata:r,addInitializer:i=>e._?xr("Already initialized"):n.push(an(i||null))}),ln=(o,t)=>Wo(t,_o("metadata"),o[3]),B=(o,t,e,r)=>{for(var n=0,i=o[t>>1],s=i&&i.length;n<s;n++)t&1?i[n].call(e):r=i[n].call(e,r);return r},j=(o,t,e,r,n,i)=>{var s,a,l,g,u,d=t&7,p=!!(t&8),f=!!(t&16),c=d>3?o.length+1:d?p?1:2:0,h=Uo[d+5],b=d>3&&(o[c-1]=[]),T=o[c]||(o[c]=[]),x=d&&(!f&&!p&&(n=n.prototype),d<5&&(d>3||!f)&&Mo(d<4?n:{get[e](){return m(this,i)},set[e](k){return S(this,i,k)}},e));d?f&&d<4&&qo(i,(d>2?"set ":d>1?"get ":"")+e):qo(n,e);for(var y=r.length-1;y>=0;y--)g=ju(d,e,l={},o[3],T),d&&(g.static=p,g.private=f,u=g.access={has:f?k=>Ou(n,k):k=>e in k},d^3&&(u.get=f?k=>(d^1?m:C)(k,n,d^4?i:x.get):k=>k[e]),d>2&&(u.set=f?(k,A)=>S(k,n,A,d^4?i:x.set):(k,A)=>k[e]=A)),a=(0,r[y])(d?d<4?f?i:x[h]:d>4?void 0:{get:x.get,set:x.set}:n,g),l._=1,d^4||a===void 0?an(a)&&(d>4?b.unshift(a):d?f?i=a:x[h]=a:n=a):typeof a!="object"||a===null?xr("Object expected"):(an(s=a.get)&&(x.get=s),an(s=a.set)&&(x.set=s),an(s=a.init)&&b.unshift(s));return d||ln(o,n),x&&br(n,e,x),f?d^4?i:x:n},ge=(o,t,e)=>Wo(o,typeof t!="symbol"?t+"":t,e),Xi=(o,t,e)=>t.has(o)||xr("Cannot "+e),Ou=(o,t)=>Object(t)!==t?xr('Cannot use the "in" operator on this value'):o.has(t),m=(o,t,e)=>(Xi(o,t,"read from private field"),e?e.call(o):t.get(o)),w=(o,t,e)=>t.has(o)?xr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(o):t.set(o,e),S=(o,t,e,r)=>(Xi(o,t,"write to private field"),r?r.call(o,e):t.set(o,e),e),C=(o,t,e)=>(Xi(o,t,"access private method"),e);var Zn=(o,t,e,r)=>({set _(n){S(o,t,n,e)},get _(){return m(o,t,r)}});var At,qu,Ho,ei=L(()=>{"use strict";At=o=>!/^_{2}.+_{2}$/u.test(o),qu={"sr-ec":"sr-Cyrl","sr-el":"sr-Latn","zh-cn":"zh-Hans-CN","zh-sg":"zh-Hans-SG","zh-my":"zh-Hans-MY","zh-tw":"zh-Hant-TW","zh-hk":"zh-Hant-HK","zh-mo":"zh-Hant-MO"},Ho=o=>{var e;if(o.length===0||o.some(r=>r.toLowerCase()!==r))return o;let t=new Set(o);for(let r of o)try{t.add((e=qu[r])!=null?e:String(new Intl.Locale(r)))}catch{}return[...t]}});var zo,Wt,ti=L(()=>{"use strict";zo=(()=>{let o={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};return Object.setPrototypeOf(o,null),o})(),Wt=(()=>{let o=["arg-in-ext","blank-alt","bold-header","format-leakage","fostered-content","h1","illegal-attr","insecure-style","invalid-gallery","invalid-imagemap","invalid-invoke","invalid-isbn","invalid-json","invalid-ref","invalid-url","lonely-apos","lonely-bracket","lonely-http","nested-link","no-arg","no-duplicate","no-ignored","obsolete-attr","obsolete-tag","parsing-order","pipe-like","required-attr","syntax-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(o),o})()});function $e(o,t,e){return e===1?o.replace(/\0(\d+)g\x7F/gu,(r,n)=>$e(String(t[n]),t,2)):e===2?o.replace(/\0(\d+)n\x7F/gu,(r,n)=>String(t[n])):o.replace(/\0(\d+)\x7F/gu,(r,n)=>t[n])}var _e,Go,tt,rt,nt,dn,yr,se,Ne,Mu,_u,ri,Dt,Vo,Yi,Wu,Du,Ut,it,oe=L(()=>{"use strict";_e=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,Go=String.raw`[^[\]<>"\0-\x1F\x7F${_e}\uFFFD]`,tt=String.raw`(?:\[[\da-f:.]+\]|${Go})`,rt=String.raw`(?:${Go}|\0\d+[cn!~]\x7F)*`,nt=o=>o.trim().toLowerCase();dn=(o,t)=>e=>e.replace(o,t),yr=dn(/[\0\x7F]|\r$/gmu,""),se=dn(/\0\d+[cn]\x7F/gu,""),Ne=(o,t="")=>o.map(e=>typeof e=="string"?e:e.text()).join(t),Mu={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},_u=dn(/&(?:#(\d+|[Xx][\da-fA-F]+)|([lg]t|[LG]T|[lr]brac[ke]|nbsp|amp|AMP|quot|QUOT));/gu,(o,t,e)=>t?String.fromCodePoint(+((/^x/iu.test(t)?"0":"")+t)):Mu[e.toLowerCase()]),Dt=o=>(ri!=null||(ri=_u),ri(o)),Vo=dn(/&#(\d+|x[\da-f]+);/giu,(o,t)=>String.fromCodePoint(+((/^x/iu.test(t)?"0":"")+t))),Yi=o=>o.map(t=>t.toLowerCase()),Wu={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},Du=(o=/[&<>"{}[\]|]/gu)=>dn(o,t=>`&${Wu[t]};`),Ut=Du(/[&<>]/gu),it=(o,t={})=>{let{pre:e="",post:r="",sep:n=""}=t;return e+o.map(i=>i.print()).join(n)+r}});var Ko=Do((Np,Uu)=>{Uu.exports={"argument-in-ext":"template argument inside an extension tag","attributes-of-closing-tag":"attributes of a closing tag","blank-alt":"blank alt attribute","bold-apostrophes":"bold apostrophes","bold-in-header":"bold text in a section header",close:null,"closing-and-self-closing":"tag that is both closing and self-closing",comment:null,"conflicting-image-parameter":"conflicting image $1 parameter","content-outside-table":"content to be moved outside the table",decode:null,delink:null,"duplicate-attribute":"duplicate $1 attribute","duplicate-category":"duplicate category","duplicate-id":"duplicate HTML id","duplicate-image-parameter":"duplicate image $1 parameter","duplicate-parameter":"duplicate template parameter",encode:null,escape:null,expand:null,"ext-in-html":"extension tag in HTML tag attributes",frame:null,"full-width-punctuation":"full-width punctuation","header-in-html":"section header in HTML tag attributes","header-like":"header-like syntax in plain text","horizontal-alignment":null,"html-in-table":"HTML tag in table attributes","illegal-attribute-name":"invalid attribute name","illegal-attribute-value":"invalid attribute value","illegal-module":"invalid Scribunto module name","imagemap-without-image":"<imagemap> without an image","in-url":"$1 in URL","inconsistent-table":"inconsistent table layout","insecure-style":"insecure style","int-name":"name cannot be a simple integer","invalid-attribute":"element containing an invalid attribute name","invalid-category":"invalid category name","invalid-content":"invalid content in <$1>","invalid-conversion-flag":"invalid conversion flag","invalid-gallery":"invalid gallery image","invalid-gallery-link":"invalid link in gallery image","invalid-image-parameter":"invalid image parameter","invalid-imagemap-link":"invalid link in <imagemap>","invalid-isbn":"invalid ISBN","invalid-parameter":"invalid parameter of <$1>","invalid-self-closing":"invalid self-closing tag","invalid-thumb":"invalid thumbnail filename","invalid-url":"invalid URL","invisible-triple-braces":"invisible content inside triple braces","italic-apostrophes":"italic apostrophes","left-bracket":"opening bracket","link-in-extlink":"internal link in an external link",lonely:'lonely "$1"',"missing-extension":"missing file extension","missing-function":"missing Scribunto module function name",newline:null,"no-empty":"<$1> should not be empty","no-empty-in-references":"<ref> tag defined in <references> has no content","no-named-in-references":"<ref> tag defined in <references> has no name attribute","no-self-closing":"no self-closing","nonzero-tabindex":"nonzero tabindex","nothing-in":"nothing should be in <$1>","obsolete-attribute":"obsolete attribute","obsolete-tag":"obsolete HTML tag",open:null,prefix:null,"pipe-in-link":'additional "|" in the link text',"pipe-in-table":'additional "|" in a table cell',"redirect-like":"redirect-like syntax in a list item","ref-details":"a <ref> tag with details must contain content or point to a parent reference by name","ref-follow":"a <ref follow> tag that is the continuation of a previous one cannot be named individually or have details","ref-in-link":"<ref> in an internal or external link","ref-no-name":"<ref> with no name must have content",remove:null,"required-attribute":"required $1 attribute is missing","template-in-link":"template in an internal link target","unbalanced-in-section-header":"unbalanced $1 in a section header",unclosed:"unclosed $1","unclosed-comment":"unclosed HTML comment","unclosed-quotes":"unclosed quotes","unclosed-table":"unclosed table","unclosed-tag":"unclosed tag","unescaped-query":"unescaped query string in an anonymous parameter","unexpected-argument":"unexpected template argument","unmatched-closing":"unmatched closing tag","unnecessary-encoding":"unnecessary percent-encoding in an internal link",uppercase:null,"useless-attribute":"useless attribute","useless-fragment":"useless fragment","useless-link-text":"useless link text","variable-anchor":"variable anchor in a section header","vertical-alignment":null,whitespace:null}});var Qo=Do((Ip,Hu)=>{Hu.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"},{"!":"!","=":"="},["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:|wikipedia://|worldwind://|xmpp:|commonsfinder://",interwiki:[],img:{},redirection:["#redirect"],variants:[]}});var Jo,Xo,un,Yo,Zi,gn=L(()=>{"use strict";Jo=Ko(),Xo=new Set(["alt","link","lang","page","caption"]),un=new Set(["tiff","tif","png","gif","jpg","jpeg","webp","xcf","pdf","svg","djvu"]),Yo=["templatedata","mapframe","maplink"],Zi=Qo()});var Zo,zu,pn,ea,ta,ra,na=L(()=>{"use strict";Zo={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
2
2
  `,r:"\r",t:" "},zu=new Set([" "," ",`
3
- `,"\r"]),pn=o=>o===""?"end of input":o==='"'?`'"'`:JSON.stringify(o),Yo=o=>{let t,e,r,n,i=(b,T,x)=>{T===void 0?b.from=t-1:(b.from=T,b.to=x!=null?x:t-1)},s=(b,T,x)=>{let y={message:b,severity:"warning"};i(y,T,x),n.push(y)},a=(b,T,x)=>{let y={warnings:n,message:b,severity:"error"};throw i(y,T,x),y},l=b=>(b&&b!==e&&a(`Expected ${pn(b)} instead of ${pn(e)}`),e=r.charAt(t),t++,e),g=()=>{let b="",T=t-1;if(e==="-"&&(b="-",l()),e==="0")b+=e,l(),e>="0"&&e<="9"&&a("Bad number");else if(e>="1"&&e<="9")for(;e>="0"&&e<="9";)b+=e,l();else a("No number after minus sign");if(e!=="."&&e!=="e"&&e!=="E"){let y=Number(b);Number.isSafeInteger(y)||s("Not a safe integer",T);return}if(e===".")for(b+=".",l(),(e<"0"||e>"9")&&a("Unterminated fractional number");e>="0"&&e<="9";)b+=e,l();if(e==="e"||e==="E")for(b+=e,l(),(e==="-"||e==="+")&&(b+=e,l());e>="0"&&e<="9";)b+=e,l();let x=Number(b);Number.isFinite(x)||a("Bad number")},u=()=>{let b="";if(e==='"')for(;l();){if(e==='"')return l(),b;let T=t-1;if(e==="\\")if(l(),e==="u"){let x=0,y=0;for(;x<4;x++){let k=parseInt(l(),16);if(!isFinite(k))break;y=y*16+k}x<4&&a("Bad unicode escape",T),b+=String.fromCharCode(y)}else typeof Xo[e]=="string"?b+=Xo[e]:a("Bad escaped character",T,t);else e<" "?a("Bad control character",T,t):b+=e}else a(`Expected '"' instead of ${JSON.stringify(e)}`);return a("Unterminated string")},d=()=>{for(;e;){for(;e&&zu.has(e);)l();if(o&&e==="/"){let b=r.charAt(t);if(b==="/"){for(l(),l();e&&e!==`
4
- `&&e!=="\r";)l();continue}else if(b==="*"){for(l(),l();e&&!(e==="*"&&r.charAt(t)==="/");)l();e==="*"&&(l(),l());continue}}break}},p=()=>{switch(e){case"t":l(),l("r"),l("u"),l("e");return;case"f":l(),l("a"),l("l"),l("s"),l("e");return;case"n":l(),l("u"),l("l"),l("l");return;default:a(`Unexpected ${JSON.stringify(e)}`)}},f=()=>{if(l(),d(),e==="]"){l();return}else if(o&&e===","){l(),d(),l("]");return}let b;for(;e;){if(e==="]"){if(o){l();return}a("Trailing comma in array",b,b+1)}if(h(),d(),e==="]"){l();return}else e===","?(b=t-1,l(),d()):a(`Expected "," or "]" instead of ${pn(e)}`)}a("Unterminated array")},c=()=>{let b=new Set;if(l(),d(),e==="}"){l();return}else if(o&&e===","){l(),d(),l("}");return}let T;for(;e;){if(e==="}"){if(o){l();return}a("Trailing comma in object",T,T+1)}T=t;let x=u(),y=t-2;if(d(),l(":"),b.has(x)?s(`Duplicate key ${pn(x)}`,T,y):b.add(x),h(),d(),e==="}"){l();return}else e===","?(T=t-1,l(),d()):a(`Expected "," or "}" instead of ${pn(e)}`)}a(`Expected '"'`)},h=()=>{switch(d(),e){case"":return;case"{":return c();case"[":return f();case'"':return u();case"-":return g();default:return e>="0"&&e<="9"?g():p()}};return b=>{if(r=b,n=[],t=0,e=" ",h(),d(),e)a("Syntax error");else if(n.length>0)throw{warnings:n}}},Zo=Yo(),ea=Yo(!0)});function Be(o){let t=new Map,e=new WeakMap;return r=>{let n=typeof r=="string"?t:e;if(n.has(r)){let s=n.get(r);return s.lastIndex=0,s}let i=o(r);return n.set(r,i),i}}var zt,Gu,ra,Vu,na,ti,Yi,ia,Ku,sa,oa,aa,ri,We=L(()=>{"use strict";ta();zt=o=>decodeURIComponent(o.replace(/%(?![\da-f]{2})/giu,"%25")),Gu=o=>Math.round(o).toString(16).padStart(2,"0"),ra=o=>Gu(o*255),Vu=(()=>{let o=String.raw`#(?:[\da-f]{3,4}|(?:[\da-f]{2}){3,4})(?![\p{L}\p{N}_])`,t=String.raw`(?:\d*\.)?\d+%?`,e=String.raw`(?:\d*\.)?\d+(?:deg|grad|rad|turn)?`,r=String.raw`rgba?\(\s*(?:${String.raw`${Array.from({length:3},()=>t).join(String.raw`\s+`)}(?:\s*\/\s*${t})?`}|${String.raw`${Array.from({length:3},()=>t).join(String.raw`\s*,\s*`)}(?:\s*,\s*${t})?`})\s*\)`,n=String.raw`hsla?\(\s*(?:${String.raw`${e}\s+${t}\s+${t}(?:\s*\/\s*${t})?`}|${String.raw`${e}${String.raw`\s*,\s*(?:\d*\.)?\d+%`.repeat(2)}(?:\s*,\s*${t})?`})\s*\)`;return{full:new RegExp(String.raw`(^|[^\p{L}\p{N}_])(${o}|${r}|${n})`,"giu"),rgb:new RegExp(String.raw`(^|[^\p{L}\p{N}_])(${o}|${r})`,"giu")}})(),na=(o,t=!0)=>{let e=[],r=Vu[t?"full":"rgb"];r.lastIndex=0;let n=r.exec(o),i=0;for(;n;){let s=n.index+n[1].length;s>i&&e.push([o.slice(i,s),i,s,!1]),{lastIndex:i}=r,e.push([n[2],s,i,o[s-1]!=="&"||!/^#\d+$/u.test(n[2])]),n=r.exec(o)}return o.length>i&&e.push([o.slice(i),i,o.length,!1]),e};ti=o=>{let t=[],e=0;for(let r of o.split(`
5
- `)){let n=e+r.length;t.push([r,e,n]),e=n+1}return t},Yi=o=>o&&Number(o[1]),ia=(o,t)=>{var n;let e,r=i=>{e!=null||(e=ti(o));let s=e.findIndex(([,,a])=>i<=a)+1;return{line:s,column:i-e[s-1][1]+1}};for(let i of t){let{line:s,column:a,from:l,to:g}=i;l==null?s?(e!=null||(e=ti(o)),(n=i.column)!=null||(i.column=1),i.from=e[s-1][1]+(i.column-1)):(i.from=0,i.line=1,i.column=1):(!s||!a)&&Object.assign(i,r(l)),g!==void 0&&({line:i.endLine,column:i.endColumn}=r(g)),i.position=i.from}return t},Ku=(o,t)=>{if(t||o.trim())try{JSON.parse(o)}catch(e){let{message:r}=e,n=Yi(/\bline (\d+)/u.exec(r)),i=Yi(/\bcolumn (\d+)/u.exec(r)),s=Yi(/\bposition (\d+)/u.exec(r));return ia(o,[{message:r,line:n,column:i,from:s,severity:"error"}])}return[]},sa=(o,t)=>{try{t(o)}catch(e){if(!(e instanceof Error)){let{warnings:r,...n}=e;return n.message&&r.push(n),ia(o,r)}}return[]},oa=o=>{var e;if(!o.trim())return[];let t=sa(o,Zo);return((e=t[t.length-1])==null?void 0:e.severity)==="error"?t:[...t,...Ku(o)]},aa=o=>o.trim()?sa(o,ea):[],ri=(o,t=/\S|$/u)=>o.search(t)});var cn,Tr,fn,mn,Zi,U,pe=L(()=>{"use strict";U=class{constructor(t,e){w(this,mn);w(this,cn);w(this,Tr);w(this,fn);S(this,cn,t),S(this,Tr,e)}get start(){return m(this,Tr)}get top(){return C(this,mn,Zi).call(this).top}get left(){return C(this,mn,Zi).call(this).left}};cn=new WeakMap,Tr=new WeakMap,fn=new WeakMap,mn=new WeakSet,Zi=function(){var t;return(t=m(this,fn))!=null||S(this,fn,m(this,cn).getRootNode().posFromIndex(m(this,Tr))),m(this,fn)}});var Qu,Ju,kr,vr,la,q,P,ve,Ar,M,ni,je,ii,si,oi,At,st,ai,ze,li,G=L(()=>{"use strict";We();Ae();pe();D();Qu=new Set(["tr","td","th","caption"]),Ju=new Set(["Template:!!","Template:!-"]),kr=o=>{let t=o.childNodes.find(e=>e.text().trim());if(!t||t.type==="text"&&t.data.trim().startsWith("!")||t.is("magic-word")&&t.name==="!"||t.is("template")&&Ju.has(t.name)||t.is("html")&&Qu.has(t.name))return!1;if(t.is("arg"))return t.length>1&&kr(t.childNodes[1]);if(t.is("magic-word"))try{let e=t.getPossibleValues().map(kr);return e.includes(2)?2:e.includes(1)&&1}catch{}return t.is("template")||t.is("magic-word")&&t.name==="invoke"?1:2},vr=(o,t,e,r)=>({line:o+e-1,character:(e===1?t:0)+r}),la=o=>(t,e,r,n,i="error")=>{let{start:s}=e,{top:a,left:l}=e instanceof U?e:new U(t,s),{offsetHeight:g,offsetWidth:u}=t,{startIndex:d,startLine:p,startCol:f}=o(t,s,a,l),{line:c,character:h}=vr(p,f,g,u);return{rule:r,message:v.msg(n),severity:i,startIndex:d,endIndex:d+t.toString().length,startLine:p,endLine:c,startCol:f,endCol:h}},q=la((o,t,e,r)=>{let n=o.getRelativeIndex(),{top:i,left:s}=o.parentNode.posFromIndex(n);return{startIndex:t+n,startLine:e+i,startCol:i?s:r+s}}),P=la((o,t,e,r)=>({startIndex:t,startLine:e,startCol:r})),ve=(o,t,e,r=0)=>({desc:v.msg(t),range:[o.startIndex+r,o.endIndex],text:e}),Ar=(o,t,e)=>({desc:v.msg(t),range:[o,o],text:e}),M=(o,t=0,e="")=>typeof o=="number"?{desc:v.msg("remove"),range:[o,o+t],text:e}:ve(o,"remove",e,t),ni=(o,t)=>ve(o,"decode",zt(t.text().replace(/%(?=21|3[ce]|5[bd]|7[b-d])/giu,"%25"))),je=(o,t,e=0)=>({desc:v.msg("close"),range:[o+e,o],text:t}),ii=o=>({desc:v.msg("open"),range:[o+1,o+2],text:""}),si=(o,t)=>ve(o,"comment",`<!--${t}-->`),oi=(o,t)=>ve(o,"uppercase",t.toUpperCase()),At=(o,t=0)=>({desc:v.msg("whitespace"),range:[o,o+t],text:" "}),st=(o,t,e=1)=>({desc:v.msg("escape"),range:[o,o+e],text:t.repeat(e)}),ai=(o,t)=>({desc:v.msg("escape"),range:[o,o+t.length],text:t.replace(/\|/gu,"&#124;")}),ze=(o,t,e,r)=>{if(o&&(r||v.viewOnly&&o[0]===Q.rev))return o[1];let n=t();return(r||v.viewOnly)&&e([Q.rev,n]),n},li=(o,t)=>o==="ol"&&t==="type"?["1","a","A","i","I"]:o==="th"&&t==="scope"?["row","col","rowgroup","colgroup"]:t==="dir"?["ltr","rtl","auto"]:t==="aria-hidden"?["true","false"]:[]});var ua=Qi((Wp,da)=>{da.exports=function(o,t,e,r,n){var i,s;if(r===void 0)r=0;else if(r=r|0,r<0||r>=o.length)throw new RangeError("invalid lower bound");if(n===void 0)n=o.length-1;else if(n=n|0,n<r||n>=o.length)throw new RangeError("invalid upper bound");for(;r<=n;)if(i=r+(n-r>>>1),s=+e(o[i],t,i,o),s<0)r=i+1;else if(s>0)n=i-1;else return i;return~r}});var ga,pa,ca=L(()=>{"use strict";ga=ju(ua()),pa=(o,t,e)=>{let r=(0,ga.default)(o,t,e);return r<0?~r:r}});var Sr,di=L(()=>{"use strict";G();Sr=(o=!0)=>t=>{let e=new WeakMap;return function(...r){return ze(e.get(this),()=>t.apply(this,r),n=>{e.set(this,n)},o)}}});var fa,ma=L(()=>{"use strict";fa=o=>{class t extends o{get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get offsetHeight(){return this.getDimension().height}get offsetWidth(){return this.getDimension().width}}return t}});var ha,ba,bn,wr,Cr,xn,ot,Lr,hn,Ge,es=L(()=>{"use strict";We();ca();G();Ae();di();ma();D();ba=[fa],ha=[Sr(!1)];Ge=class{constructor(){B(hn,5,this);ge(this,"childNodes",[]);w(this,bn);w(this,wr);w(this,Cr);w(this,xn);w(this,ot);w(this,Lr,{})}get parentNode(){return m(this,bn)}get nextSibling(){return m(this,wr)}get previousSibling(){return m(this,Cr)}getChildNodes(){let{childNodes:t}=this;return Object.isFrozen(t)?[...t]:t}getAttribute(t){return t==="padding"?0:this[t]}setAttribute(t,e){switch(t){case"parentNode":S(this,bn,e),e||(S(this,wr,void 0),S(this,Cr,void 0));break;case"nextSibling":S(this,wr,e);break;case"previousSibling":S(this,Cr,e);break;case"aIndex":v.viewOnly&&S(this,ot,[Q.rev,e]);break;default:this[t]=e}}getRootNode(){return ze(m(this,xn),()=>{var t,e;return(e=(t=this.parentNode)==null?void 0:t.getRootNode())!=null?e:this},t=>{let[,e]=t;e.type==="root"&&S(this,xn,t)})}indexFromPos(t,e){{if(t<0||e<0)return;let r=this.getLines();if(t>=r.length)return;let[,n,i]=r[t],s=n+e;return s>i?void 0:s}}posFromIndex(t){{let{length:e}=String(this);if(t+=t<0?e:0,t>=0&&t<=e){let r=this.getLines(),n=pa(r,t,([,,i],s)=>i-s);return{top:n,left:t-r[n][1]}}return}}getDimension(){{let t=this.getLines(),e=t[t.length-1];return{height:t.length,width:e[2]-e[1]}}}getGaps(t){return 0}getRelativeIndex(t){if(t===void 0){let{parentNode:e}=this;return e?e.getRelativeIndex(e.childNodes.indexOf(this)):0}return ze(m(this,Lr)[t],()=>{var s;let{childNodes:e}=this,r=((s=m(this,ot))==null?void 0:s[0])===Q.rev&&m(this,ot)[1],n=t+(t<0?e.length:0),i=this.getAttribute("padding");for(let a=0;a<n;a++)v.viewOnly&&(m(this,Lr)[a]=[Q.rev,i],r!==!1&&S(e[a],ot,[Q.rev,r+i])),i+=e[a].toString().length+this.getGaps(a);return i},e=>{m(this,Lr)[t]=e})}getAbsoluteIndex(){return ze(m(this,ot),()=>{let{parentNode:t}=this;return t?t.getAbsoluteIndex()+this.getRelativeIndex():0},t=>{S(this,ot,t)})}getBoundingClientRect(){return{...this.getDimension(),...this.getRootNode().posFromIndex(this.getAbsoluteIndex())}}is(t){return this.type===t}getLines(){return ti(String(this))}seal(t,e){{if(v.internal)return;let r=!e&&!!this[t];r||Object.defineProperty(this,t,{enumerable:r,configurable:!0})}}lspError(t){throw new Error(`${t} method is only available in the LSP version!`)}};hn=O(null),bn=new WeakMap,wr=new WeakMap,Cr=new WeakMap,xn=new WeakMap,ot=new WeakMap,Lr=new WeakMap,j(hn,1,"getLines",ha,Ge),Ge=j(hn,0,"AstNode",ba,Ge),B(hn,1,Ge)});var Xu,xa,ya=L(()=>{"use strict";Xu=o=>{if(o.includes("#")){let t=o.indexOf("#"),e=o.slice(0,t),r=o.slice(t+1);return(n,i)=>(t===0||n===e)&&i===r}return t=>t===o},xa=(o,t,e)=>{if(o=o.trim(),!o)return(()=>!0);let r=o.split(",").map(n=>n.trim()).filter(n=>n!=="").map(Xu);return(({type:n,name:i})=>r.some(s=>s(n,i)))}});var Ta,ka=L(()=>{"use strict";ya();Ta=o=>{var e,ui;class t extends o{constructor(){super(...arguments);w(this,e)}closest(s){let a=C(this,e,ui).call(this,s),{parentNode:l}=this;for(;l;){if(a(l))return l;({parentNode:l}=l)}}getElementBy(s){{let a=[...this.childNodes].reverse();for(;a.length>0;){let l=a.pop(),{type:g,childNodes:u}=l;if(g!=="text"){if(s(l))return l;for(let d=u.length-1;d>=0;d--)a.push(u[d])}}return}}querySelector(s){return this.getElementBy(C(this,e,ui).call(this,s))}getElementsBy(s){{let a=[...this.childNodes].reverse(),l=[];for(;a.length>0;){let g=a.pop(),{type:u,childNodes:d}=g;if(u!=="text"){s(g)&&l.push(g);for(let p=d.length-1;p>=0;p--)a.push(d[p])}}return l}}querySelectorAll(s){return this.getElementsBy(C(this,e,ui).call(this,s))}escape(){for(let s of this.childNodes)s.escape()}}return e=new WeakSet,ui=function(s){return xa(s,this)},t}});var va,ts,Yu,Gt,Aa=L(()=>{"use strict";ae();Ae();es();ka();va=[Ta];Gt=class extends(Yu=Ge){get length(){return this.childNodes.length}text(t){return Pe(this.childNodes,t)}removeAt(t){return Vt(this,t,1)[0]}insertAt(t,e=this.length){return Vt(this,e,0,[t]),t}isInside(t){var e;return((e=this.closest(`${t},ext`))==null?void 0:e.type)===t}append(...t){this.safeAppend(t)}safeAppend(t){for(let e of t)this.insertAt(e)}safeReplaceChildren(t){for(let e=this.length-1;e>=0;e--)this.removeAt(e);this.safeAppend([...t])}setText(t,e=0){e+=e<0?this.length:0;let r=this.childNodes[e],{data:n}=r;return r.replaceData(t),n}toString(t,e=""){return this.childNodes.map(r=>r.toString(t)).join(e)}caretPositionFromIndex(t){{if(t===void 0)return;let{length:e}=this.toString();if(t>e||t<-e)return;t+=t<0?e:0;let r=this,n=0,i=0;for(;r.type!=="text";){let{childNodes:s}=r;n+=r.getAttribute("padding");for(let a=0;n<=t&&a<s.length;a++){let l=s[a],{nextSibling:g}=l,u=l.toString(),d=u.length;if(l.setAttribute("aIndex",n),n+=d,n>t||n===t&&d>0&&(!g||g.type==="text"||l.type!=="text"&&(u.trim()||!g.toString().trim()))){r=l,n-=d,i=n;break}n+=r.getGaps(a)}if(r.childNodes===s)return{offsetNode:r,offset:t-i}}return{offsetNode:r,offset:t-i}}this.lspError("AstElement.caretPositionFromIndex")}elementFromIndex(t){var e;{let r=(e=this.caretPositionFromIndex(t))==null?void 0:e.offsetNode;return(r==null?void 0:r.type)==="text"?r.parentNode:r}this.lspError("AstElement.elementFromIndex")}elementFromPoint(t,e){return this.elementFromIndex(this.indexFromPos(e,t))}lint(t=this.getAbsoluteIndex(),e){{let r=[];for(let n=0,i=t+this.getAttribute("padding");n<this.length;n++){let s=this.childNodes[n];s.setAttribute("aIndex",i);let a=s.lint(i,e);a.length>0&&Array.prototype.push.apply(r,a),i+=s.toString().length+this.getGaps(n)}return r}}print(t={}){{let e=t.class;return this.toString()?(e===""?"":`<span class="wpb-${e!=null?e:this.type}${this.getAttribute("invalid")?" wpb-invalid":""}">`)+it(this.childNodes,t)+(e===""?"":"</span>"):""}}json(t,e=1/0,r=this.getAbsoluteIndex()){{let n={...this,type:this.type,range:[r,r+this.toString().length],childNodes:[]};if(e>=1)for(let i=0,s=r+this.getAttribute("padding");i<this.length;i++){let a=this.childNodes[i],{length:l}=a.toString();a.setAttribute("aIndex",s),n.childNodes.push(a.type==="text"?{data:a.data,range:[s,s+l]}:a.json(void 0,e-1,s)),s+=l+this.getGaps(i)}return n}}};ts=O(Yu),Gt=j(ts,0,"AstElement",va,Gt),B(ts,1,Gt)});var St,yn=L(()=>{"use strict";St=(o=1)=>t=>{class e extends t{getGaps(){return o}}return e}});var Z,we=L(()=>{"use strict";Z=o=>{{class t extends o{escape(){}}return t}}});var Zu,gi,Sa=L(()=>{"use strict";ae();G();D();V();Zu=new RegExp(`https?://${tt}${rt}$`,"iu"),gi=class extends ${get type(){return"parameter"}get anon(){return this.firstChild.length===0}get duplicated(){{let{parentNode:t,name:e}=this;return!!(t!=null&&t.isTemplate())&&t.getArgs(e,!1,!1).size>1}}constructor(t,e,r,n=[]){super(void 0,r,n);let i=new $(typeof t=="number"?void 0:t,r,n,{}),s=new $(e,r,n);i.type="parameter-key",i.setAttribute("stage",2),s.type="parameter-value",s.setAttribute("stage",2),this.append(i,s)}trimName(t,e=!0){let r=(typeof t=="string"?t:t.toString(!0)).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1");return this.setAttribute("name",r),r}afterBuild(){if(!this.anon){let{parentNode:t,firstChild:e}=this,r=this.trimName(e);t&&t.getArgs(r,!1,!1).add(this)}super.afterBuild()}toString(t){return this.anon?this.lastChild.toString(t):super.toString(t,"=")}text(){return this.anon?this.lastChild.text():super.text("=")}getGaps(){return this.anon?0:1}lint(t=this.getAbsoluteIndex(),e){var r;{let n=super.lint(t,e),i="unescaped",{lintConfig:s}=v,a=s.getSeverity(i);if(a){let{firstChild:l}=this,g=(r=Zu.exec(l.text()))==null?void 0:r[0];try{if(g&&new URL(g).search){let u=q(l,{start:t},i,"unescaped-query",a);u.startIndex=u.endIndex,u.startLine=u.endLine,u.startCol=u.endCol,u.endIndex++,u.endCol++,(s.computeEditInfo||s.fix)&&(u.fix=st(u.startIndex,"{{=}}")),n.push(u)}}catch{}}return n}}print(){return super.print({sep:this.anon?"":"="})}json(t,e,r=this.getAbsoluteIndex()){{let n=super.json(void 0,e,r);return Object.assign(n,{anon:this.anon},this.duplicated&&{duplicated:!0}),n}}}});var Er,ce,wt=L(()=>{"use strict";V();ce=class extends ${constructor(e,r,n,i,s){super(e,n,i,s);w(this,Er);S(this,Er,r)}get type(){return m(this,Er)}set type(e){S(this,Er,e)}getAttribute(e){var r;return e==="invalid"?this.type==="converter-flag"&&!!((r=this.parentNode)!=null&&r.isInvalidFlag(this)):super.getAttribute(e)}};Er=new WeakMap});var Tn,ye,Ct=L(()=>{"use strict";V();ye=class extends ${constructor(e,r,n,i,s){super(e,n,i,s);w(this,Tn);S(this,Tn,r)}get type(){return m(this,Tn)}lint(e=this.getAbsoluteIndex()){return super.lint(e,!1)}};Tn=new WeakMap});var La={};re(La,{TranscludeToken:()=>at});var wa,vn,Lt,$r,Kt,An,Nr,lt,kn,Ca,rs,eg,at,ns=L(()=>{"use strict";ae();G();Ae();pe();yn();we();D();V();Sa();wt();Ct();wa=[Z,St()];at=class extends(eg=$){constructor(e,r,n,i=[]){var T,x;let s,a=/^(?:\s|\0\d+[cn]\x7F)*\0(\d+)h\x7F(?:\s|\0\d+[cn]\x7F)*/u.exec(e);a&&(s=Number(a[1]),e=e.replace(`\0${s}h`,i[s].toString().replace(/^\n/u,"")));super(void 0,n,i,{});w(this,lt);ge(this,"modifier","");w(this,vn,"template");w(this,Lt,":");w(this,$r,!1);w(this,Kt,new Map);w(this,An,0);w(this,Nr);let{parserFunction:l,variable:g,functionHook:u}=n,d=(T=/^(?:\s|\0\d+[cn]\x7F)*\0\d+s\x7F/u.exec(e))==null?void 0:T[0];if(d)this.setAttribute("modifier",d),e=e.slice(d.length);else if(e.includes(":")){let[y,...k]=e.split(":"),[A]=/^(?:\s|\0\d+[cn]\x7F)*/u.exec((x=k[0])!=null?x:"");this.setModifier(`${y}:${A}`)&&(e=k.join(":").slice(A.length))}let p=e.search(/[::]/u),f=e[p]===":",c=p!==-1;if(c||r.length===0&&!m(this,$r)){let y=c?e.slice(0,p):e,k=c&&e.slice(p+1),A=se(y),I=c?A.slice(A.search(/\S/u))+(f?":":""):A.trim(),[,E,N]=Ea(I,l),z=!("functionHook"in n)||u.includes(N),_=g.includes(N);if(c?N&&z:_){this.setAttribute("name",N),S(this,vn,"magic-word"),f&&S(this,Lt,":");let Y=new ye(y,"magic-word-name",n,i);if(super.insertAt(Y),k!==!1&&r.unshift([k]),this.name==="invoke")for(let W=0;W<2;W++){let F=r.shift();if(!F)break;let R=new ce(F.join("="),`invoke-${W?"function":"module"}`,n,i);super.insertAt(R)}}}if(this.type==="template"){let y=se(e).trim();if(!this.normalizeTitle(y,10,{halfParsed:!0,temporary:!0}).valid)throw i.pop(),new SyntaxError("Invalid template name");let k=new ce(e,"template-name",n,i,{});super.insertAt(k)}typeof s=="number"&&(i[s]=void 0);let h=this.isTemplate(),b=1;for(let y=0;y<r.length;y++){let k=r[y];h||this.name==="switch"&&y>0||this.name==="tag"&&y>1||(k[0]=k.join("="),k.length=1),k.length===1&&(k.unshift(b),b++),this.insertAt(new gi(...k,n,i))}this.seal("modifier")}get type(){return m(this,vn)}get module(){return this.type==="magic-word"&&this.name==="invoke"?C(this,lt,kn).call(this).title:void 0}get function(){var e;return this.type==="magic-word"&&this.name==="invoke"?(e=this.childNodes[2])==null?void 0:e.text().trim():void 0}setModifier(e){let[,,r,n]=this.getAttribute("config").parserFunction,i=se(e).trim();if(e&&!i.endsWith(":"))return!1;let s=i.slice(0,-1).toLowerCase(),a=r.includes(s),l=n.includes(s);return(m(this,$r)?a:l||!e)||(Q.running||this.length>1)&&(a||l||!e)?(this.setAttribute("modifier",e),S(this,$r,a),!!e):!1}isTemplate(){return this.type==="template"||this.name==="invoke"}afterBuild(){this.modifier.includes("\0")&&this.setAttribute("modifier",this.buildFromStr(this.modifier,0)),super.afterBuild(),this.isTemplate()&&this.type==="template"&&(S(this,Nr,C(this,lt,kn).call(this)),this.setAttribute("name",m(this,Nr).title))}toString(e){let{childNodes:r,length:n,firstChild:i,modifier:s,type:a}=this;return`{{${s}${a==="magic-word"?i.toString(e)+(n===1?"":m(this,Lt))+r.slice(1).map(l=>l.toString(e)).join("|"):super.toString(e,"|")}}}`}text(){let{childNodes:e,length:r,firstChild:n,modifier:i,type:s,name:a}=this;return s==="magic-word"&&a==="vardefine"?"":`{{${i}${s==="magic-word"?n.text()+(r===1?"":m(this,Lt))+Pe(e.slice(1),"|"):super.text("|")}}}`}getAttribute(e){switch(e){case"padding":return this.modifier.length+2;case"title":return m(this,Nr);case"colon":return m(this,Lt);case"invalid":return this.type==="magic-word"&&this.name==="invoke"&&(this.length===2||!C(this,lt,kn).call(this).valid);default:return super.getAttribute(e)}}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r);if(!this.isTemplate())return n;let{type:i,childNodes:s,length:a}=this,l=new U(this,e),{lintConfig:g}=v,{computeEditInfo:u}=g,d=i==="magic-word",p="no-ignored",f=g.getSeverity(p,"fragment");if(d&&!C(this,lt,kn).call(this).valid)p="invalid-invoke",f=g.getSeverity(p,"name"),f&&n.push(q(s[1],l,p,"illegal-module",f));else if(f){let c=s[d?1:0],h=c.childNodes.findIndex(T=>T.type==="text"&&Ut(T.data).includes("#")),b=c.childNodes[h];if(b){let T=q(c,l,p,"useless-fragment",f);u&&(T.suggestions=[M(T,c.getRelativeIndex(h)+b.data.indexOf("#"))]),n.push(T)}}if(p="invalid-invoke",f=g.getSeverity(p,"function"),f&&d&&a===2)return n.push(P(this,l,p,"missing-function",f)),n;if(p="no-duplicate",f=g.getSeverity(p,"parameter"),f){let c=this.getDuplicatedArgs().filter(([,b])=>!b[0].querySelector("ext")),h="duplicate-parameter";for(let[,b]of c)Array.prototype.push.apply(n,b.map(T=>{let x=q(T,l,p,h,f);return u&&(x.suggestions=[M(x,-1)]),x}))}return n}}insertAt(e,r=this.length){return super.insertAt(e,r),e.anon?C(this,lt,Ca).call(this,e):e.name&&this.getArgs(e.name,!1,!1).add(e),e}getArgs(e,r,n=!0,i=!0){let s=String(e).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1"),a;return m(this,Kt).has(s)?a=m(this,Kt).get(s):(a=new Set,m(this,Kt).set(s,a)),a}getDuplicatedArgs(){return[...m(this,Kt)].filter(([,{size:e}])=>e>1).map(([e,r])=>[e,[...r]])}getPossibleValues(){let{type:e,name:r,childNodes:n,length:i}=this;if(e==="template")throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!");let s,a;switch(r){case"if":case"ifexist":case"ifexpr":s=2;break;case"ifeq":s=3;break;case"iferror":s=i>3?2:1;break;case"switch":{let l=n.slice(2),g=l[l.length-1];a=[...l.filter(({anon:u})=>!u),...g!=null&&g.anon?[g]:[]].map(({lastChild:u})=>u);break}default:throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!")}a!=null||(a=n.slice(s,s+2).map(({lastChild:l})=>l));for(let l=0;l<a.length;){let{length:g,0:u}=a[l].childNodes.filter(d=>d.text().trim());if(g===0)a.splice(l,1);else if(g>1||!u.is("magic-word"))l++;else try{let d=u.getPossibleValues();Array.prototype.splice.apply(a,[l,1,...d]),l+=d.length}catch{l++}}return a}print(){{let{childNodes:e,length:r,firstChild:n,modifier:i,type:s}=this;return`<span class="wpb-${s}${this.getAttribute("invalid")?" wpb-invalid":""}">{{${s==="magic-word"?Ht(i)+n.print()+(r===1?"":m(this,Lt))+it(e.slice(1),{sep:"|"}):(i?`<span class="wpb-magic-word">${Ht(i)}</span>`:"")+it(e,{sep:"|"})}}}</span>`}}};rs=O(eg),vn=new WeakMap,Lt=new WeakMap,$r=new WeakMap,Kt=new WeakMap,An=new WeakMap,Nr=new WeakMap,lt=new WeakSet,kn=function(){let e=this.type==="template";return this.normalizeTitle((e?"":"Module:")+se(this.childNodes[e?0:1].text()),10,{temporary:!0,...!e&&{page:""}})},Ca=function(e,r){S(this,An,m(this,An)+1);let n;n=m(this,An)-1;let i=e,s=String(n+1);i.setAttribute("name",s),this.getArgs(s,!1,!1).add(i)},at=j(rs,0,"TranscludeToken",wa,at),B(rs,1,at)});var is,Na,tg,rg,ng,ig,$a,sg,wn,ss,os,Sn,Ia=L(()=>{"use strict";ae();G();Ae();D();es();is=String.raw`[${_e}\t]*`,Na=String.raw`<(?:/[^\S\n]*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+|\n={2,}`,tg=new RegExp(String.raw`${Na}|\bhttps?[:/]/+|\b(?:rfc|pmid)(?=[-::]?${is}\d)|\bisbn(?=[-::]?${is}(?:\d(?:${is}|-)){6})`,"giu"),rg=new RegExp(Na,"giu"),ng=new Set(["attr-value","ext-link-text","link-text"]),ig={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},$a=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"]),sg=(()=>{try{return new RegExp(String.raw`[\p{L}\p{N}_]`,"u")}catch{return/\w/u}})(),os=class os extends Ge{constructor(e){super();w(this,wn);ge(this,"data","");this.data=e}get type(){return"text"}toString(e){var r;return e&&!((r=this.parentNode)!=null&&r.getAttribute("built"))?se(this.data):this.data}text(){return this.data}lint(e=this.getAbsoluteIndex(),r){var n,i,s;{if(r===!1)return[];let{data:a,parentNode:l,nextSibling:g,previousSibling:u}=this;if(!l)throw new Error("An isolated text node cannot be linted!");let{type:d,parentNode:p}=l;if(d==="attr-value"){let{name:W,tag:F}=p;if(F==="ref"&&(W==="name"||W==="follow")||W==="group"&&(F==="ref"||F==="references")||F==="choose"&&(W==="before"||W==="after"))return[]}if(r!=null||(r=l.isPlain()&&!ng.has(d)?tg:rg),a.search(r)===-1)return[];r.lastIndex=0;let f=[],c=g==null?void 0:g.type,h=g==null?void 0:g.name,b=u==null?void 0:u.type,T=this.getRootNode(),x=T.toString(),{ext:y,html:k,variants:A}=T.getAttribute("config"),{top:I,left:E}=T.posFromIndex(e),{lintConfig:N}=v,z=N.rules["tag-like"],_=z[1]?new Set(Object.keys(z[1]).filter(W=>W!=="invalid"&&W!=="disallowed")):new Set,Y=new Set(["onlyinclude","noinclude","includeonly",...y,...k[0],...k[1],...k[2],..._,...N.getSeverity("tag-like","disallowed")?$a:[]]);for(let W=r.exec(a);W;W=r.exec(a)){let{index:F,0:R}=W,[,ee,oe]=W,xe=R==="["&&d==="ext-link-text";if(oe&&oe!=="]"){let{length:ue}=oe;F+=ue,R=R.slice(ue)}else{if(R.startsWith("<")&&!Y.has(ee.toLowerCase())||xe&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(a.slice(F+1))||g!=null&&g.is("ext")&&h==="nowiki"&&((n=g.innerText)!=null&&n.includes("]"))))continue;R.startsWith(`
6
- ==`)&&(F++,R=R.slice(1))}R=R.toLowerCase();let[J]=R,de=R==="rfc"||R==="pmid"||R==="isbn",K=J==="{",kt=J==="}",on=J==="[",Hi=J==="]",{length:vt}=R;Hi&&(F||vt>1)&&r.lastIndex--;let br=e+F,qt=br+vt,ke,He,Jn,Xn,Mt=x[qt],zi=x[br-1],Gi=K||on,Vi=R==="{"&&zi==="-"&&A.length>0,Ki=R==="}"&&Mt==="-"&&A.length>0,Fo=on&&c==="free-ext-link"&&!a.slice(F+1).trim()||Hi&&b==="free-ext-link"&&F===0;if(de)ke="lonely-http",R=R.toUpperCase(),He=N.getSeverity(ke,R);else if(J==="<"){ke="tag-like";let ue;/^<\/?\s/u.test(R)||!/[\s/>]/u.test(Mt!=null?Mt:"")?ue="invalid":_.has(ee)?ue=ee:$a.has(ee)&&!y.includes(ee)&&(ue="disallowed"),He=N.getSeverity(ke,ue)}else if(J==="=")ke="syntax-like",He=N.getSeverity(ke,"heading");else if(Vi||Ki)ke="lonely-bracket",He=N.getSeverity(ke,"converter"),Vi&&F>0?(R="-{",F--,br--,vt=2):Ki&&F<a.length-1&&(R="}-",qt++,vt=2);else if(Fo)ke="lonely-bracket",He=N.getSeverity(ke,"extLink");else if(Gi||kt||Hi)if(ke="lonely-bracket",vt>1||K&&Mt===J||kt&&zi===J)He=N.getSeverity(ke,"double");else{if(!xe){let ue=ig[J],Re=Gi?a.slice(F+1):a.slice(0,F);if(K&&((i=ue.exec(Re))==null?void 0:i[0])==="}"||kt&&((s=ue.exec(Re))==null?void 0:s[0])==="{")continue;if(!Re.includes(J)){let et=Gi?"nextSibling":"previousSibling",Me=this[et];for(;Me&&(Me.type!=="text"||!ue.test(Me.data));)Me=Me[et];if(Me&&ue.exec(Me.data)[0]!==J)continue}}He=N.getSeverity(ke,"single")}else ke="lonely-http",He=N.getSeverity(ke);if(!He)continue;let Ro=this.posFromIndex(F),{line:Po,character:Bo}=vr(I,E,Ro.top+1,Ro.left);if(J==="="){let ue=a.indexOf(`
7
- `,F),Re=g,et;if(ue===-1){let Me=0;for(;Re&&!(Re.type==="text"&&(Me=Re.data.indexOf(`
8
- `),Me!==-1));)Re=Re.nextSibling;if(!Re)continue;et=Re.data.slice(0,Me)}else et=a.slice(F+vt,ue);if(!/(?:^|[^=])=+\s*(?:\S\s*)?$/u.test(et))continue;ue===-1?(qt=Re.getAbsoluteIndex()+et.length,{top:Jn,left:Xn}=T.posFromIndex(qt)):(qt+=et.length,vt+=et.length)}let _t={rule:ke,message:v.msg(J==="="?"header-like":"lonely",de||J==="h"||Vi||Ki?R:J),severity:He,startIndex:br,endIndex:qt,startLine:Po,endLine:Jn!=null?Jn:Po,startCol:Bo,endCol:Xn!=null?Xn:Bo+vt};if(N.computeEditInfo)if(J==="<")_t.suggestions=[st(br,"&lt;")];else if(J==="h"&&d!=="link-text"&&sg.test(zi||""))_t.suggestions=[At(br)];else if(xe){let ue=l.getAbsoluteIndex()+l.toString().length;_t.suggestions=[st(ue,"&#93;")]}else if(R==="]"&&Fo){let ue=e-u.toString().length;_t.suggestions=[Ar(ue,"left-bracket","[")]}else de&&(_t.suggestions=[...W[0]===R?[]:[oi(_t,R)],...Mt===":"||Mt===":"?[At(qt,1)]:[]]);f.push(_t)}return f}}replaceData(e){C(this,wn,ss).call(this,e)}splitText(e){{let{parentNode:r,data:n}=this;if(!r)throw new Error("The text node to be split has no parent node!");let i=new os(n.slice(e));return Vt(r,r.childNodes.indexOf(this)+1,0,[i]),this.setAttribute("data",n.slice(0,e)),i}this.lspError("AstText.splitText")}escape(){{let{parentNode:e}=this;if(!e)throw new Error("The text node to be escaped has no parent node!");let{TranscludeToken:r}=(ns(),X(La)),n=e.getAttribute("config"),i=e.childNodes.indexOf(this)+1,s=g=>Math.max(this.data.lastIndexOf("=",g),this.data.lastIndexOf("|",g)),a=s(),l=()=>new r(this.data[a]==="="?"=":"!",[],n);for(;a>=0;a=s(a-1))a<this.data.length-1&&this.splitText(a+1),e.insertAt(Q.run(l),i),C(this,wn,ss).call(this,this.data.slice(0,a))}}print(){return Ht(this.data)}};wn=new WeakSet,ss=function(e){this.setAttribute("data",e)};Sn=os});var Ne,Et=L(()=>{"use strict";Ne=(o=!0,t=!0)=>e=>{class r extends e{text(){return""}lint(i){return o?[]:super.lint(i)}}return r}});var he,Ve=L(()=>{"use strict";he=({length:o})=>t=>{class e extends t{getAttribute(n){return n==="padding"?o:super.getAttribute(n)}}return e}});var Fa,Qt,De,Ke,pi,Ra,as,og,Ce,Ir=L(()=>{"use strict";G();Ae();pe();Ve();we();D();V();wt();Fa=[Z,he("[[")];Ce=class extends(og=$){constructor(e,r,n=v.getConfig(),i=[],s="|"){super(void 0,n,i,{});w(this,pi);w(this,Qt,!0);w(this,De);w(this,Ke);if(this.insertAt(new ce(e,"link-target",n,i)),r!==void 0){let a=new $(r,{...n,excludes:[...n.excludes,"list"]},i);a.type="link-text",a.setAttribute("stage",10),this.insertAt(a)}S(this,De,s)}get link(){return m(this,Ke)}get fragment(){return m(this,Ke).fragment}afterBuild(){S(this,Ke,this.getTitle()),m(this,De).includes("\0")&&S(this,De,this.buildFromStr(m(this,De),0)),C(this,pi,Ra).call(this),super.afterBuild()}setAttribute(e,r){e==="bracket"?S(this,Qt,r):e==="title"?S(this,Ke,r):super.setAttribute(e,r)}toString(e){let r=super.toString(e,m(this,De));return m(this,Qt)?`[[${r}]]`:r}text(){let e=super.text("|");return m(this,Qt)?`[[${e}]]`:e}getAttribute(e){return e==="title"?m(this,Ke):super.getAttribute(e)}getGaps(e){return e===0?m(this,De).length:1}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),{childNodes:[i,s],type:a}=this,{encoded:l,fragment:g}=m(this,Ke),{lintConfig:u}=v,{computeEditInfo:d,fix:p}=u,f=new U(this,e),c="unknown-page",h=u.getSeverity(c);if(h&&i.childNodes.some(({type:b})=>b==="template")&&n.push(q(i,f,c,"template-in-link",h)),c="url-encoding",h=u.getSeverity(c),h&&l){let b=q(i,f,c,"unnecessary-encoding",h);(d||p)&&(b.fix=ni(b,i)),n.push(b)}if(c="pipe-like",h=u.getSeverity(c,"link"),h&&(a==="link"||a==="category")){let b=s==null?void 0:s.childNodes.findIndex(x=>x.type==="text"&&x.data.includes("|")),T=s==null?void 0:s.childNodes[b];if(T){let x=q(s,f,c,"pipe-in-link",h);if(d){let y=x.startIndex+s.getRelativeIndex(b);x.suggestions=[ai(y,T.data)]}n.push(x)}}if(c="no-ignored",h=u.getSeverity(c,"fragment"),h&&g!==void 0&&!Pa(a)){let b=q(i,f,c,"useless-fragment",h);if(d||p){let T=i.childNodes.findIndex(y=>y.type==="text"&&y.data.includes("#")),x=i.childNodes[T];x&&(b.fix=M(b,i.getRelativeIndex(T)+x.data.indexOf("#")))}n.push(b)}return n}}getTitle(e,r){return this.normalizeTitle(this.firstChild.text(),0,{halfParsed:r,temporary:e,decode:!0,selfLink:!0})}print(){return super.print(m(this,Qt)?{pre:"[[",post:"]]",sep:m(this,De)}:{sep:m(this,De)})}json(e,r,n=this.getAbsoluteIndex()){{let i=super.json(void 0,r,n),{type:s,fragment:a}=this;return a!==void 0&&(s==="link"||s==="redirect-target")&&(i.fragment=a),i}}};as=O(og),Qt=new WeakMap,De=new WeakMap,Ke=new WeakMap,pi=new WeakSet,Ra=function(){this.type!=="ext-inner"&&this.setAttribute("name",m(this,Ke).title)},Ce=j(as,0,"LinkBaseToken",Fa,Ce),B(as,1,Ce)});var Ba,ls,ag,fe,$t=L(()=>{"use strict";we();V();Ba=[Z];fe=class extends(ag=$){get innerText(){return this.firstChild.data}constructor(t="",e,r){super(t,e,r)}};ls=O(ag),fe=j(ls,0,"NowikiBaseToken",Ba,fe),B(ls,1,fe)});var ja,ds,lg,me,Jt=L(()=>{"use strict";G();Et();D();$t();ja=[Ne(!1)];me=class extends(lg=fe){get type(){return"noinclude"}toString(t){return t?"":super.toString()}lint(t=this.getAbsoluteIndex()){{let{lintConfig:e}=v,r="no-ignored",n=e.getSeverity(r,"include");if(n){let{innerText:i}=this,s=/^<(includeonly|(?:no|only)include)\s+(?:[^\s>/]|\/(?!>))[^>]*>$/iu.exec(i);if(s){let a=P(this,{start:t},r,"useless-attribute",n),{computeEditInfo:l}=e,g=s[1].length+1,u=i.endsWith("/>")?2:1;return a.startIndex+=g,a.startCol+=g,a.endIndex-=u,a.endCol-=u,l&&(a.suggestions=[M(a)]),[a]}}return[]}}};ds=O(lg),me=j(ds,0,"NoincludeToken",ja,me),B(ds,1,me)});var ci,Oa=L(()=>{"use strict";G();D();Ir();Jt();ci=class extends Ce{get type(){return"redirect-target"}constructor(t,e,r,n){super(t,void 0,r,n),e!==void 0&&this.insertAt(new me(e,r,n))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,{halfParsed:!0,decode:!0,page:""})}lint(t=this.getAbsoluteIndex()){{let e=super.lint(t,!1),r="no-ignored",{lintConfig:n}=v,i=n.getSeverity(r,"redirect");if(i&&this.length===2){let s=q(this.lastChild,{start:t},r,"useless-link-text",i);s.startIndex--,s.startCol--,(n.computeEditInfo||n.fix)&&(s.fix=M(s)),e.push(s)}return e}}}});var qa,Nt,Fr,us,dg,Xt,Ma=L(()=>{"use strict";Et();we();V();Ct();Oa();qa=[Ne(!1,!1),Z];Xt=class extends(dg=$){constructor(e,r,n,i,s,a,l=[]){super(void 0,a,l);w(this,Nt);w(this,Fr);S(this,Nt,e),S(this,Fr,s),this.append(new ye(r,"redirect-syntax",a,l),new ci(n,i==null?void 0:i.slice(1),a,l))}get type(){return"redirect"}getAttribute(e){return e==="padding"?m(this,Nt).length:super.getAttribute(e)}toString(e){return m(this,Nt)+super.toString(e)+m(this,Fr)}lint(e=this.getAbsoluteIndex()){{let r=e+m(this,Nt).length+this.firstChild.toString().length;return this.lastChild.setAttribute("aIndex",r),this.lastChild.lint(r)}}print(){return super.print({pre:m(this,Nt),post:m(this,Fr)})}};us=O(dg),Nt=new WeakMap,Fr=new WeakMap,Xt=j(us,0,"RedirectToken",qa,Xt),B(us,1,Xt)});var _a={};re(_a,{parseRedirect:()=>ug});var ug,Wa=L(()=>{"use strict";D();Ma();ug=(o,t,e)=>{var n;(n=t.regexRedirect)!=null||(t.regexRedirect=new RegExp(String.raw`^(\s*)((?:${t.redirection.join("|")})\s*(?::\s*)?)\[\[([^\n|\]]+)(\|.*?)?\]\](\s*)`,"iu"));let r=t.regexRedirect.exec(o);return r&&v.normalizeTitle(r[3],0,!1,t,{halfParsed:!0,temporary:!0,decode:!0,page:""}).valid?(o=`\0${e.length}o${o.slice(r[0].length)}`,new Xt(...r.slice(1),t,e),o):!1}});var Da,gs,gg,Yt,Ua=L(()=>{"use strict";Ve();we();V();Da=[Z,he("<onlyinclude>")];Yt=class extends(gg=$){get type(){return"onlyinclude"}toString(t){return`<onlyinclude>${super.toString(t)}</onlyinclude>`}isPlain(){return!0}print(){return super.print({pre:'<span class="wpb-ext">&lt;onlyinclude&gt;</span>',post:'<span class="wpb-ext">&lt;/onlyinclude&gt;</span>'})}};gs=O(gg),Yt=j(gs,0,"OnlyincludeToken",Da,Yt),B(gs,1,Yt)});var Ha,It,Qe,ps,pg,Ue,fi=L(()=>{"use strict";yn();we();V();Ha=[St(),Z];Ue=class extends(pg=$){constructor(e,r,n,i,s,a=[]){super(void 0,s);w(this,It);w(this,Qe);ge(this,"closed");this.setAttribute("name",e.toLowerCase()),S(this,It,[e,i||e]),this.closed=i!=="",S(this,Qe,i===void 0),this.append(r,n);let l=typeof r=="string"?-1:a.indexOf(r);a.splice(l===-1?1/0:l,0,this)}get innerText(){return m(this,Qe)?void 0:this.lastChild.text()}get selfClosing(){return m(this,Qe)}toString(e){let{firstChild:r,lastChild:n}=this,[i,s]=m(this,It);return m(this,Qe)?`<${i}${r.toString(e)}/>`:`<${i}${r.toString(e)}>${n.toString(e)}${this.closed?`</${s}>`:""}`}text(){let[e,r]=m(this,It);return m(this,Qe)?`<${e}${this.firstChild.text()}/>`:`<${e}${super.text(">")}${this.closed?`</${r}>`:""}`}getAttribute(e){return e==="padding"?m(this,It)[0].length+1:super.getAttribute(e)}print(){{let[e,r]=m(this,It);return super.print(m(this,Qe)?{pre:`&lt;${e}`,post:"/&gt;"}:{pre:`&lt;${e}`,sep:"&gt;",post:this.closed?`&lt;/${r}&gt;`:""})}}json(e,r,n=this.getAbsoluteIndex()){{let i=super.json(void 0,r,n);return i.selfClosing=m(this,Qe),i}}};ps=O(pg),It=new WeakMap,Qe=new WeakMap,Ue=j(ps,0,"TagPairToken",Ha,Ue),B(ps,1,Ue)});var za,cs,cg,Zt,Ga=L(()=>{"use strict";G();pe();Et();D();fi();za=[Ne(!1)];Zt=class extends(cg=Ue){get type(){return"include"}constructor(t,e="",r,n,i,s){super(t,e,r!=null?r:"",r===void 0||n!=null?n:"",i,s)}toString(t){return t?"":super.toString()}lint(t=this.getAbsoluteIndex()){{let e=[],{firstChild:r,closed:n,name:i}=this,s=new U(this,t),a=["no-ignored","unclosed-comment"],{lintConfig:l}=v,{computeEditInfo:g}=l,u=a.map(d=>l.getSeverity(d,"include"));if(u[0]&&r.data.trim()){let d=q(r,s,a[0],"useless-attribute",u[0]);g&&(d.suggestions=[M(d)]),e.push(d)}if(u[1]&&!n){let d=P(this,s,a[1],v.msg("unclosed",`<${i}>`),u[1]);g&&(d.suggestions=[je(d.endIndex,`</${i}>`)]),e.push(d)}return e}}};cs=O(cg),Zt=j(cs,0,"IncludeToken",za,Zt),B(cs,1,Zt)});var Rr,mi=L(()=>{"use strict";Rr=(o=0)=>t=>{var e,fs;{class n extends t{constructor(){super(...arguments);w(this,e)}hasAttr(a){return C(this,e,fs).call(this).hasAttr(a)}getAttr(a){return C(this,e,fs).call(this).getAttr(a)}}return e=new WeakSet,fs=function(){return this.childNodes[o]},n}}});var le,Va,Ka,hi,bs,hs,Qa,bi,Za,el,ms,Ja,Xa,Ya,er,xi,yi,Ti,tl,ki,vi=L(()=>{"use strict";le=new Set(["align"]),Va=new Set(["cite"]),Ka=new Set(["cite","datetime"]),hi=new Set(["width"]),bs=new Set(["bgcolor","align","valign"]),hs=new Set([...bs,"axis","height","nowrap","width"]),Qa=new Set([...hs,"abbr","headers","scope","rowspan","colspan"]),bi=new Set(["type"]),Za=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),el=new Set(["clear"]),ms=new Set(["id","qid","forcemathmode","type","display"]),Ja=new Set(["enclose","inline","lang","line","linelinks","style","class","id","dir","copy","highlight","start"]),Xa=new Set(["weight"]),Ya=new Set(["width","height","zoom","latitude","longitude","align","mapstyle","lang","alt","text"]),er=new Set,xi=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"]),yi={div:le,h1:le,h2:le,h3:le,h4:le,h5:le,h6:le,blockquote:Va,q:Va,p:le,br:el,pre:hi,ins:Ka,del:Ka,ul:bi,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...Za,"border"]),caption:le,tr:bs,td:Qa,th:Qa,font:new Set(["size","color","face"]),hr:hi,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:bi,poem:le,categorytree:le,combooption:le,img:new Set(["alt","src","width","height","loading","srcset"])},Ti={pre:new Set(["format"]),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:er,indicator:new Set(["name"]),langconvert:new Set(["from","to"]),ref:new Set(["group","name","follow","dir","details"]),references:new Set(["group","responsive"]),charinsert:new Set(["label"]),choose:new Set(["uncached","before","after"]),option:Xa,choicetemplate:Xa,imagemap:er,inputbox:er,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:er,poll:new Set(["id","show-results-before-voting"]),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([...ms,"chem"]),chem:ms,ce:ms,hiero:er,phonos:new Set(["ipa","class","text","lang","wikibase","file"]),section:new Set(["begin","end"]),source:Ja,syntaxhighlight:Ja,templatedata:er,timeline:new Set(["method","font"]),quiz:new Set(["display","shuffleanswers","points","shuffle","case"]),languages:er,mapframe:new Set([...Ya,"frameless"]),maplink:new Set([...Ya,"class"]),rss:new Set(["template","templatename","max","highlight","filter","filterout","reverse","date","item-max-length"]),"page-collection":new Set(["lang","name","description","end-date"])},tl={table:Za,td:new Set([...hs,"scope"]),th:hs,br:el,caption:le,div:le,hr:hi,h1:le,h2:le,h3:le,h4:le,h5:le,h6:le,li:bi,p:le,pre:hi,tr:bs,ul:bi},ki={dynamicpagelist:["category","notcategory","namespace","count","offset","imagewidth","imageheight","imagesperrow","mode","gallerycaption","galleryshowfilesize","galleryshowfilename","order","ordermethod","redirects","stablepages","qualitypages","suppresserrors","addfirstcategorydate","shownamespace","ignoresubpages","googlehack","nofollow"],inputbox:["preloadparams[]","type","width","preload","preloadtitle","page","editintro","useve","usedt","summary","nosummary","minor","break","default","placeholder","bgcolor","buttonlabel","searchbuttonlabel","fulltextbutton","namespaces","labeltext","hidden","id","inline","prefix","dir","searchengine","searchtype","searchfilter","tour","arialabel"]}});var fg,mg,hg,bg,Cn,Pr,be,Je,tr,rl,xs,Br,nl=L(()=>{"use strict";G();ae();vi();pe();D();V();wt();fg=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|src|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,mg=/(?:^|\s|\*\/)(?:java|vb)script(?:\W|$)/iu,hg=new Set(["ext","arg","magic-word","template"]),bg=new Set(["about","property","resource","datatype","typeof","itemid","itemprop","itemref","itemscope","itemtype"]),Br=class extends ${constructor(e,r,n,i,s,a="",l,g=[]){let u=new ce(n,"attr-key",s,g),d;if(n==="title"||r==="img"&&n==="alt")d=new $(l,s,g,{}),d.type="attr-value",d.setAttribute("stage",10);else if(r==="gallery"&&n==="caption"||r==="ref"&&n==="details"||(r==="mapframe"||r==="maplink")&&n==="text"||r==="choose"&&(n==="before"||n==="after")){let p={...s,excludes:[...s.excludes,"heading","html","table","hr","list"]};d=new $(l,p,g,{}),d.type="attr-value",d.setAttribute("stage",1)}else d=new ce(l,"attr-value",s,g,{});super(void 0,s,g);w(this,tr);w(this,Cn);w(this,Pr);w(this,be);w(this,Je);S(this,Cn,e),this.append(u,d),S(this,be,a),S(this,Je,[...i]),S(this,Pr,r),this.setAttribute("name",nt(se(n)))}get type(){return m(this,Cn)}get tag(){return m(this,Pr)}get balanced(){return!m(this,be)||m(this,Je)[0]===m(this,Je)[1]}afterBuild(){m(this,be).includes("\0")&&S(this,be,this.buildFromStr(m(this,be),0)),this.parentNode&&S(this,Pr,this.parentNode.name),C(this,tr,rl).call(this),super.afterBuild()}toString(e){let[r="",n=""]=m(this,Je);return m(this,be)?super.toString(e,m(this,be)+r)+n:this.firstChild.toString(e)}text(){return m(this,be)?`${super.text(`${m(this,be).trim()}"`)}"`:this.firstChild.text()}getGaps(){var e,r;return m(this,be)?m(this,be).length+((r=(e=m(this,Je)[0])==null?void 0:e.length)!=null?r:0):0}lint(e=this.getAbsoluteIndex(),r){var n;{let i=super.lint(e,r),{balanced:s,firstChild:a,lastChild:l,name:g,tag:u}=this,d=new U(this,e),p=["unclosed-quote","obsolete-attr"],{lintConfig:f}=v,c=p.map(b=>f.getSeverity(b,g));if(c[0]&&!s){let b=q(l,d,p[0],"unclosed-quotes",c[0]);b.startIndex--,b.startCol--,f.computeEditInfo&&(b.suggestions=[je(b.endIndex,m(this,Je)[0])]),i.push(b)}let h=C(this,tr,xs).call(this,e,d);return h&&i.push(h),c[1]&&((n=tl[u])!=null&&n.has(g))&&i.push(q(a,d,p[1],"obsolete-attribute",c[1])),i}}getValue(){return m(this,be)?this.lastChild.text().replace(/[\t\r\n ]+/gu," ").trim():""}escape(){this.type!=="ext-attr"&&(S(this,be,"{{=}}"),this.lastChild.escape())}getAttribute(e){return e==="invalid"?!!C(this,tr,xs).call(this):super.getAttribute(e)}print(){{let[e="",r=""]=m(this,Je);return m(this,be)?super.print({sep:Ht(m(this,be))+e,post:r}):super.print()}}json(e,r,n=this.getAbsoluteIndex()){{let i=super.json(void 0,r,n);return i.tag=this.tag,i}}};Cn=new WeakMap,Pr=new WeakMap,be=new WeakMap,Je=new WeakMap,tr=new WeakSet,rl=function(){this.setAttribute("name",nt(this.firstChild.text()))},xs=function(e,r){let{firstChild:n,lastChild:i,type:s,name:a,tag:l,parentNode:g}=this,u=!i.childNodes.some(({type:x})=>hg.has(x)),d=this.getValue(),p=Ti[l],f=yi[l],{length:c}=this.toString(),h="illegal-attr",b,T;if({lintConfig:b}=v,{computeEditInfo:T}=b,!(p!=null&&p.has(a))&&!(f!=null&&f.has(a))&&(s==="ext-attr"?p||f:!/\{\{[^{]+\}\}/u.test(a))&&(s==="ext-attr"&&!f||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:_]*)$/u.test(a)&&(l==="meta"||l==="link"||!xi.has(a)))||(a==="itemtype"||a==="itemid"||a==="itemref")&&!(g!=null&&g.hasAttr("itemscope"))){if(e===void 0)return 2;{let x=b.getSeverity(h,"unknown");if(x){let y=q(n,r,h,"illegal-attribute-name",x);return T&&(y.suggestions=[M(e,c)]),y}}}else if(a==="style"&&fg.test(d)){if(e===void 0)return 1;{h="insecure-style";let x=b.getSeverity(h);return x&&q(i,r,h,"insecure-style",x)}}else if(a==="tabindex"&&d!=="0"){if(e===void 0)return 2;{let x=b.getSeverity(h,"tabindex");if(x){let y=q(i,r,h,"nonzero-tabindex",x);return T&&(y.suggestions=[M(e,c),ve(y,"0 tabindex","0")]),y}}}else if((/^xmlns:[\w:.-]+$/u.test(a)||bg.has(a))&&mg.test(d)||u&&(a==="href"||s==="ext-attr"&&l==="img"&&a==="src")&&!new RegExp(String.raw`^(?:${this.getAttribute("config").protocol}|//)\S+$`,"iu").test(d)){if(e===void 0)return 2;{let x=b.getSeverity(h,"value");return x&&q(i,r,h,"illegal-attribute-value",x)}}else if(u&&s!=="ext-attr"){let x=li(l,a),y=d.toLowerCase();if(x.length>0&&x.every(k=>k!==y)){if(e===void 0)return 2;{let k=b.getSeverity(h,"value");return k&&q(i,r,h,"illegal-attribute-value",k)}}}return!1}});var sl,xg,yg,il,Ln,jr,Ai,Ft,Si=L(()=>{"use strict";G();ae();pe();D();V();wt();nl();sl=o=>o.slice(0,-1),xg=o=>`${sl(o)}-dirty`,yg=(()=>{try{return new RegExp(String.raw`[\p{L}\p{N}]`,"u")}catch{return/[^\W_]/u}})(),il=new Map([["indicator",["name"]],["langconvert",["from","to"]],["mapframe",["width","height"]],["maplink",["width","height"]],["phonos",[["ipa","file","wikibase"]]],["section",[["begin","end"]]],["templatestyles",["src"]]]),Ft=class extends ${constructor(e,r,n,i,s=[]){super(void 0,i,s,{});w(this,jr);w(this,Ln);if(S(this,Ln,r),this.setAttribute("name",n),e){let a=/([^\s/](?:(?!\0\d+~\x7F)[^\s/=])*)(?:((?:\s(?:\s|\0\d+[cn]\x7F)*)?(?:=|\0\d+~\x7F)(?:\s|\0\d+[cn]\x7F)*)(?:(["'])([\s\S]*?)(\3|$)|(\S*)))?/gu,l="",g=a.exec(e),u=0,d=()=>{l&&(super.insertAt(new ce(l,xg(r),i,s)),l="")};for(;g;){let{index:p,0:f,1:c,2:h,3:b,4:T,5:x,6:y}=g;if(l+=e.slice(u,p),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(se(c).trim())){let k=T!=null?T:y,A=[b,x],I=new Br(sl(r),n,c,A,i,h,k,s);d(),super.insertAt(I)}else l+=f;({lastIndex:u}=a),g=a.exec(e)}l+=e.slice(u),d()}}get type(){return m(this,Ln)}afterBuild(){let{parentNode:e}=this;e!=null&&e.is("td")&&this.setAttribute("name",e.subtype),super.afterBuild()}getAttrTokens(e){return this.childNodes.filter(r=>r instanceof Br&&(!e||r.name===nt(e)))}hasAttr(e){return this.getAttrTokens(e).length>0}getAttrToken(e){{let r=this.getAttrTokens(e);return r[r.length-1]}}getAttr(e){var r;return(r=this.getAttrToken(e))==null?void 0:r.getValue()}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),{parentNode:i,childNodes:s,type:a,name:l}=this,g=new Map,u=new Set,d=new U(this,e),p=["no-ignored","required-attr","no-duplicate"],{lintConfig:f}=v,{computeEditInfo:c,fix:h}=f,b=["closingTag","invalidAttributes","nonWordAttributes"].map(x=>f.getSeverity(p[0],x));if(b[0]&&C(this,jr,Ai).call(this)){let x=P(this,d,p[0],"attributes-of-closing-tag",b[0]);if(c){let y=i.getAbsoluteIndex();x.suggestions=[M(x),ii(y)]}n.push(x)}for(let x of s)if(x instanceof Br){let{name:y}=x;g.has(y)?(u.add(y),g.get(y).push(x)):g.set(y,[x])}else{let y=x.text().trim(),k=b[yg.test(y)?1:2];if(y&&k){let A=q(x,d,p[0],"invalid-attribute",k);c&&(A.suggestions=[M(A,0," ")]),n.push(A)}}if(a==="ext-attrs"&&il.has(l)){let x=f.getSeverity(p[1],l);if(x)for(let y of il.get(l)){let k=typeof y=="string"?[y]:y;k.some(A=>this.getAttr(A))||n.push(P(this,d,p[1],v.msg("required-attribute",k.join("/")),x))}}let T=f.getSeverity(p[2],"attribute");if(T&&u.size>0)for(let x of u){let y=g.get(x).map(k=>[k,k.getValue()]);Array.prototype.push.apply(n,y.map(([k,A],I)=>{let E=q(k,d,p[2],v.msg("duplicate-attribute",x),T);if(c||h){let N=M(E);!A||y.slice(0,I).some(([,z])=>z===A)?E.fix=N:c&&(E.suggestions=[N])}return E}))}return n}}escape(){this.type!=="ext-attrs"&&super.escape()}getAttribute(e){return e==="invalid"?C(this,jr,Ai).call(this):super.getAttribute(e)}print(){return this.toString()?`<span class="wpb-${this.type}${C(this,jr,Ai).call(this)?" wpb-invalid":""}">${this.childNodes.map(e=>e.print(e instanceof ce?{class:e.toString().trim()&&"attr-dirty"}:void 0)).join("")}</span>`:""}};Ln=new WeakMap,jr=new WeakSet,Ai=function(){let{parentNode:e}=this;return(e==null?void 0:e.type)==="html"&&e.closing&&this.text().trim()!==""}});var ol={};re(ol,{PreToken:()=>ys});var ys,al=L(()=>{"use strict";V();Jt();ys=class extends ${get type(){return"ext-inner"}constructor(t,e,r=[]){if(t){let n=/<nowiki>/giu,i=/<\/nowiki>/giu,{length:s}=n.source,a=n.exec(t);a&&(i.lastIndex=a.index+s);let l=i.exec(t),g=0,u="";for(;a&&l;)new me(a[0],e,r,!0),new me(l[0],e,r,!0),u+=`${t.slice(g,a.index)}\0${r.length-1}n${t.slice(a.index+s,l.index)}\0${r.length}n`,g=l.index+s+1,n.lastIndex=g,a=n.exec(t),a&&(i.lastIndex=a.index+s),l=i.exec(t);t=u+t.slice(g)}super(t,e,r,{}),this.setAttribute("stage",10)}isPlain(){return!0}lint(t=this.getAbsoluteIndex()){return super.lint(t,/<\s*\/\s*(pre)\b/giu)}}});var Rt,wi=L(()=>{"use strict";V();Rt=class extends ${get type(){return"ext-inner"}toString(t){return super.toString(t,`
3
+ `,"\r"]),pn=o=>o===""?"end of input":o==='"'?`'"'`:JSON.stringify(o),ea=o=>{let t,e,r,n,i=(b,T,x)=>{T===void 0?b.from=t-1:(b.from=T,b.to=x!=null?x:t-1)},s=(b,T,x)=>{let y={message:b,severity:"warning"};i(y,T,x),n.push(y)},a=(b,T,x)=>{let y={warnings:n,message:b,severity:"error"};throw i(y,T,x),y},l=b=>(b&&b!==e&&a(`Expected ${pn(b)} instead of ${pn(e)}`),e=r.charAt(t),t++,e),g=()=>{let b="",T=t-1;if(e==="-"&&(b="-",l()),e==="0")b+=e,l(),e>="0"&&e<="9"&&a("Bad number");else if(e>="1"&&e<="9")for(;e>="0"&&e<="9";)b+=e,l();else a("No number after minus sign");if(e!=="."&&e!=="e"&&e!=="E"){let y=Number(b);Number.isSafeInteger(y)||s("Not a safe integer",T);return}if(e===".")for(b+=".",l(),(e<"0"||e>"9")&&a("Unterminated fractional number");e>="0"&&e<="9";)b+=e,l();if(e==="e"||e==="E")for(b+=e,l(),(e==="-"||e==="+")&&(b+=e,l());e>="0"&&e<="9";)b+=e,l();let x=Number(b);Number.isFinite(x)||a("Bad number")},u=()=>{let b="";if(e==='"')for(;l();){if(e==='"')return l(),b;let T=t-1;if(e==="\\")if(l(),e==="u"){let x=0,y=0;for(;x<4;x++){let k=parseInt(l(),16);if(!isFinite(k))break;y=y*16+k}x<4&&a("Bad unicode escape",T),b+=String.fromCharCode(y)}else typeof Zo[e]=="string"?b+=Zo[e]:a("Bad escaped character",T,t);else e<" "?a("Bad control character",T,t):b+=e}else a(`Expected '"' instead of ${JSON.stringify(e)}`);return a("Unterminated string")},d=()=>{for(;e;){for(;e&&zu.has(e);)l();if(o&&e==="/"){let b=r.charAt(t);if(b==="/"){for(l(),l();e&&e!==`
4
+ `&&e!=="\r";)l();continue}else if(b==="*"){for(l(),l();e&&!(e==="*"&&r.charAt(t)==="/");)l();e==="*"&&(l(),l());continue}}break}},p=()=>{switch(e){case"t":l(),l("r"),l("u"),l("e");return;case"f":l(),l("a"),l("l"),l("s"),l("e");return;case"n":l(),l("u"),l("l"),l("l");return;default:a(`Unexpected ${JSON.stringify(e)}`)}},f=()=>{if(l(),d(),e==="]"){l();return}else if(o&&e===","){l(),d(),l("]");return}let b;for(;e;){if(e==="]"){if(o){l();return}a("Trailing comma in array",b,b+1)}if(h(),d(),e==="]"){l();return}else e===","?(b=t-1,l(),d()):a(`Expected "," or "]" instead of ${pn(e)}`)}a("Unterminated array")},c=()=>{let b=new Set;if(l(),d(),e==="}"){l();return}else if(o&&e===","){l(),d(),l("}");return}let T;for(;e;){if(e==="}"){if(o){l();return}a("Trailing comma in object",T,T+1)}T=t;let x=u(),y=t-2;if(d(),l(":"),b.has(x)?s(`Duplicate key ${pn(x)}`,T,y):b.add(x),h(),d(),e==="}"){l();return}else e===","?(T=t-1,l(),d()):a(`Expected "," or "}" instead of ${pn(e)}`)}a(`Expected '"'`)},h=()=>{switch(d(),e){case"":return;case"{":return c();case"[":return f();case'"':return u();case"-":return g();default:return e>="0"&&e<="9"?g():p()}};return b=>{if(r=b,n=[],t=0,e=" ",h(),d(),e)a("Syntax error");else if(n.length>0)throw{warnings:n}}},ta=ea(),ra=ea(!0)});function Be(o){let t=new Map,e=new WeakMap;return r=>{let n=typeof r=="string"?t:e;if(n.has(r)){let s=n.get(r);return s.lastIndex=0,s}let i=o(r);return n.set(r,i),i}}var Ht,Gu,ia,Vu,sa,ni,es,oa,Ku,aa,la,da,ii,We=L(()=>{"use strict";na();Ht=o=>decodeURIComponent(o.replace(/%(?![\da-f]{2})/giu,"%25")),Gu=o=>Math.round(o).toString(16).padStart(2,"0"),ia=o=>Gu(o*255),Vu=(()=>{let o=String.raw`#(?:[\da-f]{3,4}|(?:[\da-f]{2}){3,4})(?![\p{L}\p{N}_])`,t=String.raw`(?:\d*\.)?\d+%?`,e=String.raw`(?:\d*\.)?\d+(?:deg|grad|rad|turn)?`,r=String.raw`rgba?\(\s*(?:${String.raw`${Array.from({length:3},()=>t).join(String.raw`\s+`)}(?:\s*\/\s*${t})?`}|${String.raw`${Array.from({length:3},()=>t).join(String.raw`\s*,\s*`)}(?:\s*,\s*${t})?`})\s*\)`,n=String.raw`hsla?\(\s*(?:${String.raw`${e}\s+${t}\s+${t}(?:\s*\/\s*${t})?`}|${String.raw`${e}${String.raw`\s*,\s*(?:\d*\.)?\d+%`.repeat(2)}(?:\s*,\s*${t})?`})\s*\)`;return{full:new RegExp(String.raw`(^|[^\p{L}\p{N}_])(${o}|${r}|${n})`,"giu"),rgb:new RegExp(String.raw`(^|[^\p{L}\p{N}_])(${o}|${r})`,"giu")}})(),sa=(o,t=!0)=>{let e=[],r=Vu[t?"full":"rgb"];r.lastIndex=0;let n=r.exec(o),i=0;for(;n;){let s=n.index+n[1].length;s>i&&e.push([o.slice(i,s),i,s,!1]),{lastIndex:i}=r,e.push([n[2],s,i,o[s-1]!=="&"||!/^#\d+$/u.test(n[2])]),n=r.exec(o)}return o.length>i&&e.push([o.slice(i),i,o.length,!1]),e};ni=o=>{let t=[],e=0;for(let r of o.split(`
5
+ `)){let n=e+r.length;t.push([r,e,n]),e=n+1}return t},es=o=>o&&Number(o[1]),oa=(o,t)=>{var n;let e,r=i=>{e!=null||(e=ni(o));let s=e.findIndex(([,,a])=>i<=a)+1;return{line:s,column:i-e[s-1][1]+1}};for(let i of t){let{line:s,column:a,from:l,to:g}=i;l==null?s?(e!=null||(e=ni(o)),(n=i.column)!=null||(i.column=1),i.from=e[s-1][1]+(i.column-1)):(i.from=0,i.line=1,i.column=1):(!s||!a)&&Object.assign(i,r(l)),g!==void 0&&({line:i.endLine,column:i.endColumn}=r(g)),i.position=i.from}return t},Ku=(o,t)=>{if(t||o.trim())try{JSON.parse(o)}catch(e){let{message:r}=e,n=es(/\bline (\d+)/u.exec(r)),i=es(/\bcolumn (\d+)/u.exec(r)),s=es(/\bposition (\d+)/u.exec(r));return oa(o,[{message:r,line:n,column:i,from:s,severity:"error"}])}return[]},aa=(o,t)=>{try{t(o)}catch(e){if(!(e instanceof Error)){let{warnings:r,...n}=e;return n.message&&r.push(n),oa(o,r)}}return[]},la=o=>{var e;if(!o.trim())return[];let t=aa(o,ta);return((e=t[t.length-1])==null?void 0:e.severity)==="error"?t:[...t,...Ku(o)]},da=o=>o.trim()?aa(o,ra):[],ii=(o,t=/\S|$/u)=>o.search(t)});var cn,Tr,fn,mn,ts,U,pe=L(()=>{"use strict";U=class{constructor(t,e){w(this,mn);w(this,cn);w(this,Tr);w(this,fn);S(this,cn,t),S(this,Tr,e)}get start(){return m(this,Tr)}get top(){return C(this,mn,ts).call(this).top}get left(){return C(this,mn,ts).call(this).left}};cn=new WeakMap,Tr=new WeakMap,fn=new WeakMap,mn=new WeakSet,ts=function(){var t;return(t=m(this,fn))!=null||S(this,fn,m(this,cn).getRootNode().posFromIndex(m(this,Tr))),m(this,fn)}});var Qu,Ju,kr,vr,ua,q,P,ve,Ar,M,si,je,oi,ai,li,St,st,di,ze,ui,G=L(()=>{"use strict";We();Ae();pe();D();Qu=new Set(["tr","td","th","caption"]),Ju=new Set(["Template:!!","Template:!-"]),kr=o=>{let t=o.childNodes.find(e=>e.text().trim());if(!t||t.type==="text"&&t.data.trim().startsWith("!")||t.is("magic-word")&&t.name==="!"||t.is("template")&&Ju.has(t.name)||t.is("html")&&Qu.has(t.name))return!1;if(t.is("arg"))return t.length>1&&kr(t.childNodes[1]);if(t.is("magic-word"))try{let e=t.getPossibleValues().map(kr);return e.includes(2)?2:e.includes(1)&&1}catch{}return t.is("template")||t.is("magic-word")&&t.name==="invoke"?1:2},vr=(o,t,e,r)=>({line:o+e-1,character:(e===1?t:0)+r}),ua=o=>(t,e,r,n,i="error")=>{let{start:s}=e,{top:a,left:l}=e instanceof U?e:new U(t,s),{offsetHeight:g,offsetWidth:u}=t,{startIndex:d,startLine:p,startCol:f}=o(t,s,a,l),{line:c,character:h}=vr(p,f,g,u);return{rule:r,message:v.msg(n),severity:i,startIndex:d,endIndex:d+t.toString().length,startLine:p,endLine:c,startCol:f,endCol:h}},q=ua((o,t,e,r)=>{let n=o.getRelativeIndex(),{top:i,left:s}=o.parentNode.posFromIndex(n);return{startIndex:t+n,startLine:e+i,startCol:i?s:r+s}}),P=ua((o,t,e,r)=>({startIndex:t,startLine:e,startCol:r})),ve=(o,t,e,r=0)=>({desc:v.msg(t),range:[o.startIndex+r,o.endIndex],text:e}),Ar=(o,t,e)=>({desc:v.msg(t),range:[o,o],text:e}),M=(o,t=0,e="")=>typeof o=="number"?{desc:v.msg("remove"),range:[o,o+t],text:e}:ve(o,"remove",e,t),si=(o,t)=>ve(o,"decode",Ht(t.text().replace(/%(?=21|3[ce]|5[bd]|7[b-d])/giu,"%25"))),je=(o,t,e=0)=>({desc:v.msg("close"),range:[o+e,o],text:t}),oi=o=>({desc:v.msg("open"),range:[o+1,o+2],text:""}),ai=(o,t)=>ve(o,"comment",`<!--${t}-->`),li=(o,t)=>ve(o,"uppercase",t.toUpperCase()),St=(o,t=0)=>({desc:v.msg("whitespace"),range:[o,o+t],text:" "}),st=(o,t,e=1)=>({desc:v.msg("escape"),range:[o,o+e],text:t.repeat(e)}),di=(o,t)=>({desc:v.msg("escape"),range:[o,o+t.length],text:t.replace(/\|/gu,"&#124;")}),ze=(o,t,e,r)=>{if(o&&(r||v.viewOnly&&o[0]===Q.rev))return o[1];let n=t();return(r||v.viewOnly)&&e([Q.rev,n]),n},ui=(o,t)=>o==="ol"&&t==="type"?["1","a","A","i","I"]:o==="th"&&t==="scope"?["row","col","rowgroup","colgroup"]:t==="dir"?["ltr","rtl","auto"]:t==="aria-hidden"?["true","false"]:[]});var ga,pa=L(()=>{"use strict";ga=(o,t,e)=>{let r=0,n=o.length-1;for(;r<=n;){let i=r+(n-r>>>1),s=e(o[i],t);if(s<0)r=i+1;else if(s>0)n=i-1;else return i}return r}});var Sr,gi=L(()=>{"use strict";G();Sr=(o=!0)=>t=>{let e=new WeakMap;return function(...r){return ze(e.get(this),()=>t.apply(this,r),n=>{e.set(this,n)},o)}}});var ca,fa=L(()=>{"use strict";ca=o=>{class t extends o{get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get offsetHeight(){return this.getDimension().height}get offsetWidth(){return this.getDimension().width}}return t}});var ma,ha,bn,wr,Cr,xn,ot,Lr,hn,Ge,rs=L(()=>{"use strict";We();pa();G();Ae();gi();fa();D();ha=[ca],ma=[Sr(!1)];Ge=class{constructor(){B(hn,5,this);ge(this,"childNodes",[]);w(this,bn);w(this,wr);w(this,Cr);w(this,xn);w(this,ot);w(this,Lr,{})}get parentNode(){return m(this,bn)}get nextSibling(){return m(this,wr)}get previousSibling(){return m(this,Cr)}getChildNodes(){let{childNodes:t}=this;return Object.isFrozen(t)?[...t]:t}getAttribute(t){return t==="padding"?0:this[t]}setAttribute(t,e){switch(t){case"parentNode":S(this,bn,e),e||(S(this,wr,void 0),S(this,Cr,void 0));break;case"nextSibling":S(this,wr,e);break;case"previousSibling":S(this,Cr,e);break;case"aIndex":v.viewOnly&&S(this,ot,[Q.rev,e]);break;default:this[t]=e}}getRootNode(){return ze(m(this,xn),()=>{var t,e;return(e=(t=this.parentNode)==null?void 0:t.getRootNode())!=null?e:this},t=>{let[,e]=t;e.type==="root"&&S(this,xn,t)})}indexFromPos(t,e){{if(t<0||e<0)return;let r=this.getLines();if(t>=r.length)return;let[,n,i]=r[t],s=n+e;return s>i?void 0:s}}posFromIndex(t){{let{length:e}=String(this);if(t+=t<0?e:0,t>=0&&t<=e){let r=this.getLines(),n=ga(r,t,([,,i],s)=>i-s);return{top:n,left:t-r[n][1]}}return}}getDimension(){{let t=this.getLines(),e=t[t.length-1];return{height:t.length,width:e[2]-e[1]}}}getGaps(t){return 0}getRelativeIndex(t){if(t===void 0){let{parentNode:e}=this;return e?e.getRelativeIndex(e.childNodes.indexOf(this)):0}return ze(m(this,Lr)[t],()=>{var s;let{childNodes:e}=this,r=((s=m(this,ot))==null?void 0:s[0])===Q.rev&&m(this,ot)[1],n=t+(t<0?e.length:0),i=this.getAttribute("padding");for(let a=0;a<n;a++)v.viewOnly&&(m(this,Lr)[a]=[Q.rev,i],r!==!1&&S(e[a],ot,[Q.rev,r+i])),i+=e[a].toString().length+this.getGaps(a);return i},e=>{m(this,Lr)[t]=e})}getAbsoluteIndex(){return ze(m(this,ot),()=>{let{parentNode:t}=this;return t?t.getAbsoluteIndex()+this.getRelativeIndex():0},t=>{S(this,ot,t)})}getBoundingClientRect(){return{...this.getDimension(),...this.getRootNode().posFromIndex(this.getAbsoluteIndex())}}is(t){return this.type===t}getLines(){return ni(String(this))}seal(t,e){{if(v.internal)return;let r=!e&&!!this[t];r||Object.defineProperty(this,t,{enumerable:r,configurable:!0})}}lspError(t){throw new Error(`${t} method is only available in the LSP version!`)}};hn=O(null),bn=new WeakMap,wr=new WeakMap,Cr=new WeakMap,xn=new WeakMap,ot=new WeakMap,Lr=new WeakMap,j(hn,1,"getLines",ma,Ge),Ge=j(hn,0,"AstNode",ha,Ge),B(hn,1,Ge)});var Xu,ba,xa=L(()=>{"use strict";Xu=o=>{if(o.includes("#")){let t=o.indexOf("#"),e=o.slice(0,t),r=o.slice(t+1);return(n,i)=>(t===0||n===e)&&i===r}return t=>t===o},ba=(o,t,e)=>{if(o=o.trim(),!o)return(()=>!0);let r=o.split(",").map(n=>n.trim()).filter(n=>n!=="").map(Xu);return(({type:n,name:i})=>r.some(s=>s(n,i)))}});var ya,Ta=L(()=>{"use strict";xa();ya=o=>{var e,pi;class t extends o{constructor(){super(...arguments);w(this,e)}closest(s){let a=C(this,e,pi).call(this,s),{parentNode:l}=this;for(;l;){if(a(l))return l;({parentNode:l}=l)}}getElementBy(s){{let a=[...this.childNodes].reverse();for(;a.length>0;){let l=a.pop(),{type:g,childNodes:u}=l;if(g!=="text"){if(s(l))return l;for(let d=u.length-1;d>=0;d--)a.push(u[d])}}return}}querySelector(s){return this.getElementBy(C(this,e,pi).call(this,s))}getElementsBy(s){{let a=[...this.childNodes].reverse(),l=[];for(;a.length>0;){let g=a.pop(),{type:u,childNodes:d}=g;if(u!=="text"){s(g)&&l.push(g);for(let p=d.length-1;p>=0;p--)a.push(d[p])}}return l}}querySelectorAll(s){return this.getElementsBy(C(this,e,pi).call(this,s))}escape(){for(let s of this.childNodes)s.escape()}}return e=new WeakSet,pi=function(s){return ba(s,this)},t}});var ka,ns,Yu,zt,va=L(()=>{"use strict";oe();Ae();rs();Ta();ka=[ya];zt=class extends(Yu=Ge){get length(){return this.childNodes.length}text(t){return Ne(this.childNodes,t)}removeAt(t){return Gt(this,t,1)[0]}insertAt(t,e=this.length){return Gt(this,e,0,[t]),t}isInside(t){var e;return((e=this.closest(`${t},ext`))==null?void 0:e.type)===t}append(...t){this.safeAppend(t)}safeAppend(t){for(let e of t)this.insertAt(e)}safeReplaceChildren(t){for(let e=this.length-1;e>=0;e--)this.removeAt(e);this.safeAppend([...t])}setText(t,e=0){e+=e<0?this.length:0;let r=this.childNodes[e],{data:n}=r;return r.replaceData(t),n}toString(t,e=""){return this.childNodes.map(r=>r.toString(t)).join(e)}caretPositionFromIndex(t){{if(t===void 0)return;let{length:e}=this.toString();if(t>e||t<-e)return;t+=t<0?e:0;let r=this,n=0,i=0;for(;r.type!=="text";){let{childNodes:s}=r;n+=r.getAttribute("padding");for(let a=0;n<=t&&a<s.length;a++){let l=s[a],{nextSibling:g}=l,u=l.toString(),d=u.length;if(l.setAttribute("aIndex",n),n+=d,n>t||n===t&&d>0&&(!g||g.type==="text"||l.type!=="text"&&(u.trim()||!g.toString().trim()))){r=l,n-=d,i=n;break}n+=r.getGaps(a)}if(r.childNodes===s)return{offsetNode:r,offset:t-i}}return{offsetNode:r,offset:t-i}}this.lspError("AstElement.caretPositionFromIndex")}elementFromIndex(t){var e;{let r=(e=this.caretPositionFromIndex(t))==null?void 0:e.offsetNode;return(r==null?void 0:r.type)==="text"?r.parentNode:r}this.lspError("AstElement.elementFromIndex")}elementFromPoint(t,e){return this.elementFromIndex(this.indexFromPos(e,t))}lint(t=this.getAbsoluteIndex(),e){{let r=[];for(let n=0,i=t+this.getAttribute("padding");n<this.length;n++){let s=this.childNodes[n];s.setAttribute("aIndex",i);let a=s.lint(i,e);a.length>0&&Array.prototype.push.apply(r,a),i+=s.toString().length+this.getGaps(n)}return r}}print(t={}){{let e=t.class;return this.toString()?(e===""?"":`<span class="wpb-${e!=null?e:this.type}${this.getAttribute("invalid")?" wpb-invalid":""}">`)+it(this.childNodes,t)+(e===""?"":"</span>"):""}}json(t,e=1/0,r=this.getAbsoluteIndex()){{let n={...this,type:this.type,range:[r,r+this.toString().length],childNodes:[]};if(e>=1)for(let i=0,s=r+this.getAttribute("padding");i<this.length;i++){let a=this.childNodes[i],{length:l}=a.toString();a.setAttribute("aIndex",s),n.childNodes.push(a.type==="text"?{data:a.data,range:[s,s+l]}:a.json(void 0,e-1,s)),s+=l+this.getGaps(i)}return n}}};ns=O(Yu),zt=j(ns,0,"AstElement",ka,zt),B(ns,1,zt)});var wt,yn=L(()=>{"use strict";wt=(o=1)=>t=>{class e extends t{getGaps(){return o}}return e}});var Z,we=L(()=>{"use strict";Z=o=>{{class t extends o{escape(){}}return t}}});var Zu,ci,Aa=L(()=>{"use strict";oe();G();D();V();Zu=new RegExp(`https?://${tt}${rt}$`,"iu"),ci=class extends ${get type(){return"parameter"}get anon(){return this.firstChild.length===0}get duplicated(){{let{parentNode:t,name:e}=this;return!!(t!=null&&t.isTemplate())&&t.getArgs(e,!1,!1).size>1}}constructor(t,e,r,n=[]){super(void 0,r,n);let i=new $(typeof t=="number"?void 0:t,r,n,{}),s=new $(e,r,n);i.type="parameter-key",i.setAttribute("stage",2),s.type="parameter-value",s.setAttribute("stage",2),this.append(i,s)}trimName(t,e=!0){let r=(typeof t=="string"?t:t.toString(!0)).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1");return this.setAttribute("name",r),r}afterBuild(){if(!this.anon){let{parentNode:t,firstChild:e}=this,r=this.trimName(e);t&&t.getArgs(r,!1,!1).add(this)}super.afterBuild()}toString(t){return this.anon?this.lastChild.toString(t):super.toString(t,"=")}text(){return this.anon?this.lastChild.text():super.text("=")}getGaps(){return this.anon?0:1}lint(t=this.getAbsoluteIndex(),e){var r;{let n=super.lint(t,e),i="unescaped",{lintConfig:s}=v,a=s.getSeverity(i);if(a){let{firstChild:l}=this,g=(r=Zu.exec(l.text()))==null?void 0:r[0];try{if(g&&new URL(g).search){let u=q(l,{start:t},i,"unescaped-query",a);u.startIndex=u.endIndex,u.startLine=u.endLine,u.startCol=u.endCol,u.endIndex++,u.endCol++,(s.computeEditInfo||s.fix)&&(u.fix=st(u.startIndex,"{{=}}")),n.push(u)}}catch{}}return n}}print(){return super.print({sep:this.anon?"":"="})}json(t,e,r=this.getAbsoluteIndex()){{let n=super.json(void 0,e,r);return Object.assign(n,{anon:this.anon},this.duplicated&&{duplicated:!0}),n}}}});var Er,ce,Ct=L(()=>{"use strict";V();ce=class extends ${constructor(e,r,n,i,s){super(e,n,i,s);w(this,Er);S(this,Er,r)}get type(){return m(this,Er)}set type(e){S(this,Er,e)}getAttribute(e){var r;return e==="invalid"?this.type==="converter-flag"&&!!((r=this.parentNode)!=null&&r.isInvalidFlag(this)):super.getAttribute(e)}};Er=new WeakMap});var Tn,ye,Lt=L(()=>{"use strict";V();ye=class extends ${constructor(e,r,n,i,s){super(e,n,i,s);w(this,Tn);S(this,Tn,r)}get type(){return m(this,Tn)}lint(e=this.getAbsoluteIndex()){return super.lint(e,!1)}};Tn=new WeakMap});var Ca={};re(Ca,{TranscludeToken:()=>at});var Sa,vn,Et,$r,Vt,An,Nr,lt,kn,wa,is,eg,at,ss=L(()=>{"use strict";oe();G();Ae();pe();yn();we();D();V();Aa();Ct();Lt();Sa=[Z,wt()];at=class extends(eg=$){constructor(e,r,n,i=[]){var T,x;let s,a=/^(?:\s|\0\d+[cn]\x7F)*\0(\d+)h\x7F(?:\s|\0\d+[cn]\x7F)*/u.exec(e);a&&(s=Number(a[1]),e=e.replace(`\0${s}h`,i[s].toString().replace(/^\n/u,"")));super(void 0,n,i,{});w(this,lt);ge(this,"modifier","");w(this,vn,"template");w(this,Et,":");w(this,$r,!1);w(this,Vt,new Map);w(this,An,0);w(this,Nr);let{parserFunction:l,variable:g,functionHook:u}=n,d=(T=/^(?:\s|\0\d+[cn]\x7F)*\0\d+s\x7F/u.exec(e))==null?void 0:T[0];if(d)this.setAttribute("modifier",d),e=e.slice(d.length);else if(e.includes(":")){let[y,...k]=e.split(":"),[A]=/^(?:\s|\0\d+[cn]\x7F)*/u.exec((x=k[0])!=null?x:"");this.setModifier(`${y}:${A}`)&&(e=k.join(":").slice(A.length))}let p=e.search(/[::]/u),f=e[p]===":",c=p!==-1;if(c||r.length===0&&!m(this,$r)){let y=c?e.slice(0,p):e,k=c&&e.slice(p+1),A=se(y),I=c?A.slice(A.search(/\S/u))+(f?":":""):A.trim(),[,E,N]=La(I,l),z=!("functionHook"in n)||u.includes(N),_=g.includes(N);if(c?N&&z:_){this.setAttribute("name",N),S(this,vn,"magic-word"),f&&S(this,Et,":");let Y=new ye(y,"magic-word-name",n,i);if(super.insertAt(Y),k!==!1&&r.unshift([k]),this.name==="invoke")for(let W=0;W<2;W++){let R=r.shift();if(!R)break;let F=new ce(R.join("="),`invoke-${W?"function":"module"}`,n,i);super.insertAt(F)}}}if(this.type==="template"){let y=se(e).trim();if(!this.normalizeTitle(y,10,{halfParsed:!0,temporary:!0}).valid)throw i.pop(),new SyntaxError("Invalid template name");let k=new ce(e,"template-name",n,i,{});super.insertAt(k)}typeof s=="number"&&(i[s]=void 0);let h=this.isTemplate(),b=1;for(let y=0;y<r.length;y++){let k=r[y];h||this.name==="switch"&&y>0||this.name==="tag"&&y>1||(k[0]=k.join("="),k.length=1),k.length===1&&(k.unshift(b),b++),this.insertAt(new ci(...k,n,i))}this.seal("modifier")}get type(){return m(this,vn)}get module(){return this.type==="magic-word"&&this.name==="invoke"?C(this,lt,kn).call(this).title:void 0}get function(){var e;return this.type==="magic-word"&&this.name==="invoke"?(e=this.childNodes[2])==null?void 0:e.text().trim():void 0}setModifier(e){let[,,r,n]=this.getAttribute("config").parserFunction,i=se(e).trim();if(e&&!i.endsWith(":"))return!1;let s=i.slice(0,-1).toLowerCase(),a=r.includes(s),l=n.includes(s);return(m(this,$r)?a:l||!e)||(Q.running||this.length>1)&&(a||l||!e)?(this.setAttribute("modifier",e),S(this,$r,a),!!e):!1}isTemplate(){return this.type==="template"||this.name==="invoke"}afterBuild(){this.modifier.includes("\0")&&this.setAttribute("modifier",this.buildFromStr(this.modifier,0)),super.afterBuild(),this.isTemplate()&&this.type==="template"&&(S(this,Nr,C(this,lt,kn).call(this)),this.setAttribute("name",m(this,Nr).title))}toString(e){let{childNodes:r,length:n,firstChild:i,modifier:s,type:a}=this;return`{{${s}${a==="magic-word"?i.toString(e)+(n===1?"":m(this,Et))+r.slice(1).map(l=>l.toString(e)).join("|"):super.toString(e,"|")}}}`}text(){let{childNodes:e,length:r,firstChild:n,modifier:i,type:s,name:a}=this;return s==="magic-word"&&a==="vardefine"?"":`{{${i}${s==="magic-word"?n.text()+(r===1?"":m(this,Et))+Ne(e.slice(1),"|"):super.text("|")}}}`}getAttribute(e){switch(e){case"padding":return this.modifier.length+2;case"title":return m(this,Nr);case"colon":return m(this,Et);case"invalid":return this.type==="magic-word"&&this.name==="invoke"&&(this.length===2||!C(this,lt,kn).call(this).valid);default:return super.getAttribute(e)}}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r);if(!this.isTemplate())return n;let{type:i,childNodes:s,length:a}=this,l=new U(this,e),{lintConfig:g}=v,{computeEditInfo:u}=g,d=i==="magic-word",p="no-ignored",f=g.getSeverity(p,"fragment");if(d&&!C(this,lt,kn).call(this).valid)p="invalid-invoke",f=g.getSeverity(p,"name"),f&&n.push(q(s[1],l,p,"illegal-module",f));else if(f){let c=s[d?1:0],h=c.childNodes.findIndex(T=>T.type==="text"&&Dt(T.data).includes("#")),b=c.childNodes[h];if(b){let T=q(c,l,p,"useless-fragment",f);u&&(T.suggestions=[M(T,c.getRelativeIndex(h)+b.data.indexOf("#"))]),n.push(T)}}if(p="invalid-invoke",f=g.getSeverity(p,"function"),f&&d&&a===2)return n.push(P(this,l,p,"missing-function",f)),n;if(p="no-duplicate",f=g.getSeverity(p,"parameter"),f){let c=this.getDuplicatedArgs().filter(([,b])=>!b[0].querySelector("ext")),h="duplicate-parameter";for(let[,b]of c)Array.prototype.push.apply(n,b.map(T=>{let x=q(T,l,p,h,f);return u&&(x.suggestions=[M(x,-1)]),x}))}return n}}insertAt(e,r=this.length){return super.insertAt(e,r),e.anon?C(this,lt,wa).call(this,e):e.name&&this.getArgs(e.name,!1,!1).add(e),e}getArgs(e,r,n=!0,i=!0){let s=String(e).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1"),a;return m(this,Vt).has(s)?a=m(this,Vt).get(s):(a=new Set,m(this,Vt).set(s,a)),a}getDuplicatedArgs(){return[...m(this,Vt)].filter(([,{size:e}])=>e>1).map(([e,r])=>[e,[...r]])}getPossibleValues(){let{type:e,name:r,childNodes:n,length:i}=this;if(e==="template")throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!");let s,a;switch(r){case"if":case"ifexist":case"ifexpr":s=2;break;case"ifeq":s=3;break;case"iferror":s=i>3?2:1;break;case"switch":{let l=n.slice(2),g=l[l.length-1];a=[...l.filter(({anon:u})=>!u),...g!=null&&g.anon?[g]:[]].map(({lastChild:u})=>u);break}default:throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!")}a!=null||(a=n.slice(s,s+2).map(({lastChild:l})=>l));for(let l=0;l<a.length;){let{length:g,0:u}=a[l].childNodes.filter(d=>d.text().trim());if(g===0)a.splice(l,1);else if(g>1||!u.is("magic-word"))l++;else try{let d=u.getPossibleValues();Array.prototype.splice.apply(a,[l,1,...d]),l+=d.length}catch{l++}}return a}print(){{let{childNodes:e,length:r,firstChild:n,modifier:i,type:s}=this;return`<span class="wpb-${s}${this.getAttribute("invalid")?" wpb-invalid":""}">{{${s==="magic-word"?Ut(i)+n.print()+(r===1?"":m(this,Et))+it(e.slice(1),{sep:"|"}):(i?`<span class="wpb-magic-word">${Ut(i)}</span>`:"")+it(e,{sep:"|"})}}}</span>`}}};is=O(eg),vn=new WeakMap,Et=new WeakMap,$r=new WeakMap,Vt=new WeakMap,An=new WeakMap,Nr=new WeakMap,lt=new WeakSet,kn=function(){let e=this.type==="template";return this.normalizeTitle((e?"":"Module:")+se(this.childNodes[e?0:1].text()),10,{temporary:!0,...!e&&{page:""}})},wa=function(e,r){S(this,An,m(this,An)+1);let n;n=m(this,An)-1;let i=e,s=String(n+1);i.setAttribute("name",s),this.getArgs(s,!1,!1).add(i)},at=j(is,0,"TranscludeToken",Sa,at),B(is,1,at)});var os,$a,tg,rg,ng,ig,Ea,sg,wn,as,ls,Sn,Na=L(()=>{"use strict";oe();G();Ae();D();rs();os=String.raw`[${_e}\t]*`,$a=String.raw`<(?:/[^\S\n]*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+|\n={2,}`,tg=new RegExp(String.raw`${$a}|\bhttps?[:/]/+|\b(?:rfc|pmid)(?=[-::]?${os}\d)|\bisbn(?=[-::]?${os}(?:\d(?:${os}|-)){6})`,"giu"),rg=new RegExp($a,"giu"),ng=new Set(["attr-value","ext-link-text","link-text"]),ig={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},Ea=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"]),sg=(()=>{try{return new RegExp(String.raw`[\p{L}\p{N}_]`,"u")}catch{return/\w/u}})(),ls=class ls extends Ge{constructor(e){super();w(this,wn);ge(this,"data","");this.data=e}get type(){return"text"}toString(e){var r;return e&&!((r=this.parentNode)!=null&&r.getAttribute("built"))?se(this.data):this.data}text(){return this.data}lint(e=this.getAbsoluteIndex(),r){var n,i,s;{if(r===!1)return[];let{data:a,parentNode:l,nextSibling:g,previousSibling:u}=this;if(!l)throw new Error("An isolated text node cannot be linted!");let{type:d,parentNode:p}=l;if(d==="attr-value"){let{name:W,tag:R}=p;if(R==="ref"&&(W==="name"||W==="follow")||W==="group"&&(R==="ref"||R==="references")||R==="choose"&&(W==="before"||W==="after"))return[]}if(r!=null||(r=l.isPlain()&&!ng.has(d)?tg:rg),a.search(r)===-1)return[];r.lastIndex=0;let f=[],c=g==null?void 0:g.type,h=g==null?void 0:g.name,b=u==null?void 0:u.type,T=this.getRootNode(),x=T.toString(),{ext:y,html:k,variants:A}=T.getAttribute("config"),{top:I,left:E}=T.posFromIndex(e),{lintConfig:N}=v,z=N.rules["tag-like"],_=z[1]?new Set(Object.keys(z[1]).filter(W=>W!=="invalid"&&W!=="disallowed")):new Set,Y=new Set(["onlyinclude","noinclude","includeonly",...y,...k[0],...k[1],...k[2],..._,...N.getSeverity("tag-like","disallowed")?Ea:[]]);for(let W=r.exec(a);W;W=r.exec(a)){let{index:R,0:F}=W,[,ee,ae]=W,xe=F==="["&&d==="ext-link-text";if(ae&&ae!=="]"){let{length:ue}=ae;R+=ue,F=F.slice(ue)}else{if(F.startsWith("<")&&!Y.has(ee.toLowerCase())||xe&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(a.slice(R+1))||g!=null&&g.is("ext")&&h==="nowiki"&&((n=g.innerText)!=null&&n.includes("]"))))continue;F.startsWith(`
6
+ ==`)&&(R++,F=F.slice(1))}F=F.toLowerCase();let[J]=F,de=F==="rfc"||F==="pmid"||F==="isbn",K=J==="{",kt=J==="}",on=J==="[",Gi=J==="]",{length:vt}=F;Gi&&(R||vt>1)&&r.lastIndex--;let hr=e+R,qt=hr+vt,ke,He,Xn,Yn,Mt=x[qt],Vi=x[hr-1],Ki=K||on,Qi=F==="{"&&Vi==="-"&&A.length>0,Ji=F==="}"&&Mt==="-"&&A.length>0,Po=on&&c==="free-ext-link"&&!a.slice(R+1).trim()||Gi&&b==="free-ext-link"&&R===0;if(de)ke="lonely-http",F=F.toUpperCase(),He=N.getSeverity(ke,F);else if(J==="<"){ke="tag-like";let ue;/^<\/?\s/u.test(F)||!/[\s/>]/u.test(Mt!=null?Mt:"")?ue="invalid":_.has(ee)?ue=ee:Ea.has(ee)&&!y.includes(ee)&&(ue="disallowed"),He=N.getSeverity(ke,ue)}else if(J==="=")ke="syntax-like",He=N.getSeverity(ke,"heading");else if(Qi||Ji)ke="lonely-bracket",He=N.getSeverity(ke,"converter"),Qi&&R>0?(F="-{",R--,hr--,vt=2):Ji&&R<a.length-1&&(F="}-",qt++,vt=2);else if(Po)ke="lonely-bracket",He=N.getSeverity(ke,"extLink");else if(Ki||kt||Gi)if(ke="lonely-bracket",vt>1||K&&Mt===J||kt&&Vi===J)He=N.getSeverity(ke,"double");else{if(!xe){let ue=ig[J],Pe=Ki?a.slice(R+1):a.slice(0,R);if(K&&((i=ue.exec(Pe))==null?void 0:i[0])==="}"||kt&&((s=ue.exec(Pe))==null?void 0:s[0])==="{")continue;if(!Pe.includes(J)){let et=Ki?"nextSibling":"previousSibling",Me=this[et];for(;Me&&(Me.type!=="text"||!ue.test(Me.data));)Me=Me[et];if(Me&&ue.exec(Me.data)[0]!==J)continue}}He=N.getSeverity(ke,"single")}else ke="lonely-http",He=N.getSeverity(ke);if(!He)continue;let Bo=this.posFromIndex(R),{line:jo,character:Oo}=vr(I,E,Bo.top+1,Bo.left);if(J==="="){let ue=a.indexOf(`
7
+ `,R),Pe=g,et;if(ue===-1){let Me=0;for(;Pe&&!(Pe.type==="text"&&(Me=Pe.data.indexOf(`
8
+ `),Me!==-1));)Pe=Pe.nextSibling;if(!Pe)continue;et=Pe.data.slice(0,Me)}else et=a.slice(R+vt,ue);if(!/(?:^|[^=])=+\s*(?:\S\s*)?$/u.test(et))continue;ue===-1?(qt=Pe.getAbsoluteIndex()+et.length,{top:Xn,left:Yn}=T.posFromIndex(qt)):(qt+=et.length,vt+=et.length)}let _t={rule:ke,message:v.msg(J==="="?"header-like":"lonely",de||J==="h"||Qi||Ji?F:J),severity:He,startIndex:hr,endIndex:qt,startLine:jo,endLine:Xn!=null?Xn:jo,startCol:Oo,endCol:Yn!=null?Yn:Oo+vt};if(N.computeEditInfo)if(J==="<")_t.suggestions=[st(hr,"&lt;")];else if(J==="h"&&d!=="link-text"&&sg.test(Vi||""))_t.suggestions=[St(hr)];else if(xe){let ue=l.getAbsoluteIndex()+l.toString().length;_t.suggestions=[st(ue,"&#93;")]}else if(F==="]"&&Po){let ue=e-u.toString().length;_t.suggestions=[Ar(ue,"left-bracket","[")]}else de&&(_t.suggestions=[...W[0]===F?[]:[li(_t,F)],...Mt===":"||Mt===":"?[St(qt,1)]:[]]);f.push(_t)}return f}}replaceData(e){C(this,wn,as).call(this,e)}splitText(e){{let{parentNode:r,data:n}=this;if(!r)throw new Error("The text node to be split has no parent node!");let i=new ls(n.slice(e));return Gt(r,r.childNodes.indexOf(this)+1,0,[i]),this.setAttribute("data",n.slice(0,e)),i}this.lspError("AstText.splitText")}escape(){{let{parentNode:e}=this;if(!e)throw new Error("The text node to be escaped has no parent node!");let{TranscludeToken:r}=(ss(),X(Ca)),n=e.getAttribute("config"),i=e.childNodes.indexOf(this)+1,s=g=>Math.max(this.data.lastIndexOf("=",g),this.data.lastIndexOf("|",g)),a=s(),l=()=>new r(this.data[a]==="="?"=":"!",[],n);for(;a>=0;a=s(a-1))a<this.data.length-1&&this.splitText(a+1),e.insertAt(Q.run(l),i),C(this,wn,as).call(this,this.data.slice(0,a))}}print(){return Ut(this.data)}};wn=new WeakSet,as=function(e){this.setAttribute("data",e)};Sn=ls});var Ie,$t=L(()=>{"use strict";Ie=(o=!0,t=!0)=>e=>{class r extends e{text(){return""}lint(i){return o?[]:super.lint(i)}}return r}});var he,Ve=L(()=>{"use strict";he=({length:o})=>t=>{class e extends t{getAttribute(n){return n==="padding"?o:super.getAttribute(n)}}return e}});var Ia,Kt,De,Ke,fi,Ra,ds,og,Ce,Ir=L(()=>{"use strict";G();Ae();pe();Ve();we();D();V();Ct();Ia=[Z,he("[[")];Ce=class extends(og=$){constructor(e,r,n=v.getConfig(),i=[],s="|"){super(void 0,n,i,{});w(this,fi);w(this,Kt,!0);w(this,De);w(this,Ke);if(this.insertAt(new ce(e,"link-target",n,i)),r!==void 0){let a=new $(r,{...n,excludes:[...n.excludes,"list"]},i);a.type="link-text",a.setAttribute("stage",10),this.insertAt(a)}S(this,De,s)}get link(){return m(this,Ke)}get fragment(){return m(this,Ke).fragment}afterBuild(){S(this,Ke,this.getTitle()),m(this,De).includes("\0")&&S(this,De,this.buildFromStr(m(this,De),0)),C(this,fi,Ra).call(this),super.afterBuild()}setAttribute(e,r){e==="bracket"?S(this,Kt,r):e==="title"?S(this,Ke,r):super.setAttribute(e,r)}toString(e){let r=super.toString(e,m(this,De));return m(this,Kt)?`[[${r}]]`:r}text(){let e=super.text("|");return m(this,Kt)?`[[${e}]]`:e}getAttribute(e){return e==="title"?m(this,Ke):super.getAttribute(e)}getGaps(e){return e===0?m(this,De).length:1}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),{childNodes:[i,s],type:a}=this,{encoded:l,fragment:g}=m(this,Ke),{lintConfig:u}=v,{computeEditInfo:d,fix:p}=u,f=new U(this,e),c="unknown-page",h=u.getSeverity(c);if(h&&i.childNodes.some(({type:b})=>b==="template")&&n.push(q(i,f,c,"template-in-link",h)),c="url-encoding",h=u.getSeverity(c),h&&l){let b=q(i,f,c,"unnecessary-encoding",h);(d||p)&&(b.fix=si(b,i)),n.push(b)}if(c="pipe-like",h=u.getSeverity(c,"link"),h&&(a==="link"||a==="category")){let b=s==null?void 0:s.childNodes.findIndex(x=>x.type==="text"&&x.data.includes("|")),T=s==null?void 0:s.childNodes[b];if(T){let x=q(s,f,c,"pipe-in-link",h);if(d){let y=x.startIndex+s.getRelativeIndex(b);x.suggestions=[di(y,T.data)]}n.push(x)}}if(c="no-ignored",h=u.getSeverity(c,"fragment"),h&&g!==void 0&&!Fa(a)){let b=q(i,f,c,"useless-fragment",h);if(d||p){let T=i.childNodes.findIndex(y=>y.type==="text"&&y.data.includes("#")),x=i.childNodes[T];x&&(b.fix=M(b,i.getRelativeIndex(T)+x.data.indexOf("#")))}n.push(b)}return n}}getTitle(e,r){return this.normalizeTitle(this.firstChild.text(),0,{halfParsed:r,temporary:e,decode:!0,selfLink:!0})}print(){return super.print(m(this,Kt)?{pre:"[[",post:"]]",sep:m(this,De)}:{sep:m(this,De)})}json(e,r,n=this.getAbsoluteIndex()){{let i=super.json(void 0,r,n),{type:s,fragment:a}=this;return a!==void 0&&(s==="link"||s==="redirect-target")&&(i.fragment=a),i}}};ds=O(og),Kt=new WeakMap,De=new WeakMap,Ke=new WeakMap,fi=new WeakSet,Ra=function(){this.type!=="ext-inner"&&this.setAttribute("name",m(this,Ke).title)},Ce=j(ds,0,"LinkBaseToken",Ia,Ce),B(ds,1,Ce)});var Pa,us,ag,fe,Nt=L(()=>{"use strict";we();V();Pa=[Z];fe=class extends(ag=$){get innerText(){return this.firstChild.data}constructor(t="",e,r){super(t,e,r)}};us=O(ag),fe=j(us,0,"NowikiBaseToken",Pa,fe),B(us,1,fe)});var Ba,gs,lg,me,Qt=L(()=>{"use strict";G();$t();D();Nt();Ba=[Ie(!1)];me=class extends(lg=fe){get type(){return"noinclude"}toString(t){return t?"":super.toString()}lint(t=this.getAbsoluteIndex()){{let{lintConfig:e}=v,r="no-ignored",n=e.getSeverity(r,"include");if(n){let{innerText:i}=this,s=/^<(includeonly|(?:no|only)include)\s+(?:[^\s>/]|\/(?!>))[^>]*>$/iu.exec(i);if(s){let a=P(this,{start:t},r,"useless-attribute",n),{computeEditInfo:l}=e,g=s[1].length+1,u=i.endsWith("/>")?2:1;return a.startIndex+=g,a.startCol+=g,a.endIndex-=u,a.endCol-=u,l&&(a.suggestions=[M(a)]),[a]}}return[]}}};gs=O(lg),me=j(gs,0,"NoincludeToken",Ba,me),B(gs,1,me)});var mi,ja=L(()=>{"use strict";G();D();Ir();Qt();mi=class extends Ce{get type(){return"redirect-target"}constructor(t,e,r,n){super(t,void 0,r,n),e!==void 0&&this.insertAt(new me(e,r,n))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,{halfParsed:!0,decode:!0,page:""})}lint(t=this.getAbsoluteIndex()){{let e=super.lint(t,!1),r="no-ignored",{lintConfig:n}=v,i=n.getSeverity(r,"redirect");if(i&&this.length===2){let s=q(this.lastChild,{start:t},r,"useless-link-text",i);s.startIndex--,s.startCol--,(n.computeEditInfo||n.fix)&&(s.fix=M(s)),e.push(s)}return e}}}});var Oa,It,Rr,ps,dg,Jt,qa=L(()=>{"use strict";$t();we();V();Lt();ja();Oa=[Ie(!1,!1),Z];Jt=class extends(dg=$){constructor(e,r,n,i,s,a,l=[]){super(void 0,a,l);w(this,It);w(this,Rr);S(this,It,e),S(this,Rr,s),this.append(new ye(r,"redirect-syntax",a,l),new mi(n,i==null?void 0:i.slice(1),a,l))}get type(){return"redirect"}getAttribute(e){return e==="padding"?m(this,It).length:super.getAttribute(e)}toString(e){return m(this,It)+super.toString(e)+m(this,Rr)}lint(e=this.getAbsoluteIndex()){{let r=e+m(this,It).length+this.firstChild.toString().length;return this.lastChild.setAttribute("aIndex",r),this.lastChild.lint(r)}}print(){return super.print({pre:m(this,It),post:m(this,Rr)})}};ps=O(dg),It=new WeakMap,Rr=new WeakMap,Jt=j(ps,0,"RedirectToken",Oa,Jt),B(ps,1,Jt)});var Ma={};re(Ma,{parseRedirect:()=>ug});var ug,_a=L(()=>{"use strict";D();qa();ug=(o,t,e)=>{var n;(n=t.regexRedirect)!=null||(t.regexRedirect=new RegExp(String.raw`^(\s*)((?:${t.redirection.join("|")})\s*(?::\s*)?)\[\[([^\n|\]]+)(\|.*?)?\]\](\s*)`,"iu"));let r=t.regexRedirect.exec(o);return r&&v.normalizeTitle(r[3],0,!1,t,{halfParsed:!0,temporary:!0,decode:!0,page:""}).valid?(o=`\0${e.length}o${o.slice(r[0].length)}`,new Jt(...r.slice(1),t,e),o):!1}});var Wa,cs,gg,Xt,Da=L(()=>{"use strict";Ve();we();V();Wa=[Z,he("<onlyinclude>")];Xt=class extends(gg=$){get type(){return"onlyinclude"}toString(t){return`<onlyinclude>${super.toString(t)}</onlyinclude>`}isPlain(){return!0}print(){return super.print({pre:'<span class="wpb-ext">&lt;onlyinclude&gt;</span>',post:'<span class="wpb-ext">&lt;/onlyinclude&gt;</span>'})}};cs=O(gg),Xt=j(cs,0,"OnlyincludeToken",Wa,Xt),B(cs,1,Xt)});var Ua,Rt,Qe,fs,pg,Ue,hi=L(()=>{"use strict";yn();we();V();Ua=[wt(),Z];Ue=class extends(pg=$){constructor(e,r,n,i,s,a=[]){super(void 0,s);w(this,Rt);w(this,Qe);ge(this,"closed");this.setAttribute("name",e.toLowerCase()),S(this,Rt,[e,i||e]),this.closed=i!=="",S(this,Qe,i===void 0),this.append(r,n);let l=typeof r=="string"?-1:a.indexOf(r);a.splice(l===-1?1/0:l,0,this)}get innerText(){return m(this,Qe)?void 0:this.lastChild.text()}get selfClosing(){return m(this,Qe)}toString(e){let{firstChild:r,lastChild:n}=this,[i,s]=m(this,Rt);return m(this,Qe)?`<${i}${r.toString(e)}/>`:`<${i}${r.toString(e)}>${n.toString(e)}${this.closed?`</${s}>`:""}`}text(){let[e,r]=m(this,Rt);return m(this,Qe)?`<${e}${this.firstChild.text()}/>`:`<${e}${super.text(">")}${this.closed?`</${r}>`:""}`}getAttribute(e){return e==="padding"?m(this,Rt)[0].length+1:super.getAttribute(e)}print(){{let[e,r]=m(this,Rt);return super.print(m(this,Qe)?{pre:`&lt;${e}`,post:"/&gt;"}:{pre:`&lt;${e}`,sep:"&gt;",post:this.closed?`&lt;/${r}&gt;`:""})}}json(e,r,n=this.getAbsoluteIndex()){{let i=super.json(void 0,r,n);return i.selfClosing=m(this,Qe),i}}};fs=O(pg),Rt=new WeakMap,Qe=new WeakMap,Ue=j(fs,0,"TagPairToken",Ua,Ue),B(fs,1,Ue)});var Ha,ms,cg,Yt,za=L(()=>{"use strict";G();pe();$t();D();hi();Ha=[Ie(!1)];Yt=class extends(cg=Ue){get type(){return"include"}constructor(t,e="",r,n,i,s){super(t,e,r!=null?r:"",r===void 0||n!=null?n:"",i,s)}toString(t){return t?"":super.toString()}lint(t=this.getAbsoluteIndex()){{let e=[],{firstChild:r,closed:n,name:i}=this,s=new U(this,t),a=["no-ignored","unclosed-comment"],{lintConfig:l}=v,{computeEditInfo:g}=l,u=a.map(d=>l.getSeverity(d,"include"));if(u[0]&&r.data.trim()){let d=q(r,s,a[0],"useless-attribute",u[0]);g&&(d.suggestions=[M(d)]),e.push(d)}if(u[1]&&!n){let d=P(this,s,a[1],v.msg("unclosed",`<${i}>`),u[1]);g&&(d.suggestions=[je(d.endIndex,`</${i}>`)]),e.push(d)}return e}}};ms=O(cg),Yt=j(ms,0,"IncludeToken",Ha,Yt),B(ms,1,Yt)});var Fr,bi=L(()=>{"use strict";Fr=(o=0)=>t=>{var e,hs;{class n extends t{constructor(){super(...arguments);w(this,e)}hasAttr(a){return C(this,e,hs).call(this).hasAttr(a)}getAttr(a){return C(this,e,hs).call(this).getAttr(a)}}return e=new WeakSet,hs=function(){return this.childNodes[o]},n}}});var le,Ga,Va,xi,ys,xs,Ka,yi,Ya,Za,bs,Qa,Ja,Xa,Zt,Ti,ki,vi,el,Ai,Si=L(()=>{"use strict";le=new Set(["align"]),Ga=new Set(["cite"]),Va=new Set(["cite","datetime"]),xi=new Set(["width"]),ys=new Set(["bgcolor","align","valign"]),xs=new Set([...ys,"axis","height","nowrap","width"]),Ka=new Set([...xs,"abbr","headers","scope","rowspan","colspan"]),yi=new Set(["type"]),Ya=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),Za=new Set(["clear"]),bs=new Set(["id","qid","forcemathmode","type","display"]),Qa=new Set(["enclose","inline","lang","line","linelinks","style","class","id","dir","copy","highlight","start"]),Ja=new Set(["weight"]),Xa=new Set(["width","height","zoom","latitude","longitude","align","mapstyle","lang","alt","text"]),Zt=new Set,Ti=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"]),ki={div:le,h1:le,h2:le,h3:le,h4:le,h5:le,h6:le,blockquote:Ga,q:Ga,p:le,br:Za,pre:xi,ins:Va,del:Va,ul:yi,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...Ya,"border"]),caption:le,tr:ys,td:Ka,th:Ka,font:new Set(["size","color","face"]),hr:xi,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:yi,poem:le,categorytree:le,combooption:le,img:new Set(["alt","src","width","height","loading","srcset"])},vi={pre:new Set(["format"]),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:Zt,indicator:new Set(["name"]),langconvert:new Set(["from","to"]),ref:new Set(["group","name","follow","dir","details"]),references:new Set(["group","responsive"]),charinsert:new Set(["label"]),choose:new Set(["uncached","before","after"]),option:Ja,choicetemplate:Ja,imagemap:Zt,inputbox:Zt,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:Zt,poll:new Set(["id","show-results-before-voting"]),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([...bs,"chem"]),chem:bs,ce:bs,hiero:Zt,phonos:new Set(["ipa","class","text","lang","wikibase","file"]),section:new Set(["begin","end"]),source:Qa,syntaxhighlight:Qa,templatedata:Zt,timeline:new Set(["method","font"]),quiz:new Set(["display","shuffleanswers","points","shuffle","case"]),languages:Zt,mapframe:new Set([...Xa,"frameless"]),maplink:new Set([...Xa,"class"]),rss:new Set(["template","templatename","max","highlight","filter","filterout","reverse","date","item-max-length"]),"page-collection":new Set(["lang","name","description","end-date"])},el={table:Ya,td:new Set([...xs,"scope"]),th:xs,br:Za,caption:le,div:le,hr:xi,h1:le,h2:le,h3:le,h4:le,h5:le,h6:le,li:yi,p:le,pre:xi,tr:ys,ul:yi},Ai={dynamicpagelist:["category","notcategory","namespace","count","offset","imagewidth","imageheight","imagesperrow","mode","gallerycaption","galleryshowfilesize","galleryshowfilename","order","ordermethod","redirects","stablepages","qualitypages","suppresserrors","addfirstcategorydate","shownamespace","ignoresubpages","googlehack","nofollow"],inputbox:["preloadparams[]","type","width","preload","preloadtitle","page","editintro","useve","usedt","summary","nosummary","minor","break","default","placeholder","bgcolor","buttonlabel","searchbuttonlabel","fulltextbutton","namespaces","labeltext","hidden","id","inline","prefix","dir","searchengine","searchtype","searchfilter","tour","arialabel"]}});var fg,mg,hg,bg,Cn,Pr,be,Je,er,tl,Ts,Br,rl=L(()=>{"use strict";G();oe();Si();pe();D();V();Ct();fg=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|src|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,mg=/(?:^|\s|\*\/)(?:java|vb)script(?:\W|$)/iu,hg=new Set(["ext","arg","magic-word","template"]),bg=new Set(["about","property","resource","datatype","typeof","itemid","itemprop","itemref","itemscope","itemtype"]),Br=class extends ${constructor(e,r,n,i,s,a="",l,g=[]){let u=new ce(n,"attr-key",s,g),d;if(n==="title"||r==="img"&&n==="alt")d=new $(l,s,g,{}),d.type="attr-value",d.setAttribute("stage",10);else if(r==="gallery"&&n==="caption"||r==="ref"&&n==="details"||(r==="mapframe"||r==="maplink")&&n==="text"||r==="choose"&&(n==="before"||n==="after")){let p={...s,excludes:[...s.excludes,"heading","html","table","hr","list"]};d=new $(l,p,g,{}),d.type="attr-value",d.setAttribute("stage",1)}else d=new ce(l,"attr-value",s,g,{});super(void 0,s,g);w(this,er);w(this,Cn);w(this,Pr);w(this,be);w(this,Je);S(this,Cn,e),this.append(u,d),S(this,be,a),S(this,Je,[...i]),S(this,Pr,r),this.setAttribute("name",nt(se(n)))}get type(){return m(this,Cn)}get tag(){return m(this,Pr)}get balanced(){return!m(this,be)||m(this,Je)[0]===m(this,Je)[1]}afterBuild(){m(this,be).includes("\0")&&S(this,be,this.buildFromStr(m(this,be),0)),this.parentNode&&S(this,Pr,this.parentNode.name),C(this,er,tl).call(this),super.afterBuild()}toString(e){let[r="",n=""]=m(this,Je);return m(this,be)?super.toString(e,m(this,be)+r)+n:this.firstChild.toString(e)}text(){return m(this,be)?`${super.text(`${m(this,be).trim()}"`)}"`:this.firstChild.text()}getGaps(){var e,r;return m(this,be)?m(this,be).length+((r=(e=m(this,Je)[0])==null?void 0:e.length)!=null?r:0):0}lint(e=this.getAbsoluteIndex(),r){var n;{let i=super.lint(e,r),{balanced:s,firstChild:a,lastChild:l,name:g,tag:u}=this,d=new U(this,e),p=["unclosed-quote","obsolete-attr"],{lintConfig:f}=v,c=p.map(b=>f.getSeverity(b,g));if(c[0]&&!s){let b=q(l,d,p[0],"unclosed-quotes",c[0]);b.startIndex--,b.startCol--,f.computeEditInfo&&(b.suggestions=[je(b.endIndex,m(this,Je)[0])]),i.push(b)}let h=C(this,er,Ts).call(this,e,d);return h&&i.push(h),c[1]&&((n=el[u])!=null&&n.has(g))&&i.push(q(a,d,p[1],"obsolete-attribute",c[1])),i}}getValue(){return m(this,be)?this.lastChild.text().replace(/[\t\r\n ]+/gu," ").trim():""}escape(){this.type!=="ext-attr"&&(S(this,be,"{{=}}"),this.lastChild.escape())}getAttribute(e){return e==="invalid"?!!C(this,er,Ts).call(this):super.getAttribute(e)}print(){{let[e="",r=""]=m(this,Je);return m(this,be)?super.print({sep:Ut(m(this,be))+e,post:r}):super.print()}}json(e,r,n=this.getAbsoluteIndex()){{let i=super.json(void 0,r,n);return i.tag=this.tag,i}}};Cn=new WeakMap,Pr=new WeakMap,be=new WeakMap,Je=new WeakMap,er=new WeakSet,tl=function(){this.setAttribute("name",nt(this.firstChild.text()))},Ts=function(e,r){let{firstChild:n,lastChild:i,type:s,name:a,tag:l,parentNode:g}=this,u=!i.childNodes.some(({type:x})=>hg.has(x)),d=this.getValue(),p=vi[l],f=ki[l],{length:c}=this.toString(),h="illegal-attr",b,T;if({lintConfig:b}=v,{computeEditInfo:T}=b,!(p!=null&&p.has(a))&&!(f!=null&&f.has(a))&&(s==="ext-attr"?p||f:!/\{\{[^{]+\}\}/u.test(a))&&(s==="ext-attr"&&!f||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:_]*)$/u.test(a)&&(l==="meta"||l==="link"||!Ti.has(a)))||(a==="itemtype"||a==="itemid"||a==="itemref")&&!(g!=null&&g.hasAttr("itemscope"))){if(e===void 0)return 2;{let x=b.getSeverity(h,"unknown");if(x){let y=q(n,r,h,"illegal-attribute-name",x);return T&&(y.suggestions=[M(e,c)]),y}}}else if(a==="style"&&fg.test(d)){if(e===void 0)return 1;{h="insecure-style";let x=b.getSeverity(h);return x&&q(i,r,h,"insecure-style",x)}}else if(a==="tabindex"&&d!=="0"){if(e===void 0)return 2;{let x=b.getSeverity(h,"tabindex");if(x){let y=q(i,r,h,"nonzero-tabindex",x);return T&&(y.suggestions=[M(e,c),ve(y,"0 tabindex","0")]),y}}}else if((/^xmlns:[\w:.-]+$/u.test(a)||bg.has(a))&&mg.test(d)||u&&(a==="href"||s==="ext-attr"&&l==="img"&&a==="src")&&!new RegExp(String.raw`^(?:${this.getAttribute("config").protocol}|//)\S+$`,"iu").test(d)){if(e===void 0)return 2;{let x=b.getSeverity(h,"value");return x&&q(i,r,h,"illegal-attribute-value",x)}}else if(u&&s!=="ext-attr"){let x=ui(l,a),y=d.toLowerCase();if(x.length>0&&x.every(k=>k!==y)){if(e===void 0)return 2;{let k=b.getSeverity(h,"value");return k&&q(i,r,h,"illegal-attribute-value",k)}}}return!1}});var il,xg,yg,nl,Ln,jr,wi,Ft,Ci=L(()=>{"use strict";G();oe();pe();D();V();Ct();rl();il=o=>o.slice(0,-1),xg=o=>`${il(o)}-dirty`,yg=(()=>{try{return new RegExp(String.raw`[\p{L}\p{N}]`,"u")}catch{return/[^\W_]/u}})(),nl=new Map([["indicator",["name"]],["langconvert",["from","to"]],["mapframe",["width","height"]],["maplink",["width","height"]],["phonos",[["ipa","file","wikibase"]]],["section",[["begin","end"]]],["templatestyles",["src"]]]),Ft=class extends ${constructor(e,r,n,i,s=[]){super(void 0,i,s,{});w(this,jr);w(this,Ln);if(S(this,Ln,r),this.setAttribute("name",n),e){let a=/([^\s/](?:(?!\0\d+~\x7F)[^\s/=])*)(?:((?:\s(?:\s|\0\d+[cn]\x7F)*)?(?:=|\0\d+~\x7F)(?:\s|\0\d+[cn]\x7F)*)(?:(["'])([\s\S]*?)(\3|$)|(\S*)))?/gu,l="",g=a.exec(e),u=0,d=()=>{l&&(super.insertAt(new ce(l,xg(r),i,s)),l="")};for(;g;){let{index:p,0:f,1:c,2:h,3:b,4:T,5:x,6:y}=g;if(l+=e.slice(u,p),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(se(c).trim())){let k=T!=null?T:y,A=[b,x],I=new Br(il(r),n,c,A,i,h,k,s);d(),super.insertAt(I)}else l+=f;({lastIndex:u}=a),g=a.exec(e)}l+=e.slice(u),d()}}get type(){return m(this,Ln)}afterBuild(){let{parentNode:e}=this;e!=null&&e.is("td")&&this.setAttribute("name",e.subtype),super.afterBuild()}getAttrTokens(e){return this.childNodes.filter(r=>r instanceof Br&&(!e||r.name===nt(e)))}hasAttr(e){return this.getAttrTokens(e).length>0}getAttrToken(e){{let r=this.getAttrTokens(e);return r[r.length-1]}}getAttr(e){var r;return(r=this.getAttrToken(e))==null?void 0:r.getValue()}lintRef(e,r){{let n=this.getAttrToken("follow"),i=n==null?void 0:n.getValue(),s=this.getAttr("name"),a="invalid-ref";if(i&&!/\D/u.test(i)){let l="int-name";return e?q(n,e,a,l,r):l}else if(i&&(this.hasAttr("details")||s&&/\D/u.test(s))){let l="ref-follow";return e?P(this,e,a,l,r):l}return""}}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),{parentNode:i,childNodes:s,type:a,name:l}=this,g=new Map,u=new Set,d=new U(this,e),p=["no-ignored","required-attr","invalid-ref","no-duplicate"],{lintConfig:f}=v,{computeEditInfo:c,fix:h}=f,b=["closingTag","invalidAttributes","nonWordAttributes"].map(x=>f.getSeverity(p[0],x));if(b[0]&&C(this,jr,wi).call(this)){let x=P(this,d,p[0],"attributes-of-closing-tag",b[0]);if(c){let y=i.getAbsoluteIndex();x.suggestions=[M(x),oi(y)]}n.push(x)}for(let x of s)if(x instanceof Br){let{name:y}=x;g.has(y)?(u.add(y),g.get(y).push(x)):g.set(y,[x])}else{let y=x.text().trim(),k=b[yg.test(y)?1:2];if(y&&k){let A=q(x,d,p[0],"invalid-attribute",k);c&&(A.suggestions=[M(A,0," ")]),n.push(A)}}if(a==="ext-attrs"&&nl.has(l)){let x=f.getSeverity(p[1],l);if(x)for(let y of nl.get(l)){let k=typeof y=="string"?[y]:y;k.some(A=>this.getAttr(A))||n.push(P(this,d,p[1],v.msg("required-attribute",k.join("/")),x))}}if(l==="ref"){let x=f.getSeverity(p[2]);if(x){let y=this.lintRef(d,x);y&&n.push(y)}}let T=f.getSeverity(p[3],"attribute");if(T&&u.size>0)for(let x of u){let y=g.get(x).map(k=>[k,k.getValue()]);Array.prototype.push.apply(n,y.map(([k,A],I)=>{let E=q(k,d,p[3],v.msg("duplicate-attribute",x),T);if(c||h){let N=M(E);!A||y.slice(0,I).some(([,z])=>z===A)?E.fix=N:c&&(E.suggestions=[N])}return E}))}return n}}escape(){this.type!=="ext-attrs"&&super.escape()}getAttribute(e){return e==="invalid"?C(this,jr,wi).call(this):super.getAttribute(e)}print(){return this.toString()?`<span class="wpb-${this.type}${C(this,jr,wi).call(this)?" wpb-invalid":""}">${this.childNodes.map(e=>e.print(e instanceof ce?{class:e.toString().trim()&&"attr-dirty"}:void 0)).join("")}</span>`:""}};Ln=new WeakMap,jr=new WeakSet,wi=function(){let{parentNode:e}=this;return(e==null?void 0:e.type)==="html"&&e.closing&&this.text().trim()!==""}});var sl={};re(sl,{PreToken:()=>ks});var ks,ol=L(()=>{"use strict";V();Qt();ks=class extends ${get type(){return"ext-inner"}constructor(t,e,r=[]){if(t){let n=/<nowiki>/giu,i=/<\/nowiki>/giu,{length:s}=n.source,a=n.exec(t);a&&(i.lastIndex=a.index+s);let l=i.exec(t),g=0,u="";for(;a&&l;)new me(a[0],e,r,!0),new me(l[0],e,r,!0),u+=`${t.slice(g,a.index)}\0${r.length-1}n${t.slice(a.index+s,l.index)}\0${r.length}n`,g=l.index+s+1,n.lastIndex=g,a=n.exec(t),a&&(i.lastIndex=a.index+s),l=i.exec(t);t=u+t.slice(g)}super(t,e,r,{}),this.setAttribute("stage",10)}isPlain(){return!0}lint(t=this.getAbsoluteIndex()){return super.lint(t,/<\s*\/\s*(pre)\b/giu)}}});var Pt,Li=L(()=>{"use strict";V();Pt=class extends ${get type(){return"ext-inner"}toString(t){return super.toString(t,`
9
9
  `)}text(){return super.text(`
10
10
  `).replace(/\n\s*\n/gu,`
11
11
  `)}getGaps(){return 1}print(){return super.print({sep:`
12
- `})}}});var Ci,ll=L(()=>{"use strict";G();vi();D();V();Ci=class extends ${get type(){return"param-line"}constructor(t,e,r,n,i){super(e,r,n,i),this.setAttribute("name",t)}lint(t=this.getAbsoluteIndex()){{let e="no-ignored",{lintConfig:r}=v,{name:n,childNodes:i}=this,s=r.getSeverity(e,n);if(!s)return[];let a=v.msg("invalid-parameter",n);if(i.some(({type:p})=>p==="ext"))return[P(this,{start:t},e,a,s)];let l=i.filter(({type:p})=>p!=="comment"&&p!=="include"&&p!=="noinclude"),g=n==="inputbox",u=g?l.findIndex(({type:p})=>p!=="text"):-1,d=l.slice(0,u===-1?void 0:u).map(String).join("").trim();if(d){g&&(d=d.toLowerCase());let p=d.indexOf("="),f=d.slice(0,p===-1?void 0:p).trim(),c=ki[n];if(p===-1?u===-1||!c.some(h=>h.startsWith(f)):!c.includes(f)){let h=P(this,{start:t},e,a,s);return r.computeEditInfo&&(h.suggestions=[M(h)]),[h]}}return super.lint(t,!1)}}}});var dl={};re(dl,{ParamTagToken:()=>En});var En,Ts=L(()=>{"use strict";$n();wi();ll();En=class extends Rt{constructor(t,e,r,n,i=[],s){super(void 0,n,i,{}),r&&this.safeAppend(r.split(`
13
- `).map(a=>s?a:rr(a,n,i,e)).map(a=>new Ci(t,a,n,i,{}))),i.splice(i.indexOf(this),1),i.push(this)}}});var ul,Nn,Or,Li,ks,Tg,dt,vs=L(()=>{"use strict";We();G();Ae();pe();we();D();V();Ct();ul=[Z];dt=class extends(Tg=$){constructor(e,r,n,i=[]){super(void 0,n,i);w(this,Or);w(this,Nn);S(this,Nn,e);let s=new $(r[0],n,i);s.type="heading-title",s.setAttribute("stage",2);let a=new ye(r[1],"heading-trail",n,i);this.append(s,a)}get type(){return"heading"}get level(){return m(this,Nn)}toString(e){let r=C(this,Or,Li).call(this);return r+this.firstChild.toString(e)+r+this.lastChild.toString(e)}text(){let e=C(this,Or,Li).call(this);return e+this.firstChild.text()+e}getAttribute(e){return e==="invalid"?this.inHtmlAttrs()===2:e==="padding"?this.level:super.getAttribute(e)}getGaps(){return this.level}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),{firstChild:i,level:s}=this,a=i.toString(),l=a.startsWith("="),g=l||a.endsWith("="),u=new U(this,e),d=this.inHtmlAttrs(),p=["h1","unbalanced-header","format-leakage"],{lintConfig:f}=v,{computeEditInfo:c,fix:h}=f,b=p.map(T=>f.getSeverity(T,"apostrophe"));if(b[0]&&this.level===1){let T=q(i,u,p[0],"<h1>",b[0]);c&&!g&&(T.suggestions=[ve(T,"h2",`=${a}=`)]),n.push(T)}if(b[1]&&g){let T=v.msg("unbalanced-in-section-header",'"="'),x=q(i,u,p[1],T,b[1]);if(!(!c||a==="="))if(l){let y=ri(a,/[^=]|$/u),k=s+y;x.suggestions=[{desc:`h${s}`,range:[x.startIndex,x.startIndex+y],text:""}],k<7&&x.suggestions.push({desc:`h${k}`,range:[x.endIndex,x.endIndex],text:"=".repeat(y)})}else{let y=/[^=](=+)$/u.exec(a)[1],k=s+y.length;x.suggestions=[{desc:`h${s}`,range:[x.endIndex-y.length,x.endIndex],text:""}],k<7&&x.suggestions.push({desc:`h${k}`,range:[x.startIndex,x.startIndex],text:y})}n.push(x)}if(d){let T="parsing-order",x=f.getSeverity(T,d===2?"heading":"templateInTable");x&&n.push(P(this,u,T,"header-in-html",x))}if(b[2]){let T=this.getRootNode().toString(),x=i.childNodes.filter(Ei("quote")),y=x.filter(({bold:A})=>A),k=x.filter(({italic:A})=>A);if(y.length%2){let A=q(y[y.length-1],{...u,start:e+s,left:u.left+s},p[2],v.msg("unbalanced-in-section-header","bold-apostrophes"),b[2]);if(c||h){let I=e+s+a.length,E=M(A);T.slice(A.endIndex,I).trim()?c&&(A.suggestions=[E,je(I,"'''")]):y.length===1&&k.length===0?A.fix=E:c&&(A.suggestions=[E])}n.push(A)}if(k.length%2){let A=q(k[k.length-1],{start:e+s},p[2],v.msg("unbalanced-in-section-header","italic-apostrophes"),b[2]);if(c||h){let I=e+s+a.length;T.slice(A.endIndex,I).trim()?c&&(A.suggestions=[je(I,"''")]):k.length===1&&y.length===0?A.fix=M(A):c&&(A.suggestions=[M(A)])}n.push(A)}}return n}}print(){{let e=C(this,Or,Li).call(this);return super.print({pre:e,sep:e})}}json(e,r,n=this.getAbsoluteIndex()){{let i=super.json(void 0,r,n);return i.level=this.level,i}}};ks=O(Tg),Nn=new WeakMap,Or=new WeakSet,Li=function(){return"=".repeat(this.level)},dt=j(ks,0,"HeadingToken",ul,dt),B(ks,1,dt)});var gl,As,kg,nr,pl=L(()=>{"use strict";Et();we();V();gl=[Ne(),Z];nr=class extends(kg=$){get type(){return"hidden"}getAttribute(t){return t==="invalid"||super.getAttribute(t)}};As=O(kg),nr=j(As,0,"HiddenToken",gl,nr),B(As,1,nr)});var cl,$i,fl,Ss,vg,ir,ml=L(()=>{"use strict";ae();G();pe();Ve();yn();we();D();V();wt();pl();cl=[Z,he("{{{"),St()];ir=class extends(vg=$){constructor(e,r,n=[]){super(void 0,r,n,{});w(this,$i);for(let i=0;i<e.length;i++){let s=e[i];if(i===0){let a=new ce(s,"arg-name",r,n,{});super.insertAt(a)}else if(i>1){let a=new nr(s,r,n);super.insertAt(a)}else{let a=new $(s,r,n);a.type="arg-default",a.setAttribute("stage",2),super.insertAt(a)}}}get type(){return"arg"}get default(){var e,r;return(r=(e=this.childNodes[1])==null?void 0:e.text())!=null?r:!1}toString(e){return`{{{${super.toString(e,"|")}}}}`}text(){return`{{{${Pe(this.childNodes.slice(0,2),"|")}}}}`}afterBuild(){C(this,$i,fl).call(this),super.afterBuild()}lint(e=this.getAbsoluteIndex(),r){{let[n,i,...s]=this.childNodes;n.setAttribute("aIndex",e+3);let a=n.lint(e+3,r);if(i){let c=e+4+n.toString().length;i.setAttribute("aIndex",c);let h=i.lint(c,r);h.length>0&&Array.prototype.push.apply(a,h)}let l=["no-ignored","no-arg"],{lintConfig:g}=v,{computeEditInfo:u}=g,d=new U(this,e),p=l.map(c=>g.getSeverity(c,"arg"));if(p[0]&&s.length>0&&Array.prototype.push.apply(a,s.map(c=>{let h=q(c,d,l[0],"invisible-triple-braces",p[0]);return h.startIndex--,h.startCol--,u&&(h.suggestions=[M(h),st(h.startIndex,"{{!}}")]),h})),p[1]&&!this.getAttribute("include")){let c=P(this,d,l[1],"unexpected-argument",p[1]);u&&i&&(c.suggestions=[ve(c,"expand",i.text())]),a.push(c)}let f=this.closest("ext");if(f){let c="arg-in-ext",h=g.getSeverity(c,f.name);h&&a.push(P(this,d,c,"argument-in-ext",h))}return a}}print(){return super.print({pre:"{{{",post:"}}}",sep:"|"})}json(e,r,n=this.getAbsoluteIndex()){{let i=super.json(void 0,r,n);return i.default=this.default,i}}};Ss=O(vg),$i=new WeakSet,fl=function(){this.setAttribute("name",this.firstChild.text().trim())},ir=j(Ss,0,"ArgToken",cl,ir),B(Ss,1,ir)});var vl={};re(vl,{parseBraces:()=>In});var Ag,hl,ws,bl,xl,yl,kl,Tl,In,Ni=L(()=>{"use strict";We();ae();vs();ns();ml();Ag={"=":String.raw`\n(?!(?:[^\S\n]|\0\d+[cn]\x7F)*\n)`,"{":String.raw`\}{2,}|\|`,"-":String.raw`\}-`,"[":String.raw`\]\]`},hl=String.raw`\[(?!\[)`,ws=String.raw`\n(?![=\0])`,bl=String.raw`|\{{2,}`,xl=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"],["server","m"]]),yl=Be(o=>new RegExp(o,"gmu"));kl=new RegExp(String.raw`\{\{((?:[^\n{}[]|${hl}|${ws})*)\}\}(?!\})`+"|"+String.raw`\[\[(?:[^\n[\]{]|${ws})*\]\]`+"|"+String.raw`-\{(?:[^\n{}[]|${hl}|${ws})*\}-`,"gu");Tl=o=>{let t=nt(se(o));return xl.has(t)?xl.get(t):/^(?:filepath|(?:full|canonical)urle?):./u.test(t)?"m":/^#vardefine:./u.test(t)?"n":"t"},In=(o,t,e)=>{var c,h,b,T,x;let r=String.raw`${t.excludes.includes("heading")?"":String.raw`^((?:\0\d+[cno]\x7F)*)={1,6}|`}\[\[|-\{(?!\{)`,[,,,n]=t.parserFunction,i=[],s=[],a=(y,k,A,I)=>{k[k.length-1].push($e(y.slice(A,I),s))},l;do l!==void 0&&(o=l),l=o.replace(kl,(y,k,A)=>{if(k!==void 0||typeof A=="string")try{let{length:I}=e,E=(k!=null?k:A).split("|");return new at($e(E[0],s),E.slice(1).map(N=>{let z=N.indexOf("=");return(z===-1?[N]:[N.slice(0,z),N.slice(z+1)]).map(_=>$e(_,s))}),t,e),`\0${I}${Tl(E[0])}`}catch(I){if(!(I instanceof SyntaxError)||I.message!=="Invalid template name")throw I}return s.push($e(y,s)),`\0${s.length-1}`});while(l!==o);o=l;let g=o.lastIndexOf("}}")-o.length,u=g+o.length!==-1,d=yl(r+(u?bl:"")),p=d.exec(o),f;for(;p||f!==void 0&&f<=o.length&&((h=(c=i[i.length-1])==null?void 0:c[0])!=null&&h.startsWith("="));){if(p!=null&&p[1]){let[,{length:F}]=p;p[0]=p[0].slice(F),p.index+=F}let{0:y,index:k}=p!=null?p:{0:`
12
+ `})}}});var Ei,al=L(()=>{"use strict";G();Si();D();V();Ei=class extends ${get type(){return"param-line"}constructor(t,e,r,n,i){super(e,r,n,i),this.setAttribute("name",t)}lint(t=this.getAbsoluteIndex()){{let e="no-ignored",{lintConfig:r}=v,{name:n,childNodes:i}=this,s=r.getSeverity(e,n);if(!s)return[];let a=v.msg("invalid-parameter",n);if(i.some(({type:p})=>p==="ext"))return[P(this,{start:t},e,a,s)];let l=i.filter(({type:p})=>p!=="comment"&&p!=="include"&&p!=="noinclude"),g=n==="inputbox",u=g?l.findIndex(({type:p})=>p!=="text"):-1,d=l.slice(0,u===-1?void 0:u).map(String).join("").trim();if(d){g&&(d=d.toLowerCase());let p=d.indexOf("="),f=d.slice(0,p===-1?void 0:p).trim(),c=Ai[n];if(p===-1?u===-1||!c.some(h=>h.startsWith(f)):!c.includes(f)){let h=P(this,{start:t},e,a,s);return r.computeEditInfo&&(h.suggestions=[M(h)]),[h]}}return super.lint(t,!1)}}}});var ll={};re(ll,{ParamTagToken:()=>En});var En,vs=L(()=>{"use strict";$n();Li();al();En=class extends Pt{constructor(t,e,r,n,i=[],s){super(void 0,n,i,{}),r&&this.safeAppend(r.split(`
13
+ `).map(a=>s?a:tr(a,n,i,e)).map(a=>new Ei(t,a,n,i,{}))),i.splice(i.indexOf(this),1),i.push(this)}}});var dl,Nn,Or,$i,As,Tg,dt,Ss=L(()=>{"use strict";We();G();Ae();pe();we();D();V();Lt();dl=[Z];dt=class extends(Tg=$){constructor(e,r,n,i=[]){super(void 0,n,i);w(this,Or);w(this,Nn);S(this,Nn,e);let s=new $(r[0],n,i);s.type="heading-title",s.setAttribute("stage",2);let a=new ye(r[1],"heading-trail",n,i);this.append(s,a)}get type(){return"heading"}get level(){return m(this,Nn)}toString(e){let r=C(this,Or,$i).call(this);return r+this.firstChild.toString(e)+r+this.lastChild.toString(e)}text(){let e=C(this,Or,$i).call(this);return e+this.firstChild.text()+e}getAttribute(e){return e==="invalid"?this.inHtmlAttrs()===2:e==="padding"?this.level:super.getAttribute(e)}getGaps(){return this.level}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),{firstChild:i,level:s}=this,a=i.toString(),l=a.startsWith("="),g=l||a.endsWith("="),u=new U(this,e),d=this.inHtmlAttrs(),p=["h1","unbalanced-header","format-leakage"],{lintConfig:f}=v,{computeEditInfo:c,fix:h}=f,b=p.map(T=>f.getSeverity(T,"apostrophe"));if(b[0]&&this.level===1){let T=q(i,u,p[0],"<h1>",b[0]);c&&!g&&(T.suggestions=[ve(T,"h2",`=${a}=`)]),n.push(T)}if(b[1]&&g){let T=v.msg("unbalanced-in-section-header",'"="'),x=q(i,u,p[1],T,b[1]);if(!(!c||a==="="))if(l){let y=ii(a,/[^=]|$/u),k=s+y;x.suggestions=[{desc:`h${s}`,range:[x.startIndex,x.startIndex+y],text:""}],k<7&&x.suggestions.push({desc:`h${k}`,range:[x.endIndex,x.endIndex],text:"=".repeat(y)})}else{let y=/[^=](=+)$/u.exec(a)[1],k=s+y.length;x.suggestions=[{desc:`h${s}`,range:[x.endIndex-y.length,x.endIndex],text:""}],k<7&&x.suggestions.push({desc:`h${k}`,range:[x.startIndex,x.startIndex],text:y})}n.push(x)}if(d){let T="parsing-order",x=f.getSeverity(T,d===2?"heading":"templateInTable");x&&n.push(P(this,u,T,"header-in-html",x))}if(b[2]){let T=this.getRootNode().toString(),x=i.childNodes.filter(Ni("quote")),y=x.filter(({bold:A})=>A),k=x.filter(({italic:A})=>A);if(y.length%2){let A=q(y[y.length-1],{...u,start:e+s,left:u.left+s},p[2],v.msg("unbalanced-in-section-header","bold-apostrophes"),b[2]);if(c||h){let I=e+s+a.length,E=M(A);T.slice(A.endIndex,I).trim()?c&&(A.suggestions=[E,je(I,"'''")]):y.length===1&&k.length===0?A.fix=E:c&&(A.suggestions=[E])}n.push(A)}if(k.length%2){let A=q(k[k.length-1],{start:e+s},p[2],v.msg("unbalanced-in-section-header","italic-apostrophes"),b[2]);if(c||h){let I=e+s+a.length;T.slice(A.endIndex,I).trim()?c&&(A.suggestions=[je(I,"''")]):k.length===1&&y.length===0?A.fix=M(A):c&&(A.suggestions=[M(A)])}n.push(A)}}return n}}print(){{let e=C(this,Or,$i).call(this);return super.print({pre:e,sep:e})}}json(e,r,n=this.getAbsoluteIndex()){{let i=super.json(void 0,r,n);return i.level=this.level,i}}};As=O(Tg),Nn=new WeakMap,Or=new WeakSet,$i=function(){return"=".repeat(this.level)},dt=j(As,0,"HeadingToken",dl,dt),B(As,1,dt)});var ul,ws,kg,rr,gl=L(()=>{"use strict";$t();we();V();ul=[Ie(),Z];rr=class extends(kg=$){get type(){return"hidden"}getAttribute(t){return t==="invalid"||super.getAttribute(t)}};ws=O(kg),rr=j(ws,0,"HiddenToken",ul,rr),B(ws,1,rr)});var pl,Ii,cl,Cs,vg,nr,fl=L(()=>{"use strict";oe();G();pe();Ve();yn();we();D();V();Ct();gl();pl=[Z,he("{{{"),wt()];nr=class extends(vg=$){constructor(e,r,n=[]){super(void 0,r,n,{});w(this,Ii);for(let i=0;i<e.length;i++){let s=e[i];if(i===0){let a=new ce(s,"arg-name",r,n,{});super.insertAt(a)}else if(i>1){let a=new rr(s,r,n);super.insertAt(a)}else{let a=new $(s,r,n);a.type="arg-default",a.setAttribute("stage",2),super.insertAt(a)}}}get type(){return"arg"}get default(){var e,r;return(r=(e=this.childNodes[1])==null?void 0:e.text())!=null?r:!1}toString(e){return`{{{${super.toString(e,"|")}}}}`}text(){return`{{{${Ne(this.childNodes.slice(0,2),"|")}}}}`}afterBuild(){C(this,Ii,cl).call(this),super.afterBuild()}lint(e=this.getAbsoluteIndex(),r){{let[n,i,...s]=this.childNodes;n.setAttribute("aIndex",e+3);let a=n.lint(e+3,r);if(i){let c=e+4+n.toString().length;i.setAttribute("aIndex",c);let h=i.lint(c,r);h.length>0&&Array.prototype.push.apply(a,h)}let l=["no-ignored","no-arg"],{lintConfig:g}=v,{computeEditInfo:u}=g,d=new U(this,e),p=l.map(c=>g.getSeverity(c,"arg"));if(p[0]&&s.length>0&&Array.prototype.push.apply(a,s.map(c=>{let h=q(c,d,l[0],"invisible-triple-braces",p[0]);return h.startIndex--,h.startCol--,u&&(h.suggestions=[M(h),st(h.startIndex,"{{!}}")]),h})),p[1]&&!this.getAttribute("include")){let c=P(this,d,l[1],"unexpected-argument",p[1]);u&&i&&(c.suggestions=[ve(c,"expand",i.text())]),a.push(c)}let f=this.closest("ext");if(f){let c="arg-in-ext",h=g.getSeverity(c,f.name);h&&a.push(P(this,d,c,"argument-in-ext",h))}return a}}print(){return super.print({pre:"{{{",post:"}}}",sep:"|"})}json(e,r,n=this.getAbsoluteIndex()){{let i=super.json(void 0,r,n);return i.default=this.default,i}}};Cs=O(vg),Ii=new WeakSet,cl=function(){this.setAttribute("name",this.firstChild.text().trim())},nr=j(Cs,0,"ArgToken",pl,nr),B(Cs,1,nr)});var kl={};re(kl,{parseBraces:()=>In});var Ag,ml,Ls,hl,bl,xl,Tl,yl,In,Ri=L(()=>{"use strict";We();oe();Ss();ss();fl();Ag={"=":String.raw`\n(?!(?:[^\S\n]|\0\d+[cn]\x7F)*\n)`,"{":String.raw`\}{2,}|\|`,"-":String.raw`\}-`,"[":String.raw`\]\]`},ml=String.raw`\[(?!\[)`,Ls=String.raw`\n(?![=\0])`,hl=String.raw`|\{{2,}`,bl=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"],["server","m"]]),xl=Be(o=>new RegExp(o,"gmu"));Tl=new RegExp(String.raw`\{\{((?:[^\n{}[]|${ml}|${Ls})*)\}\}(?!\})`+"|"+String.raw`\[\[(?:[^\n[\]{]|${Ls})*\]\]`+"|"+String.raw`-\{(?:[^\n{}[]|${ml}|${Ls})*\}-`,"gu");yl=o=>{let t=nt(se(o));return bl.has(t)?bl.get(t):/^(?:filepath|(?:full|canonical)urle?):./u.test(t)?"m":/^#vardefine:./u.test(t)?"n":"t"},In=(o,t,e)=>{var c,h,b,T,x;let r=String.raw`${t.excludes.includes("heading")?"":String.raw`^((?:\0\d+[cno]\x7F)*)={1,6}|`}\[\[|-\{(?!\{)`,[,,,n]=t.parserFunction,i=[],s=[],a=(y,k,A,I)=>{k[k.length-1].push($e(y.slice(A,I),s))},l;do l!==void 0&&(o=l),l=o.replace(Tl,(y,k,A)=>{if(k!==void 0||typeof A=="string")try{let{length:I}=e,E=(k!=null?k:A).split("|");return new at($e(E[0],s),E.slice(1).map(N=>{let z=N.indexOf("=");return(z===-1?[N]:[N.slice(0,z),N.slice(z+1)]).map(_=>$e(_,s))}),t,e),`\0${I}${yl(E[0])}`}catch(I){if(!(I instanceof SyntaxError)||I.message!=="Invalid template name")throw I}return s.push($e(y,s)),`\0${s.length-1}`});while(l!==o);o=l;let g=o.lastIndexOf("}}")-o.length,u=g+o.length!==-1,d=xl(r+(u?hl:"")),p=d.exec(o),f;for(;p||f!==void 0&&f<=o.length&&((h=(c=i[i.length-1])==null?void 0:c[0])!=null&&h.startsWith("="));){if(p!=null&&p[1]){let[,{length:R}]=p;p[0]=p[0].slice(R),p.index+=R}let{0:y,index:k}=p!=null?p:{0:`
14
14
  `,index:o.length},A=(b=i.pop())!=null?b:{},{0:I,index:E,parts:N,findEqual:z,pos:_}=A,Y=y==="="&&z;if(y==="]]"||y==="}-")f=k+2;else if(y===`
15
- `){f=k+1;let{pos:F,findEqual:R}=(T=i[i.length-1])!=null?T:{};if(F===void 0||R||se(o.slice(F,E))!==""){let ee=/^(={1,6})(.+)\1((?:\s|\0\d+[cn]\x7F)*)$/u.exec(o.slice(E,k));ee&&(ee[2]=$e(ee[2],s),ee[2].includes(`
16
- `)||(o=`${o.slice(0,E)}\0${e.length}h${o.slice(k)}`,f=E+4+String(e.length).length,new dt(ee[1].length,ee.slice(2),t,e)))}}else if(y==="|"||Y)f=k+1,a(o,N,_,k),y==="|"&&N.push([]),A.pos=f,A.findEqual=y==="|",i.push(A);else if(y.startsWith("}}")){let F=y.slice(0,Math.min(I.length,3)),R=I.length-F.length,{length:ee}=e;f=k+F.length,a(o,N,_,k);let oe=!1,xe="t";if(F.length===3){let J=N.map(K=>K.join("=")),de=J.length>1&&se(J[1]).trim();new ir(J,t,e),de&&de.endsWith(":")&&n.includes(de.slice(0,-1).toLowerCase())&&(xe="s")}else try{new at(N[0][0],N.slice(1),t,e),xe=Tl(N[0][0])}catch(J){if(!(J instanceof SyntaxError&&J.message==="Invalid template name"))throw J;oe=!0}oe||(o=`${o.slice(0,E+R)}\0${ee}${xe}${o.slice(f)}`,f=E+R+3+String(ee).length,R>1?i.push({0:I.slice(0,R),index:E,pos:E+R,parts:[[]]}):R===1&&o[E-1]==="-"&&i.push({0:"-{",index:E-1,pos:E+1,parts:[[]]}))}else f=k+y.length,y.startsWith("{")&&(p.pos=f,p.parts=[[]]),i.push(..."0"in A?[A]:[],p);let W=i[i.length-1];if(u&&g+o.length<f)for(u=!1;(x=W==null?void 0:W[0])!=null&&x.startsWith("{");)i.pop(),W=i[i.length-1];d=yl(r+(u?bl:"")+(W?`|${Ag[W[0][0]]}${W.findEqual?"|=":""}`:"")),d.lastIndex=f,p=d.exec(o)}return $e(o,s)}});var Al={};re(Al,{InputboxToken:()=>Cs});var Cs,Sl=L(()=>{"use strict";$n();Ni();Ts();Cs=class extends En{constructor(t,e,r,n,i=[]){let s=Symbol("InputboxToken"),a=n.excludes.includes("heading")?n:{...n,excludes:[...n.excludes,"heading"]},{length:l}=i;i.push(s),r&&(r=rr(r,a,i,e)),r&&(r=In(r,a,i)),i.splice(l,1),super(t,e,r,a,i,{})}}});var Ii={};re(Ii,{NestedToken:()=>Ls});var Sg,wg,Fn,qr,Ls,Fi=L(()=>{"use strict";G();pe();$n();Ni();D();V();Es();Jt();Sg=new Set(["comment","include","arg","template","magic-word"]),wg=[!1,!0].map(o=>{let t=o?"includeonly":"noinclude";return new RegExp(String.raw`^(?:<${t}(?:\s[^>]*)?/?>|</${t}\s*>)$`,"iu")}),Ls=class extends ${constructor(e,r,n,i,s=[]){if(typeof r=="boolean"){let a=Symbol("NestedToken"),{length:l}=s;s.push(a),e&&(e=rr(e,i,s,r)),e&&(e=In(e,i,s)),s.splice(l,1)}else e&&(e=e.replace(r,(a,l,g,u,d)=>{let p=`\0${s.length+1}e`;return new ut(l,g,u,d,i,!1,s),p}));e&&(e=e.replace(/(^|\0\d+.\x7F)([^\0]+)(?=$|\0\d+.\x7F)/gu,(a,l,g)=>(new me(g,i,s),`${l}\0${s.length}n`)));super(e,i,s);w(this,Fn);w(this,qr);S(this,Fn,[...n]),S(this,qr,r)}get type(){return"ext-inner"}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),i="no-ignored",{lintConfig:s}=v,a=s.getSeverity(i,this.name);if(!a)return n;let l=new U(this,e),g=typeof m(this,qr)=="boolean"?wg[m(this,qr)?1:0]:/^<!--[\s\S]*-->$/u;return[...n,...this.childNodes.filter(u=>{let{type:d,name:p}=u;if(d==="ext")return!m(this,Fn).includes(p);if(Sg.has(d))return!1;let f=u.toString().trim();return f&&!g.test(f)}).map(u=>{let d=q(u,l,i,v.msg("invalid-content",this.name),a);return s.computeEditInfo&&(d.suggestions=[M(d),si(d,u.toString())]),d})]}}};Fn=new WeakMap,qr=new WeakMap});function $s(o,t,e,r,n){t=se(t).trim();let i=t.replace(o==="link"?/\0\d+[tq]\x7F/gu:/\0\d+t\x7F/gu,"").trim();switch(o){case"width":return!i&&!!t||/^(?:\d+x?|\d*x\d+)(?:\s*px)?$/u.test(i);case"link":{let s=r==="gallery-image";if(i){if(Cg(e.protocol).test(i))return Lg(e.protocol).test(i)?t:s;i.startsWith("[[")&&i.endsWith("]]")&&(i=i.slice(2,-2))}else return t;let a=v.normalizeTitle(i,0,!1,e,{halfParsed:n,decode:!0,selfLink:!0,page:""});return a.valid?a: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 Cg,Lg,Eg,$g,wl,Ie,Ri,Cl,Ns,Ng,sr,Ll=L(()=>{"use strict";We();ae();G();gn();Ae();we();D();V();Cg=Be(o=>new RegExp(String.raw`^(?:${o}|//|\0\d+m\x7F)`,"iu")),Lg=Be(o=>new RegExp(String.raw`^(?:(?:${o}|//)${tt}|\0\d+m\x7F)${rt}$`,"iu")),Eg=Be(o=>new RegExp(String.raw`^(\s*(?!\s))${o.replace("$1","(.*)")}${o.endsWith("$1")?`(?=$|
17
- )`:""}(\s*)$`,"u")),$g=o=>{if(o)o.startsWith("//")&&(o=`https:${o}`);else return o;return new URL(o).href};wl=[Z];sr=class extends(Ng=$){constructor(e,r,n,i,s){var t=(...kh)=>(super(...kh),w(this,Ri),w(this,Ie,""),this);let a,l=Object.entries(i.img).map(([u,d])=>[u,d,Eg(u)]),g=l.find(([,u,d])=>(a=d.exec(e),a&&(a.length!==4||$s(u,a[2],i,u==="link"?n:r,!0)!==!1)));if(g&&a){a.length===3?(t(void 0,i,s),S(this,Ie,e)):(t(a[2],i,s,{}),S(this,Ie,a[1]+g[0]+a[3])),this.setAttribute("name",g[1]),g[1]==="alt"&&this.setAttribute("stage",10);return}t(e,i.excludes.includes("list")?i:{...i,excludes:[...i.excludes,"list"]},s),this.setAttribute("name","caption"),this.setAttribute("stage",7)}get type(){return"image-parameter"}get thumb(){return this.name==="manualthumb"?this.normalizeTitle(`File:${super.text().trim()}`,6,{page:""}):void 0}get link(){{if(this.name!=="link")return;let e=super.text().trim();return Q.run(()=>{var s;let r=this.getAttribute("config"),n=new $(e,r);if(n.parseOnce(0,this.getAttribute("include")).parseOnce(),/^\0\d+m\x7F/u.test(n.firstChild.toString()))return e;let i=$s("link",e,r,(s=this.parentNode)==null?void 0:s.type);return i===!0?void 0:i},v)}}afterBuild(){var e;(e=this.parentNode)!=null&&e.is("gallery-image")&&!Qo.has(this.name)&&this.setAttribute("name","invalid"),super.afterBuild()}toString(e){return m(this,Ie)?m(this,Ie).replace("$1",super.toString(e)):super.toString(e)}text(){return m(this,Ie)?m(this,Ie).replace("$1",super.text()).trim():super.text().trim()}isPlain(){return this.name==="caption"||this.name==="alt"}getAttribute(e){return e==="invalid"?this.name==="invalid":e==="padding"?Math.max(0,m(this,Ie).indexOf("$1")):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),r){var n;{let i=super.lint(e,r),{lintConfig:s}=v,{computeEditInfo:a,fix:l}=s,{link:g,name:u}=this,d=u==="width"&&this.getValue();if(u==="invalid"||d&&d.endsWith("px")){let p="invalid-gallery",f=s.getSeverity(p,"parameter");if(f){let c=P(this,{start:e},p,"invalid-image-parameter",f);(a||l)&&(c.fix=d?M(c,0,d):M(c,-1)),i.push(c)}}else if(u==="link"){if(g===void 0){let p="invalid-gallery",f=s.getSeverity(p,"link");if(f){let c=P(this,{start:e},p,"invalid-gallery-link",f);if(a){let h=super.toString(),b=h.indexOf("|"),T=h.slice(0,b).trim();b!==-1&&!/[<{]/u.test(T)&&typeof $s("link",T,this.getAttribute("config"),(n=this.parentNode)==null?void 0:n.type)=="string"&&(c.suggestions=[At(e+this.getRelativeIndex(0)+b)])}i.push(c)}}else if(typeof g=="string"){let p="invalid-url",f=s.getSeverity(p);if(f&&!this.querySelector("magic-word"))try{$g(g)}catch{i.push(P(this,{start:e},p,"invalid-url",f))}}else if(g.encoded){let p="url-encoding",f=s.getSeverity(p,"file");if(f){let c=P(this,{start:e},p,"unnecessary-encoding",f);(a||l)&&(c.fix=ni(c,this)),i.push(c)}}}else if(u==="manualthumb"){let p="invalid-gallery",f=s.getSeverity(p,"thumb");if(f&&!this.querySelector("arg,magic-word,template")){let{valid:c,ns:h,extension:b}=this.thumb;(!c||h!==6||!un.has(b))&&i.push(P(this,{start:e},p,"invalid-thumb",f))}}return i}}getValue(){return this.name==="invalid"?this.text():C(this,Ri,Cl).call(this)||super.text()}print(){return m(this,Ie)?`<span class="wpb-image-parameter${this.name==="invalid"?" wpb-invalid":""}">${m(this,Ie).replace("$1",`<span class="wpb-image-caption">${it(this.childNodes)}</span>`)}</span>`:super.print({class:"image-caption"})}};Ns=O(Ng),Ie=new WeakMap,Ri=new WeakSet,Cl=function(){return m(this,Ie)&&!m(this,Ie).includes("$1")},sr=j(Ns,0,"ImageParameterToken",wl,sr),B(Ns,1,sr)});var El,Ig,Fg,$l,Nl,Rg,Il,Mr,Is=L(()=>{"use strict";G();gn();pe();D();Ir();Ll();El=new Map([["manualthumb","Thumb"],["frameless","Frameless"],["framed","Frame"],["thumbnail","Thumb"]]),Ig=new Set(["arg"]),Fg=new Set(["template","magic-word"]),$l=new Set(["left","right","center","none"]),Nl=new Set(["baseline","sub","super","top","text-top","middle","bottom","text-bottom"]),Rg=o=>{if(o===void 0)return[];let t=/-\{|\}-|\|/gu,e=[],r=t.exec(o),n=0,i=0;for(;r;){let{0:s,index:a}=r;s!=="|"?n+=s==="-{"?1:-1:n===0&&(e.push(o.slice(i,a)),{lastIndex:i}=t),r=t.exec(o)}return e.push(o.slice(i)),e},Il=(o,t)=>o.filter(({childNodes:e})=>!e.some(r=>r.text().trim()&&t.has(r.type))),Mr=class extends Ce{get type(){return"file"}get extension(){return this.getAttribute("title").extension}constructor(t,e,r,n=[],i="|",s){super(t,void 0,r,n,i);let{extension:a}=this.getTitle(!0,!0);this.safeAppend(Rg(e).map(l=>new sr(l,a,s,r,n)))}lint(t=this.getAbsoluteIndex(),e){var r;{let n=super.lint(t,e),i=Il(this.getAllArgs(),Ig),s=[...new Set(i.map(({name:E})=>E))],a=s.filter(E=>El.has(E)),l=s.filter(E=>$l.has(E)),g=s.filter(E=>Nl.has(E)),[u]=a,d=u==="framed"||u==="manualthumb",p=new U(this,t),{lintConfig:f}=v,{computeEditInfo:c,fix:h}=f,{ns:b,extension:T}=this.getAttribute("title"),{firstChild:x}=this,y="nested-link",k=f.getSeverity(y,"file");if(k&&un.has(T)&&this.isInside("ext-link-text")&&((r=this.getValue("link"))==null?void 0:r.trim())!==""){let E=P(this,p,y,"link-in-extlink",k);if(c||h){let N=this.getArg("link");if(N){let z=t+N.getRelativeIndex();E.fix={desc:v.msg("delink"),range:[z,z+N.toString().length],text:"link="}}else E.fix=Ar(E.endIndex-2,"delink","|link=")}n.push(E)}if(y="invalid-gallery",k=f.getSeverity(y,"extension"),k&&b===6&&!T&&!x.querySelector("arg,magic-word,template")&&n.push(P(this,p,y,"missing-extension",k)),k=f.getSeverity(y,"parameter"),k&&d)for(let E of i.filter(({name:N})=>N==="width")){let N=q(E,p,y,"invalid-image-parameter",k);(c||h)&&(N.fix=M(N,-1)),n.push(N)}if(y="blank-alt",k=f.getSeverity(y),k){let E=this.getArg("alt");if((E==null?void 0:E.getValue())===""){let N=q(E,p,y,"blank-alt",k);(c||h)&&(N.fix=M(N,-1)),n.push(N)}}if(i.length===s.length&&a.length<2&&l.length<2&&g.length<2)return n;y="no-duplicate";let A=["unknownImageParameter","imageParameter"].map(E=>f.getSeverity(y,E)),I=(E,N,z,_=!0)=>E.map(Y=>{if(k=A[Number(typeof _=="function"?_(Y):_)],!k)return!1;let W=q(Y,p,y,v.msg(`${N}-image-parameter`,z),k);return c&&(W.suggestions=[M(W,-1)]),W}).filter(Y=>Y!==!1);for(let E of s){if(E==="invalid"||E==="width"&&d)continue;let N=E==="caption",z=i.filter(({name:_})=>_===E);if(N&&(z=[...z.slice(0,-1).filter(_=>_.text()),...z.slice(-1)]),z.length>1){let _=!N||!T||un.has(T);if(N&&_){let Y=Il(z,Fg);_=Y.length>1&&(W=>Y.includes(W))}Array.prototype.push.apply(n,I(z,"duplicate",E,_))}}return a.length>1&&Array.prototype.push.apply(n,I(i.filter(({name:E})=>El.has(E)),"conflicting","frame")),l.length>1&&Array.prototype.push.apply(n,I(i.filter(({name:E})=>$l.has(E)),"conflicting","horizontal-alignment")),g.length>1&&Array.prototype.push.apply(n,I(i.filter(({name:E})=>Nl.has(E)),"conflicting","vertical-alignment")),n}}getAllArgs(){return this.childNodes.slice(1)}getArgs(t){return this.getAllArgs().filter(({name:e})=>t===e)}getArg(t){{let e=this.getArgs(t);return e[t==="manualthumb"?0:e.length-1]}}getValue(t){var e;return(e=this.getArg(t))==null?void 0:e.getValue()}json(t,e,r=this.getAbsoluteIndex()){{let n=super.json(void 0,e,r),{extension:i}=this;return i&&(n.extension=i),n}}}});var Fl,Rn,Rs,Fs,Pg,gt,Ps=L(()=>{"use strict";G();Ve();D();V();Is();Fl=[he("")];gt=class extends(Pg=Mr){constructor(e,r,n,i,s=[]){let a;if(n!==void 0){let{length:g}=s;a=new $(n,i,s);for(let u=0;u<10;u++)a.parseOnce();s.splice(g,1)}let l=`${e}-image`;super(r,a==null?void 0:a.firstChild.toString(),i,s,void 0,l);w(this,Rn);ge(this,"privateType","imagemap-image");this.setAttribute("bracket",!1),this.privateType=l,this.seal("privateType",!0)}get type(){return this.privateType}getTitle(e){let r=this.type==="imagemap-image";return this.normalizeTitle(this.firstChild.toString(),r?0:6,{halfParsed:!0,temporary:e,decode:!r,page:""})}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),i="invalid-gallery",{lintConfig:s}=v,a=s.getSeverity(i,"image");if(a&&C(this,Rn,Rs).call(this)){let l=P(this,{start:e},i,"invalid-gallery",a);s.computeEditInfo&&(l.suggestions=[Ar(e,"prefix","File:")]),n.push(l)}return n}}getAttribute(e){return e==="invalid"?C(this,Rn,Rs).call(this):super.getAttribute(e)}};Fs=O(Pg),Rn=new WeakSet,Rs=function(){return this.getAttribute("title").ns!==6},gt=j(Fs,0,"GalleryImageToken",Fl,gt),B(Fs,1,gt)});var or,Bs=L(()=>{"use strict";Jt();or=class extends me{}});var Pl={};re(Pl,{GalleryToken:()=>js});var ar,Rl,Os,js,Bl=L(()=>{"use strict";G();D();wi();Ps();Bs();js=class extends Rt{constructor(e,r,n=[]){var i;super(void 0,r,n,{});w(this,ar);for(let s of(i=e==null?void 0:e.split(`
18
- `))!=null?i:[]){let a=/^([^|]+)(?:\|(.*))?/u.exec(s);if(!a){super.insertAt(s.trim()?new or(s,r,n):s);continue}let[,l,g]=a;C(this,ar,Rl).call(this,l)?super.insertAt(new gt("gallery",l,g,r,n)):super.insertAt(new or(s,r,n))}}get widths(){return C(this,ar,Os).call(this,"widths")}get heights(){return C(this,ar,Os).call(this,"heights")}lint(e=this.getAbsoluteIndex(),r){{let{top:n,left:i}=this.getRootNode().posFromIndex(e),s=[],a="no-ignored",{lintConfig:l}=v,g=["Image","NoImage","Comment"].map(u=>l.getSeverity(a,`gallery${u}`));for(let u=0;u<this.length;u++){let d=this.childNodes[u],p=d.toString(),{length:f}=p,c=p.trim(),{type:h}=d,b=n+u,T=u?0:i;if(d.setAttribute("aIndex",e),h==="noinclude"&&c&&!/^<!--.*-->$/u.test(c)){let[x]=g;if(c.startsWith("|")?[,x]=g:(c.startsWith("<!--")||c.endsWith("-->"))&&([,,x]=g),x){let y=e+f,k={rule:a,message:v.msg("invalid-content","gallery"),severity:x,startIndex:e,endIndex:y,startLine:b,endLine:b,startCol:T,endCol:T+f};l.computeEditInfo&&(k.suggestions=[M(k),si(k,p)]),s.push(k)}}else if(h!=="noinclude"&&h!=="text"){let x=d.lint(e,r);x.length>0&&Array.prototype.push.apply(s,x)}e+=f+1}return s}}json(e,r,n=this.getAbsoluteIndex()){{let i=super.json(void 0,r,n);return Object.assign(i,{widths:this.widths,heights:this.heights}),i}}};ar=new WeakSet,Rl=function(e){return this.normalizeTitle(e,6,{halfParsed:!0,temporary:!0,decode:!0,page:""}).valid},Os=function(e){var r,n;{let i=(r=this.parentNode)==null?void 0:r.getAttr(e),s=i&&((n=/^(\d+)\s*(?:px)?$/u.exec(i))==null?void 0:n[1]);return s&&Number(s)||120}}});var _r,qs=L(()=>{"use strict";We();G();D();Ir();_r=class extends Ce{get type(){return"link"}get innerText(){return this.length>1?this.lastChild.text():zt(this.firstChild.text().replace(/^\s*:?/u,""))}lint(t=this.getAbsoluteIndex(),e){{let r=super.lint(t,e),n="nested-link",{lintConfig:i}=v,s=i.getSeverity(n);if(s&&this.isInside("ext-link-text")){let a=P(this,{start:t},n,"link-in-extlink",s);(i.computeEditInfo||i.fix)&&(a.fix=ve(a,"delink",this.innerText)),r.push(a)}return r}}}});var Bg,jg,Pn,Pt,Ms,_s,pt,Pi=L(()=>{"use strict";G();ae();pe();D();V();Bg=String.raw`(?:[${_e}\t]|&nbsp;|&#0*160;|&#[xX]0*[aA]0;)`,jg=new RegExp(`${Bg}+`,"gu"),pt=class extends ${constructor(e,r="free-ext-link",n=v.getConfig(),i){super(e,n,i,{});w(this,Pt);w(this,Pn);S(this,Pn,r)}get type(){return m(this,Pn)}get innerText(){let e=new Map([["!","|"],["=","="]]),r=Pe(this.childNodes.map(n=>{let{type:i}=n,s=String(n.name);return i==="magic-word"&&e.has(s)?e.get(s):n}));return this.type==="magic-link"&&(r=r.replace(jg," ")),r}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:zo(e).replace(/\n/gu,"%0A")}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),i=new U(this,e),{lintConfig:s}=v,{type:a,childNodes:l}=this;if(a==="magic-link"){let p="invalid-isbn",f=s.getSeverity(p);return f&&C(this,Pt,Ms).call(this)&&n.push(P(this,i,p,"invalid-isbn",f)),n}let g="invalid-url",u=s.getSeverity(g);if(u&&!this.querySelector("magic-word"))try{C(this,Pt,_s).call(this)}catch{n.push(P(this,i,g,"invalid-url",u))}let d=a==="ext-link-url";if(g="unterminated-url",u=s.getSeverity(g,d?"pipe":"punctuation"),u){let p=d?/\|/u:/[,;。:!?()]+/u,f=l.find(c=>c.type==="text"&&p.test(c.data));if(f){let{data:c}=f,h=q(f,i,g,v.msg("in-url",d?'"|"':"full-width-punctuation"),u);if(s.computeEditInfo){let{index:b,0:T}=p.exec(c),x=h.startIndex+b;h.suggestions=d?[At(x,1)]:[At(x),{desc:v.msg("encode"),range:[x,x+T.length],text:encodeURI(T)}]}n.push(h)}}return n}}getUrl(e){{if(this.type!=="magic-link")return C(this,Pt,_s).call(this);let{link:r}=this;return r.startsWith("ISBN")?this.normalizeTitle(`BookSources/${r.slice(5)}`,-1,{temporary:!0}).getUrl(e):new URL(r.startsWith("RFC")?`https://datatracker.ietf.org/doc/html/rfc${r.slice(4)}`:`https://www.ncbi.nlm.nih.gov/pubmed/${r.slice(5)}?dopt=Abstract`)}this.lspError("MagicLinkToken.getUrl")}getAttribute(e){return e==="invalid"?C(this,Pt,Ms).call(this):super.getAttribute(e)}};Pn=new WeakMap,Pt=new WeakSet,Ms=function(){if(this.type==="magic-link"){let{link:e}=this;if(e.startsWith("ISBN")){let r=[...e.slice(5)].map(n=>n==="X"?10:Number(n));return r.length===10?r.reduce((n,i,s)=>n+i*(10-s),0)%11!==0:r.length===13&&(r[12]===10||r.reduce((n,i,s)=>n+i*(s%2?3:1),0)%10!==0)}}return!1},_s=function(){{let{link:e}=this;return e.startsWith("//")&&(e=`https:${e}`),new URL(e)}}});var jl,ct,Ws,Og,ft,Ds=L(()=>{"use strict";G();Ve();D();V();Pi();jl=[he("[")];ft=class extends(Og=$){constructor(e,r="",n="",i,s=[]){super(void 0,i,s,{});w(this,ct);let a=e&&/^\0\d+f\x7F$/u.test(e)?s[Number(e.slice(1,-2))]:new pt(e,"ext-link-url",i,s);if(this.insertAt(a),S(this,ct,r),n){let l=new $(n,i,s,{});l.type="ext-link-text",l.setAttribute("stage",10),this.insertAt(l)}}get type(){return"ext-link"}toString(e){return this.length===1?`[${super.toString(e)}${m(this,ct)}]`:`[${super.toString(e,m(this,ct))}]`}text(){return`[${super.text(" ")}]`}getGaps(){return m(this,ct).length}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),i="var-anchor",s=v.lintConfig.getSeverity(i,"extLink");return s&&this.length===1&&this.isInside("heading-title")&&n.push(P(this,{start:e},i,"variable-anchor",s)),n}}print(){return super.print(this.length===1?{pre:"[",post:`${m(this,ct)}]`}:{pre:"[",sep:m(this,ct),post:"]"})}};Ws=O(Og),ct=new WeakMap,ft=j(Ws,0,"ExtLinkToken",jl,ft),B(Ws,1,ft)});var Bn,Ol=L(()=>{"use strict";V();Jt();qs();Ds();Bn=class extends ${get type(){return"imagemap-link"}constructor(t,e,r,n,i=[]){super(void 0,n,i),this.append(t,e.length===2?new _r(...e,n,i):new ft(...e,n,i),new me(r,n,i))}}});var ql={};re(ql,{ImagemapToken:()=>Us});var Us,Ml=L(()=>{"use strict";G();Ae();pe();D();wi();Bs();Ps();Ol();Us=class extends Rt{get image(){return this.childNodes.find(Ei("imagemap-image"))}constructor(t,e=v.getConfig(),r=[]){if(super(void 0,e,r,{}),!t)return;let n=t.split(`
19
- `),i=new Set(e.protocol.split("|")),s=!0,a=!1;for(let l of n){let g=l.trim();if(!(a||!g||g.startsWith("#"))){if(s){let u=l.indexOf("|"),d=u===-1?l:l.slice(0,u),p=this.normalizeTitle(d,0,{halfParsed:!0,temporary:!0,page:""});if(p.valid&&p.ns===6){let f=new gt("imagemap",d,u===-1?void 0:l.slice(u+1),e,r);super.insertAt(f),s=!1;continue}else a=!0}else if(l.trim().split(/[\t ]/u,1)[0]==="desc"){super.insertAt(l);continue}else if(l.includes("[")){let u=l.indexOf("["),d=l.slice(u),p=/^\[\[([^|]+)(?:\|([^\]]*))?\]\][\w\s]*$/u.exec(d);if(p){if(this.normalizeTitle(p[1],0,{halfParsed:!0,temporary:!0,selfLink:!0,page:""}).valid){super.insertAt(new Bn(l.slice(0,u),p.slice(1),d.slice(d.indexOf("]]")+2),e,r));continue}}else if(d.startsWith("[//")||i.has(d.slice(1,d.indexOf(":")+1))||i.has(d.slice(1,d.indexOf("//")+2))){let f=/^\[([^\]\s]+)(?:(\s+(?!\s))([^\]]*))?\][\w\s]*$/u.exec(d);if(f){super.insertAt(new Bn(l.slice(0,u),f.slice(1),d.slice(d.indexOf("]")+1),e,r));continue}}}}super.insertAt(new or(l,e,r))}}lint(t=this.getAbsoluteIndex(),e){{let r=super.lint(t,e),n=new U(this,t),{childNodes:i,image:s}=this,a="invalid-imagemap",{lintConfig:l}=v,g=l.getSeverity(a,s?"link":"image");return g&&(s?Array.prototype.push.apply(r,i.filter(u=>{let d=u.toString().trim();return u.is("noinclude")&&d&&!d.startsWith("#")}).map(u=>{let d=q(u,n,a,"invalid-imagemap-link",g);return l.computeEditInfo&&(d.suggestions=[M(d,-1),ve(d,"comment","# ")]),d})):r.push(P(this,n,a,"imagemap-without-image",g))),r}}getAttribute(t){return t==="invalid"?!this.image:super.getAttribute(t)}}});var _l,Hs,qg,mt,zs=L(()=>{"use strict";G();Et();Ve();D();$t();_l=[Ne(!1),he("<!--")];mt=class extends(qg=fe){constructor(e,r,n,i){super(e,n,i);ge(this,"closed");this.closed=r}get type(){return"comment"}lint(e=this.getAbsoluteIndex()){{if(this.closed)return[];let r="unclosed-comment",{lintConfig:n}=v,i=n.getSeverity(r);if(!i)return[];let s=P(this,{start:e},r,"unclosed-comment",i);return n.computeEditInfo&&(s.suggestions=[je(s.endIndex,"-->")]),[s]}}toString(e){return e?"":`<!--${this.innerText}${this.closed?"-->":""}`}print(){return super.print({pre:"&lt;!--",post:this.closed?"--&gt;":""})}};Hs=O(qg),mt=j(Hs,0,"CommentToken",_l,mt),B(Hs,1,mt)});var Wl={};re(Wl,{CommentedToken:()=>Gs});var Gs,Dl=L(()=>{"use strict";V();zs();Gs=class extends ${get type(){return"ext-inner"}constructor(t,e,r=[]){if(super(void 0,e,r,{AstText:":",CommentToken:":"}),t){let n=t.indexOf("<!--"),i=n!==-1&&t.indexOf("-->",n+4),s=0;for(;i!==!1&&i!==-1;)n>s&&this.insertAt(t.slice(s,n)),this.insertAt(new mt(t.slice(n+4,i),!0,e,r)),s=i+3,n=t.indexOf("<!--",s),i=n!==-1&&t.indexOf("-->",n+4);s<t.length&&this.insertAt(t.slice(s))}}lint(t=this.getAbsoluteIndex()){return super.lint(t,new RegExp(String.raw`<\s*(?:\/\s*)?(${this.name})\b`,"giu"))}}});var Hl={};re(Hl,{CategorytreeToken:()=>Wr});var Ul,Vs,Mg,Wr,zl=L(()=>{"use strict";G();Ve();D();Ir();Ul=[he("")];Wr=class extends(Mg=Ce){get type(){return"ext-inner"}constructor(t,e,r,n=[]){super(t,e,r,n),this.setAttribute("bracket",!1)}getTitle(){let t=this.firstChild.toString().trim(),e={halfParsed:!0},r=this.normalizeTitle(t,14,e);return r.valid&&r.ns===14?r:this.normalizeTitle(`Category:${t}`,0,e)}lint(t=this.getAbsoluteIndex()){{let e="no-ignored",r=v.lintConfig.getSeverity(e,"categorytree");if(r){let{link:n}=this;if(!n.valid||n.ns!==14)return[P(this,{start:t},e,"invalid-category",r)]}return super.lint(t,!1)}}};Vs=O(Mg),Wr=j(Vs,0,"CategorytreeToken",Ul,Wr),B(Vs,1,Wr)});var Gl={};re(Gl,{NowikiToken:()=>Ks});var _g,Wg,jn,Qs,Ks,Vl=L(()=>{"use strict";We();gn();G();pe();D();$t();_g=Be(o=>new RegExp(String.raw`<\s*(?:/\s*)${o==="nowiki"?"":"?"}(${o})\b`,"giu")),Wg=new Set(["languages","section","templatestyles"]),Ks=class extends fe{constructor(){super(...arguments);w(this,jn)}get type(){return"ext-inner"}lint(e=this.getAbsoluteIndex()){{let{name:r,innerText:n}=this,{lintConfig:i}=v,s="void-ext",a=i.getSeverity(s,r);if(a&&C(this,jn,Qs).call(this)){let l=P(this,{start:e},s,v.msg("nothing-in",r),a);return i.computeEditInfo&&(l.suggestions=[M(l)]),[l]}{s="invalid-json";let l=i.getSeverity(s),g=i.getSeverity(s,"duplicate");if(Jo.includes(r)&&(l||g))return(r==="templatedata"?oa:aa)(n).map(({message:u,from:d,to:p=d,line:f,endLine:c=f,column:h,endColumn:b=h,severity:T})=>{if(a=T==="warning"?g:l,!a)return!1;let x=new U(this,e);return{rule:s,message:u,severity:a,startIndex:e+d,endIndex:e+p,startLine:x.top+f-1,endLine:x.top+c-1,startCol:(f>1?0:x.left)+h-1,endCol:(c>1?0:x.left)+b-1}}).filter(u=>u!==!1)}return super.lint(e,_g(r))}}getAttribute(e){return e==="invalid"?C(this,jn,Qs).call(this):super.getAttribute(e)}};jn=new WeakSet,Qs=function(){let{name:e,firstChild:{data:r}}=this;return Wg.has(e)&&!!r}});var Kl,Js,Dg,ut,Es=L(()=>{"use strict";G();pe();D();mi();V();fi();Si();Kl=[Rr()];ut=class extends(Dg=Ue){get type(){return"ext"}constructor(t,e,r,n,i=v.getConfig(),s=!1,a=[]){let l=t.toLowerCase(),g=new Ft(!e||/^\s/u.test(e)?e:` ${e}`,"ext-attrs",l,i,a),u={...i,ext:i.ext.filter(p=>p!==l),excludes:[...i.excludes],inExt:!0},d;switch(l){case"pre":if(g.getAttr("format")!=="wikitext"){let{PreToken:p}=(al(),X(ol));d=new p(r,u,a);break}u.excludes.push("list");case"indicator":case"poem":case"ref":case"option":case"combooption":case"tab":case"tabs":case"poll":case"seo":case"langconvert":case"phonos":switch(l){case"poem":u.excludes.push("heading");break;case"langconvert":u.excludes.push("list");break;case"tab":u.ext=u.ext.filter(p=>p!=="tabs");break;case"ref":u.ext=u.ext.filter(p=>p!=="references")}d=new $(r,u,a);break;case"dynamicpagelist":{let{ParamTagToken:p}=(Ts(),X(dl));d=new p(l,s,r,u,a);break}case"inputbox":{let{InputboxToken:p}=(Sl(),X(Al));d=new p(l,s,r,u,a);break}case"references":{let{NestedToken:p}=(Fi(),X(Ii));u.excludes.push("heading"),d=new p(r,s,["ref"],u,a);break}case"choose":{let{NestedToken:p}=(Fi(),X(Ii));d=new p(r,/<(option|choicetemplate)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(\1)>)/gu,["option","choicetemplate"],u,a);break}case"combobox":{let{NestedToken:p}=(Fi(),X(Ii));d=new p(r,/<(combooption)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(combooption\s*)>)/giu,["combooption"],u,a);break}case"gallery":{let{GalleryToken:p}=(Bl(),X(Pl));d=new p(r,u,a);break}case"imagemap":{let{ImagemapToken:p}=(Ml(),X(ql));d=new p(r,u,a);break}case"hiero":{let{CommentedToken:p}=(Dl(),X(Wl));d=new p(r,u,a);break}case"categorytree":{let{CategorytreeToken:p}=(zl(),X(Hl));d=new p(r,void 0,u,a);break}default:{let{NowikiToken:p}=(Vl(),X(Gl));d=new p(r,u,a)}}d.setAttribute("name",l),d.type==="plain"&&(d.type="ext-inner"),super(t,g,d,n,i,a),this.seal("closed",!0)}lint(t=this.getAbsoluteIndex(),e){{let r=super.lint(t,e),{lintConfig:n}=v,i=new U(this,t);if(this.name!=="nowiki"){let s=this.inHtmlAttrs(),a="parsing-order",l=s&&n.getSeverity(a,s===2?"ext":"templateInTable");l&&r.push(P(this,i,a,"ext-in-html",l))}if(this.name==="ref"){let s="var-anchor",a=n.getSeverity(s,"ref");a&&this.closest("heading-title")&&r.push(P(this,i,s,"variable-anchor",a)),s="nested-link",a=n.getSeverity(s,"ref"),a&&this.closest("link-text,ext-link-text")&&r.push(P(this,i,s,"ref-in-link",a))}return r}}};Js=O(Dg),ut=j(Js,0,"ExtToken",Kl,ut),B(Js,1,ut)});var Xe,Bt,ht,Dr,Xs=L(()=>{"use strict";G();Ae();V();D();Dr=class extends ${constructor(e,r,n,i,s){super(void 0,i,s);w(this,Xe);w(this,Bt);w(this,ht);this.insertAt(r),S(this,Xe,n),S(this,Bt,e)}get closing(){return m(this,Xe)}toString(e){return`<${m(this,Xe)?"/":""}${m(this,Bt)}${super.toString(e)}${this.selfClosing?"/":""}>`}text(e=""){let{closing:r}=this;return`<${r&&!e?"/":""}${m(this,Bt)}${r?"":super.text()}${e}>`}getAttribute(e){return e==="padding"?m(this,Bt).length+(m(this,Xe)?2:1):super.getAttribute(e)}findMatchingTag(){return ze(m(this,ht),()=>{let{type:e,name:r,parentNode:n,closing:i,selfClosing:s}=this,a=!1,l=!1;if(e==="html"){let[,c,h]=this.getAttribute("config").html;a=h.includes(r),l=c.includes(r)}if(a||l&&s)return this;if(!n)return;let{childNodes:g}=n,u=g.indexOf(this),d=i?g.slice(0,u).reverse():g.slice(u+1),p=[this],{rev:f}=Q;for(let c of d)if(!(!c.is(e)||e==="html"&&(c.name!==r||l&&c.selfClosing)))if(m(c,Xe)===i){if(e==="tvar")return;p.push(c)}else{let h=p.pop();if(h===this)return c;v.viewOnly&&(S(h,ht,[f,c]),S(c,ht,[f,h]))}if(v.viewOnly)for(let c of p)S(c,ht,[f,void 0])},e=>{S(this,ht,e),e[1]&&e[1]!==this&&S(e[1],ht,[Q.rev,this])})}print(){return super.print({pre:`&lt;${m(this,Xe)?"/":""}${m(this,Bt)}`,post:`${this.selfClosing?"/":""}&gt;`})}json(e,r,n=this.getAbsoluteIndex()){{let i=super.json(void 0,r,n);return i.closing=m(this,Xe),i}}};Xe=new WeakMap,Bt=new WeakMap,ht=new WeakMap});var Ql,Ys,Ug,Ye,Jl=L(()=>{"use strict";Et();we();Xs();Ct();Ql=[Ne(),Z];Ye=class extends(Ug=Dr){get type(){return"tvar"}constructor(t,e,r,n,i){let s=new ye(e,"tvar-name",n,i);super(t,s,r,n,i)}};Ys=O(Ug),Ye=j(Ys,0,"TvarToken",Ql,Ye),B(Ys,1,Ye)});var Yl={};re(Yl,{TranslateToken:()=>Zs});var Bi,Xl,Zs,Zl=L(()=>{"use strict";V();fi();Ct();Jl();Zs=class extends Ue{constructor(e,r,n,i=[]){let s=new ye(e,"translate-attr",n,i);r=r==null?void 0:r.replace(/<tvar(\|[^>]+)>([\s\S]*?)<\/>/gu,(l,g,u)=>(new Ye("tvar",g,!1,n,i),new Ye("","",!0,n,i),`\0${i.length-2}n${u}\0${i.length}n`)).replace(/<(tvar)(\s+name\s*=(?:\s*(?:(["'])[\s\S]*?\3|[^"'\s>]+))?\s*)>([\s\S]*?)<\/(tvar)(\s*)>/giu,(l,g,u,d,p,f,c)=>(new Ye(g,u,!1,n,i),new Ye(f,c,!0,n,i),`\0${i.length-2}n${p}\0${i.length}n`));let a=new $(r,n,i);a.type="translate-inner";super("translate",s,a,"translate",n,i);w(this,Bi);this.seal("closed",!0)}get type(){return"translate"}get selfClosing(){return!1}toString(e){return e?this.lastChild.toString(!0):super.toString()}text(){return this.lastChild.text()}print(){return`<span class="wpb-ext">&lt;translate${C(this,Bi,Xl).call(this)?'<span class="wpb-ext-attrs"> <span class="wpb-ext-attr"><span class="wpb-attr-key">nowrap</span></span></span>':""}&gt;${this.lastChild.print({class:"ext-inner"})}&lt;/translate&gt;</span>`}};Bi=new WeakSet,Xl=function(){return this.firstChild.toString()===" nowrap"}});var rd={};re(rd,{parseCommentAndExt:()=>rr});var td,Hg,eo,zg,ed,rr,$n=L(()=>{"use strict";We();ae();Ua();Jt();Ga();Es();zs();td="<onlyinclude>",Hg="</onlyinclude>",{length:eo}=td,zg=[!1,!0].map(o=>{let t=o?"includeonly":"(?:no|only)include",e=o?"noinclude":"includeonly";return Be(r=>new RegExp(String.raw`<!--[\s\S]*?(?:-->|$)|<${t}(?:\s[^>]*)?/?>|</${t}\s*>|<(${r})(\s[^>]*?)?(?:/>|>([\s\S]*?)</(${"\\1"}\s*)>)|<(${e})(\s[^>]*?)?(?:/>|>([\s\S]*?)(?:</(${e}\s*)>|$))`,"giu"))}),ed=o=>{let t=o.indexOf(td);return{i:t,j:o.indexOf(Hg,t+eo)}},rr=(o,t,e,r)=>{if(r){let{i:l,j:g}=ed(o);if(l!==-1&&g!==-1){let u="",d=p=>{new me(p,t,e),u+=`\0${e.length-1}n`};for(;l!==-1&&g!==-1;){let p=`\0${e.length}g`;new Yt(o.slice(l+eo,g),t,e),l>0&&d(o.slice(0,l)),u+=p,o=o.slice(g+eo+1),{i:l,j:g}=ed(o)}return o&&d(o),u}}let{ext:n}=t,i=n,s=t;if(n.includes("translate")){let{TranslateToken:l}=(Zl(),X(Yl)),g=[];i=n.filter(u=>u!=="translate"&&u!=="tvar"),s={...t,ext:i},o=o.replace(/<nowiki>[\s\S]*?<\/nowiki>/giu,u=>(g.push(u),`\0${g.length-1}`)).replace(/<translate( nowrap)?>([\s\S]*?)<\/translate>/gu,(u,d,p)=>{let f=e.length;return new l(d,p&&$e(p,g),s,e),`\0${f}g`}),o=$e(o,g)}let a=zg[r?1:0](i.join("|"));return a.lastIndex=0,a.test(o)?o.replace(a,(l,g,u,d,p,f,c,h,b)=>{let T=e.length,x="n";if(g)x="e",new ut(g,u,d,p,s,f,e);else if(l.startsWith("<!--")){x="c";let y=l.endsWith("-->");new mt($e(l,e,1).slice(4,y?-3:void 0),y,t,e)}else f?new Zt(f,c&&$e(c,e,1),h&&$e(h,e,1),b,t,e):new me(l,t,e,!0);return`\0${T}${x}`}):o}});var Gg,Vg,Kg,nd,Ur,to,Qg,lr,id=L(()=>{"use strict";G();pe();mi();D();Xs();Gg=new Set(["if","ifeq","ifexpr","ifexist","iferror","switch"]),Vg=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"]),Kg=new Set(["strike","big","center","font","tt"]);nd=[Rr()];lr=class extends(Qg=Dr){constructor(e,r,n,i,s,a){super(e,r,n,s,a);w(this,Ur);this.setAttribute("name",e.toLowerCase()),S(this,Ur,i)}get type(){return"html"}get selfClosing(){return m(this,Ur)}text(){let{closing:e,selfClosing:r,name:n}=this,[,,i]=this.getAttribute("config").html;return i.includes(n)?e&&n!=="br"?"":super.text("/"):super.text(r&&!e?"/":"")}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),{name:i,parentNode:s,closing:a,selfClosing:l}=this,g=new U(this,e),{lintConfig:u}=v,{computeEditInfo:d,fix:p}=u,f=this.inTableAttrs(),c="h1",h=u.getSeverity(c,"html");if(h&&i==="h1"&&!a){let A=P(this,g,c,"<h1>",h);d&&(A.suggestions=[{desc:"h2",range:[e+2,e+3],text:"2"}]),n.push(A)}if(c="parsing-order",h=f&&u.getSeverity(c,f===2?"html":"templateInTable"),h){let A=P(this,g,c,"html-in-table",h);d&&f===2&&(A.suggestions=[M(A)]),n.push(A)}if(c="obsolete-tag",h=u.getSeverity(c,i),h&&Kg.has(i)&&n.push(P(this,g,c,"obsolete-tag",h)),c="bold-header",h=u.getSeverity(c,i),h&&(i==="b"||i==="strong")&&this.isInside("heading-title")){let A=P(this,g,c,"bold-in-header",h);d&&(A.suggestions=[M(A)]),n.push(A)}let[,b,T]=this.getAttribute("config").html,x=T.includes(i),y=b.includes(i),k=!x&&!y;if(c="unmatched-tag",a&&(l||x)||l&&k){if(h=u.getSeverity(c,a?"both":"selfClosing"),h){let A=P(this,g,c,a?"closing-and-self-closing":"invalid-self-closing",h);if(d||p){let I=ii(e),E={desc:v.msg("no-self-closing"),range:[A.endIndex-2,A.endIndex-1],text:""};y?d&&(A.suggestions=[I,E]):a?A.fix=x?I:E:d&&(A.suggestions=[E,je(A.endIndex,`></${i}>`,-2)])}n.push(A)}}else if(!this.findMatchingTag()){let A=P(this,g,c,a?"unmatched-closing":"unclosed-tag"),I=this.closest("magic-word");if(I&&Gg.has(I.name))h=u.getSeverity(c,"conditional");else if(a)h=u.getSeverity(c,"closing"),A.suggestions=[M(A)];else{h=u.getSeverity(c,"opening");let E=s==null?void 0:s.childNodes;Vg.has(i)&&(E!=null&&E.slice(0,E.indexOf(this)).some(N=>N.is("html")&&N.name===i&&!N.findMatchingTag())&&(A.suggestions=[je(e+1,"/")]),this.isInside("heading-title")&&(A.rule="format-leakage",h=u.getSeverity("format-leakage",i)))}h&&(A.severity=h,n.push(A))}return n}}getAttribute(e){return e==="invalid"?this.inTableAttrs()===2:super.getAttribute(e)}json(e,r,n=this.getAbsoluteIndex()){{let i=super.json(void 0,r,n);return i.selfClosing=m(this,Ur),i}}};to=O(Qg),Ur=new WeakMap,lr=j(to,0,"HtmlToken",nd,lr),B(to,1,lr)});var sd={};re(sd,{parseHtml:()=>Xg});var Jg,Xg,od=L(()=>{"use strict";Si();id();Jg=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,Xg=(o,t,e)=>{var s;let{html:r}=t;(s=t.htmlElements)!=null||(t.htmlElements=new Set([...r[0],...r[1],...r[2]]));let n=o.split("<"),i=n.shift();for(let a of n){let l=Jg.exec(a),g=l==null?void 0:l[2],u=g==null?void 0:g.toLowerCase();if(!l||!t.htmlElements.has(u)){i+=`<${a}`;continue}let[,d,,p="",f,c]=l,{length:h}=e,b=new Ft(p,"html-attrs",u,t,e),T=b.hasAttr("itemprop");if(u==="meta"&&!(T&&b.hasAttr("content"))||u==="link"&&!(T&&b.hasAttr("href"))){i+=`<${a}`,e.length=h;continue}i+=`\0${e.length}x${c}`,new lr(g,b,d==="/",f==="/>",t,e)}return i}});var Yg,ad,ro,Zg,bt,no=L(()=>{"use strict";Ae();mi();D();V();Ct();Si();Yg=o=>{let t=o.childNodes.map(r=>r.type==="text"?r.data.replace(/\|{1,2}/gu,({length:n})=>`{{${"!".repeat(n)}}}`):r.toString()).join(""),{childNodes:e}=v.parseWithRef(t,o,2);Q.run(()=>{o.safeReplaceChildren(e)})};ad=[Rr(1)];bt=class extends(Zg=$){constructor(t,e,r,n,i,s=[],a){super(void 0,i,s,a),this.append(new ye(e,"table-syntax",i,s),new Ft(n,"table-attrs",r,i,s))}escape(){for(let t of this.childNodes)t instanceof ye?Yg(t):t.escape()}};ro=O(Zg),bt=j(ro,0,"TableBaseToken",ad,bt),B(ro,1,bt)});var ld,dd,Le,io,Hr,On,dr,so=L(()=>{"use strict";G();pe();di();D();V();no();dr=class extends(dd=bt,ld=[Sr(!1)],dd){constructor(e,r,n,i=[]){var g;let s=/\||\0\d+!\x7F/u.exec(r!=null?r:""),a=s?r.slice(0,s.index):"";/\[\[|-\{/u.test(a)&&(s=null,a="");super(/^(?:\n[^\S\n]*(?:[|!]|\|\+|\{\{\s*!\s*\}\}\+?)|(?:\||\{\{\s*!\s*\}\}){2}|!!|\{\{\s*!!\s*\}\})$/u,e,"td",a,n,i);B(io,5,this);w(this,Hr);w(this,Le,"");s&&([Yn(this,Le)._]=s);let l=new $(r==null?void 0:r.slice(((g=s==null?void 0:s.index)!=null?g:NaN)+m(this,Le).length),n,i);l.type="td-inner",l.setAttribute("stage",4),this.insertAt(l)}get type(){return"td"}get rowspan(){return this.getAttr("rowspan")}get colspan(){return this.getAttr("colspan")}get subtype(){return C(this,Hr,On).call(this).subtype}afterBuild(){m(this,Le).includes("\0")&&S(this,Le,this.buildFromStr(m(this,Le),0)),super.afterBuild()}toString(e){let[r,n,i]=this.childNodes;return r.toString(e)+n.toString(e)+m(this,Le)+i.toString(e)}text(){let[e,r,n]=this.childNodes;return e.text()+r.text()+m(this,Le)+n.text()}getGaps(e){return e===1?m(this,Le).length:0}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),i=new U(this,e+this.getRelativeIndex(this.length-1)),s="pipe-like",{lintConfig:a}=v,{computeEditInfo:l,fix:g}=a,u=["td","double"].map(d=>a.getSeverity(s,d));for(let d of this.lastChild.childNodes)if(d.type==="text"){let{data:p}=d;if(p.includes("|")){let f=p.includes("||"),c=u[f?1:0];if(c){let h=q(d,i,s,"pipe-in-table",c);if(l||g)if(f){let b={caption:"|+",td:"|",th:"!"}[this.subtype];h.fix=ve(h,"newline",p.replace(/\|\|/gu,`
20
- ${b}`))}else l&&(h.suggestions=[ai(h.startIndex,p)]);n.push(h)}}}return n}}isIndependent(){return this.firstChild.text().startsWith(`
21
- `)}getAttr(e){{let r=super.getAttr(e);return e==="rowspan"||e==="colspan"?parseInt(r||"")||1:r}}escape(){super.escape(),this.childNodes[1].toString()&&(m(this,Le)||S(this,Le,"{{!}}")),m(this,Le)==="|"&&S(this,Le,"{{!}}")}print(){{let[e,r,n]=this.childNodes;return`<span class="wpb-td">${e.print()}${r.print()}${m(this,Le)}${n.print()}</span>`}}json(e,r,n=this.getAbsoluteIndex()){{let i=super.json(void 0,r,n),{rowspan:s,colspan:a}=this;return Object.assign(i,{subtype:this.subtype},s!==1&&{rowspan:s},a!==1&&{colspan:a}),i}}};io=O(dd),Le=new WeakMap,Hr=new WeakSet,On=function(){var a;let e=this.firstChild.text(),r=e.slice(-1),n="td";if(r==="!"?n="th":r==="+"&&(n="caption"),this.isIndependent())return{subtype:n};let{previousSibling:i}=this;return{...C(a=i,Hr,On).call(a)}},On=j(io,17,"#getSyntax",ld,Hr,On),ln(io,dr)});var zr,oo=L(()=>{"use strict";G();D();no();so();zr=class extends bt{lint(t=this.getAbsoluteIndex(),e){{let r=super.lint(t,e),n=this.childNodes.find(({type:l})=>l==="table-inter");if(!n)return r;let i=kr(n),s="fostered-content",a=i&&v.lintConfig.getSeverity(s,i===2?void 0:"transclusion");if(a){let l=q(n,{start:t},s,"content-outside-table",a);l.startIndex++,l.startLine++,l.startCol=0,r.push(l)}return r}}getRowCount(){return Number(this.childNodes.some(t=>t instanceof dr&&t.isIndependent()&&!t.firstChild.text().endsWith("+")))}}});var lo,ud,gd,ao,Gr,pd=L(()=>{"use strict";G();Ae();pe();di();D();oo();Ct();lo=class extends Array{},Gr=class extends(gd=zr,ud=[Sr(!1)],gd){constructor(e,r,n,i){super(/^(?:\{\||\{\{\{\s*!\s*\}\}|\{\{\s*\(!\s*\}\})$/u,e,"table",r,n,i,{});B(ao,5,this)}get type(){return"table"}get closed(){return this.lastChild.is("table-syntax")}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),i=new U(this,e),s=["unclosed-table","table-layout"],a=s.map(l=>v.lintConfig.getSeverity(l));if(a[0]&&!this.closed&&n.push(q(this.firstChild,i,s[0],"unclosed-table",a[0])),a[1]){let l=this.getLayout(),{length:g}=l;if(g>1){let u=1,d=1/0,p=0;for(;p<g;p++){let f=l[p],c=f.length;if(c<u)break;c<d&&(d=c);let h=f.indexOf(f[c-1])+1;if(h>d)break;h>u&&(u=h)}if(p<g){let f=this.getNthRow(p),c=q(f,i,s[1],"inconsistent-table",a[1]);c.startIndex++,c.startLine++,c.startCol=0,n.push(c)}}}return n}}close(e=`
22
- |}`,r){Q.run(()=>{let n=new ye(r?e:void 0,"table-syntax",this.getAttribute("config"),this.getAttribute("accum"));super.insertAt(n)})}getLayout(e){{let r=this.getAllRows(),{length:n}=r,i=lo.from(fd(n,()=>[]));for(let s=0;s<i.length;s++){let a=i[s],l=0,g=0,u;for(let d of r[s].childNodes.slice(2))if(d.is("td")){if(d.isIndependent()&&(u=d.subtype!=="caption"),u){let p={row:s,column:l},{rowspan:f,colspan:c}=d;for(l++;a[g];)g++;for(let h=s;h<Math.min(s+f,n);h++)for(let b=g;b<g+c;b++)i[h][b]=p;g+=c}}else if(cd(d))break}return i}}getAllRows(){return[...super.getRowCount()?[this]:[],...this.childNodes.slice(1).filter(e=>e.is("tr")&&e.getRowCount()>0)]}getNthRow(e,r,n){{let i=super.getRowCount();if(e===0&&i)return this;i&&e--;for(let s of this.childNodes.slice(2)){let{type:a}=s;if(a==="tr"&&s.getRowCount()&&(e--,e<0))return s}return}}json(e,r,n=this.getAbsoluteIndex()){{let i=super.json(void 0,r,n);return i.closed=this.closed,i}}};ao=O(gd),j(ao,1,"getLayout",ud,Gr),ln(ao,Gr)});var ji,md=L(()=>{"use strict";oo();ji=class extends zr{get type(){return"tr"}constructor(t,e,r,n){super(/^\n[^\S\n]*(?:\|-+|\{\{\s*!\s*\}\}-+|\{\{\s*!-\s*\}\}-*)$/u,t,"tr",e,r,n)}}});var Vr,uo=L(()=>{"use strict";$t();Vr=class extends fe{get indent(){return this.innerText.split(":").length-1}json(t,e,r=this.getAbsoluteIndex()){{let n=super.json(void 0,e,r),{indent:i}=this;return i&&(n.indent=i),n}}}});var Kr,go=L(()=>{"use strict";uo();Kr=class extends Vr{get type(){return"dd"}}});var bd={};re(bd,{parseTable:()=>tp});var ep,hd,tp,xd=L(()=>{"use strict";V();pd();md();so();go();ep=o=>o.lastChild.constructor!==$,hd=(o,t)=>o.is("td")?t.pop():o,tp=({firstChild:{data:o},type:t,name:e},r,n)=>{let i=[],s=o.split(`
15
+ `){f=k+1;let{pos:R,findEqual:F}=(T=i[i.length-1])!=null?T:{};if(R===void 0||F||se(o.slice(R,E))!==""){let ee=/^(={1,6})(.+)\1((?:\s|\0\d+[cn]\x7F)*)$/u.exec(o.slice(E,k));ee&&(ee[2]=$e(ee[2],s),ee[2].includes(`
16
+ `)||(o=`${o.slice(0,E)}\0${e.length}h${o.slice(k)}`,f=E+4+String(e.length).length,new dt(ee[1].length,ee.slice(2),t,e)))}}else if(y==="|"||Y)f=k+1,a(o,N,_,k),y==="|"&&N.push([]),A.pos=f,A.findEqual=y==="|",i.push(A);else if(y.startsWith("}}")){let R=y.slice(0,Math.min(I.length,3)),F=I.length-R.length,{length:ee}=e;f=k+R.length,a(o,N,_,k);let ae=!1,xe="t";if(R.length===3){let J=N.map(K=>K.join("=")),de=J.length>1&&se(J[1]).trim();new nr(J,t,e),de&&de.endsWith(":")&&n.includes(de.slice(0,-1).toLowerCase())&&(xe="s")}else try{new at(N[0][0],N.slice(1),t,e),xe=yl(N[0][0])}catch(J){if(!(J instanceof SyntaxError&&J.message==="Invalid template name"))throw J;ae=!0}ae||(o=`${o.slice(0,E+F)}\0${ee}${xe}${o.slice(f)}`,f=E+F+3+String(ee).length,F>1?i.push({0:I.slice(0,F),index:E,pos:E+F,parts:[[]]}):F===1&&o[E-1]==="-"&&i.push({0:"-{",index:E-1,pos:E+1,parts:[[]]}))}else f=k+y.length,y.startsWith("{")&&(p.pos=f,p.parts=[[]]),i.push(..."0"in A?[A]:[],p);let W=i[i.length-1];if(u&&g+o.length<f)for(u=!1;(x=W==null?void 0:W[0])!=null&&x.startsWith("{");)i.pop(),W=i[i.length-1];d=xl(r+(u?hl:"")+(W?`|${Ag[W[0][0]]}${W.findEqual?"|=":""}`:"")),d.lastIndex=f,p=d.exec(o)}return $e(o,s)}});var vl={};re(vl,{InputboxToken:()=>Es});var Es,Al=L(()=>{"use strict";$n();Ri();vs();Es=class extends En{constructor(t,e,r,n,i=[]){let s=Symbol("InputboxToken"),a=n.excludes.includes("heading")?n:{...n,excludes:[...n.excludes,"heading"]},{length:l}=i;i.push(s),r&&(r=tr(r,a,i,e)),r&&(r=In(r,a,i)),i.splice(l,1),super(t,e,r,a,i,{})}}});var Fi={};re(Fi,{NestedToken:()=>$s});var Sg,wg,Rn,qr,$s,Pi=L(()=>{"use strict";G();pe();$n();Ri();D();V();Ns();Qt();Sg=new Set(["comment","include","arg","template","magic-word"]),wg=[!1,!0].map(o=>{let t=o?"includeonly":"noinclude";return new RegExp(String.raw`^(?:<${t}(?:\s[^>]*)?/?>|</${t}\s*>)$`,"iu")}),$s=class extends ${constructor(e,r,n,i,s=[]){if(typeof r=="boolean"){let a=Symbol("NestedToken"),{length:l}=s;s.push(a),e&&(e=tr(e,i,s,r)),e&&(e=In(e,i,s)),s.splice(l,1)}else e&&(e=e.replace(r,(a,l,g,u,d)=>{let p=`\0${s.length+1}e`;return new ut(l,g,u,d,i,!1,s),p}));e&&(e=e.replace(/(^|\0\d+.\x7F)([^\0]+)(?=$|\0\d+.\x7F)/gu,(a,l,g)=>(new me(g,i,s),`${l}\0${s.length}n`)));super(e,i,s);w(this,Rn);w(this,qr);S(this,Rn,[...n]),S(this,qr,r)}get type(){return"ext-inner"}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),i="no-ignored",{lintConfig:s}=v,a=s.getSeverity(i,this.name);if(!a)return n;let l=new U(this,e),g=typeof m(this,qr)=="boolean"?wg[m(this,qr)?1:0]:/^<!--[\s\S]*-->$/u;return[...n,...this.childNodes.filter(u=>{let{type:d,name:p}=u;if(d==="ext")return!m(this,Rn).includes(p);if(Sg.has(d))return!1;let f=u.toString().trim();return f&&!g.test(f)}).map(u=>{let d=q(u,l,i,v.msg("invalid-content",this.name),a);return s.computeEditInfo&&(d.suggestions=[M(d),ai(d,u.toString())]),d})]}}};Rn=new WeakMap,qr=new WeakMap});function Is(o,t,e,r,n,i){t=se(t).trim();let s=t.replace(o==="link"?/\0\d+[tq]\x7F/gu:/\0\d+t\x7F/gu,"").trim();switch(o){case"width":return!s&&!!t||/^(?:\d+x?|\d*x\d+)(?:\s*px)?$/u.test(s);case"link":{let a=r==="gallery-image",l=!0;if(s){if(Cg(e.protocol).test(s))return Lg(e.protocol).test(s)?t:a;s.startsWith("[[")&&s.endsWith("]]")&&(s=s.slice(2,-2),l=!1)}else return t;let g=v.normalizeTitle(s,0,!1,e,{halfParsed:n,decode:!0,selfLink:!0,page:"",nowiki:l},i);return g.valid?g:a}case"lang":return(r==="svg"||r==="svgz")&&!/[^a-z\d-]/u.test(s);case"alt":case"class":case"manualthumb":return!0;case"page":return(r==="djvu"||r==="djv"||r==="pdf")&&Number(s)>0;default:return!!s&&!isNaN(s)}}var Cg,Lg,Eg,$g,Sl,Re,Bi,wl,Rs,Ng,ir,Cl=L(()=>{"use strict";We();oe();G();gn();Ae();we();D();V();Cg=Be(o=>new RegExp(String.raw`^(?:${o}|//|\0\d+m\x7F)`,"iu")),Lg=Be(o=>new RegExp(String.raw`^(?:(?:${o}|//)${tt}|\0\d+m\x7F)${rt}$`,"iu")),Eg=Be(o=>new RegExp(String.raw`^(\s*(?!\s))${o.replace("$1","(.*)")}${o.endsWith("$1")?`(?=$|
17
+ )`:""}(\s*)$`,"u")),$g=o=>{if(o)o.startsWith("//")&&(o=`https:${o}`);else return o;return new URL(o).href};Sl=[Z];ir=class extends(Ng=$){constructor(e,r,n,i,s){var t=(...vh)=>(super(...vh),w(this,Bi),w(this,Re,""),this);let a,l=Object.entries(i.img).map(([u,d])=>[u,d,Eg(u)]),g=l.find(([,u,d])=>(a=d.exec(e),a&&(a.length!==4||Is(u,a[2],i,u==="link"?n:r,!0,s)!==!1)));if(g&&a){a.length===3?(t(void 0,i,s),S(this,Re,e)):(t(a[2],i,s,{}),S(this,Re,a[1]+g[0]+a[3])),this.setAttribute("name",g[1]),g[1]==="alt"&&this.setAttribute("stage",10);return}t(e,i.excludes.includes("list")?i:{...i,excludes:[...i.excludes,"list"]},s),this.setAttribute("name","caption"),this.setAttribute("stage",7)}get type(){return"image-parameter"}get thumb(){return this.name==="manualthumb"?this.normalizeTitle(`File:${super.text().trim()}`,6,{page:""}):void 0}get link(){{if(this.name!=="link")return;let e=super.text().trim();return Q.run(()=>{var a;let r=this.getAttribute("config"),n=[],i=new $(e,r,n);if(i.parseOnce(0,this.getAttribute("include")).parseOnce(),/^\0\d+m\x7F/u.test(i.firstChild.toString()))return e;let s=Is("link",e,r,(a=this.parentNode)==null?void 0:a.type,void 0,n);return s===!0?void 0:s},v)}}afterBuild(){var e;(e=this.parentNode)!=null&&e.is("gallery-image")&&!Xo.has(this.name)&&this.setAttribute("name","invalid"),super.afterBuild()}toString(e){return m(this,Re)?m(this,Re).replace("$1",super.toString(e)):super.toString(e)}text(){return m(this,Re)?m(this,Re).replace("$1",super.text()).trim():super.text().trim()}isPlain(){return this.name==="caption"||this.name==="alt"}getAttribute(e){return e==="invalid"?this.name==="invalid":e==="padding"?Math.max(0,m(this,Re).indexOf("$1")):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),r){var n;{let i=super.lint(e,r),{lintConfig:s}=v,{computeEditInfo:a,fix:l}=s,{link:g,name:u}=this,d=u==="width"&&this.getValue();if(u==="invalid"||d&&d.endsWith("px")){let p="invalid-gallery",f=s.getSeverity(p,"parameter");if(f){let c=P(this,{start:e},p,"invalid-image-parameter",f);(a||l)&&(c.fix=d?M(c,0,d):M(c,-1)),i.push(c)}}else if(u==="link"){if(g===void 0){let p="invalid-gallery",f=s.getSeverity(p,"link");if(f){let c=P(this,{start:e},p,"invalid-gallery-link",f);if(a){let h=super.toString(),b=h.indexOf("|"),T=h.slice(0,b).trim();b!==-1&&!/[<{]/u.test(T)&&typeof Is("link",T,this.getAttribute("config"),(n=this.parentNode)==null?void 0:n.type)=="string"&&(c.suggestions=[St(e+this.getRelativeIndex(0)+b)])}i.push(c)}}else if(typeof g=="string"){let p="invalid-url",f=s.getSeverity(p);if(f&&!this.querySelector("magic-word"))try{$g(g)}catch{i.push(P(this,{start:e},p,"invalid-url",f))}}else if(g.encoded){let p="url-encoding",f=s.getSeverity(p,"file");if(f){let c=P(this,{start:e},p,"unnecessary-encoding",f);(a||l)&&(c.fix=si(c,this)),i.push(c)}}}else if(u==="manualthumb"){let p="invalid-gallery",f=s.getSeverity(p,"thumb");if(f&&!this.querySelector("arg,magic-word,template")){let{valid:c,ns:h,extension:b}=this.thumb;(!c||h!==6||!un.has(b))&&i.push(P(this,{start:e},p,"invalid-thumb",f))}}return i}}getValue(){{let{name:e,childNodes:r}=this;return e==="link"?Ne(r.map(n=>{var i;return n.is("ext")&&n.name==="nowiki"?(i=n.innerText)!=null?i:"":n})):e==="invalid"?this.text():C(this,Bi,wl).call(this)||super.text()}}print(){return m(this,Re)?`<span class="wpb-image-parameter${this.name==="invalid"?" wpb-invalid":""}">${m(this,Re).replace("$1",`<span class="wpb-image-caption">${it(this.childNodes)}</span>`)}</span>`:super.print({class:"image-caption"})}};Rs=O(Ng),Re=new WeakMap,Bi=new WeakSet,wl=function(){return m(this,Re)&&!m(this,Re).includes("$1")},ir=j(Rs,0,"ImageParameterToken",Sl,ir),B(Rs,1,ir)});var Ll,Ig,Rg,El,$l,Fg,Nl,Mr,Fs=L(()=>{"use strict";G();gn();pe();D();Ir();Cl();Ll=new Map([["manualthumb","Thumb"],["frameless","Frameless"],["framed","Frame"],["thumbnail","Thumb"]]),Ig=new Set(["arg"]),Rg=new Set(["template","magic-word"]),El=new Set(["left","right","center","none"]),$l=new Set(["baseline","sub","super","top","text-top","middle","bottom","text-bottom"]),Fg=o=>{if(o===void 0)return[];let t=/-\{|\}-|\|/gu,e=[],r=t.exec(o),n=0,i=0;for(;r;){let{0:s,index:a}=r;s!=="|"?n+=s==="-{"?1:-1:n===0&&(e.push(o.slice(i,a)),{lastIndex:i}=t),r=t.exec(o)}return e.push(o.slice(i)),e},Nl=(o,t)=>o.filter(({childNodes:e})=>!e.some(r=>r.text().trim()&&t.has(r.type))),Mr=class extends Ce{get type(){return"file"}get extension(){return this.getAttribute("title").extension}constructor(t,e,r,n=[],i="|",s){super(t,void 0,r,n,i);let{extension:a}=this.getTitle(!0,!0);this.safeAppend(Fg(e).map(l=>new ir(l,a,s,r,n)))}lint(t=this.getAbsoluteIndex(),e){var r;{let n=super.lint(t,e),i=Nl(this.getAllArgs(),Ig),s=[...new Set(i.map(({name:E})=>E))],a=s.filter(E=>Ll.has(E)),l=s.filter(E=>El.has(E)),g=s.filter(E=>$l.has(E)),[u]=a,d=u==="framed"||u==="manualthumb",p=new U(this,t),{lintConfig:f}=v,{computeEditInfo:c,fix:h}=f,{ns:b,extension:T}=this.getAttribute("title"),{firstChild:x}=this,y="nested-link",k=f.getSeverity(y,"file");if(k&&un.has(T)&&this.isInside("ext-link-text")&&((r=this.getValue("link"))==null?void 0:r.trim())!==""){let E=P(this,p,y,"link-in-extlink",k);if(c||h){let N=this.getArg("link");if(N){let z=t+N.getRelativeIndex();E.fix={desc:v.msg("delink"),range:[z,z+N.toString().length],text:"link="}}else E.fix=Ar(E.endIndex-2,"delink","|link=")}n.push(E)}if(y="invalid-gallery",k=f.getSeverity(y,"extension"),k&&b===6&&!T&&!x.querySelector("arg,magic-word,template")&&n.push(P(this,p,y,"missing-extension",k)),k=f.getSeverity(y,"parameter"),k&&d)for(let E of i.filter(({name:N})=>N==="width")){let N=q(E,p,y,"invalid-image-parameter",k);(c||h)&&(N.fix=M(N,-1)),n.push(N)}if(y="blank-alt",k=f.getSeverity(y),k){let E=this.getArg("alt");if((E==null?void 0:E.getValue())===""){let N=q(E,p,y,"blank-alt",k);(c||h)&&(N.fix=M(N,-1)),n.push(N)}}if(i.length===s.length&&a.length<2&&l.length<2&&g.length<2)return n;y="no-duplicate";let A=["unknownImageParameter","imageParameter"].map(E=>f.getSeverity(y,E)),I=(E,N,z,_=!0)=>E.map(Y=>{if(k=A[Number(typeof _=="function"?_(Y):_)],!k)return!1;let W=q(Y,p,y,v.msg(`${N}-image-parameter`,z),k);return c&&(W.suggestions=[M(W,-1)]),W}).filter(Y=>Y!==!1);for(let E of s){if(E==="invalid"||E==="width"&&d)continue;let N=E==="caption",z=i.filter(({name:_})=>_===E);if(N&&(z=[...z.slice(0,-1).filter(_=>_.text()),...z.slice(-1)]),z.length>1){let _=!N||!T||un.has(T);if(N&&_){let Y=Nl(z,Rg);_=Y.length>1&&(W=>Y.includes(W))}Array.prototype.push.apply(n,I(z,"duplicate",E,_))}}return a.length>1&&Array.prototype.push.apply(n,I(i.filter(({name:E})=>Ll.has(E)),"conflicting","frame")),l.length>1&&Array.prototype.push.apply(n,I(i.filter(({name:E})=>El.has(E)),"conflicting","horizontal-alignment")),g.length>1&&Array.prototype.push.apply(n,I(i.filter(({name:E})=>$l.has(E)),"conflicting","vertical-alignment")),n}}getAllArgs(){return this.childNodes.slice(1)}getArgs(t){return this.getAllArgs().filter(({name:e})=>t===e)}getArg(t){{let e=this.getArgs(t);return e[t==="manualthumb"?0:e.length-1]}}getValue(t){var e;return(e=this.getArg(t))==null?void 0:e.getValue()}json(t,e,r=this.getAbsoluteIndex()){{let n=super.json(void 0,e,r),{extension:i}=this;return i&&(n.extension=i),n}}}});var Il,Fn,Bs,Ps,Pg,gt,js=L(()=>{"use strict";G();Ve();D();V();Fs();Il=[he("")];gt=class extends(Pg=Mr){constructor(e,r,n,i,s=[]){let a;if(n!==void 0){let{length:g}=s;a=new $(n,i,s);for(let u=0;u<10;u++)a.parseOnce();s.splice(g,1)}let l=`${e}-image`;super(r,a==null?void 0:a.firstChild.toString(),i,s,void 0,l);w(this,Fn);ge(this,"privateType","imagemap-image");this.setAttribute("bracket",!1),this.privateType=l,this.seal("privateType",!0)}get type(){return this.privateType}getTitle(e){let r=this.type==="imagemap-image";return this.normalizeTitle(this.firstChild.toString(),r?0:6,{halfParsed:!0,temporary:e,decode:!r,page:""})}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),i="invalid-gallery",{lintConfig:s}=v,a=s.getSeverity(i,"image");if(a&&C(this,Fn,Bs).call(this)){let l=P(this,{start:e},i,"invalid-gallery",a);s.computeEditInfo&&(l.suggestions=[Ar(e,"prefix","File:")]),n.push(l)}return n}}getAttribute(e){return e==="invalid"?C(this,Fn,Bs).call(this):super.getAttribute(e)}};Ps=O(Pg),Fn=new WeakSet,Bs=function(){return this.getAttribute("title").ns!==6},gt=j(Ps,0,"GalleryImageToken",Il,gt),B(Ps,1,gt)});var sr,Os=L(()=>{"use strict";Qt();sr=class extends me{}});var Fl={};re(Fl,{GalleryToken:()=>qs});var or,Rl,Ms,qs,Pl=L(()=>{"use strict";G();D();Li();js();Os();qs=class extends Pt{constructor(e,r,n=[]){var i;super(void 0,r,n,{});w(this,or);for(let s of(i=e==null?void 0:e.split(`
18
+ `))!=null?i:[]){let a=/^([^|]+)(?:\|(.*))?/u.exec(s);if(!a){super.insertAt(s.trim()?new sr(s,r,n):s);continue}let[,l,g]=a;C(this,or,Rl).call(this,l)?super.insertAt(new gt("gallery",l,g,r,n)):super.insertAt(new sr(s,r,n))}}get widths(){return C(this,or,Ms).call(this,"widths")}get heights(){return C(this,or,Ms).call(this,"heights")}lint(e=this.getAbsoluteIndex(),r){{let{top:n,left:i}=this.getRootNode().posFromIndex(e),s=[],a="no-ignored",{lintConfig:l}=v,g=["Image","NoImage","Comment"].map(u=>l.getSeverity(a,`gallery${u}`));for(let u=0;u<this.length;u++){let d=this.childNodes[u],p=d.toString(),{length:f}=p,c=p.trim(),{type:h}=d,b=n+u,T=u?0:i;if(d.setAttribute("aIndex",e),h==="noinclude"&&c&&!/^<!--.*-->$/u.test(c)){let[x]=g;if(c.startsWith("|")?[,x]=g:(c.startsWith("<!--")||c.endsWith("-->"))&&([,,x]=g),x){let y=e+f,k={rule:a,message:v.msg("invalid-content","gallery"),severity:x,startIndex:e,endIndex:y,startLine:b,endLine:b,startCol:T,endCol:T+f};l.computeEditInfo&&(k.suggestions=[M(k),ai(k,p)]),s.push(k)}}else if(h!=="noinclude"&&h!=="text"){let x=d.lint(e,r);x.length>0&&Array.prototype.push.apply(s,x)}e+=f+1}return s}}json(e,r,n=this.getAbsoluteIndex()){{let i=super.json(void 0,r,n);return Object.assign(i,{widths:this.widths,heights:this.heights}),i}}};or=new WeakSet,Rl=function(e){return this.normalizeTitle(e,6,{halfParsed:!0,temporary:!0,decode:!0,page:""}).valid},Ms=function(e){var r,n;{let i=(r=this.parentNode)==null?void 0:r.getAttr(e),s=i&&((n=/^(\d+)\s*(?:px)?$/u.exec(i))==null?void 0:n[1]);return s&&Number(s)||120}}});var _r,_s=L(()=>{"use strict";We();G();D();Ir();_r=class extends Ce{get type(){return"link"}get innerText(){return this.length>1?this.lastChild.text():Ht(this.firstChild.text().replace(/^\s*:?/u,""))}lint(t=this.getAbsoluteIndex(),e){{let r=super.lint(t,e),n="nested-link",{lintConfig:i}=v,s=i.getSeverity(n);if(s&&this.isInside("ext-link-text")){let a=P(this,{start:t},n,"link-in-extlink",s);(i.computeEditInfo||i.fix)&&(a.fix=ve(a,"delink",this.innerText)),r.push(a)}return r}}}});var Bg,jg,Pn,Bt,Ws,Ds,pt,ji=L(()=>{"use strict";G();oe();pe();D();V();Bg=String.raw`(?:[${_e}\t]|&nbsp;|&#0*160;|&#[xX]0*[aA]0;)`,jg=new RegExp(`${Bg}+`,"gu"),pt=class extends ${constructor(e,r="free-ext-link",n=v.getConfig(),i){super(e,n,i,{});w(this,Bt);w(this,Pn);S(this,Pn,r)}get type(){return m(this,Pn)}get innerText(){let e=new Map([["!","|"],["=","="]]),r=Ne(this.childNodes.map(n=>{let{type:i}=n,s=String(n.name);return i==="magic-word"&&e.has(s)?e.get(s):n}));return this.type==="magic-link"&&(r=r.replace(jg," ")),r}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:Vo(e).replace(/\n/gu,"%0A")}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),i=new U(this,e),{lintConfig:s}=v,{type:a,childNodes:l}=this;if(a==="magic-link"){let p="invalid-isbn",f=s.getSeverity(p);return f&&C(this,Bt,Ws).call(this)&&n.push(P(this,i,p,"invalid-isbn",f)),n}let g="invalid-url",u=s.getSeverity(g);if(u&&!this.querySelector("magic-word"))try{C(this,Bt,Ds).call(this)}catch{n.push(P(this,i,g,"invalid-url",u))}let d=a==="ext-link-url";if(g="unterminated-url",u=s.getSeverity(g,d?"pipe":"punctuation"),u){let p=d?/\|/u:/[,;。:!?()]+/u,f=l.find(c=>c.type==="text"&&p.test(c.data));if(f){let{data:c}=f,h=q(f,i,g,v.msg("in-url",d?'"|"':"full-width-punctuation"),u);if(s.computeEditInfo){let{index:b,0:T}=p.exec(c),x=h.startIndex+b;h.suggestions=d?[St(x,1)]:[St(x),{desc:v.msg("encode"),range:[x,x+T.length],text:encodeURI(T)}]}n.push(h)}}return n}}getUrl(e){{if(this.type!=="magic-link")return C(this,Bt,Ds).call(this);let{link:r}=this;return r.startsWith("ISBN")?this.normalizeTitle(`BookSources/${r.slice(5)}`,-1,{temporary:!0}).getUrl(e):new URL(r.startsWith("RFC")?`https://datatracker.ietf.org/doc/html/rfc${r.slice(4)}`:`https://www.ncbi.nlm.nih.gov/pubmed/${r.slice(5)}?dopt=Abstract`)}this.lspError("MagicLinkToken.getUrl")}getAttribute(e){return e==="invalid"?C(this,Bt,Ws).call(this):super.getAttribute(e)}};Pn=new WeakMap,Bt=new WeakSet,Ws=function(){if(this.type==="magic-link"){let{link:e}=this;if(e.startsWith("ISBN")){let r=[...e.slice(5)].map(n=>n==="X"?10:Number(n));return r.length===10?r.reduce((n,i,s)=>n+i*(10-s),0)%11!==0:r.length===13&&(r[12]===10||r.reduce((n,i,s)=>n+i*(s%2?3:1),0)%10!==0)}}return!1},Ds=function(){{let{link:e}=this;return e.startsWith("//")&&(e=`https:${e}`),new URL(e)}}});var Bl,ct,Us,Og,ft,Hs=L(()=>{"use strict";G();Ve();D();V();ji();Bl=[he("[")];ft=class extends(Og=$){constructor(e,r="",n="",i,s=[]){super(void 0,i,s,{});w(this,ct);let a=e&&/^\0\d+f\x7F$/u.test(e)?s[Number(e.slice(1,-2))]:new pt(e,"ext-link-url",i,s);if(this.insertAt(a),S(this,ct,r),n){let l=new $(n,i,s,{});l.type="ext-link-text",l.setAttribute("stage",10),this.insertAt(l)}}get type(){return"ext-link"}toString(e){return this.length===1?`[${super.toString(e)}${m(this,ct)}]`:`[${super.toString(e,m(this,ct))}]`}text(){return`[${super.text(" ")}]`}getGaps(){return m(this,ct).length}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),i="var-anchor",s=v.lintConfig.getSeverity(i,"extLink");return s&&this.length===1&&this.isInside("heading-title")&&n.push(P(this,{start:e},i,"variable-anchor",s)),n}}print(){return super.print(this.length===1?{pre:"[",post:`${m(this,ct)}]`}:{pre:"[",sep:m(this,ct),post:"]"})}};Us=O(Og),ct=new WeakMap,ft=j(Us,0,"ExtLinkToken",Bl,ft),B(Us,1,ft)});var Bn,jl=L(()=>{"use strict";V();Qt();_s();Hs();Bn=class extends ${get type(){return"imagemap-link"}constructor(t,e,r,n,i=[]){super(void 0,n,i),this.append(t,e.length===2?new _r(...e,n,i):new ft(...e,n,i),new me(r,n,i))}}});var Ol={};re(Ol,{ImagemapToken:()=>zs});var zs,ql=L(()=>{"use strict";G();Ae();pe();D();Li();Os();js();jl();zs=class extends Pt{get image(){return this.childNodes.find(Ni("imagemap-image"))}constructor(t,e=v.getConfig(),r=[]){if(super(void 0,e,r,{}),!t)return;let n=t.split(`
19
+ `),i=new Set(e.protocol.split("|")),s=!0,a=!1;for(let l of n){let g=l.trim();if(!(a||!g||g.startsWith("#"))){if(s){let u=l.indexOf("|"),d=u===-1?l:l.slice(0,u),p=this.normalizeTitle(d,0,{halfParsed:!0,temporary:!0,page:""});if(p.valid&&p.ns===6){let f=new gt("imagemap",d,u===-1?void 0:l.slice(u+1),e,r);super.insertAt(f),s=!1;continue}else a=!0}else if(l.trim().split(/[\t ]/u,1)[0]==="desc"){super.insertAt(l);continue}else if(l.includes("[")){let u=l.indexOf("["),d=l.slice(u),p=/^\[\[([^|]+)(?:\|([^\]]*))?\]\][\w\s]*$/u.exec(d);if(p){if(this.normalizeTitle(p[1],0,{halfParsed:!0,temporary:!0,selfLink:!0,page:""}).valid){super.insertAt(new Bn(l.slice(0,u),p.slice(1),d.slice(d.indexOf("]]")+2),e,r));continue}}else if(d.startsWith("[//")||i.has(d.slice(1,d.indexOf(":")+1))||i.has(d.slice(1,d.indexOf("//")+2))){let f=/^\[([^\]\s]+)(?:(\s+(?!\s))([^\]]*))?\][\w\s]*$/u.exec(d);if(f){super.insertAt(new Bn(l.slice(0,u),f.slice(1),d.slice(d.indexOf("]")+1),e,r));continue}}}}super.insertAt(new sr(l,e,r))}}lint(t=this.getAbsoluteIndex(),e){{let r=super.lint(t,e),n=new U(this,t),{childNodes:i,image:s}=this,a="invalid-imagemap",{lintConfig:l}=v,g=l.getSeverity(a,s?"link":"image");return g&&(s?Array.prototype.push.apply(r,i.filter(u=>{let d=u.toString().trim();return u.is("noinclude")&&d&&!d.startsWith("#")}).map(u=>{let d=q(u,n,a,"invalid-imagemap-link",g);return l.computeEditInfo&&(d.suggestions=[M(d,-1),ve(d,"comment","# ")]),d})):r.push(P(this,n,a,"imagemap-without-image",g))),r}}getAttribute(t){return t==="invalid"?!this.image:super.getAttribute(t)}}});var Ml,Gs,qg,mt,Vs=L(()=>{"use strict";G();$t();Ve();D();Nt();Ml=[Ie(!1),he("<!--")];mt=class extends(qg=fe){constructor(e,r,n,i){super(e,n,i);ge(this,"closed");this.closed=r}get type(){return"comment"}lint(e=this.getAbsoluteIndex()){{if(this.closed)return[];let r="unclosed-comment",{lintConfig:n}=v,i=n.getSeverity(r);if(!i)return[];let s=P(this,{start:e},r,"unclosed-comment",i);return n.computeEditInfo&&(s.suggestions=[je(s.endIndex,"-->")]),[s]}}toString(e){return e?"":`<!--${this.innerText}${this.closed?"-->":""}`}print(){return super.print({pre:"&lt;!--",post:this.closed?"--&gt;":""})}};Gs=O(qg),mt=j(Gs,0,"CommentToken",Ml,mt),B(Gs,1,mt)});var _l={};re(_l,{CommentedToken:()=>Ks});var Ks,Wl=L(()=>{"use strict";V();Vs();Ks=class extends ${get type(){return"ext-inner"}constructor(t,e,r=[]){if(super(void 0,e,r,{AstText:":",CommentToken:":"}),t){let n=t.indexOf("<!--"),i=n!==-1&&t.indexOf("-->",n+4),s=0;for(;i!==!1&&i!==-1;)n>s&&this.insertAt(t.slice(s,n)),this.insertAt(new mt(t.slice(n+4,i),!0,e,r)),s=i+3,n=t.indexOf("<!--",s),i=n!==-1&&t.indexOf("-->",n+4);s<t.length&&this.insertAt(t.slice(s))}}lint(t=this.getAbsoluteIndex()){return super.lint(t,new RegExp(String.raw`<\s*(?:\/\s*)?(${this.name})\b`,"giu"))}}});var Ul={};re(Ul,{CategorytreeToken:()=>Wr});var Dl,Qs,Mg,Wr,Hl=L(()=>{"use strict";G();Ve();D();Ir();Dl=[he("")];Wr=class extends(Mg=Ce){get type(){return"ext-inner"}constructor(t,e,r,n=[]){super(t,e,r,n),this.setAttribute("bracket",!1)}getTitle(){let t=this.firstChild.toString().trim(),e={halfParsed:!0},r=this.normalizeTitle(t,14,e);return r.valid&&r.ns===14?r:this.normalizeTitle(`Category:${t}`,0,e)}lint(t=this.getAbsoluteIndex()){{let e="no-ignored",r=v.lintConfig.getSeverity(e,"categorytree");if(r){let{link:n}=this;if(!n.valid||n.ns!==14)return[P(this,{start:t},e,"invalid-category",r)]}return super.lint(t,!1)}}};Qs=O(Mg),Wr=j(Qs,0,"CategorytreeToken",Dl,Wr),B(Qs,1,Wr)});var zl={};re(zl,{NowikiToken:()=>Js});var _g,Wg,jn,Xs,Js,Gl=L(()=>{"use strict";We();gn();G();pe();D();Nt();_g=Be(o=>new RegExp(String.raw`<\s*(?:/\s*)${o==="nowiki"?"":"?"}(${o})\b`,"giu")),Wg=new Set(["languages","section","templatestyles"]),Js=class extends fe{constructor(){super(...arguments);w(this,jn)}get type(){return"ext-inner"}lint(e=this.getAbsoluteIndex()){{let{name:r,innerText:n}=this,{lintConfig:i}=v,s="void-ext",a=i.getSeverity(s,r);if(a&&C(this,jn,Xs).call(this)){let l=P(this,{start:e},s,v.msg("nothing-in",r),a);return i.computeEditInfo&&(l.suggestions=[M(l)]),[l]}{s="invalid-json";let l=i.getSeverity(s),g=i.getSeverity(s,"duplicate");if(Yo.includes(r)&&(l||g))return(r==="templatedata"?la:da)(n).map(({message:u,from:d,to:p=d,line:f,endLine:c=f,column:h,endColumn:b=h,severity:T})=>{if(a=T==="warning"?g:l,!a)return!1;let x=new U(this,e);return{rule:s,message:u,severity:a,startIndex:e+d,endIndex:e+p,startLine:x.top+f-1,endLine:x.top+c-1,startCol:(f>1?0:x.left)+h-1,endCol:(c>1?0:x.left)+b-1}}).filter(u=>u!==!1)}return super.lint(e,_g(r))}}getAttribute(e){return e==="invalid"?C(this,jn,Xs).call(this):super.getAttribute(e)}};jn=new WeakSet,Xs=function(){let{name:e,firstChild:{data:r}}=this;return Wg.has(e)&&!!r}});var Dg,Vl,Ys,Ug,ut,Ns=L(()=>{"use strict";G();pe();D();bi();V();hi();Ci();Dg=new Set(["dynamicpagelist","templatedata","rss"]);Vl=[Fr()];ut=class extends(Ug=Ue){get type(){return"ext"}constructor(t,e,r,n,i=v.getConfig(),s=!1,a=[]){let l=t.toLowerCase(),g=new Ft(!e||/^\s/u.test(e)?e:` ${e}`,"ext-attrs",l,i,a),u={...i,ext:i.ext.filter(p=>p!==l),excludes:[...i.excludes],inExt:!0},d;switch(l){case"pre":if(g.getAttr("format")!=="wikitext"){let{PreToken:p}=(ol(),X(sl));d=new p(r,u,a);break}u.excludes.push("list");case"indicator":case"poem":case"ref":case"option":case"combooption":case"tab":case"tabs":case"poll":case"seo":case"langconvert":case"phonos":switch(l){case"poem":u.excludes.push("heading");break;case"langconvert":u.excludes.push("list");break;case"tab":u.ext=u.ext.filter(p=>p!=="tabs");break;case"ref":u.ext=u.ext.filter(p=>p!=="references")}d=new $(r,u,a);break;case"dynamicpagelist":{let{ParamTagToken:p}=(vs(),X(ll));d=new p(l,s,r,u,a);break}case"inputbox":{let{InputboxToken:p}=(Al(),X(vl));d=new p(l,s,r,u,a);break}case"references":{let{NestedToken:p}=(Pi(),X(Fi));u.excludes.push("heading"),d=new p(r,s,["ref"],u,a);break}case"choose":{let{NestedToken:p}=(Pi(),X(Fi));d=new p(r,/<(option|choicetemplate)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(\1)>)/gu,["option","choicetemplate"],u,a);break}case"combobox":{let{NestedToken:p}=(Pi(),X(Fi));d=new p(r,/<(combooption)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(combooption\s*)>)/giu,["combooption"],u,a);break}case"gallery":{let{GalleryToken:p}=(Pl(),X(Fl));d=new p(r,u,a);break}case"imagemap":{let{ImagemapToken:p}=(ql(),X(Ol));d=new p(r,u,a);break}case"hiero":{let{CommentedToken:p}=(Wl(),X(_l));d=new p(r,u,a);break}case"categorytree":{let{CategorytreeToken:p}=(Hl(),X(Ul));d=new p(r,void 0,u,a);break}default:{let{NowikiToken:p}=(Gl(),X(zl));d=new p(r,u,a)}}d.setAttribute("name",l),d.type==="plain"&&(d.type="ext-inner"),super(t,g,d,n,i,a),this.seal("closed",!0)}lintRef(t,e){var r;{let n=this.getAttr("name"),i=(r=this.innerText)==null?void 0:r.trim(),s="";return this.closest("ext#references")?n?i||(s="no-empty-in-references"):s="no-named-in-references":!n&&!i&&(s=this.hasAttr("details")?"ref-details":"ref-no-name"),s&&(t?P(this,t,"invalid-ref",s,e):s)}}lint(t=this.getAbsoluteIndex(),e){{let r=super.lint(t,e),{name:n}=this,{lintConfig:i}=v,s=new U(this,t);if(n!=="nowiki"){let a=this.inHtmlAttrs(),l="parsing-order",g=a&&i.getSeverity(l,a===2?"ext":"templateInTable");g&&r.push(P(this,s,l,"ext-in-html",g))}if(n==="ref"){let a="var-anchor",l=i.getSeverity(a,"ref");if(l&&this.closest("heading-title")&&r.push(P(this,s,a,"variable-anchor",l)),a="nested-link",l=i.getSeverity(a,"ref"),l&&this.closest("link-text,ext-link-text")&&r.push(P(this,s,a,"ref-in-link",l)),l=i.getSeverity("invalid-ref"),l){let g=this.lintRef(s,l);g&&r.push(g)}}else{let a="void-ext",l=i.getSeverity(a,n);l&&Dg.has(n)&&!this.innerText&&r.push(P(this,{start:t},a,v.msg("no-empty",n),l))}return r}}};Ys=O(Ug),ut=j(Ys,0,"ExtToken",Vl,ut),B(Ys,1,ut)});var Xe,jt,ht,Dr,Zs=L(()=>{"use strict";G();Ae();V();D();Dr=class extends ${constructor(e,r,n,i,s){super(void 0,i,s);w(this,Xe);w(this,jt);w(this,ht);this.insertAt(r),S(this,Xe,n),S(this,jt,e)}get closing(){return m(this,Xe)}toString(e){return`<${m(this,Xe)?"/":""}${m(this,jt)}${super.toString(e)}${this.selfClosing?"/":""}>`}text(e=""){let{closing:r}=this;return`<${r&&!e?"/":""}${m(this,jt)}${r?"":super.text()}${e}>`}getAttribute(e){return e==="padding"?m(this,jt).length+(m(this,Xe)?2:1):super.getAttribute(e)}findMatchingTag(){return ze(m(this,ht),()=>{let{type:e,name:r,parentNode:n,closing:i,selfClosing:s}=this,a=!1,l=!1;if(e==="html"){let[,c,h]=this.getAttribute("config").html;a=h.includes(r),l=c.includes(r)}if(a||l&&s)return this;if(!n)return;let{childNodes:g}=n,u=g.indexOf(this),d=i?g.slice(0,u).reverse():g.slice(u+1),p=[this],{rev:f}=Q;for(let c of d)if(!(!c.is(e)||e==="html"&&(c.name!==r||l&&c.selfClosing)))if(m(c,Xe)===i){if(e==="tvar")return;p.push(c)}else{let h=p.pop();if(h===this)return c;v.viewOnly&&(S(h,ht,[f,c]),S(c,ht,[f,h]))}if(v.viewOnly)for(let c of p)S(c,ht,[f,void 0])},e=>{S(this,ht,e),e[1]&&e[1]!==this&&S(e[1],ht,[Q.rev,this])})}print(){return super.print({pre:`&lt;${m(this,Xe)?"/":""}${m(this,jt)}`,post:`${this.selfClosing?"/":""}&gt;`})}json(e,r,n=this.getAbsoluteIndex()){{let i=super.json(void 0,r,n);return i.closing=m(this,Xe),i}}};Xe=new WeakMap,jt=new WeakMap,ht=new WeakMap});var Kl,eo,Hg,Ye,Ql=L(()=>{"use strict";$t();we();Zs();Lt();Kl=[Ie(),Z];Ye=class extends(Hg=Dr){get type(){return"tvar"}constructor(t,e,r,n,i){let s=new ye(e,"tvar-name",n,i);super(t,s,r,n,i)}};eo=O(Hg),Ye=j(eo,0,"TvarToken",Kl,Ye),B(eo,1,Ye)});var Xl={};re(Xl,{TranslateToken:()=>to});var Oi,Jl,to,Yl=L(()=>{"use strict";V();hi();Lt();Ql();to=class extends Ue{constructor(e,r,n,i=[]){let s=new ye(e,"translate-attr",n,i);r=r==null?void 0:r.replace(/<tvar(\|[^>]+)>([\s\S]*?)<\/>/gu,(l,g,u)=>(new Ye("tvar",g,!1,n,i),new Ye("","",!0,n,i),`\0${i.length-2}n${u}\0${i.length}n`)).replace(/<(tvar)(\s+name\s*=(?:\s*(?:(["'])[\s\S]*?\3|[^"'\s>]+))?\s*)>([\s\S]*?)<\/(tvar)(\s*)>/giu,(l,g,u,d,p,f,c)=>(new Ye(g,u,!1,n,i),new Ye(f,c,!0,n,i),`\0${i.length-2}n${p}\0${i.length}n`));let a=new $(r,n,i);a.type="translate-inner";super("translate",s,a,"translate",n,i);w(this,Oi);this.seal("closed",!0)}get type(){return"translate"}get selfClosing(){return!1}toString(e){return e?this.lastChild.toString(!0):super.toString()}text(){return this.lastChild.text()}print(){return`<span class="wpb-ext">&lt;translate${C(this,Oi,Jl).call(this)?'<span class="wpb-ext-attrs"> <span class="wpb-ext-attr"><span class="wpb-attr-key">nowrap</span></span></span>':""}&gt;${this.lastChild.print({class:"ext-inner"})}&lt;/translate&gt;</span>`}};Oi=new WeakSet,Jl=function(){return this.firstChild.toString()===" nowrap"}});var td={};re(td,{parseCommentAndExt:()=>tr});var ed,zg,ro,Gg,Zl,tr,$n=L(()=>{"use strict";We();oe();Da();Qt();za();Ns();Vs();ed="<onlyinclude>",zg="</onlyinclude>",{length:ro}=ed,Gg=[!1,!0].map(o=>{let t=o?"includeonly":"(?:no|only)include",e=o?"noinclude":"includeonly";return Be(r=>new RegExp(String.raw`<!--[\s\S]*?(?:-->|$)|<${t}(?:\s[^>]*)?/?>|</${t}\s*>|<(${r})(\s[^>]*?)?(?:/>|>([\s\S]*?)</(${"\\1"}\s*)>)|<(${e})(\s[^>]*?)?(?:/>|>([\s\S]*?)(?:</(${e}\s*)>|$))`,"giu"))}),Zl=o=>{let t=o.indexOf(ed);return{i:t,j:o.indexOf(zg,t+ro)}},tr=(o,t,e,r)=>{if(r){let{i:l,j:g}=Zl(o);if(l!==-1&&g!==-1){let u="",d=p=>{new me(p,t,e),u+=`\0${e.length-1}n`};for(;l!==-1&&g!==-1;){let p=`\0${e.length}g`;new Xt(o.slice(l+ro,g),t,e),l>0&&d(o.slice(0,l)),u+=p,o=o.slice(g+ro+1),{i:l,j:g}=Zl(o)}return o&&d(o),u}}let{ext:n}=t,i=n,s=t;if(n.includes("translate")){let{TranslateToken:l}=(Yl(),X(Xl)),g=[];i=n.filter(u=>u!=="translate"&&u!=="tvar"),s={...t,ext:i},o=o.replace(/<nowiki>[\s\S]*?<\/nowiki>/giu,u=>(g.push(u),`\0${g.length-1}`)).replace(/<translate( nowrap)?>([\s\S]*?)<\/translate>/gu,(u,d,p)=>{let f=e.length;return new l(d,p&&$e(p,g),s,e),`\0${f}g`}),o=$e(o,g)}let a=Gg[r?1:0](i.join("|"));return a.lastIndex=0,a.test(o)?o.replace(a,(l,g,u,d,p,f,c,h,b)=>{let T=e.length,x="n";if(g)x="e",new ut(g,u,d,p,s,f,e);else if(l.startsWith("<!--")){x="c";let y=l.endsWith("-->");new mt($e(l,e,1).slice(4,y?-3:void 0),y,t,e)}else f?new Yt(f,c&&$e(c,e,1),h&&$e(h,e,1),b,t,e):new me(l,t,e,!0);return`\0${T}${x}`}):o}});var Vg,Kg,Qg,rd,Ur,no,Jg,ar,nd=L(()=>{"use strict";G();pe();bi();D();Zs();Vg=new Set(["if","ifeq","ifexpr","ifexist","iferror","switch"]),Kg=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"]),Qg=new Set(["strike","big","center","font","tt"]);rd=[Fr()];ar=class extends(Jg=Dr){constructor(e,r,n,i,s,a){super(e,r,n,s,a);w(this,Ur);this.setAttribute("name",e.toLowerCase()),S(this,Ur,i)}get type(){return"html"}get selfClosing(){return m(this,Ur)}text(){let{closing:e,selfClosing:r,name:n}=this,[,,i]=this.getAttribute("config").html;return i.includes(n)?e&&n!=="br"?"":super.text("/"):super.text(r&&!e?"/":"")}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),{name:i,parentNode:s,closing:a,selfClosing:l}=this,g=new U(this,e),{lintConfig:u}=v,{computeEditInfo:d,fix:p}=u,f=this.inTableAttrs(),c="h1",h=u.getSeverity(c,"html");if(h&&i==="h1"&&!a){let A=P(this,g,c,"<h1>",h);d&&(A.suggestions=[{desc:"h2",range:[e+2,e+3],text:"2"}]),n.push(A)}if(c="parsing-order",h=f&&u.getSeverity(c,f===2?"html":"templateInTable"),h){let A=P(this,g,c,"html-in-table",h);d&&f===2&&(A.suggestions=[M(A)]),n.push(A)}if(c="obsolete-tag",h=u.getSeverity(c,i),h&&Qg.has(i)&&n.push(P(this,g,c,"obsolete-tag",h)),c="bold-header",h=u.getSeverity(c,i),h&&(i==="b"||i==="strong")&&this.isInside("heading-title")){let A=P(this,g,c,"bold-in-header",h);d&&(A.suggestions=[M(A)]),n.push(A)}let[,b,T]=this.getAttribute("config").html,x=T.includes(i),y=b.includes(i),k=!x&&!y;if(c="unmatched-tag",a&&(l||x)||l&&k){if(h=u.getSeverity(c,a?"both":"selfClosing"),h){let A=P(this,g,c,a?"closing-and-self-closing":"invalid-self-closing",h);if(d||p){let I=oi(e),E={desc:v.msg("no-self-closing"),range:[A.endIndex-2,A.endIndex-1],text:""};y?d&&(A.suggestions=[I,E]):a?A.fix=x?I:E:d&&(A.suggestions=[E,je(A.endIndex,`></${i}>`,-2)])}n.push(A)}}else if(!this.findMatchingTag()){let A=P(this,g,c,a?"unmatched-closing":"unclosed-tag"),I=this.closest("magic-word");if(I&&Vg.has(I.name))h=u.getSeverity(c,"conditional");else if(a)h=u.getSeverity(c,"closing"),A.suggestions=[M(A)];else{h=u.getSeverity(c,"opening");let E=s==null?void 0:s.childNodes;Kg.has(i)&&(E!=null&&E.slice(0,E.indexOf(this)).some(N=>N.is("html")&&N.name===i&&!N.findMatchingTag())&&(A.suggestions=[je(e+1,"/")]),this.isInside("heading-title")&&(A.rule="format-leakage",h=u.getSeverity("format-leakage",i)))}h&&(A.severity=h,n.push(A))}return n}}getAttribute(e){return e==="invalid"?this.inTableAttrs()===2:super.getAttribute(e)}json(e,r,n=this.getAbsoluteIndex()){{let i=super.json(void 0,r,n);return i.selfClosing=m(this,Ur),i}}};no=O(Jg),Ur=new WeakMap,ar=j(no,0,"HtmlToken",rd,ar),B(no,1,ar)});var id={};re(id,{parseHtml:()=>Yg});var Xg,Yg,sd=L(()=>{"use strict";Ci();nd();Xg=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,Yg=(o,t,e)=>{var s;let{html:r}=t;(s=t.htmlElements)!=null||(t.htmlElements=new Set([...r[0],...r[1],...r[2]]));let n=o.split("<"),i=n.shift();for(let a of n){let l=Xg.exec(a),g=l==null?void 0:l[2],u=g==null?void 0:g.toLowerCase();if(!l||!t.htmlElements.has(u)){i+=`<${a}`;continue}let[,d,,p="",f,c]=l,{length:h}=e,b=new Ft(p,"html-attrs",u,t,e),T=b.hasAttr("itemprop");if(u==="meta"&&!(T&&b.hasAttr("content"))||u==="link"&&!(T&&b.hasAttr("href"))){i+=`<${a}`,e.length=h;continue}i+=`\0${e.length}x${c}`,new ar(g,b,d==="/",f==="/>",t,e)}return i}});var Zg,od,io,ep,bt,so=L(()=>{"use strict";Ae();bi();D();V();Lt();Ci();Zg=o=>{let t=o.childNodes.map(r=>r.type==="text"?r.data.replace(/\|{1,2}/gu,({length:n})=>`{{${"!".repeat(n)}}}`):r.toString()).join(""),{childNodes:e}=v.parseWithRef(t,o,2);Q.run(()=>{o.safeReplaceChildren(e)})};od=[Fr(1)];bt=class extends(ep=$){constructor(t,e,r,n,i,s=[],a){super(void 0,i,s,a),this.append(new ye(e,"table-syntax",i,s),new Ft(n,"table-attrs",r,i,s))}escape(){for(let t of this.childNodes)t instanceof ye?Zg(t):t.escape()}};io=O(ep),bt=j(io,0,"TableBaseToken",od,bt),B(io,1,bt)});var ad,ld,Le,oo,Hr,On,lr,ao=L(()=>{"use strict";G();pe();gi();D();V();so();lr=class extends(ld=bt,ad=[Sr(!1)],ld){constructor(e,r,n,i=[]){var g;let s=/\||\0\d+!\x7F/u.exec(r!=null?r:""),a=s?r.slice(0,s.index):"";/\[\[|-\{/u.test(a)&&(s=null,a="");super(/^(?:\n[^\S\n]*(?:[|!]|\|\+|\{\{\s*!\s*\}\}\+?)|(?:\||\{\{\s*!\s*\}\}){2}|!!|\{\{\s*!!\s*\}\})$/u,e,"td",a,n,i);B(oo,5,this);w(this,Hr);w(this,Le,"");s&&([Zn(this,Le)._]=s);let l=new $(r==null?void 0:r.slice(((g=s==null?void 0:s.index)!=null?g:NaN)+m(this,Le).length),n,i);l.type="td-inner",l.setAttribute("stage",4),this.insertAt(l)}get type(){return"td"}get rowspan(){return this.getAttr("rowspan")}get colspan(){return this.getAttr("colspan")}get subtype(){return C(this,Hr,On).call(this).subtype}afterBuild(){m(this,Le).includes("\0")&&S(this,Le,this.buildFromStr(m(this,Le),0)),super.afterBuild()}toString(e){let[r,n,i]=this.childNodes;return r.toString(e)+n.toString(e)+m(this,Le)+i.toString(e)}text(){let[e,r,n]=this.childNodes;return e.text()+r.text()+m(this,Le)+n.text()}getGaps(e){return e===1?m(this,Le).length:0}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),i=new U(this,e+this.getRelativeIndex(this.length-1)),s="pipe-like",{lintConfig:a}=v,{computeEditInfo:l,fix:g}=a,u=["td","double"].map(d=>a.getSeverity(s,d));for(let d of this.lastChild.childNodes)if(d.type==="text"){let{data:p}=d;if(p.includes("|")){let f=p.includes("||"),c=u[f?1:0];if(c){let h=q(d,i,s,"pipe-in-table",c);if(l||g)if(f){let b={caption:"|+",td:"|",th:"!"}[this.subtype];h.fix=ve(h,"newline",p.replace(/\|\|/gu,`
20
+ ${b}`))}else l&&(h.suggestions=[di(h.startIndex,p)]);n.push(h)}}}return n}}isIndependent(){return this.firstChild.text().startsWith(`
21
+ `)}getAttr(e){{let r=super.getAttr(e);return e==="rowspan"||e==="colspan"?parseInt(r||"")||1:r}}escape(){super.escape(),this.childNodes[1].toString()&&(m(this,Le)||S(this,Le,"{{!}}")),m(this,Le)==="|"&&S(this,Le,"{{!}}")}print(){{let[e,r,n]=this.childNodes;return`<span class="wpb-td">${e.print()}${r.print()}${m(this,Le)}${n.print()}</span>`}}json(e,r,n=this.getAbsoluteIndex()){{let i=super.json(void 0,r,n),{rowspan:s,colspan:a}=this;return Object.assign(i,{subtype:this.subtype},s!==1&&{rowspan:s},a!==1&&{colspan:a}),i}}};oo=O(ld),Le=new WeakMap,Hr=new WeakSet,On=function(){var a;let e=this.firstChild.text(),r=e.slice(-1),n="td";if(r==="!"?n="th":r==="+"&&(n="caption"),this.isIndependent())return{subtype:n};let{previousSibling:i}=this;return{...C(a=i,Hr,On).call(a)}},On=j(oo,17,"#getSyntax",ad,Hr,On),ln(oo,lr)});var zr,lo=L(()=>{"use strict";G();D();so();ao();zr=class extends bt{lint(t=this.getAbsoluteIndex(),e){{let r=super.lint(t,e),n=this.childNodes.find(({type:l})=>l==="table-inter");if(!n)return r;let i=kr(n),s="fostered-content",a=i&&v.lintConfig.getSeverity(s,i===2?void 0:"transclusion");if(a){let l=q(n,{start:t},s,"content-outside-table",a);l.startIndex++,l.startLine++,l.startCol=0,r.push(l)}return r}}getRowCount(){return Number(this.childNodes.some(t=>t instanceof lr&&t.isIndependent()&&!t.firstChild.text().endsWith("+")))}}});var go,dd,ud,uo,Gr,gd=L(()=>{"use strict";G();Ae();pe();gi();D();lo();Lt();go=class extends Array{},Gr=class extends(ud=zr,dd=[Sr(!1)],ud){constructor(e,r,n,i){super(/^(?:\{\||\{\{\{\s*!\s*\}\}|\{\{\s*\(!\s*\}\})$/u,e,"table",r,n,i,{});B(uo,5,this)}get type(){return"table"}get closed(){return this.lastChild.is("table-syntax")}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),i=new U(this,e),s=["unclosed-table","table-layout"],a=s.map(l=>v.lintConfig.getSeverity(l));if(a[0]&&!this.closed&&n.push(q(this.firstChild,i,s[0],"unclosed-table",a[0])),a[1]){let l=this.getLayout(),{length:g}=l;if(g>1){let u=1,d=1/0,p=0;for(;p<g;p++){let f=l[p],c=f.length;if(c<u)break;c<d&&(d=c);let h=f.indexOf(f[c-1])+1;if(h>d)break;h>u&&(u=h)}if(p<g){let f=this.getNthRow(p),c=q(f,i,s[1],"inconsistent-table",a[1]);c.startIndex++,c.startLine++,c.startCol=0,n.push(c)}}}return n}}close(e=`
22
+ |}`,r){Q.run(()=>{let n=new ye(r?e:void 0,"table-syntax",this.getAttribute("config"),this.getAttribute("accum"));super.insertAt(n)})}getLayout(e){{let r=this.getAllRows(),{length:n}=r,i=go.from(cd(n,()=>[]));for(let s=0;s<i.length;s++){let a=i[s],l=0,g=0,u;for(let d of r[s].childNodes.slice(2))if(d.is("td")){if(d.isIndependent()&&(u=d.subtype!=="caption"),u){let p={row:s,column:l},{rowspan:f,colspan:c}=d;for(l++;a[g];)g++;for(let h=s;h<Math.min(s+f,n);h++)for(let b=g;b<g+c;b++)i[h][b]=p;g+=c}}else if(pd(d))break}return i}}getAllRows(){return[...super.getRowCount()?[this]:[],...this.childNodes.slice(1).filter(e=>e.is("tr")&&e.getRowCount()>0)]}getNthRow(e,r,n){{let i=super.getRowCount();if(e===0&&i)return this;i&&e--;for(let s of this.childNodes.slice(2)){let{type:a}=s;if(a==="tr"&&s.getRowCount()&&(e--,e<0))return s}return}}json(e,r,n=this.getAbsoluteIndex()){{let i=super.json(void 0,r,n);return i.closed=this.closed,i}}};uo=O(ud),j(uo,1,"getLayout",dd,Gr),ln(uo,Gr)});var qi,fd=L(()=>{"use strict";lo();qi=class extends zr{get type(){return"tr"}constructor(t,e,r,n){super(/^\n[^\S\n]*(?:\|-+|\{\{\s*!\s*\}\}-+|\{\{\s*!-\s*\}\}-*)$/u,t,"tr",e,r,n)}}});var Vr,po=L(()=>{"use strict";Nt();Vr=class extends fe{get indent(){return this.innerText.split(":").length-1}json(t,e,r=this.getAbsoluteIndex()){{let n=super.json(void 0,e,r),{indent:i}=this;return i&&(n.indent=i),n}}}});var Kr,co=L(()=>{"use strict";po();Kr=class extends Vr{get type(){return"dd"}}});var hd={};re(hd,{parseTable:()=>rp});var tp,md,rp,bd=L(()=>{"use strict";V();gd();fd();ao();co();tp=o=>o.lastChild.constructor!==$,md=(o,t)=>o.is("td")?t.pop():o,rp=({firstChild:{data:o},type:t,name:e},r,n)=>{let i=[],s=o.split(`
23
23
  `),a=t==="root"||t==="parameter-value"||t==="ext-inner"&&e==="poem"?"":`
24
- ${s.shift()}`,l,g=(u,d)=>{if(!d){a+=u;return}let{lastChild:p}=d;if(ep(d)){let f=new $(u,r,n);f.type="table-inter",f.setAttribute("stage",3),d.insertAt(f)}else p.setText(p.toString()+u)};for(let u of s){l=i.pop();let[d]=/^(?:\s|\0\d+[cno]\x7F)*/u.exec(u),p=u.slice(d.length),f=/^(:*)((?:\s|\0\d+[cn]\x7F)*)(\{\||\{(?:\0\d+[cn]\x7F)*\0\d+!\x7F|\0\d+\{\x7F)(.*)$/u.exec(p);if(f){for(;l&&!l.is("td");)l=i.pop();let[,y,k,A,I]=f;y&&new Kr(y,r,n),g(`
24
+ ${s.shift()}`,l,g=(u,d)=>{if(!d){a+=u;return}let{lastChild:p}=d;if(tp(d)){let f=new $(u,r,n);f.type="table-inter",f.setAttribute("stage",3),d.insertAt(f)}else p.setText(p.toString()+u)};for(let u of s){l=i.pop();let[d]=/^(?:\s|\0\d+[cno]\x7F)*/u.exec(u),p=u.slice(d.length),f=/^(:*)((?:\s|\0\d+[cn]\x7F)*)(\{\||\{(?:\0\d+[cn]\x7F)*\0\d+!\x7F|\0\d+\{\x7F)(.*)$/u.exec(p);if(f){for(;l&&!l.is("td");)l=i.pop();let[,y,k,A,I]=f;y&&new Kr(y,r,n),g(`
25
25
  ${d}${y&&`\0${n.length-1}d`}${k}\0${n.length}b`,l),i.push(...l?[l]:[],new Gr(A,I,r,n));continue}else if(!l){a+=`
26
26
  ${u}`;continue}let c=/^(?:(\|\}|\0\d+!\x7F\}|\0\d+\}\x7F)|(\|-+|\0\d+!\x7F-+|\0\d+-\x7F-*)(?!-)|(!|(?:\||\0\d+!\x7F)\+?))(.*)$/u.exec(p);if(!c){g(`
27
27
  ${u}`,l),i.push(l);continue}let[,h,b,T,x]=c;if(h){for(;!l.is("table");)l=i.pop();l.close(`
28
- ${d}${h}`,!0),g(x,i[i.length-1])}else if(b){l=hd(l,i),l.is("tr")&&(l=i.pop());let y=new ji(`
29
- ${d}${b}`,x,r,n);i.push(l,y),l.insertAt(y)}else{l=hd(l,i);let y=T==="!"?/!!|(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu:/(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu,k=y.exec(x),A=0,I=`
30
- ${d}${T}`,E=N=>{let z=new dr(I,x.slice(A,k==null?void 0:k.index),r,n);return N.insertAt(z),z};for(;k;)E(l),{lastIndex:A}=y,[I]=k,k=y.exec(x);i.push(l,E(l))}}return a.slice(1)}});var jt,po=L(()=>{"use strict";jt=o=>!/^_{2}.+_{2}$/u.test(o)});var Oi,yd=L(()=>{"use strict";$t();Oi=class extends fe{get type(){return"hr"}}});var Td,Qr,co,rp,ur,kd=L(()=>{"use strict";Et();Ve();$t();Td=[Ne(!0,!1),he("__")];ur=class extends(rp=fe){constructor(e,r,n,i,s){var u,d;super(e,i,s);w(this,Qr);let a=e.toLowerCase(),[,,l,g]=i.doubleUnderscore;this.setAttribute("name",(d=r?(u=g[e])==null?void 0:u.toLowerCase():l[a])!=null?d:a),S(this,Qr,n)}get type(){return"double-underscore"}toString(){let e=m(this,Qr)?"__":"__";return e+this.innerText+e}print(){{let e=m(this,Qr)?"__":"__";return super.print({pre:e,post:e})}}};co=O(rp),Qr=new WeakMap,ur=j(co,0,"DoubleUnderscoreToken",Td,ur),B(co,1,ur)});var vd={};re(vd,{parseHrAndDoubleUnderscore:()=>np});var np,Ad=L(()=>{"use strict";po();yd();kd();vs();np=({firstChild:{data:o},type:t,name:e},r,n)=>{var g,u,d;let[i,s,a]=r.doubleUnderscore,l=[...i,...s];return(g=r.insensitiveDoubleUnderscore)!=null||(r.insensitiveDoubleUnderscore=new Set(i.filter(jt))),(u=r.sensitiveDoubleUnderscore)!=null||(r.sensitiveDoubleUnderscore=new Set(s.filter(jt))),(d=r.regexHrAndDoubleUnderscore)!=null||(r.regexHrAndDoubleUnderscore=new RegExp(String.raw`^((?:\0\d+[cno]\x7F)*)(-{4,})|__(${l.filter(jt).join("|")})__|_{2}(${l.filter(p=>!jt(p)).map(p=>p.slice(2,-2)).join("|")})_{2}`,"gimu")),t!=="root"&&(t!=="ext-inner"||e!=="poem")&&(o=`\0${o}`),o=o.replace(r.regexHrAndDoubleUnderscore,(p,f,c,h,b)=>{var A;if(c)return new Oi(c,r,n),`${f}\0${n.length-1}r`;let T=h!=null?h:b,x=r.sensitiveDoubleUnderscore.has(T),y=T.toLowerCase(),k=r.insensitiveDoubleUnderscore.has(y);return x||k?(new ur(T,x,!!b,r,n),`\0${n.length-1}${k&&((A=a[y])!=null?A:y)==="toc"?"u":"n"}`):p}),r.excludes.includes("heading")||(o=o.replace(/^((?:\0\d+[cn]\x7F)*)(={1,6})(.+)\2((?:\s|\0\d+[cn]\x7F)*)$/gmu,(p,f,c,h,b)=>{let T=`${f}\0${n.length}h`;return new dt(c.length,[h,b],r,n),T})),t==="root"||t==="ext-inner"&&e==="poem"?o:o.slice(1)}});var Jr,qi,Sd=L(()=>{"use strict";G();pe();D();$t();qi=class extends fe{constructor(e,r,n,i){super(e,n,i);w(this,Jr);S(this,Jr,r)}get type(){return"quote"}get bold(){return this.innerText.length!==2}get italic(){return this.innerText.length!==3}get closing(){return{...this.bold?{bold:m(this,Jr).bold}:void 0,...this.italic?{italic:m(this,Jr).italic}:void 0}}text(){let{parentNode:e,innerText:r}=this;return e!=null&&e.is("image-parameter")&&e.name!=="caption"?"":r}lint(e=this.getAbsoluteIndex()){{let{previousSibling:r,bold:n,closing:i}=this,s=(r==null?void 0:r.type)==="text"?r.data:void 0,a=[],l=new U(this,e),g=["lonely-apos","bold-header"],{lintConfig:u}=v,{computeEditInfo:d}=u,p=[void 0,"word"].map(c=>u.getSeverity(g[0],c)),f=u.getSeverity(g[1]);if(s!=null&&s.endsWith("'")){let c=p[(i.bold||i.italic)&&/[a-z\d]'$/iu.test(s)?1:0];if(c){let h=P(this,l,g[0],v.msg("lonely","'"),c),{startLine:b,startCol:T}=h,[,{length:x}]=/(?:^|[^'])('+)$/u.exec(s),y=e-x,k={...h,startIndex:y,endIndex:e,endLine:b,startCol:T-x,endCol:T};d&&n&&(k.suggestions=[st(y,"&apos;",x),M(k)]),a.push(k)}}if(f&&n&&this.isInside("heading-title")){let c=P(this,l,g[1],"bold-in-header",f);d&&(c.suggestions=[M(c)]),a.push(c)}return a}}json(e,r,n=this.getAbsoluteIndex()){{let i=super.json(void 0,r,n);return Object.assign(i,{bold:this.bold,italic:this.italic}),i}}};Jr=new WeakMap});var wd={};re(wd,{parseQuotes:()=>fo});var fo,mo=L(()=>{"use strict";Sd();fo=(o,t,e,r)=>{var f;let n=o.split(/('{2,})/u),{length:i}=n;if(i===1)return o;let s=0,a=0,l,g,u;for(let c=1;c<i;c+=2){let h=n[c].length;switch(h){case 2:a++;break;case 4:n[c-1]+="'",n[c]="'''";case 3:if(s++,l!==void 0)break;n[c-1].endsWith(" ")?g===void 0&&u===void 0&&(u=c):n[c-1].slice(-2,-1)===" "?l=c:g!=null||(g=c);break;default:n[c-1]+="'".repeat(h-5),n[c]="'''''",a++,s++}}if(a%2===1&&s%2===1){let c=(f=l!=null?l:g)!=null?f:u;c!==void 0&&(n[c]="''",n[c-1]+="'")}let d=!1,p=!1;for(let c=1;c<i;c+=2){let h=n[c].length,b=h!==2,T=h!==3,x=new qi(n[c],{bold:b&&!!d,italic:T&&!!p},t,e);b&&(d=!d&&x),T&&(p=!p&&x),n[c]=`\0${e.length-1}q`}return n.join("")}});var Cd={};re(Cd,{parseExternalLinks:()=>ho});var ho,bo=L(()=>{"use strict";ae();Ds();Pi();ho=(o,t,e,r)=>{var n;return(n=t.regexExternalLinks)!=null||(t.regexExternalLinks=new RegExp(String.raw`\[((?:\0\d+[cn]\x7F)*(?:\0\d+f\x7F|(?:(?:${t.protocol}|//)${tt}|\0\d+m\x7F)${rt}(?=[[\]<>"\t${_e}]|\0\d)))([${_e}]*(?![${_e}]))([^\]\x01-\x08\x0A-\x1F\uFFFD]*)\]`,"giu")),o.replace(t.regexExternalLinks,(i,s,a,l)=>{let{length:g}=e,u=/&[lg]t;/u.exec(s);return u&&(a="",l=s.slice(u.index)+a+l,s=s.slice(0,u.index)),r?(new pt(s,"ext-link-url",t,e),`[\0${g}f${a}${l}]`):(new ft(s,a,l,t,e),`\0${g}w`)})}});var Mi,Ld=L(()=>{"use strict";Ir();ae();Mi=class extends Ce{get type(){return"category"}get sortkey(){{let[,t]=this.childNodes;return t&&Ut(t.text())}}json(t,e,r=this.getAbsoluteIndex()){{let n=super.json(void 0,e,r),{sortkey:i}=this;return i&&(n.sortkey=i),n}}}});var $d={};re($d,{parseLinks:()=>Ed});var ip,Ed,Nd=L(()=>{"use strict";ae();D();mo();bo();qs();Is();Ld();ip=/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(\||\0\d+!\x7F)([\s\S]*)$/u,Ed=(o,t,e,r,n)=>{var l;(l=t.regexLinks)!=null||(t.regexLinks=new RegExp(String.raw`^\s*(?:${t.protocol}|//)`,"iu"));let i=t.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,s=o.split("[["),a=s.shift();for(let g=0;g<s.length;g++){let u=!1,d,p,f,c,h=s[g],b=i.exec(h);if(b)[,d,p,f,c]=b,c.startsWith("]")&&(f!=null&&f.includes("["))&&(f+="]",c=c.slice(1));else{let I=ip.exec(h);I&&(u=!0,[,d,p,f]=I)}if(d===void 0||t.regexLinks.test(d)||/\0\d+[exhbru]\x7F/u.test(d)){a+=`[[${h}`;continue}let T=se(d).trim(),x=T.startsWith(":");if(x&&u){a+=`[[${h}`;continue}else!T&&f&&!f.includes(`
31
- `)&&(T=se(f).trim());let{ns:y,valid:k}=v.normalizeTitle(T,0,!1,t,{halfParsed:!0,temporary:!0,decode:!0,selfLink:!0,page:r});if(k){if(u){if(y!==6){a+=`[[${h}`;continue}let I=!1;for(g++;g<s.length;g++){let E=s[g],N=E.split("]]");if(N.length>2){I=!0,f+=`[[${N[0]}]]${N[1]}`,c=N.slice(2).join("]]");break}else if(N.length===2)f+=`[[${N[0]}]]${N[1]}`;else{f+=`[[${E}`;break}}if(f=Ed(f,t,e,r,n),!I){a+=`[[${d}${p}${f}`;continue}}}else{a+=`[[${h}`;continue}f&&(f=fo(f,t,e,n));let A=_r;x||(y===6?(f&&(f=ho(f,t,e,!0)),A=Mr):y===14&&(A=Mi)),f===void 0&&p&&(f=""),a+=`\0${e.length}l${c}`,new A(d,f,t,e,p)}return a}});var Bd={};re(Bd,{parseMagicLinks:()=>sp});var Pd,Id,Fd,Rd,sp,jd=L(()=>{"use strict";ae();Pi();Pd=String.raw`[${_e}\t]|&nbsp;|&#0*160;|&#x0*a0;`,Id=`(?:${Pd})+`,Fd=`(?:${Pd}|-)`,Rd=String.raw`(?:RFC|PMID)${Id}\d+\b|ISBN${Id}(?:97[89]${Fd}?)?(?:\d${Fd}?){9}[\dx]\b`,sp=(o,t,e)=>{if(!t.regexMagicLinks)try{t.regexMagicLinks=new RegExp(String.raw`(^|[^\p{L}\p{N}_])(?:(?:${t.protocol})(${tt}${rt})|${Rd})`,"giu")}catch{t.regexMagicLinks=new RegExp(String.raw`(^|\W)(?:(?:${t.protocol})(${tt}${rt})|${Rd})`,"giu")}return o.replace(t.regexMagicLinks,(r,n,i)=>{let s=n?r.slice(n.length):r;if(i){let a="",l=/&(?:[lg]t|nbsp|#x0*(?:3[ce]|a0)|#0*(?:6[02]|160));/iu.exec(s);l&&(a=s.slice(l.index),s=s.slice(0,l.index));let g=s.includes("(")?/[^,;\\.:!?][,;\\.:!?]+$/u:/[^,;\\.:!?)][,;\\.:!?)]+$/u,u=g.exec(s);if(u){let d=1;u[0][1]===";"&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(s.slice(0,u.index))&&(d=2),a=s.slice(u.index+d)+a,s=s.slice(0,u.index+d)}return a.length>=i.length?r:(new pt(s,void 0,t,e),`${n}\0${e.length-1}w${a}`)}else if(!/^(?:RFC|PMID|ISBN)/u.test(s))return r;return new pt(s,"magic-link",t,e),`${n}\0${e.length-1}i`})}});var Od,qd=L(()=>{"use strict";Od=(o,t)=>o.startsWith(t)?t.length:[...t].findIndex((e,r)=>e!==o[r])});var op,_i,Md=L(()=>{"use strict";G();D();uo();op=new Set(["link","category","file"]),_i=class extends Vr{get type(){return"list"}lint(t=this.getAbsoluteIndex()){var e;{let r="syntax-like",n=v.lintConfig.getSeverity(r,"redirect"),{innerText:i}=this;if(n&&i==="#"){let{nextSibling:s}=this;if((s==null?void 0:s.type)==="text"&&op.has((e=s.nextSibling)==null?void 0:e.type)&&new RegExp(String.raw`^(?:${this.getAttribute("config").redirection.join("|")})\s*(?::\s*)?$`,"iu").test(`#${s.data}`)){let l=P(s,{start:t+1},r,"redirect-like",n);return l.startIndex--,l.startCol--,l.endIndex+=2,l.endCol+=2,[l]}}return[]}}}});var _d={};re(_d,{parseList:()=>ap});var ap,Wd=L(()=>{"use strict";qd();Md();go();ap=(o,t,e,r)=>{let n=/^((?:\0\d+[cno]\x7F)*)([;:*#]+)(\s*)/u.exec(o);if(!n)return t.lastPrefix="",o;let[i,s,a,l]=n,g=a.replace(/;/gu,":"),u=Od(g,t.lastPrefix),d=((u>1?a.slice(u-1):a)+l).split(/(?=;)/u),p=d[0].startsWith(";"),f=d.length-(p?0:1);if(u>1){let _=a.slice(0,u-1);if(p){let Y=_.split(/(?=;)/u);d.unshift(...Y),f+=_.includes(";")?Y.length:0}else d[0]=_+d[0]}t.lastPrefix=g;let c=s+d.map((_,Y)=>`\0${r.length+Y}d`).join("")+o.slice(i.length);for(let _ of d)new _i(_,e,r);if(!f)return c;let[h,,b]=e.html,T=/:+|-\{|\0\d+[xq]\x7F/gu,x=T,y=x.exec(c),k=0,A=!1,I=!1,E=0,N=(_,Y)=>(new Kr(_,e,r),`${c.slice(0,Y)}\0${r.length-1}d${c.slice(Y+_.length)}`),z=_=>{_?k&&k--:k++};for(;y&&f;){let{0:_,index:Y}=y;if(_==="-{"){if(!E){let{lastIndex:W}=x;x=/-\{|\}-/gu,x.lastIndex=W}E++}else if(_==="}-"){if(E--,!E){let{lastIndex:W}=x;x=T,x.lastIndex=W}}else if(_.endsWith("x")){let{name:W,closing:F,selfClosing:R}=r[Number(_.slice(1,-2))];(h.includes(W)||!R&&!b.includes(W))&&z(F)}else if(_.endsWith("q")){let{bold:W,italic:F}=r[Number(_.slice(1,-2))];W&&(z(A),A=!A),F&&(z(I),I=!I)}else if(k===0){if(_.length>=f)return N(_.slice(0,f),Y);f-=_.length,x.lastIndex=Y+4+String(r.length).length,c=N(_,Y)}y=x.exec(c)}return c}});var xo,Dd,Ze,yo,lp,gr,Ud=L(()=>{"use strict";G();pe();yn();we();D();V();wt();xo=new Set(["A","T","R","D","-","H","N"]);Dd=[St(),Z];gr=class extends(lp=$){constructor(e,r,n=[]){super(void 0,r,n,{});w(this,Ze);this.safeAppend(e.map(i=>new ce(i,"converter-flag",r,n)))}get type(){return"converter-flags"}afterBuild(){S(this,Ze,this.childNodes.map(e=>e.text().trim())),super.afterBuild()}toString(e){return super.toString(e,";")}text(){return super.text(";")}getUnknownFlags(){return new Set(m(this,Ze).filter(e=>/\{{3}[^{}]+\}{3}/u.test(e)))}getVariantFlags(){let e=new Set(this.getAttribute("config").variants);return new Set(m(this,Ze).filter(r=>e.has(r)))}isInvalidFlag(e,r,n){if(typeof e=="object"){let i=new Set(this.getAttribute("config").variants);e=e.text().trim(),r=m(this,Ze).some(s=>i.has(s))?i:new Set,n=this.getUnknownFlags()}return!!e&&!r.has(e)&&!n.has(e)&&(r.size>0||!xo.has(e))}lint(e=this.getAbsoluteIndex(),r){{let n=this.getVariantFlags(),i=this.getUnknownFlags(),s=m(this,Ze).filter(c=>!c).length,a=m(this,Ze).length-i.size-s,{lintConfig:l}=v,{computeEditInfo:g,fix:u}=l,d=super.lint(e,r);if(n.size===a||m(this,Ze).filter(c=>xo.has(c)).length===a)return d;let p="no-ignored",f=l.getSeverity(p,"conversionFlag");if(f){let c=new U(this,e);for(let h=0;h<this.length;h++){let b=this.childNodes[h],T=b.text().trim();if(this.isInvalidFlag(T,n,i)){let x=q(b,c,p,"invalid-conversion-flag",f);(g||u)&&(n.size===0&&xo.has(T.toUpperCase())?x.fix=oi(x,T):g&&(x.suggestions=[M(x,h&&-1)])),d.push(x)}}}return d}}print(){return super.print({sep:";"})}};yo=O(lp),Ze=new WeakMap,gr=j(yo,0,"ConverterFlagsToken",Dd,gr),B(yo,1,gr)});var To,Hd,ko,dp,xt,zd=L(()=>{"use strict";we();D();V();wt();To=(o,t,e,r)=>{let n=new $(o,e,r);return n.type=`converter-rule-${t}`,n.setAttribute("stage",11),n};Hd=[Z];xt=class extends(dp=$){get type(){return"converter-rule"}get variant(){var t,e;return(e=(t=this.childNodes[this.length-2])==null?void 0:t.text().trim().toLowerCase())!=null?e:""}constructor(t,e=!0,r=v.getConfig(),n=[]){super(void 0,r,n,{});let i=t.indexOf(":"),s=t.slice(0,i).indexOf("=>"),a=s===-1?t.slice(0,i):t.slice(s+2,i);e&&r.variants.includes(a.trim().toLowerCase())?(super.insertAt(new ce(a,"converter-rule-variant",r,n)),super.insertAt(To(t.slice(i+1),"to",r,n)),s!==-1&&super.insertAt(To(t.slice(0,s),"from",r,n),0)):super.insertAt(To(t,"to",r,n))}toString(t){let{childNodes:e,firstChild:r,lastChild:n}=this;return e.length===3?`${r.toString(t)}=>${e[1].toString(t)}:${n.toString(t)}`:super.toString(t,":")}text(){let{childNodes:t,firstChild:e,lastChild:r}=this;return t.length===3?`${e.text()}=>${t[1].text()}:${r.text()}`:super.text(":")}getGaps(t){return t===0&&this.length===3?2:1}print(){{let{childNodes:t}=this;if(t.length===3){let[e,r,n]=t;return`<span class="wpb-converter-rule">${e.print()}=>${r.print()}:${n.print()}</span>`}return super.print({sep:":"})}}json(t,e,r=this.getAbsoluteIndex()){{let n=super.json(void 0,e,r);return n.variant=this.variant,n}}};ko=O(dp),xt=j(ko,0,"ConverterRuleToken",Hd,xt),B(ko,1,xt)});var Gd,vo,up,pr,Vd=L(()=>{"use strict";ae();Ve();we();V();Ud();zd();Gd=[Z,he("-{")];pr=class extends(up=$){get type(){return"converter"}constructor(t,e,r,n=[]){super(void 0,r,n),this.insertAt(new gr(t,r,n));let[i]=e,s=i.includes(":"),a=new xt(i,s,r,n);(s?a.length===1:e.length===2&&!se(e[1]).trim())?this.insertAt(new xt(e.join(";"),!1,r,n)):this.safeAppend([a,...e.slice(1).map(l=>new xt(l,!0,r,n))])}toString(t){let[e,...r]=this.childNodes;return`-{${e.toString(t)}${e.length>0?"|":""}${r.map(n=>n.toString(t)).join(";")}}-`}text(){let[t,...e]=this.childNodes;return`-{${t.text()}|${Pe(e,";")}}-`}getGaps(t){return t||this.firstChild.length>0?1:0}print(){{let[t,...e]=this.childNodes;return`<span class="wpb-converter">-{${t.print()}${t.length>0?"|":""}${it(e,{sep:";"})}}-</span>`}}};vo=O(up),pr=j(vo,0,"ConverterToken",Gd,pr),B(vo,1,pr)});var Kd={};re(Kd,{parseConverter:()=>gp});var gp,Qd=L(()=>{"use strict";Vd();gp=(o,t,e)=>{var l;(l=t.regexConverter)!=null||(t.regexConverter=new RegExp(String.raw`;(?=(?:[^;]*?=>)?\s*(?:${t.variants.join("|")})\s*:|(?:\s|\0\d+[cn]\x7F)*$)`,"iu"));let r=/-\{/gu,n=/-\{|\}-/gu,i=[],s=r,a=s.exec(o);for(;a;){let{0:g,index:u}=a;if(g==="}-"){let d=i.pop(),{length:p}=e,f=o.slice(d.index+2,u),c=f.indexOf("|"),[h,b]=c===-1?[[],f]:[f.slice(0,c).split(";"),f.slice(c+1)],T=b.replace(/(&[#a-z\d]+);/giu,"$1"),x=T.split(t.regexConverter).map(y=>y.replace(/\x01/gu,";"));new pr(h,x,t,e),o=`${o.slice(0,d.index)}\0${p}v${o.slice(u+2)}`,i.length===0&&(s=r),s.lastIndex=d.index+3+String(p).length}else i.push(a),s=n,s.lastIndex=u+2;a=s.exec(o)}return o}});var Wi={};re(Wi,{Token:()=>$});var pp,qn,Fe,ne,ie,Xr,Yr,Mn,Zr,te,Jd,Xd,Yd,Zd,eu,tu,ru,nu,iu,su,ou,au,Ao,$,V=L(()=>{"use strict";ae();G();Ae();D();Aa();Ia();pp=["category","html-attr#id,ext-attr#id,table-attr#id"],Ao=class Ao extends Gt{constructor(e,r=v.getConfig(),n=[],i){super();w(this,te);w(this,qn,"plain");w(this,Fe,0);w(this,ne);w(this,ie);w(this,Xr);w(this,Yr,!1);w(this,Mn);w(this,Zr);typeof e=="string"&&this.insertAt(e),S(this,ne,r),S(this,ie,n),n.push(this)}get type(){return m(this,qn)}set type(e){S(this,qn,e)}get pageName(){return m(this.getRootNode(),Zr)}set pageName(e){if(e){let r=this.normalizeTitle(e,0,{temporary:!0,page:""});S(this,Zr,r.valid?r.title:void 0)}else S(this,Zr,e===""?"":void 0)}parseOnce(e=m(this,Fe),r=!1,n){if(e<m(this,Fe)||this.length!==1||!this.isPlain())return this;if(m(this,Fe)>=11)return this;switch(e){case 0:if(this.type==="root"){m(this,ie).pop();let i=C(this,te,Jd).call(this);r&&(r=!i)}S(this,Xr,r),C(this,te,Xd).call(this,r);break;case 1:C(this,te,Yd).call(this);break;case 2:C(this,te,Zd).call(this);break;case 3:C(this,te,eu).call(this);break;case 4:C(this,te,tu).call(this);break;case 5:C(this,te,ru).call(this,n);break;case 6:C(this,te,nu).call(this,n);break;case 7:C(this,te,iu).call(this);break;case 8:C(this,te,su).call(this);break;case 9:C(this,te,ou).call(this);break;case 10:C(this,te,au).call(this)}if(this.type==="root")for(let i of m(this,ie))i==null||i.parseOnce(e,r,n);return Yn(this,Fe)._++,this}buildFromStr(e,r){let n=e.split(/[\0\x7F]/u).map((i,s)=>{if(s%2===0)return i&&new Sn(i);let a=Number(i.slice(0,-1));return m(this,ie)[a]}).filter(i=>i!=="");return r===0?n.map(String).join(""):r===1?Pe(n):n}build(){S(this,Fe,11);let{length:e,firstChild:r}=this,n=r==null?void 0:r.toString();if(e===1&&r.type==="text"&&n.includes("\0")&&(Vt(this,0,1,this.buildFromStr(n)),this.type==="root"))for(let i of m(this,ie))i==null||i.build()}afterBuild(){if(this.type==="root")for(let e of m(this,ie))e==null||e.afterBuild();S(this,Yr,!0)}parse(e=11,r,n){for(e=Math.min(e,11);m(this,Fe)<e;)this.parseOnce(m(this,Fe),r,n);return e&&(this.build(),this.afterBuild()),this}isPlain(){return this.constructor===Ao}getAttribute(e){var r;switch(e){case"config":return m(this,ne);case"include":return(r=m(this,Xr))!=null?r:!!m(this.getRootNode(),Xr);case"accum":return m(this,ie);case"built":return m(this,Yr);case"stage":return m(this,Fe);case"invalid":return this.type==="table-inter"&&kr(this)===2;default:return super.getAttribute(e)}}setAttribute(e,r){e==="stage"?(m(this,Fe)===0&&this.type==="root"&&m(this,ie).shift(),S(this,Fe,r)):super.setAttribute(e,r)}insertAt(e,r=this.length){let n=typeof e=="string"?new Sn(e):e,{length:i}=this;r+=r<0?i:0,super.insertAt(n,r);let{type:s}=n;return s==="root"&&(n.type="plain"),n}normalizeTitle(e,r=0,n){return v.normalizeTitle(e,r,this.getAttribute("include"),m(this,ne),{page:this.pageName,...n})}inTableAttrs(){var e;return this.isInside("table-attrs")&&((e=this.closest("table-attrs,arg,parameter"))!=null&&e.is("table-attrs")?2:1)}inHtmlAttrs(){return this.isInside("html-attrs")?2:this.inTableAttrs()}lint(e=this.getAbsoluteIndex(),r){var n;{let{lintConfig:i}=v,{computeEditInfo:s,fix:a,ignoreDisables:l,configurationComment:g}=i,u=super.lint(e,r);if(this.type==="root"){let d=new Map,p="no-duplicate",f=["category","id"].map(b=>i.getSeverity(p,b)),c=this.toString(),h=pp.filter((b,T)=>f[T]).join();if(h){for(let b of this.querySelectorAll(h)){let T;if(b.is("category"))T=b.name;else{let x=b.getValue();x&&(T=`#${x}`)}if(T){let x=d.get(T);x?x.add(b):d.set(T,new Set([b]))}}for(let[b,T]of d)if(T.size>1&&!b.startsWith("#mw-customcollapsible-")){let x=!b.startsWith("#"),y=`duplicate-${x?"category":"id"}`,k=f[x?0:1];u.push(...[...T].map(A=>{let I=P(A,{start:A.getAbsoluteIndex()},p,y,k);return s&&x&&(I.suggestions=[M(I)]),I}))}}if(!l){let b=new RegExp(String.raw`<!--\s*${g}-(disable(?:(?:-next)?-line)?|enable)(\s[\sa-z,-]*)?-->`,"gu"),T=[],x=b.exec(c);for(;x;){let{1:y,index:k}=x,A=(n=x[2])==null?void 0:n.trim(),I;(y==="disable-line"||y==="disable-next-line")&&(I=this.posFromIndex(k).top+(y==="disable-line"?0:1)),T.push({line:I,from:y==="disable"?b.lastIndex:void 0,to:y==="enable"?b.lastIndex:void 0,rules:A?new Set(A.split(",").map(E=>E.trim())):void 0}),x=b.exec(c)}u=u.filter(({rule:y,startLine:k,startIndex:A})=>{let I={pos:0};for(let{line:E,from:N,to:z,rules:_}of T){if(E&&E>k+1)break;if(_&&!_.has(y))continue;if(E===k)return!1;N<=A&&N>I.pos?(I.pos=N,I.type="from"):z<=A&&z>I.pos&&(I.pos=z,I.type="to")}return I.type!=="from"})}if(a&&u.some(({fix:b})=>b)){let b=u.map(({fix:y})=>y).filter(y=>y!==void 0).sort(({range:[y,k]},{range:[A,I]})=>k===I?A-y:I-k),T=1/0,x=c;for(let{range:[y,k],text:A}of b)k<=T&&(x=x.slice(0,y)+A+x.slice(k),T=y);Object.assign(u,{output:x})}if(!s)for(let b of u)delete b.fix,delete b.suggestions}return u}}toString(e,r){return e?super.toString(!0,r):ze(m(this,Mn),()=>super.toString(!1,r),n=>{let i=this.getRootNode();i.type==="root"&&m(i,Yr)&&S(this,Mn,n)})}};qn=new WeakMap,Fe=new WeakMap,ne=new WeakMap,ie=new WeakMap,Xr=new WeakMap,Yr=new WeakMap,Mn=new WeakMap,Zr=new WeakMap,te=new WeakSet,Jd=function(){let{parseRedirect:e}=(Wa(),X(_a)),r=this.firstChild.toString(),n=e(r,m(this,ne),m(this,ie));return n!==!1&&this.setText(n),!!n},Xd=function(e){let{parseCommentAndExt:r}=($n(),X(rd));this.setText(r(this.firstChild.toString(),m(this,ne),m(this,ie),e))},Yd=function(){let{parseBraces:e}=(Ni(),X(vl)),r=this.type==="root"?this.firstChild.toString():`\0${this.firstChild.toString()}`,n=e(r,m(this,ne),m(this,ie));this.setText(this.type==="root"?n:n.slice(1))},Zd=function(){if(m(this,ne).excludes.includes("html"))return;let{parseHtml:e}=(od(),X(sd));this.setText(e(this.firstChild.toString(),m(this,ne),m(this,ie)))},eu=function(){if(m(this,ne).excludes.includes("table"))return;let{parseTable:e}=(xd(),X(bd));this.setText(e(this,m(this,ne),m(this,ie)))},tu=function(){if(m(this,ne).excludes.includes("hr"))return;let{parseHrAndDoubleUnderscore:e}=(Ad(),X(vd));this.setText(e(this,m(this,ne),m(this,ie)))},ru=function(e){let{parseLinks:r}=(Nd(),X($d));this.setText(r(this.firstChild.toString(),m(this,ne),m(this,ie),this.pageName,e))},nu=function(e){let{parseQuotes:r}=(mo(),X(wd)),n=this.firstChild.toString().split(`
28
+ ${d}${h}`,!0),g(x,i[i.length-1])}else if(b){l=md(l,i),l.is("tr")&&(l=i.pop());let y=new qi(`
29
+ ${d}${b}`,x,r,n);i.push(l,y),l.insertAt(y)}else{l=md(l,i);let y=T==="!"?/!!|(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu:/(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu,k=y.exec(x),A=0,I=`
30
+ ${d}${T}`,E=N=>{let z=new lr(I,x.slice(A,k==null?void 0:k.index),r,n);return N.insertAt(z),z};for(;k;)E(l),{lastIndex:A}=y,[I]=k,k=y.exec(x);i.push(l,E(l))}}return a.slice(1)}});var Mi,xd=L(()=>{"use strict";Nt();Mi=class extends fe{get type(){return"hr"}}});var yd,Qr,fo,np,dr,Td=L(()=>{"use strict";$t();Ve();Nt();yd=[Ie(!0,!1),he("__")];dr=class extends(np=fe){constructor(e,r,n,i,s){var u,d;super(e,i,s);w(this,Qr);let a=e.toLowerCase(),[,,l,g]=i.doubleUnderscore;this.setAttribute("name",(d=r?(u=g[e])==null?void 0:u.toLowerCase():l[a])!=null?d:a),S(this,Qr,n)}get type(){return"double-underscore"}toString(){let e=m(this,Qr)?"__":"__";return e+this.innerText+e}print(){{let e=m(this,Qr)?"__":"__";return super.print({pre:e,post:e})}}};fo=O(np),Qr=new WeakMap,dr=j(fo,0,"DoubleUnderscoreToken",yd,dr),B(fo,1,dr)});var kd={};re(kd,{parseHrAndDoubleUnderscore:()=>ip});var ip,vd=L(()=>{"use strict";ei();xd();Td();Ss();ip=({firstChild:{data:o},type:t,name:e},r,n)=>{var g,u,d;let[i,s,a]=r.doubleUnderscore,l=[...i,...s];return(g=r.insensitiveDoubleUnderscore)!=null||(r.insensitiveDoubleUnderscore=new Set(i.filter(At))),(u=r.sensitiveDoubleUnderscore)!=null||(r.sensitiveDoubleUnderscore=new Set(s.filter(At))),(d=r.regexHrAndDoubleUnderscore)!=null||(r.regexHrAndDoubleUnderscore=new RegExp(String.raw`^((?:\0\d+[cno]\x7F)*)(-{4,})|__(${l.filter(At).join("|")})__|_{2}(${l.filter(p=>!At(p)).map(p=>p.slice(2,-2)).join("|")})_{2}`,"gimu")),t!=="root"&&(t!=="ext-inner"||e!=="poem")&&(o=`\0${o}`),o=o.replace(r.regexHrAndDoubleUnderscore,(p,f,c,h,b)=>{var A;if(c)return new Mi(c,r,n),`${f}\0${n.length-1}r`;let T=h!=null?h:b,x=r.sensitiveDoubleUnderscore.has(T),y=T.toLowerCase(),k=r.insensitiveDoubleUnderscore.has(y);return x||k?(new dr(T,x,!!b,r,n),`\0${n.length-1}${k&&((A=a[y])!=null?A:y)==="toc"?"u":"n"}`):p}),r.excludes.includes("heading")||(o=o.replace(/^((?:\0\d+[cn]\x7F)*)(={1,6})(.+)\2((?:\s|\0\d+[cn]\x7F)*)$/gmu,(p,f,c,h,b)=>{let T=`${f}\0${n.length}h`;return new dt(c.length,[h,b],r,n),T})),t==="root"||t==="ext-inner"&&e==="poem"?o:o.slice(1)}});var Jr,_i,Ad=L(()=>{"use strict";G();pe();D();Nt();_i=class extends fe{constructor(e,r,n,i){super(e,n,i);w(this,Jr);S(this,Jr,r)}get type(){return"quote"}get bold(){return this.innerText.length!==2}get italic(){return this.innerText.length!==3}get closing(){return{...this.bold?{bold:m(this,Jr).bold}:void 0,...this.italic?{italic:m(this,Jr).italic}:void 0}}text(){let{parentNode:e,innerText:r}=this;return e!=null&&e.is("image-parameter")&&e.name!=="caption"?"":r}lint(e=this.getAbsoluteIndex()){{let{previousSibling:r,bold:n,closing:i}=this,s=(r==null?void 0:r.type)==="text"?r.data:void 0,a=[],l=new U(this,e),g=["lonely-apos","bold-header"],{lintConfig:u}=v,{computeEditInfo:d}=u,p=[void 0,"word"].map(c=>u.getSeverity(g[0],c)),f=u.getSeverity(g[1]);if(s!=null&&s.endsWith("'")){let c=p[(i.bold||i.italic)&&/[a-z\d]'$/iu.test(s)?1:0];if(c){let h=P(this,l,g[0],v.msg("lonely","'"),c),{startLine:b,startCol:T}=h,[,{length:x}]=/(?:^|[^'])('+)$/u.exec(s),y=e-x,k={...h,startIndex:y,endIndex:e,endLine:b,startCol:T-x,endCol:T};d&&n&&(k.suggestions=[st(y,"&apos;",x),M(k)]),a.push(k)}}if(f&&n&&this.isInside("heading-title")){let c=P(this,l,g[1],"bold-in-header",f);d&&(c.suggestions=[M(c)]),a.push(c)}return a}}json(e,r,n=this.getAbsoluteIndex()){{let i=super.json(void 0,r,n);return Object.assign(i,{bold:this.bold,italic:this.italic}),i}}};Jr=new WeakMap});var Sd={};re(Sd,{parseQuotes:()=>mo});var mo,ho=L(()=>{"use strict";Ad();mo=(o,t,e,r)=>{var f;let n=o.split(/('{2,})/u),{length:i}=n;if(i===1)return o;let s=0,a=0,l,g,u;for(let c=1;c<i;c+=2){let h=n[c].length;switch(h){case 2:a++;break;case 4:n[c-1]+="'",n[c]="'''";case 3:if(s++,l!==void 0)break;n[c-1].endsWith(" ")?g===void 0&&u===void 0&&(u=c):n[c-1].slice(-2,-1)===" "?l=c:g!=null||(g=c);break;default:n[c-1]+="'".repeat(h-5),n[c]="'''''",a++,s++}}if(a%2===1&&s%2===1){let c=(f=l!=null?l:g)!=null?f:u;c!==void 0&&(n[c]="''",n[c-1]+="'")}let d=!1,p=!1;for(let c=1;c<i;c+=2){let h=n[c].length,b=h!==2,T=h!==3,x=new _i(n[c],{bold:b&&!!d,italic:T&&!!p},t,e);b&&(d=!d&&x),T&&(p=!p&&x),n[c]=`\0${e.length-1}q`}return n.join("")}});var wd={};re(wd,{parseExternalLinks:()=>bo});var bo,xo=L(()=>{"use strict";oe();Hs();ji();bo=(o,t,e,r)=>{var n;return(n=t.regexExternalLinks)!=null||(t.regexExternalLinks=new RegExp(String.raw`\[((?:\0\d+[cn]\x7F)*(?:\0\d+f\x7F|(?:(?:${t.protocol}|//)${tt}|\0\d+m\x7F)${rt}(?=[[\]<>"\t${_e}]|\0\d)))([${_e}]*(?![${_e}]))([^\]\x01-\x08\x0A-\x1F\uFFFD]*)\]`,"giu")),o.replace(t.regexExternalLinks,(i,s,a,l)=>{let{length:g}=e,u=/&[lg]t;/u.exec(s);return u&&(a="",l=s.slice(u.index)+a+l,s=s.slice(0,u.index)),r?(new pt(s,"ext-link-url",t,e),`[\0${g}f${a}${l}]`):(new ft(s,a,l,t,e),`\0${g}w`)})}});var Wi,Cd=L(()=>{"use strict";Ir();oe();Wi=class extends Ce{get type(){return"category"}get sortkey(){{let[,t]=this.childNodes;return t&&Dt(t.text())}}json(t,e,r=this.getAbsoluteIndex()){{let n=super.json(void 0,e,r),{sortkey:i}=this;return i&&(n.sortkey=i),n}}}});var Ed={};re(Ed,{parseLinks:()=>Ld});var sp,Ld,$d=L(()=>{"use strict";oe();D();ho();xo();_s();Fs();Cd();sp=/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(\||\0\d+!\x7F)([\s\S]*)$/u,Ld=(o,t,e,r,n)=>{var l;(l=t.regexLinks)!=null||(t.regexLinks=new RegExp(String.raw`^\s*(?:${t.protocol}|//)`,"iu"));let i=t.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,s=o.split("[["),a=s.shift();for(let g=0;g<s.length;g++){let u=!1,d,p,f,c,h=s[g],b=i.exec(h);if(b)[,d,p,f,c]=b,c.startsWith("]")&&(f!=null&&f.includes("["))&&(f+="]",c=c.slice(1));else{let I=sp.exec(h);I&&(u=!0,[,d,p,f]=I)}if(d===void 0||t.regexLinks.test(d)||/\0\d+[exhbru]\x7F/u.test(d)){a+=`[[${h}`;continue}let T=se(d).trim(),x=T.startsWith(":");if(x&&u){a+=`[[${h}`;continue}else!T&&f&&!f.includes(`
31
+ `)&&(T=se(f).trim());let{ns:y,valid:k}=v.normalizeTitle(T,0,!1,t,{halfParsed:!0,temporary:!0,decode:!0,selfLink:!0,page:r});if(k){if(u){if(y!==6){a+=`[[${h}`;continue}let I=!1;for(g++;g<s.length;g++){let E=s[g],N=E.split("]]");if(N.length>2){I=!0,f+=`[[${N[0]}]]${N[1]}`,c=N.slice(2).join("]]");break}else if(N.length===2)f+=`[[${N[0]}]]${N[1]}`;else{f+=`[[${E}`;break}}if(f=Ld(f,t,e,r,n),!I){a+=`[[${d}${p}${f}`;continue}}}else{a+=`[[${h}`;continue}f&&(f=mo(f,t,e,n));let A=_r;x||(y===6?(f&&(f=bo(f,t,e,!0)),A=Mr):y===14&&(A=Wi)),f===void 0&&p&&(f=""),a+=`\0${e.length}l${c}`,new A(d,f,t,e,p)}return a}});var Pd={};re(Pd,{parseMagicLinks:()=>op});var Fd,Nd,Id,Rd,op,Bd=L(()=>{"use strict";oe();ji();Fd=String.raw`[${_e}\t]|&nbsp;|&#0*160;|&#x0*a0;`,Nd=`(?:${Fd})+`,Id=`(?:${Fd}|-)`,Rd=String.raw`(?:RFC|PMID)${Nd}\d+\b|ISBN${Nd}(?:97[89]${Id}?)?(?:\d${Id}?){9}[\dx]\b`,op=(o,t,e)=>{if(!t.regexMagicLinks)try{t.regexMagicLinks=new RegExp(String.raw`(^|[^\p{L}\p{N}_])(?:(?:${t.protocol})(${tt}${rt})|${Rd})`,"giu")}catch{t.regexMagicLinks=new RegExp(String.raw`(^|\W)(?:(?:${t.protocol})(${tt}${rt})|${Rd})`,"giu")}return o.replace(t.regexMagicLinks,(r,n,i)=>{let s=n?r.slice(n.length):r;if(i){let a="",l=/&(?:[lg]t|nbsp|#x0*(?:3[ce]|a0)|#0*(?:6[02]|160));/iu.exec(s);l&&(a=s.slice(l.index),s=s.slice(0,l.index));let g=s.includes("(")?/[^,;\\.:!?][,;\\.:!?]+$/u:/[^,;\\.:!?)][,;\\.:!?)]+$/u,u=g.exec(s);if(u){let d=1;u[0][1]===";"&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(s.slice(0,u.index))&&(d=2),a=s.slice(u.index+d)+a,s=s.slice(0,u.index+d)}return a.length>=i.length?r:(new pt(s,void 0,t,e),`${n}\0${e.length-1}w${a}`)}else if(!/^(?:RFC|PMID|ISBN)/u.test(s))return r;return new pt(s,"magic-link",t,e),`${n}\0${e.length-1}i`})}});var jd,Od=L(()=>{"use strict";jd=(o,t)=>o.startsWith(t)?t.length:[...t].findIndex((e,r)=>e!==o[r])});var ap,Di,qd=L(()=>{"use strict";G();D();po();ap=new Set(["link","category","file"]),Di=class extends Vr{get type(){return"list"}lint(t=this.getAbsoluteIndex()){var e;{let r="syntax-like",n=v.lintConfig.getSeverity(r,"redirect"),{innerText:i}=this;if(n&&i==="#"){let{nextSibling:s}=this;if((s==null?void 0:s.type)==="text"&&ap.has((e=s.nextSibling)==null?void 0:e.type)&&new RegExp(String.raw`^(?:${this.getAttribute("config").redirection.join("|")})\s*(?::\s*)?$`,"iu").test(`#${s.data}`)){let l=P(s,{start:t+1},r,"redirect-like",n);return l.startIndex--,l.startCol--,l.endIndex+=2,l.endCol+=2,[l]}}return[]}}}});var Md={};re(Md,{parseList:()=>lp});var lp,_d=L(()=>{"use strict";Od();qd();co();lp=(o,t,e,r)=>{let n=/^((?:\0\d+[cno]\x7F)*)([;:*#]+)(\s*)/u.exec(o);if(!n)return t.lastPrefix="",o;let[i,s,a,l]=n,g=a.replace(/;/gu,":"),u=jd(g,t.lastPrefix),d=((u>1?a.slice(u-1):a)+l).split(/(?=;)/u),p=d[0].startsWith(";"),f=d.length-(p?0:1);if(u>1){let _=a.slice(0,u-1);if(p){let Y=_.split(/(?=;)/u);d.unshift(...Y),f+=_.includes(";")?Y.length:0}else d[0]=_+d[0]}t.lastPrefix=g;let c=s+d.map((_,Y)=>`\0${r.length+Y}d`).join("")+o.slice(i.length);for(let _ of d)new Di(_,e,r);if(!f)return c;let[h,,b]=e.html,T=/:+|-\{|\0\d+[xq]\x7F/gu,x=T,y=x.exec(c),k=0,A=!1,I=!1,E=0,N=(_,Y)=>(new Kr(_,e,r),`${c.slice(0,Y)}\0${r.length-1}d${c.slice(Y+_.length)}`),z=_=>{_?k&&k--:k++};for(;y&&f;){let{0:_,index:Y}=y;if(_==="-{"){if(!E){let{lastIndex:W}=x;x=/-\{|\}-/gu,x.lastIndex=W}E++}else if(_==="}-"){if(E--,!E){let{lastIndex:W}=x;x=T,x.lastIndex=W}}else if(_.endsWith("x")){let{name:W,closing:R,selfClosing:F}=r[Number(_.slice(1,-2))];(h.includes(W)||!F&&!b.includes(W))&&z(R)}else if(_.endsWith("q")){let{bold:W,italic:R}=r[Number(_.slice(1,-2))];W&&(z(A),A=!A),R&&(z(I),I=!I)}else if(k===0){if(_.length>=f)return N(_.slice(0,f),Y);f-=_.length,x.lastIndex=Y+4+String(r.length).length,c=N(_,Y)}y=x.exec(c)}return c}});var yo,Wd,Ze,qn,ko,To,dp,ur,Dd=L(()=>{"use strict";G();oe();pe();yn();we();D();V();Ct();yo=new Set(["A","T","R","D","-","H","N"]);Wd=[wt(),Z];ur=class extends(dp=$){constructor(e,r,n=[]){super(void 0,r,n,{});w(this,qn);w(this,Ze);this.safeAppend(e.map(i=>new ce(i,"converter-flag",r,n)))}get type(){return"converter-flags"}afterBuild(){S(this,Ze,this.childNodes.map(e=>e.text().trim())),super.afterBuild()}toString(e){return super.toString(e,";")}text(){return super.text(";")}getUnknownFlags(){return new Set(m(this,Ze).filter(e=>/\{{3}[^{}]+\}{3}/u.test(e)))}getVariantFlags(){let e=C(this,qn,ko).call(this);return new Set(Yi(m(this,Ze)).filter(r=>e.has(r)))}isInvalidFlag(e,r,n){if(typeof e=="object"){let i=C(this,qn,ko).call(this);e=e.text().trim(),r=m(this,Ze).some(s=>i.has(s.toLowerCase()))?i:new Set,n=this.getUnknownFlags()}return!!e&&!r.has(e.toLowerCase())&&!n.has(e)&&(r.size>0||!yo.has(e))}lint(e=this.getAbsoluteIndex(),r){{let n=this.getVariantFlags(),i=this.getUnknownFlags(),s=m(this,Ze).filter(c=>!c).length,a=m(this,Ze).length-i.size-s,{lintConfig:l}=v,{computeEditInfo:g,fix:u}=l,d=super.lint(e,r);if(n.size===a||m(this,Ze).filter(c=>yo.has(c)).length===a)return d;let p="no-ignored",f=l.getSeverity(p,"conversionFlag");if(f){let c=new U(this,e);for(let h=0;h<this.length;h++){let b=this.childNodes[h],T=b.text().trim();if(this.isInvalidFlag(T,n,i)){let x=q(b,c,p,"invalid-conversion-flag",f);(g||u)&&(n.size===0&&yo.has(T.toUpperCase())?x.fix=li(x,T):g&&(x.suggestions=[M(x,h&&-1)])),d.push(x)}}}return d}}print(){return super.print({sep:";"})}};To=O(dp),Ze=new WeakMap,qn=new WeakSet,ko=function(){return new Set(Yi(this.getAttribute("config").variants))},ur=j(To,0,"ConverterFlagsToken",Wd,ur),B(To,1,ur)});var vo,Ud,Ao,up,xt,Hd=L(()=>{"use strict";we();D();V();Ct();vo=(o,t,e,r)=>{let n=new $(o,e,r);return n.type=`converter-rule-${t}`,n.setAttribute("stage",11),n};Ud=[Z];xt=class extends(up=$){get type(){return"converter-rule"}get variant(){var t,e;return(e=(t=this.childNodes[this.length-2])==null?void 0:t.text().trim())!=null?e:""}constructor(t,e=!0,r=v.getConfig(),n=[]){super(void 0,r,n,{});let i=t.indexOf(":"),s=t.slice(0,i).indexOf("=>"),a=s===-1?t.slice(0,i):t.slice(s+2,i);e&&r.variants.includes(a.trim())?(super.insertAt(new ce(a,"converter-rule-variant",r,n)),super.insertAt(vo(t.slice(i+1),"to",r,n)),s!==-1&&super.insertAt(vo(t.slice(0,s),"from",r,n),0)):super.insertAt(vo(t,"to",r,n))}toString(t){let{childNodes:e,firstChild:r,lastChild:n}=this;return e.length===3?`${r.toString(t)}=>${e[1].toString(t)}:${n.toString(t)}`:super.toString(t,":")}text(){let{childNodes:t,firstChild:e,lastChild:r}=this;return t.length===3?`${e.text()}=>${t[1].text()}:${r.text()}`:super.text(":")}getGaps(t){return t===0&&this.length===3?2:1}print(){{let{childNodes:t}=this;if(t.length===3){let[e,r,n]=t;return`<span class="wpb-converter-rule">${e.print()}=>${r.print()}:${n.print()}</span>`}return super.print({sep:":"})}}json(t,e,r=this.getAbsoluteIndex()){{let n=super.json(void 0,e,r);return n.variant=this.variant,n}}};Ao=O(up),xt=j(Ao,0,"ConverterRuleToken",Ud,xt),B(Ao,1,xt)});var zd,So,gp,gr,Gd=L(()=>{"use strict";oe();Ve();we();V();Dd();Hd();zd=[Z,he("-{")];gr=class extends(gp=$){get type(){return"converter"}constructor(t,e,r,n=[]){super(void 0,r,n),this.insertAt(new ur(t,r,n));let[i]=e,s=i.includes(":"),a=new xt(i,s,r,n);(s?a.length===1:e.length===2&&!se(e[1]).trim())?this.insertAt(new xt(e.join(";"),!1,r,n)):this.safeAppend([a,...e.slice(1).map(l=>new xt(l,!0,r,n))])}toString(t){let[e,...r]=this.childNodes;return`-{${e.toString(t)}${e.length>0?"|":""}${r.map(n=>n.toString(t)).join(";")}}-`}text(){let[t,...e]=this.childNodes;return`-{${t.text()}|${Ne(e,";")}}-`}getGaps(t){return t||this.firstChild.length>0?1:0}print(){{let[t,...e]=this.childNodes;return`<span class="wpb-converter">-{${t.print()}${t.length>0?"|":""}${it(e,{sep:";"})}}-</span>`}}};So=O(gp),gr=j(So,0,"ConverterToken",zd,gr),B(So,1,gr)});var Vd={};re(Vd,{parseConverter:()=>pp});var pp,Kd=L(()=>{"use strict";Gd();pp=(o,t,e)=>{var l;(l=t.regexConverter)!=null||(t.regexConverter=new RegExp(String.raw`;(?=(?:[^;]*?=>)?\s*(?:${t.variants.join("|")})\s*:|(?:\s|\0\d+[cn]\x7F)*$)`,"u"));let r=/-\{/gu,n=/-\{|\}-/gu,i=[],s=r,a=s.exec(o);for(;a;){let{0:g,index:u}=a;if(g==="}-"){let d=i.pop(),{length:p}=e,f=o.slice(d.index+2,u),c=f.indexOf("|"),[h,b]=c===-1?[[],f]:[f.slice(0,c).split(";"),f.slice(c+1)],T=b.replace(/(&[#a-z\d]+);/giu,"$1"),x=T.split(t.regexConverter).map(y=>y.replace(/\x01/gu,";"));new gr(h,x,t,e),o=`${o.slice(0,d.index)}\0${p}v${o.slice(u+2)}`,i.length===0&&(s=r),s.lastIndex=d.index+3+String(p).length}else i.push(a),s=n,s.lastIndex=u+2;a=s.exec(o)}return o}});var Ui={};re(Ui,{Token:()=>$});var cp,Mn,Fe,ne,ie,Xr,Yr,_n,Zr,te,Qd,Jd,Xd,Yd,Zd,eu,tu,ru,nu,iu,su,ou,wo,$,V=L(()=>{"use strict";oe();G();Ae();D();va();Na();cp=["category","html-attr#id,ext-attr#id,table-attr#id"],wo=class wo extends zt{constructor(e,r=v.getConfig(),n=[],i){super();w(this,te);w(this,Mn,"plain");w(this,Fe,0);w(this,ne);w(this,ie);w(this,Xr);w(this,Yr,!1);w(this,_n);w(this,Zr);typeof e=="string"&&this.insertAt(e),S(this,ne,r),S(this,ie,n),n.push(this)}get type(){return m(this,Mn)}set type(e){S(this,Mn,e)}get pageName(){return m(this.getRootNode(),Zr)}set pageName(e){if(e){let r=this.normalizeTitle(e,0,{temporary:!0,page:""});S(this,Zr,r.valid?r.title:void 0)}else S(this,Zr,e===""?"":void 0)}parseOnce(e=m(this,Fe),r=!1,n){if(e<m(this,Fe)||this.length!==1||!this.isPlain())return this;if(m(this,Fe)>=11)return this;switch(e){case 0:if(this.type==="root"){m(this,ie).pop();let i=C(this,te,Qd).call(this);r&&(r=!i)}S(this,Xr,r),C(this,te,Jd).call(this,r);break;case 1:C(this,te,Xd).call(this);break;case 2:C(this,te,Yd).call(this);break;case 3:C(this,te,Zd).call(this);break;case 4:C(this,te,eu).call(this);break;case 5:C(this,te,tu).call(this,n);break;case 6:C(this,te,ru).call(this,n);break;case 7:C(this,te,nu).call(this);break;case 8:C(this,te,iu).call(this);break;case 9:C(this,te,su).call(this);break;case 10:C(this,te,ou).call(this)}if(this.type==="root")for(let i of m(this,ie))i==null||i.parseOnce(e,r,n);return Zn(this,Fe)._++,this}buildFromStr(e,r){let n=e.split(/[\0\x7F]/u).map((i,s)=>{if(s%2===0)return i&&new Sn(i);let a=Number(i.slice(0,-1));return m(this,ie)[a]}).filter(i=>i!=="");return r===0?n.map(String).join(""):r===1?Ne(n):n}build(){S(this,Fe,11);let{length:e,firstChild:r}=this,n=r==null?void 0:r.toString();if(e===1&&r.type==="text"&&n.includes("\0")&&(Gt(this,0,1,this.buildFromStr(n)),this.type==="root"))for(let i of m(this,ie))i==null||i.build()}afterBuild(){if(this.type==="root")for(let e of m(this,ie))e==null||e.afterBuild();S(this,Yr,!0)}parse(e=11,r,n){for(e=Math.min(e,11);m(this,Fe)<e;)this.parseOnce(m(this,Fe),r,n);return e&&(this.build(),this.afterBuild()),this}isPlain(){return this.constructor===wo}getAttribute(e){var r;switch(e){case"config":return m(this,ne);case"include":return(r=m(this,Xr))!=null?r:!!m(this.getRootNode(),Xr);case"accum":return m(this,ie);case"built":return m(this,Yr);case"stage":return m(this,Fe);case"invalid":return this.type==="table-inter"&&kr(this)===2;default:return super.getAttribute(e)}}setAttribute(e,r){e==="stage"?(m(this,Fe)===0&&this.type==="root"&&m(this,ie).shift(),S(this,Fe,r)):super.setAttribute(e,r)}insertAt(e,r=this.length){let n=typeof e=="string"?new Sn(e):e,{length:i}=this;r+=r<0?i:0,super.insertAt(n,r);let{type:s}=n;return s==="root"&&(n.type="plain"),n}normalizeTitle(e,r=0,n){return v.normalizeTitle(e,r,this.getAttribute("include"),m(this,ne),{page:this.pageName,...n})}inTableAttrs(){var e;return this.isInside("table-attrs")&&((e=this.closest("table-attrs,arg,parameter"))!=null&&e.is("table-attrs")?2:1)}inHtmlAttrs(){return this.isInside("html-attrs")?2:this.inTableAttrs()}lint(e=this.getAbsoluteIndex(),r){var n;{let{lintConfig:i}=v,{computeEditInfo:s,fix:a,ignoreDisables:l,configurationComment:g}=i,u=super.lint(e,r);if(this.type==="root"){let d=new Map,p="no-duplicate",f=["category","id"].map(b=>i.getSeverity(p,b)),c=this.toString(),h=cp.filter((b,T)=>f[T]).join();if(h){for(let b of this.querySelectorAll(h)){let T;if(b.is("category"))T=b.name;else{let x=b.getValue();x&&(T=`#${x}`)}if(T){let x=d.get(T);x?x.add(b):d.set(T,new Set([b]))}}for(let[b,T]of d)if(T.size>1&&!b.startsWith("#mw-customcollapsible-")){let x=!b.startsWith("#"),y=`duplicate-${x?"category":"id"}`,k=f[x?0:1];u.push(...[...T].map(A=>{let I=P(A,{start:A.getAbsoluteIndex()},p,y,k);return s&&x&&(I.suggestions=[M(I)]),I}))}}if(!l){let b=new RegExp(String.raw`<!--\s*${g}-(disable(?:(?:-next)?-line)?|enable)(\s[\sa-z,-]*)?-->`,"gu"),T=[],x=b.exec(c);for(;x;){let{1:y,index:k}=x,A=(n=x[2])==null?void 0:n.trim(),I;(y==="disable-line"||y==="disable-next-line")&&(I=this.posFromIndex(k).top+(y==="disable-line"?0:1)),T.push({line:I,from:y==="disable"?b.lastIndex:void 0,to:y==="enable"?b.lastIndex:void 0,rules:A?new Set(A.split(",").map(E=>E.trim())):void 0}),x=b.exec(c)}u=u.filter(({rule:y,startLine:k,startIndex:A})=>{let I={pos:0};for(let{line:E,from:N,to:z,rules:_}of T){if(E&&E>k+1)break;if(_&&!_.has(y))continue;if(E===k)return!1;N<=A&&N>I.pos?(I.pos=N,I.type="from"):z<=A&&z>I.pos&&(I.pos=z,I.type="to")}return I.type!=="from"})}if(a&&u.some(({fix:b})=>b)){let b=u.map(({fix:y})=>y).filter(y=>y!==void 0).sort(({range:[y,k]},{range:[A,I]})=>k===I?A-y:I-k),T=1/0,x=c;for(let{range:[y,k],text:A}of b)k<=T&&(x=x.slice(0,y)+A+x.slice(k),T=y);Object.assign(u,{output:x})}if(!s)for(let b of u)delete b.fix,delete b.suggestions}return u}}toString(e,r){return e?super.toString(!0,r):ze(m(this,_n),()=>super.toString(!1,r),n=>{let i=this.getRootNode();i.type==="root"&&m(i,Yr)&&S(this,_n,n)})}};Mn=new WeakMap,Fe=new WeakMap,ne=new WeakMap,ie=new WeakMap,Xr=new WeakMap,Yr=new WeakMap,_n=new WeakMap,Zr=new WeakMap,te=new WeakSet,Qd=function(){let{parseRedirect:e}=(_a(),X(Ma)),r=this.firstChild.toString(),n=e(r,m(this,ne),m(this,ie));return n!==!1&&this.setText(n),!!n},Jd=function(e){let{parseCommentAndExt:r}=($n(),X(td));this.setText(r(this.firstChild.toString(),m(this,ne),m(this,ie),e))},Xd=function(){let{parseBraces:e}=(Ri(),X(kl)),r=this.type==="root"?this.firstChild.toString():`\0${this.firstChild.toString()}`,n=e(r,m(this,ne),m(this,ie));this.setText(this.type==="root"?n:n.slice(1))},Yd=function(){if(m(this,ne).excludes.includes("html"))return;let{parseHtml:e}=(sd(),X(id));this.setText(e(this.firstChild.toString(),m(this,ne),m(this,ie)))},Zd=function(){if(m(this,ne).excludes.includes("table"))return;let{parseTable:e}=(bd(),X(hd));this.setText(e(this,m(this,ne),m(this,ie)))},eu=function(){if(m(this,ne).excludes.includes("hr"))return;let{parseHrAndDoubleUnderscore:e}=(vd(),X(kd));this.setText(e(this,m(this,ne),m(this,ie)))},tu=function(e){let{parseLinks:r}=($d(),X(Ed));this.setText(r(this.firstChild.toString(),m(this,ne),m(this,ie),this.pageName,e))},ru=function(e){let{parseQuotes:r}=(ho(),X(Sd)),n=this.firstChild.toString().split(`
32
32
  `);for(let i=0;i<n.length;i++)n[i]=r(n[i],m(this,ne),m(this,ie),e);this.setText(n.join(`
33
- `))},iu=function(){let{parseExternalLinks:e}=(bo(),X(Cd));this.setText(e(this.firstChild.toString(),m(this,ne),m(this,ie)))},su=function(){let{parseMagicLinks:e}=(jd(),X(Bd));this.setText(e(this.firstChild.toString(),m(this,ne),m(this,ie)))},ou=function(){if(m(this,ne).excludes.includes("list"))return;let{parseList:e}=(Wd(),X(_d)),{firstChild:r,type:n,name:i}=this,s=r.toString().split(`
33
+ `))},nu=function(){let{parseExternalLinks:e}=(xo(),X(wd));this.setText(e(this.firstChild.toString(),m(this,ne),m(this,ie)))},iu=function(){let{parseMagicLinks:e}=(Bd(),X(Pd));this.setText(e(this.firstChild.toString(),m(this,ne),m(this,ie)))},su=function(){if(m(this,ne).excludes.includes("list"))return;let{parseList:e}=(_d(),X(Md)),{firstChild:r,type:n,name:i}=this,s=r.toString().split(`
34
34
  `),a={lastPrefix:""},l=n==="root"||n==="ext-inner"&&i==="poem"?0:1;for(;l<s.length;l++)s[l]=e(s[l],a,m(this,ne),m(this,ie));this.setText(s.join(`
35
- `))},au=function(){if(m(this,ne).variants.length>0){let{parseConverter:e}=(Qd(),X(Kd));this.setText(e(this.firstChild.toString(),m(this,ne),m(this,ie)))}};$=Ao});function Ei(o){return t=>t.type===o}var Q,cd,Pa,Vt,Ea,fd,Ae=L(()=>{"use strict";Q={running:!1,run(o,t){let{running:e}=this;this.running=!0;let r=t==null?void 0:t.internal;t&&(t.internal=!0);let n=()=>{this.running=e,t&&(t.internal=r)};try{let{Token:i}=(V(),X(Wi)),s=o();return s instanceof i&&!s.getAttribute("built")&&s.afterBuild(),n(),s}catch(i){throw n(),i}},internal(o,t){let{internal:e}=t;t.internal=!0;let r=o();return t.internal=e,r},rev:0};cd=({type:o})=>o==="tr"||o==="table-syntax",Pa=o=>o==="redirect-target"||o==="link",Vt=(o,t,e,r=[])=>{var s,a;let n=o.getChildNodes(),i;n.length===e?(i=n,n=r):i=Array.prototype.splice.apply(n,[t,e,...r]);for(let l=0;l<r.length;l++){let g=r[l];g.setAttribute("parentNode",o),g.setAttribute("nextSibling",n[t+l+1]),g.setAttribute("previousSibling",n[t+l-1])}return(s=n[t-1])==null||s.setAttribute("nextSibling",n[t]),(a=n[t+r.length])==null||a.setAttribute("previousSibling",n[t+r.length-1]),n===r&&o.setAttribute("childNodes",n),i},Ea=(o,t)=>{let e=o.toLowerCase(),[r,n]=t,i=Object.prototype.hasOwnProperty.call(n,o);return[e,i,i?n[o]:Object.prototype.hasOwnProperty.call(r,e)&&r[e]]},fd=(o,t)=>Array.from({length:o},(e,r)=>t(r))});var So,uu,lu,du,cp,gu,pu,wo,en,_n,cu=L(()=>{"use strict";Zn();So=new Map([[0,!1],[1,"warning"],[2,"error"],[!1,!1],["off",!1],["warning","warning"],["error","error"]]),uu={"arg-in-ext":[1],"blank-alt":[1],"bold-header":[1,{}],"format-leakage":[1,{}],"fostered-content":[1,{}],h1:[1,{}],"illegal-attr":[2,{}],"insecure-style":[2],"invalid-gallery":[2,{parameter:1}],"invalid-imagemap":[2,{}],"invalid-invoke":[2,{}],"invalid-isbn":[2],"invalid-json":[2,{duplicate:1}],"invalid-url":[1],"lonely-apos":[1,{}],"lonely-bracket":[1,{extLink:2}],"lonely-http":[1,{}],"nested-link":[2,{}],"no-arg":[1],"no-duplicate":[2,{category:1,id:1,unknownImageParameter:1}],"no-ignored":[2,{fragment:1,galleryComment:1,galleryNoImage:1,include:1,nonWordAttributes:1,redirect:1}],"obsolete-attr":[1],"obsolete-tag":[1],"parsing-order":[2,{templateInTable:1}],"pipe-like":[1,{double:2}],"required-attr":[2,{}],"syntax-like":[2,{}],"table-layout":[1],"tag-like":[2,{disallowed:1,invalid:1}],"unbalanced-header":[2],"unclosed-comment":[1,{}],"unclosed-quote":[1],"unclosed-table":[2],unescaped:[2],"unknown-page":[1],"unmatched-tag":[1,{both:2,selfClosing:2}],"unterminated-url":[1,{}],"url-encoding":[1,{}],"var-anchor":[1,{}],"void-ext":[2,{}]},lu={configurationComment:"lint",ignoreDisables:!1,fix:!0,computeEditInfo:!0},du=o=>So.has(o),cp=o=>du(o)||(Array.isArray(o)?du(o[0])&&(o.length===1||typeof o[1]=="object"):typeof o=="object"),gu=(o,t,e)=>{if(!Dt.includes(t))throw new RangeError(`Unknown lint rule: ${t}`);if(e===void 0)return!1;if(cp(e)){if(Array.isArray(e))o[t]=e;else if(typeof e=="object"){let[r,n={}]=uu[t];o[t]=[r,{...pu(n),...e}]}else o[t]=[e];return!0}throw new RangeError(`Invalid lint config for ${t}: ${JSON.stringify(e)}`)},pu=typeof structuredClone=="function"?structuredClone:o=>JSON.parse(JSON.stringify(o)),wo=class{constructor(t){if(Object.assign(this,pu(uu)),!!t)for(let e in t)gu(this,e,t[e])}getSeverity(t,e){var s;let[r,n]=this[t],i=So.get(r);return e&&(s=So.get(n==null?void 0:n[e]))!=null?s:i}},_n=class{constructor(t){w(this,en);if(Object.assign(this,lu),t&&!("rules"in t)&&Object.keys(t).some(e=>Dt.includes(e)))this.rules=t;else{let{rules:e,...r}=t!=null?t:{};this.rules=e;for(let n in r){let i=r[n];i!==void 0&&Object.prototype.hasOwnProperty.call(lu,n)&&(this[n]=i)}}}get rules(){return m(this,en)}set rules(t){S(this,en,new Proxy(new wo(t),{set:gu,deleteProperty(){return!1}}))}getSeverity(t,e){return m(this,en).getSeverity(t,e)}};en=new WeakMap});var fu,Dn,Un,Oe,tn,cr,Di,mu,Wn,hu=L(()=>{"use strict";We();ae();fu=o=>{let[,{length:t},e]=/^((?:\.\.\/)*)([\s\S]*)/u.exec(o);return[t/3,e]},Wn=class{constructor(t,e,r,{temporary:n,decode:i,selfLink:s,page:a}={}){w(this,Di);w(this,Dn);w(this,Un);w(this,Oe);w(this,tn);w(this,cr);ge(this,"page");ge(this,"valid");ge(this,"encoded",!1);this.page=a;let l=t.trim(),g=l.startsWith("../");if(i&&t.includes("%"))try{let f=/%(?!21|3[ce]|5[bd]|7[b-d])[\da-f]{2}/iu.test(t);t=zt(t),this.encoded=f}catch{}if(t=Ut(t).replace(/[_ ]+/gu," ").trim(),g||a&&l.startsWith("/"))S(this,tn,0);else{let f=e;t.startsWith(":")&&(f=0,t=t.slice(1).trim());let c=t.split(":");if(c.length>1){let h=nt(c[0]),b=Object.prototype.hasOwnProperty.call(r.nsid,h)&&r.nsid[h];b&&(f=b,t=c.slice(1).join(":").trim())}S(this,tn,f)}let u=t.indexOf("#");if(u!==-1){let f=t.slice(u).trim().slice(1);if(f.includes("%"))try{f=zt(f)}catch{}S(this,cr,f.replace(/ /gu,"_")),t=t.slice(0,u).trim()}let[d,p]=g?fu(t):[0,t];this.valid=!!(t||s&&this.ns===0&&m(this,cr)!==void 0)&&Ut(t)===t&&(d===0||a===void 0||a.split("/",d+1).length>d)&&!/^:|\0\d+[eh!+-]\x7F|[<>[\]{}|\n]|%[\da-f]{2}|(?:^|\/)\.{1,2}(?:$|\/)/iu.test(p),this.main=t,S(this,Un,r.namespaces),S(this,Oe,r.articlePath||"/wiki/$1"),m(this,Oe).includes("$1")||S(this,Oe,m(this,Oe)+`${m(this,Oe).endsWith("/")?"":"/"}$1`),n||Object.defineProperties(this,{encoded:{enumerable:!1,writable:!1}})}get ns(){return m(this,tn)}get fragment(){return m(this,cr)}get main(){return m(this,Dn)}set main(t){t=t.replace(/_/gu," ").trim(),S(this,Dn,t&&t[0].toUpperCase()+t.slice(1))}get prefix(){let t=m(this,Un)[this.ns];return t+(t&&":")}get title(){return this.getRedirection()[1]}get extension(){let{main:t}=this,e=t.lastIndexOf(".");return e===-1?void 0:t.slice(e+1).toLowerCase()}getRedirection(){let{prefix:t}=this,e=t;return C(this,Di,mu).call(this,e)}setFragment(t){S(this,cr,t)}getUrl(t){{typeof t=="string"&&(S(this,Oe,t),m(this,Oe).includes("$1")||S(this,Oe,m(this,Oe)+`${m(this,Oe).endsWith("/")?"":"/"}$1`));let{title:e,fragment:r}=this;return e?m(this,Oe).replace("$1",encodeURIComponent(e)+(r?`#${encodeURIComponent(r)}`:"")):r===void 0?"":`#${encodeURIComponent(r)}`}throw new Error("Title.getUrl method is only available in the LSP version!")}};Dn=new WeakMap,Un=new WeakMap,Oe=new WeakMap,tn=new WeakMap,cr=new WeakMap,Di=new WeakSet,mu=function(t,e=!0){var n,i;let r=(t+this.main).replace(/ /gu,"_");if(r.startsWith("/"))r=((n=this.page)!=null?n:"")+r.replace(/(.)\/$/u,"$1");else if(r.startsWith("../")&&((i=this.page)!=null&&i.includes("/"))){let[s,a]=fu(r),l=this.page.split("/");l.length>s&&(r=l.slice(0,-s).join("/")+(a&&"/")+a)}return[!1,r]}});var Lu={};re(Lu,{LanguageService:()=>Co,tasks:()=>vu});var vu,fp,mp,hp,bp,Au,xp,yp,Tp,kp,bu,vp,xu,Vn,Su,fr,Te,yu,wu,Hn,zn,Ui,Tu,Ap,ku,Ee,Ot,yt,Tt,mr,Kn,nn,sn,hr,H,Gn,qe,Lo,Eo,$o,Cu,No,rn,Co,Eu=L(()=>{"use strict";We();po();Zn();vi();G();ae();Ae();D();V();vu=new WeakMap,fp=new Set(["ref"]),mp=new Set(["ref","references"]),hp=new Set(["name","follow"]),bp=new Set(["group"]),Au=new Set(["arg-name","template-name","link-target","parameter-key"]),xp=new Set(["ext","html","attr-key","image-parameter","heading-title","heading","magic-word-name",...Au]),yp=new Set(["text","comment","noinclude","include"]),Tp=["ext","html","table"].map(o=>`${o}-attr#style`).join(),kp=Be(o=>new RegExp(`^(?:${o}|//)`,"iu")),bu=({type:o,parentNode:t,length:e,firstChild:r},n)=>o==="attr-value"&&e===1&&r.type==="text"&&(!n||t.name==="style"),vp=o=>o.is("html-attr")||o.is("table-attr"),xu=o=>o.childNodes.every(({type:t})=>yp.has(t)),Vn=(o,t)=>{let{top:e,left:r}=o.posFromIndex(t);return{line:e,character:r}},Su=(o,t,e)=>({start:Vn(o,t),end:Vn(o,e)}),fr=o=>{let{top:t,left:e,height:r,width:n}=o.getBoundingClientRect();return{start:{line:t,character:e},end:vr(t,e,r,n)}},Te=(o,t,e,{line:r,character:n},i,s)=>[...new Set(o)].map(a=>{var g;let l=(g=s==null?void 0:s(a))==null?void 0:g.description;return{label:a,kind:t,textEdit:{range:{start:{line:r,character:n-e.length},end:{line:r,character:n}},newText:a+(i!=null?i:"")},...l&&{documentation:{kind:"markdown",value:l}}}}),yu=(o,t,{line:e,character:r})=>{let n=o.indexFromPos(e,r);return o.caretPositionFromIndex(n+Number(/\w/u.test(t.charAt(n))))},wu=(o,t,e)=>{let{type:r,parentNode:n={}}=o,{name:i,tag:s}=n;return r==="attr-value"&&t.has(s)&&e.has(i)?o.toString().trim():NaN},Hn=o=>wu(o,fp,hp),zn=o=>wu(o,mp,bp),Ui=o=>{let{type:t,name:e,parentNode:r}=o;switch(t){case"heading":return o.level;case"heading-title":return r.level;case"parameter-key":return`${r.parentNode.name}|${r.name}`;case"ext":case"html":case"image-parameter":return e;default:return r.name}},Tu=(o,t,e=!1)=>({range:Su(o,...t.range),newText:t.text,title:`${e?"Fix":"Suggestion"}: ${t.desc}`,fix:e}),Ap=(o,t)=>{let{lintConfig:e}=v,{rules:r,fix:n,computeEditInfo:i}=e;if(e.fix=!0,e.computeEditInfo=!1,t){e.rules=void 0;for(let a of Dt)e.rules[a]=a===t?r[a]:0}let{output:s}=o.lint();return e.fix=n,e.computeEditInfo=i,t&&(e.rules=r),s===void 0?[]:[{range:fr(o),newText:s}]},ku=async(o,t,e,r=v.getConfig())=>{let n=typeof setImmediate=="function"?setImmediate:setTimeout,{running:i}=Q;Q.running=!0;let{internal:s}=v;v.internal=!0;let a=()=>{Q.running=i,v.internal=s},l=new $(yr(o),r);l.type="root";let g=0;try{await new Promise(u=>{let d=()=>{t()===o?(g++,n(p,0)):u()},p=()=>{g===12?(l.afterBuild(),u()):(l[g===11?"build":"parseOnce"](g,e),d())};n(p,0)})}catch(u){throw a(),u}return a(),l},Co=class{constructor(t){w(this,H);w(this,Ee);w(this,Ot);w(this,yt);w(this,Tt);w(this,mr);w(this,Kn);w(this,nn);w(this,sn);w(this,hr);ge(this,"include",!0);ge(this,"config");ge(this,"data");vu.set(t,this),Object.defineProperties(this,{config:{enumerable:!1},data:{enumerable:!1}})}async destroy(){Object.setPrototypeOf(this,null)}async provideDocumentColors(t,e,r=!0){let n=await C(this,H,qe).call(this,e);return n.querySelectorAll("attr-value,parameter-value,arg-default").reverse().flatMap(i=>{let{type:s,childNodes:a}=i;return s!=="attr-value"&&!xu(i)?[]:a.filter(l=>l.type==="text").reverse().flatMap(l=>{let{data:g}=l,u=na(g,r).filter(([,,,p])=>p);if(u.length===0)return[];let d=l.getAbsoluteIndex();return u.map(([p,f,c])=>{let h=t(p);return h.length===4&&{color:{red:h[0]/255,green:h[1]/255,blue:h[2]/255,alpha:h[3]},range:Su(n,d+f,d+c)}}).filter(p=>p!==!1)})})}provideColorPresentations(t){let{color:{red:e,green:r,blue:n,alpha:i},range:s}=t,a=[e,r,n],l=i<1?`rgba(${a.map(g=>Math.round(g*255)).join()},${i})`:`#${a.map(ra).join("")}`;return[{label:l,textEdit:{range:s,newText:l}}]}async provideCompletionItems(t,e){var I,E,N,z,_,Y,W;let{re:r,allTags:n,functions:i,switches:s,jaSwitches:a,protocols:l,params:g,tags:u,ext:d}=C(this,H,Cu).call(this),{line:p,character:f}=e,c=t.split(/\r?\n/u,p+1)[p],h=r.exec((I=c==null?void 0:c.slice(0,f))!=null?I:""),[,,b,T]=this.config.doubleUnderscore;if((h==null?void 0:h[1])!==void 0){let F=h[1].startsWith("/");return Te(n,"Class",h[1].slice(F?1:0),e,F&&!(c!=null&&c.slice(f).trim().startsWith(">"))?">":"")}else if(h!=null&&h[4]||h!=null&&h[5]&&a.length>0){let F=h[5]!==void 0;return Te(F?a:s,"Constant",h[F?5:4],e,"",R=>{if(this.data)F||(R=R.slice(2,-2));else return;return Object.hasOwn(b,R)?R=b[R]:Object.hasOwn(T,R)&&(R=T[R]),C(this,H,No).call(this,R.toLowerCase())})}else if((h==null?void 0:h[6])!==void 0)return Te(l,"Reference",h[6],e);let x=await C(this,H,qe).call(this,t),y;if(h!=null&&h[2]){y=x.elementFromPoint(h.index+h[2].length-1,p);let F=(E=h[3])!=null?E:"";if(h[2]==="{{{")return Te(x.querySelectorAll("arg").filter(K=>K.name&&K!==y).map(({name:K})=>K),"Variable",F,e);let[R,ee]=this.config.parserFunction,oe=c.charAt(f),xe=F.startsWith(":"),J=xe?F.slice(1).trimStart():F;if(h[2]==="[[")return Te(x.querySelectorAll("link,file,category,redirect-target").filter(K=>K!==y).map(({name:K})=>K),"Folder",J,e);let de=i;return oe===":"?de=i.filter(K=>!K.endsWith(":")):oe===":"&&(de=i.filter(K=>K.endsWith(":")).map(K=>K.slice(0,-1))),[...Te(de,"Function",F,e,"",K=>{if(this.data)Object.hasOwn(R,K)?K=R[K]:Object.hasOwn(ee,K)&&(K=ee[K]);else return;return C(this,H,rn).call(this,K.toLowerCase())}),...F.startsWith("#")?[]:Te(x.querySelectorAll("template").filter(K=>K!==y).map(K=>{let{name:kt}=K;if(xe)return kt;let{ns:on}=K.getAttribute("title");return on===0?`:${kt}`:on===10?kt.slice(9):kt}),"Folder",J,e)]}let k,A;if((h==null?void 0:h[8])===void 0){if(y=x.elementFromPoint(f,p),!y)return;({type:k,parentNode:A}=y)}if((h==null?void 0:h[7])!==void 0||k==="image-parameter"){let F=x.indexFromPos(p,f),R=(z=(N=h==null?void 0:h[7])==null?void 0:N.trimStart())!=null?z:m(this,Ee).slice(y.getAbsoluteIndex(),F).trimStart(),ee=m(this,Ee)[F]==="=";return[...Te(g,"Property",R,e).filter(({label:oe})=>!ee||!/[= ]$/u.test(oe)),...Te(x.querySelectorAll("image-parameter#width").filter(oe=>oe!==y).map(oe=>oe.text()),"Unit",R,e)]}else if((h==null?void 0:h[8])!==void 0||k==="attr-key"){let F=(Y=(_=h==null?void 0:h[8])==null?void 0:_.toLowerCase())!=null?Y:A.tag,R=(W=h==null?void 0:h[10])!=null?W:y.toString().slice(0,f-x.posFromIndex(y.getAbsoluteIndex()).left);if(!u.has(F))return;let ee=yi[F],oe=Ti[F],xe=oe&&Te(oe,"Field",R,e);return d.includes(F)&&!ee?xe:[...xe!=null?xe:[],...F==="meta"||F==="link"?[]:Te(xi,"Property",R,e),...ee?Te(ee,"Property",R,e):[],...Te(["data-"],"Variable",R,e),...Te(["xmlns:"],"Interface",R,e)]}else if(k==="parameter-key"||k==="parameter-value"&&A.anon){let F=A.parentNode,{type:R,name:ee}=F;if(R==="magic-word"&&ee!=="invoke")return;let oe=m(this,Ee).slice(y.getAbsoluteIndex(),x.indexFromPos(p,f)).trimStart(),{module:xe,function:J}=F;return oe?Te(x.querySelectorAll("parameter").filter(de=>de===A||de.anon||de.parentNode.type!==R||de.parentNode.name!==ee?!1:R==="template"?!0:de.parentNode.module===xe&&de.parentNode.function===J).map(({name:de})=>de),"Variable",oe,e,k==="parameter-value"?"=":""):void 0}else if(k==="param-line"){let F=m(this,Ee).slice(y.getAbsoluteIndex(),x.indexFromPos(p,f)).trimStart();return/^[a-z]+$/iu.test(F)?Te(ki[y.name],"Property",F,e):void 0}else if(bu(y)&&vp(A)){let F=li(A.tag,A.name);if(F.length===0)return;let R=m(this,Ee).slice(y.getAbsoluteIndex(),x.indexFromPos(p,f)).trimStart();return Te(F,"Value",R,e)}}async provideDiagnostics(t,e=!0){let r=await C(this,H,qe).call(this,t),{lintConfig:n}=v,i=n.fix;n.fix=!1;let s=r.lint();return n.fix=i,[(e?s:s.filter(({severity:u})=>u==="error")).map(({startLine:u,startCol:d,endLine:p,endCol:f,severity:c,rule:h,message:b,fix:T,suggestions:x})=>({range:{start:{line:u,character:d},end:{line:p,character:f}},severity:c==="error"?1:2,source:"WikiLint",code:h,message:b,data:[...T?[Tu(r,T,!0)]:[],...x?x.map(y=>Tu(r,y)):[]]})),[],[]].flat(2)}resolveCodeAction(t){if(t.kind!=="source.fixAll")return t;let{rule:e}=t.data;return{...t,edit:{changes:{"":Ap(m(this,mr),e)}}}}async provideFoldingRanges(t){let e=await C(this,H,qe).call(this,t),{length:r}=e.getLines(),n=[],i=Array.from({length:6}),s=e.querySelectorAll("heading-title,table,template,magic-word");for(let a of[...s].reverse())a.getRelativeIndex();for(let a of s){let{offsetHeight:l}=a;if(a.type==="heading-title"||l>2){let{top:g}=e.posFromIndex(a.getAbsoluteIndex());if(a.type==="heading-title"){let{level:u}=a.parentNode;for(let d=u-1;d<6;d++){let p=i[d];p!==void 0&&p<g-1&&n.push({startLine:p,endLine:g-1,kind:"region"}),i[d]=void 0}i[u-1]=g+l-1}else n.push({startLine:g,endLine:g+l-2,kind:"region"})}}for(let a of i)a!==void 0&&a<r-1&&n.push({startLine:a,endLine:r-1,kind:"region"});return n}async provideLinks(t){var s;(s=this.config)!=null||(this.config=v.getConfig());let{articlePath:e,protocol:r}=this.config,n=e==null?void 0:e.includes("//"),i=kp(r);return(await C(this,H,qe).call(this,t)).querySelectorAll(`magic-link,ext-link-url,free-ext-link,attr-value${n?",link-target,template-name,invoke-module,magic-word#filepath,magic-word#widget":""},image-parameter#link,image-parameter#manualthumb`).reverse().map(a=>{let l;a.is("magic-word")?({name:l}=a,a=a.childNodes[1].lastChild):a.is("image-parameter")&&({name:l}=a);let{type:g,parentNode:u,firstChild:d,lastChild:p,childNodes:f,length:c}=a,{tag:h}=u;if(l!=null||(l=u.name),!(g!=="attr-value"||l==="cite"&&["blockquote","del","ins","q"].includes(h)||l==="src"&&["templatestyles","img"].includes(h)||l==="templatename"&&h==="rss"||l==="file"&&h==="phonos")||!xu(a))return!1;let b=f.filter(T=>T.type==="text").map(({data:T})=>T).join("").trim();if(!b)return!1;try{if(a.is("magic-link")||a.is("ext-link-url")||a.is("free-ext-link"))b=a.getUrl(e);else if(g==="link-target"&&(u.is("link")||u.is("redirect-target")||u.is("category"))){if(/^(?:\.\.)?\//u.test(b))return!1;b=u.link.getUrl(e)}else if(g==="link-target"||g==="template-name")b=u.getAttribute("title").getUrl(e);else if(["invoke-module","parameter-value"].includes(g)||g==="attr-value"&&(l==="src"&&h==="templatestyles"||l==="templatename"&&h==="rss"||l==="file"&&h==="phonos")||g==="image-parameter"&&(l==="manualthumb"||!i.test(b))){if(!n||b.startsWith("/"))return!1;g==="image-parameter"&&l==="manualthumb"||g==="parameter-value"&&l==="filepath"||g==="attr-value"&&h==="phonos"?b=`File:${b}`:g==="parameter-value"?b=`Widget:${b}`:g==="invoke-module"&&(b=`Module:${b}`);let T=v.normalizeTitle(b,g==="attr-value"?10:0,!1,this.config,{temporary:!0});if(!T.valid)return!1;b=T.getUrl()}if(typeof b=="string"&&b.startsWith("//")&&(b=`https:${b}`),b=new URL(b).href,g==="image-parameter"){let T=d.getBoundingClientRect(),{top:x,left:y,height:k,width:A}=c===1?T:p.getBoundingClientRect();return{range:{start:{line:T.top,character:T.left},end:vr(x,y,k,A)},target:b}}return{range:fr(a),target:b}}catch{return!1}}).filter(a=>a!==!1)}async provideReferences(t,e){let r=await C(this,H,qe).call(this,t),{offsetNode:n,offset:i}=yu(r,m(this,Ee),e),s=n.type==="text"?n.parentNode:n,a=i===0&&(s.is("ext-attr-dirty")||s.is("html-attr-dirty"))?s.parentNode.parentNode:s,{type:l}=a,g=Hn(a),u=zn(a);if(!g&&!u&&!xp.has(l))return;let d=Ui(a),p=r.querySelectorAll(l==="heading-title"?"heading":l).filter(f=>l==="attr-value"?Hn(f)===g||zn(f)===u:Ui(f)===d).reverse().map(f=>({range:fr(f.type==="parameter-key"?f.parentNode:f)}));return p.length===0?void 0:p}async provideDefinition(t,e){let r=await C(this,H,qe).call(this,t),n=r.elementFromPoint(e.character,e.line);if(!n)return;let i=n.is("ext")&&n.name==="ref"?n:n.closest("ext#ref"),s=i==null?void 0:i.getAttr("name");if(!s)return;let a=i.getAttr("group"),l=r.querySelectorAll("ext#ref").filter(g=>g.innerText&&g.getAttr("name")===s&&g.getAttr("group")===a).reverse().map(({lastChild:g})=>({range:fr(g)}));return l.length===0?void 0:l}async resolveRenameLocation(t,e){let r=await C(this,H,qe).call(this,t),n=r.elementFromPoint(e.character,e.line);if(!n)return;let{type:i}=n,s=Hn(n),a=zn(n);return!s&&!a&&(!Au.has(i)||i==="parameter-key"&&/^[1-9]\d*$/u.test(n.parentNode.name)||i==="link-target"&&!["link","redirect-target"].includes(n.parentNode.type))?void 0:fr(n)}async provideRenameEdits(t,e,r){let n=await C(this,H,qe).call(this,t),i=n.elementFromPoint(e.character,e.line);if(!i)return;let{type:s}=i,a=Hn(i),l=a&&i.parentNode.parentNode.getAttr("group"),g=zn(i),u=Ui(i),d=n.querySelectorAll(s).filter(p=>{let{type:f}=p.parentNode;return s==="link-target"&&f!=="link"&&f!=="redirect-target"?!1:s==="attr-value"?zn(p)===g||Hn(p)===a&&p.parentNode.parentNode.getAttr("group")===l:Ui(p)===u});return d.length===0?void 0:{changes:{"":d.reverse().map(p=>({range:fr(p),newText:r}))}}}async provideHover(t,e){if(!this.data)return;let r=await C(this,H,qe).call(this,t),{offsetNode:n,offset:i}=yu(r,m(this,Ee),e);n.type==="text"&&(i+=n.getRelativeIndex(),n=n.parentNode);let{type:s,parentNode:a,length:l,name:g}=n,u,d,p,f;if(n.is("double-underscore")&&i>0)u=C(this,H,No).call(this,n.name);else if(s==="magic-word-name")u=C(this,H,rn).call(this,a.name),d=n.text().trim(),p=a.getAttribute("colon");else if(n.is("magic-word")&&!n.modifier&&l===1&&(i>0||r.posFromIndex(n.getAbsoluteIndex()).left===e.character))u=C(this,H,rn).call(this,g),d=n.firstChild.text().trim(),p=n.getAttribute("colon");else if((n.is("magic-word")||n.is("template"))&&n.modifier&&i>=2&&n.getRelativeIndex(0)>i&&(d=n.modifier.trim().slice(0,-1),u=C(this,H,rn).call(this,d.toLowerCase()),p=":",u)){let c=n.getAbsoluteIndex();f={start:Vn(r,c+2),end:Vn(r,c+n.modifier.trimEnd().length+1)}}return u&&{contents:{kind:"markdown",value:(u.signatures?`${u.signatures.map(c=>`- **{{ ${d}${c.length===0?"**":`${p}** `}${c.map(({label:h,const:b})=>b?h:`*${h}*`).join(" **|** ")} **}}**`).join(`
35
+ `))},ou=function(){if(m(this,ne).variants.length>0){let{parseConverter:e}=(Kd(),X(Vd));this.setText(e(this.firstChild.toString(),m(this,ne),m(this,ie)))}};$=wo});function Ni(o){return t=>t.type===o}var Q,pd,Fa,Gt,La,cd,Ae=L(()=>{"use strict";Q={running:!1,run(o,t){let{running:e}=this;this.running=!0;let r=t==null?void 0:t.internal;t&&(t.internal=!0);let n=()=>{this.running=e,t&&(t.internal=r)};try{let{Token:i}=(V(),X(Ui)),s=o();return s instanceof i&&!s.getAttribute("built")&&s.afterBuild(),n(),s}catch(i){throw n(),i}},internal(o,t){let{internal:e}=t;t.internal=!0;let r=o();return t.internal=e,r},rev:0};pd=({type:o})=>o==="tr"||o==="table-syntax",Fa=o=>o==="redirect-target"||o==="link",Gt=(o,t,e,r=[])=>{var s,a;let n=o.getChildNodes(),i;n.length===e?(i=n,n=r):i=Array.prototype.splice.apply(n,[t,e,...r]);for(let l=0;l<r.length;l++){let g=r[l];g.setAttribute("parentNode",o),g.setAttribute("nextSibling",n[t+l+1]),g.setAttribute("previousSibling",n[t+l-1])}return(s=n[t-1])==null||s.setAttribute("nextSibling",n[t]),(a=n[t+r.length])==null||a.setAttribute("previousSibling",n[t+r.length-1]),n===r&&o.setAttribute("childNodes",n),i},La=(o,t)=>{let e=o.toLowerCase(),[r,n]=t,i=Object.prototype.hasOwnProperty.call(n,o);return[e,i,i?n[o]:Object.prototype.hasOwnProperty.call(r,e)&&r[e]]},cd=(o,t)=>Array.from({length:o},(e,r)=>t(r))});var Co,du,au,lu,fp,uu,gu,Lo,en,Wn,pu=L(()=>{"use strict";ti();Co=new Map([[0,!1],[1,"warning"],[2,"error"],[!1,!1],["off",!1],["warning","warning"],["error","error"]]),du={"arg-in-ext":[1],"blank-alt":[1],"bold-header":[1,{}],"format-leakage":[1,{}],"fostered-content":[1,{}],h1:[1,{}],"illegal-attr":[2,{}],"insecure-style":[2],"invalid-gallery":[2,{parameter:1}],"invalid-imagemap":[2,{}],"invalid-invoke":[2,{}],"invalid-isbn":[2],"invalid-json":[2,{duplicate:1}],"invalid-ref":[2],"invalid-url":[1],"lonely-apos":[1,{}],"lonely-bracket":[1,{extLink:2}],"lonely-http":[1,{}],"nested-link":[2,{}],"no-arg":[1],"no-duplicate":[2,{category:1,id:1,unknownImageParameter:1}],"no-ignored":[2,{fragment:1,galleryComment:1,galleryNoImage:1,include:1,nonWordAttributes:1,redirect:1}],"obsolete-attr":[1],"obsolete-tag":[1],"parsing-order":[2,{templateInTable:1}],"pipe-like":[1,{double:2}],"required-attr":[2,{}],"syntax-like":[2,{}],"table-layout":[1],"tag-like":[2,{disallowed:1,invalid:1}],"unbalanced-header":[2],"unclosed-comment":[1,{}],"unclosed-quote":[1],"unclosed-table":[2],unescaped:[2],"unknown-page":[1],"unmatched-tag":[1,{both:2,selfClosing:2}],"unterminated-url":[1,{}],"url-encoding":[1,{}],"var-anchor":[1,{}],"void-ext":[2,{}]},au={configurationComment:"lint",ignoreDisables:!1,fix:!0,computeEditInfo:!0},lu=o=>Co.has(o),fp=o=>lu(o)||(Array.isArray(o)?lu(o[0])&&(o.length===1||typeof o[1]=="object"):typeof o=="object"),uu=(o,t,e)=>{if(!Wt.includes(t))throw new RangeError(`Unknown lint rule: ${t}`);if(e===void 0)return!1;if(fp(e)){if(Array.isArray(e))o[t]=e;else if(typeof e=="object"){let[r,n={}]=du[t];o[t]=[r,{...gu(n),...e}]}else o[t]=[e];return!0}throw new RangeError(`Invalid lint config for ${t}: ${JSON.stringify(e)}`)},gu=typeof structuredClone=="function"?structuredClone:o=>JSON.parse(JSON.stringify(o)),Lo=class{constructor(t){if(Object.assign(this,gu(du)),!!t)for(let e in t)uu(this,e,t[e])}getSeverity(t,e){var s;let[r,n]=this[t],i=Co.get(r);return e&&(s=Co.get(n==null?void 0:n[e]))!=null?s:i}},Wn=class{constructor(t){w(this,en);if(Object.assign(this,au),t&&!("rules"in t)&&Object.keys(t).some(e=>Wt.includes(e)))this.rules=t;else{let{rules:e,...r}=t!=null?t:{};this.rules=e;for(let n in r){let i=r[n];i!==void 0&&Object.prototype.hasOwnProperty.call(au,n)&&(this[n]=i)}}}get rules(){return m(this,en)}set rules(t){S(this,en,new Proxy(new Lo(t),{set:uu,deleteProperty(){return!1}}))}getSeverity(t,e){return m(this,en).getSeverity(t,e)}};en=new WeakMap});var cu,Un,Hn,Oe,tn,pr,Hi,fu,Dn,mu=L(()=>{"use strict";We();oe();cu=o=>{let[,{length:t},e]=/^((?:\.\.\/)*)([\s\S]*)/u.exec(o);return[t/3,e]},Dn=class{constructor(t,e,r,{temporary:n,decode:i,selfLink:s,page:a,nowiki:l}={},g=[]){w(this,Hi);w(this,Un);w(this,Hn);w(this,Oe);w(this,tn);w(this,pr);ge(this,"page");ge(this,"valid");ge(this,"encoded",!1);this.page=a,l&&(t=t.replace(/\0(\d+)e\x7F/gu,(h,b)=>{var T;return(T=g[b].innerText)!=null?T:""}));let u=t.trim(),d=u.startsWith("../");if(i&&t.includes("%"))try{let h=/%(?!21|3[ce]|5[bd]|7[b-d])[\da-f]{2}/iu.test(t);t=Ht(t),this.encoded=h}catch{}if(t=Dt(t).replace(/[_ ]+/gu," ").trim(),d||a&&u.startsWith("/"))S(this,tn,0);else{let h=e;t.startsWith(":")&&(h=0,t=t.slice(1).trim());let b=t.split(":");if(b.length>1){let T=nt(b[0]),x=Object.prototype.hasOwnProperty.call(r.nsid,T)&&r.nsid[T];x&&(h=x,t=b.slice(1).join(":").trim())}S(this,tn,h)}let p=t.indexOf("#");if(p!==-1){let h=t.slice(p).trim().slice(1);if(h.includes("%"))try{h=Ht(h)}catch{}S(this,pr,h.replace(/ /gu,"_")),t=t.slice(0,p).trim()}let[f,c]=d?cu(t):[0,t];this.valid=!!(t||s&&this.ns===0&&m(this,pr)!==void 0)&&Dt(t)===t&&(f===0||a===void 0||a.split("/",f+1).length>f)&&!/^:|\0\d+[eh!+-]\x7F|[<>[\]{}|\n]|%[\da-f]{2}|(?:^|\/)\.{1,2}(?:$|\/)/iu.test(c),this.main=t,S(this,Hn,r.namespaces),S(this,Oe,r.articlePath||"/wiki/$1"),m(this,Oe).includes("$1")||S(this,Oe,m(this,Oe)+`${m(this,Oe).endsWith("/")?"":"/"}$1`),n||Object.defineProperties(this,{encoded:{enumerable:!1,writable:!1}})}get ns(){return m(this,tn)}get fragment(){return m(this,pr)}get main(){return m(this,Un)}set main(t){t=t.replace(/_/gu," ").trim(),S(this,Un,t&&t[0].toUpperCase()+t.slice(1))}get prefix(){let t=m(this,Hn)[this.ns];return t+(t&&":")}get title(){return this.getRedirection()[1]}get extension(){let{main:t}=this,e=t.lastIndexOf(".");return e===-1?void 0:t.slice(e+1).toLowerCase()}getRedirection(){let{prefix:t}=this,e=t;return C(this,Hi,fu).call(this,e)}setFragment(t){S(this,pr,t)}getUrl(t){{typeof t=="string"&&(S(this,Oe,t),m(this,Oe).includes("$1")||S(this,Oe,m(this,Oe)+`${m(this,Oe).endsWith("/")?"":"/"}$1`));let{title:e,fragment:r}=this;return e?m(this,Oe).replace("$1",encodeURIComponent(e)+(r?`#${encodeURIComponent(r)}`:"")):r===void 0?"":`#${encodeURIComponent(r)}`}throw new Error("Title.getUrl method is only available in the LSP version!")}};Un=new WeakMap,Hn=new WeakMap,Oe=new WeakMap,tn=new WeakMap,pr=new WeakMap,Hi=new WeakSet,fu=function(t,e=!0){var n,i;let r=(t+this.main).replace(/ /gu,"_");if(r.startsWith("/"))r=((n=this.page)!=null?n:"")+r.replace(/(.)\/$/u,"$1");else if(r.startsWith("../")&&((i=this.page)!=null&&i.includes("/"))){let[s,a]=cu(r),l=this.page.split("/");l.length>s&&(r=l.slice(0,-s).join("/")+(a&&"/")+a)}return[!1,r]}});var Cu={};re(Cu,{LanguageService:()=>Eo,tasks:()=>ku});var ku,mp,hp,bp,xp,vu,yp,Tp,kp,vp,hu,Ap,bu,Kn,Au,cr,Te,xu,Su,zn,Gn,zi,yu,Sp,Tu,Ee,Ot,yt,Tt,fr,Qn,nn,sn,mr,H,Vn,qe,$o,No,Io,wu,Ro,rn,Eo,Lu=L(()=>{"use strict";We();ei();ti();Si();G();oe();Ae();D();V();ku=new WeakMap,mp=new Set(["ref"]),hp=new Set(["ref","references"]),bp=new Set(["name","follow"]),xp=new Set(["group"]),vu=new Set(["arg-name","template-name","link-target","parameter-key"]),yp=new Set(["ext","html","attr-key","image-parameter","heading-title","heading","magic-word-name",...vu]),Tp=new Set(["text","comment","noinclude","include"]),kp=["ext","html","table"].map(o=>`${o}-attr#style`).join(),vp=Be(o=>new RegExp(`^(?:${o}|//)`,"iu")),hu=({type:o,parentNode:t,length:e,firstChild:r},n)=>o==="attr-value"&&e===1&&r.type==="text"&&(!n||t.name==="style"),Ap=o=>o.is("html-attr")||o.is("table-attr"),bu=o=>o.childNodes.every(({type:t})=>Tp.has(t)),Kn=(o,t)=>{let{top:e,left:r}=o.posFromIndex(t);return{line:e,character:r}},Au=(o,t,e)=>({start:Kn(o,t),end:Kn(o,e)}),cr=o=>{let{top:t,left:e,height:r,width:n}=o.getBoundingClientRect();return{start:{line:t,character:e},end:vr(t,e,r,n)}},Te=(o,t,e,{line:r,character:n},i,s)=>[...new Set(o)].map(a=>{var g;let l=(g=s==null?void 0:s(a))==null?void 0:g.description;return{label:a,kind:t,textEdit:{range:{start:{line:r,character:n-e.length},end:{line:r,character:n}},newText:a+(i!=null?i:"")},...l&&{documentation:{kind:"markdown",value:l}}}}),xu=(o,t,{line:e,character:r})=>{let n=o.indexFromPos(e,r);return o.caretPositionFromIndex(n+Number(/\w/u.test(t.charAt(n))))},Su=(o,t,e)=>{let{type:r,parentNode:n={}}=o,{name:i,tag:s}=n;return r==="attr-value"&&t.has(s)&&e.has(i)?o.toString().trim():NaN},zn=o=>Su(o,mp,bp),Gn=o=>Su(o,hp,xp),zi=o=>{let{type:t,name:e,parentNode:r}=o;switch(t){case"heading":return o.level;case"heading-title":return r.level;case"parameter-key":return`${r.parentNode.name}|${r.name}`;case"ext":case"html":case"image-parameter":return e;default:return r.name}},yu=(o,t,e=!1)=>({range:Au(o,...t.range),newText:t.text,title:`${e?"Fix":"Suggestion"}: ${t.desc}`,fix:e}),Sp=(o,t)=>{let{lintConfig:e}=v,{rules:r,fix:n,computeEditInfo:i}=e;if(e.fix=!0,e.computeEditInfo=!1,t){e.rules=void 0;for(let a of Wt)e.rules[a]=a===t?r[a]:0}let{output:s}=o.lint();return e.fix=n,e.computeEditInfo=i,t&&(e.rules=r),s===void 0?[]:[{range:cr(o),newText:s}]},Tu=async(o,t,e,r=v.getConfig())=>{let n=typeof setImmediate=="function"?setImmediate:setTimeout,{running:i}=Q;Q.running=!0;let{internal:s}=v;v.internal=!0;let a=()=>{Q.running=i,v.internal=s},l=new $(yr(o),r);l.type="root";let g=0;try{await new Promise(u=>{let d=()=>{t()===o?(g++,n(p,0)):u()},p=()=>{g===12?(l.afterBuild(),u()):(l[g===11?"build":"parseOnce"](g,e),d())};n(p,0)})}catch(u){throw a(),u}return a(),l},Eo=class{constructor(t){w(this,H);w(this,Ee);w(this,Ot);w(this,yt);w(this,Tt);w(this,fr);w(this,Qn);w(this,nn);w(this,sn);w(this,mr);ge(this,"include",!0);ge(this,"config");ge(this,"data");ku.set(t,this),Object.defineProperties(this,{config:{enumerable:!1},data:{enumerable:!1}})}async destroy(){Object.setPrototypeOf(this,null)}async provideDocumentColors(t,e,r=!0){let n=await C(this,H,qe).call(this,e);return n.querySelectorAll("attr-value,parameter-value,arg-default").reverse().flatMap(i=>{let{type:s,childNodes:a}=i;return s!=="attr-value"&&!bu(i)?[]:a.filter(l=>l.type==="text").reverse().flatMap(l=>{let{data:g}=l,u=sa(g,r).filter(([,,,p])=>p);if(u.length===0)return[];let d=l.getAbsoluteIndex();return u.map(([p,f,c])=>{let h=t(p);return h.length===4&&{color:{red:h[0]/255,green:h[1]/255,blue:h[2]/255,alpha:h[3]},range:Au(n,d+f,d+c)}}).filter(p=>p!==!1)})})}provideColorPresentations(t){let{color:{red:e,green:r,blue:n,alpha:i},range:s}=t,a=[e,r,n],l=i<1?`rgba(${a.map(g=>Math.round(g*255)).join()},${i})`:`#${a.map(ia).join("")}`;return[{label:l,textEdit:{range:s,newText:l}}]}async provideCompletionItems(t,e){var I,E,N,z,_,Y,W;let{re:r,allTags:n,functions:i,switches:s,jaSwitches:a,protocols:l,params:g,tags:u,ext:d}=C(this,H,wu).call(this),{line:p,character:f}=e,c=t.split(/\r?\n/u,p+1)[p],h=r.exec((I=c==null?void 0:c.slice(0,f))!=null?I:""),[,,b,T]=this.config.doubleUnderscore;if((h==null?void 0:h[1])!==void 0){let R=h[1].startsWith("/");return Te(n,"Class",h[1].slice(R?1:0),e,R&&!(c!=null&&c.slice(f).trim().startsWith(">"))?">":"")}else if(h!=null&&h[4]||h!=null&&h[5]&&a.length>0){let R=h[5]!==void 0;return Te(R?a:s,"Constant",h[R?5:4],e,"",F=>{if(this.data)R||(F=F.slice(2,-2));else return;return Object.hasOwn(b,F)?F=b[F]:Object.hasOwn(T,F)&&(F=T[F]),C(this,H,Ro).call(this,F.toLowerCase())})}else if((h==null?void 0:h[6])!==void 0)return Te(l,"Reference",h[6],e);let x=await C(this,H,qe).call(this,t),y;if(h!=null&&h[2]){y=x.elementFromPoint(h.index+h[2].length-1,p);let R=(E=h[3])!=null?E:"";if(h[2]==="{{{")return Te(x.querySelectorAll("arg").filter(K=>K.name&&K!==y).map(({name:K})=>K),"Variable",R,e);let[F,ee]=this.config.parserFunction,ae=c.charAt(f),xe=R.startsWith(":"),J=xe?R.slice(1).trimStart():R;if(h[2]==="[[")return Te(x.querySelectorAll("link,file,category,redirect-target").filter(K=>K!==y).map(({name:K})=>K),"Folder",J,e);let de=i;return ae===":"?de=i.filter(K=>!K.endsWith(":")):ae===":"&&(de=i.filter(K=>K.endsWith(":")).map(K=>K.slice(0,-1))),[...Te(de,"Function",R,e,"",K=>{if(this.data)Object.hasOwn(F,K)?K=F[K]:Object.hasOwn(ee,K)&&(K=ee[K]);else return;return C(this,H,rn).call(this,K.toLowerCase())}),...R.startsWith("#")?[]:Te(x.querySelectorAll("template").filter(K=>K!==y).map(K=>{let{name:kt}=K;if(xe)return kt;let{ns:on}=K.getAttribute("title");return on===0?`:${kt}`:on===10?kt.slice(9):kt}),"Folder",J,e)]}let k,A;if((h==null?void 0:h[8])===void 0){if(y=x.elementFromPoint(f,p),!y)return;({type:k,parentNode:A}=y)}if((h==null?void 0:h[7])!==void 0||k==="image-parameter"){let R=x.indexFromPos(p,f),F=(z=(N=h==null?void 0:h[7])==null?void 0:N.trimStart())!=null?z:m(this,Ee).slice(y.getAbsoluteIndex(),R).trimStart(),ee=m(this,Ee)[R]==="=";return[...Te(g,"Property",F,e).filter(({label:ae})=>!ee||!/[= ]$/u.test(ae)),...Te(x.querySelectorAll("image-parameter#width").filter(ae=>ae!==y).map(ae=>ae.text()),"Unit",F,e)]}else if((h==null?void 0:h[8])!==void 0||k==="attr-key"){let R=(Y=(_=h==null?void 0:h[8])==null?void 0:_.toLowerCase())!=null?Y:A.tag,F=(W=h==null?void 0:h[10])!=null?W:y.toString().slice(0,f-x.posFromIndex(y.getAbsoluteIndex()).left);if(!u.has(R))return;let ee=ki[R],ae=vi[R],xe=ae&&Te(ae,"Field",F,e);return d.includes(R)&&!ee?xe:[...xe!=null?xe:[],...R==="meta"||R==="link"?[]:Te(Ti,"Property",F,e),...ee?Te(ee,"Property",F,e):[],...Te(["data-"],"Variable",F,e),...Te(["xmlns:"],"Interface",F,e)]}else if(k==="parameter-key"||k==="parameter-value"&&A.anon){let R=A.parentNode,{type:F,name:ee}=R;if(F==="magic-word"&&ee!=="invoke")return;let ae=m(this,Ee).slice(y.getAbsoluteIndex(),x.indexFromPos(p,f)).trimStart(),{module:xe,function:J}=R;return ae?Te(x.querySelectorAll("parameter").filter(de=>de===A||de.anon||de.parentNode.type!==F||de.parentNode.name!==ee?!1:F==="template"?!0:de.parentNode.module===xe&&de.parentNode.function===J).map(({name:de})=>de),"Variable",ae,e,k==="parameter-value"?"=":""):void 0}else if(k==="param-line"){let R=m(this,Ee).slice(y.getAbsoluteIndex(),x.indexFromPos(p,f)).trimStart();return/^[a-z]+$/iu.test(R)?Te(Ai[y.name],"Property",R,e):void 0}else if(hu(y)&&Ap(A)){let R=ui(A.tag,A.name);if(R.length===0)return;let F=m(this,Ee).slice(y.getAbsoluteIndex(),x.indexFromPos(p,f)).trimStart();return Te(R,"Value",F,e)}}async provideDiagnostics(t,e=!0){let r=await C(this,H,qe).call(this,t),{lintConfig:n}=v,i=n.fix;n.fix=!1;let s=r.lint();return n.fix=i,[(e?s:s.filter(({severity:u})=>u==="error")).map(({startLine:u,startCol:d,endLine:p,endCol:f,severity:c,rule:h,message:b,fix:T,suggestions:x})=>({range:{start:{line:u,character:d},end:{line:p,character:f}},severity:c==="error"?1:2,source:"WikiLint",code:h,message:b,data:[...T?[yu(r,T,!0)]:[],...x?x.map(y=>yu(r,y)):[]]})),[],[]].flat(2)}resolveCodeAction(t){if(t.kind!=="source.fixAll")return t;let{rule:e}=t.data;return{...t,edit:{changes:{"":Sp(m(this,fr),e)}}}}async provideFoldingRanges(t){let e=await C(this,H,qe).call(this,t),{length:r}=e.getLines(),n=[],i=Array.from({length:6}),s=e.querySelectorAll("heading-title,table,template,magic-word");for(let a of[...s].reverse())a.getRelativeIndex();for(let a of s){let{offsetHeight:l}=a;if(a.type==="heading-title"||l>2){let{top:g}=e.posFromIndex(a.getAbsoluteIndex());if(a.type==="heading-title"){let{level:u}=a.parentNode;for(let d=u-1;d<6;d++){let p=i[d];p!==void 0&&p<g-1&&n.push({startLine:p,endLine:g-1,kind:"region"}),i[d]=void 0}i[u-1]=g+l-1}else n.push({startLine:g,endLine:g+l-2,kind:"region"})}}for(let a of i)a!==void 0&&a<r-1&&n.push({startLine:a,endLine:r-1,kind:"region"});return n}async provideLinks(t){var s;(s=this.config)!=null||(this.config=v.getConfig());let{articlePath:e,protocol:r}=this.config,n=e==null?void 0:e.includes("//"),i=vp(r);return(await C(this,H,qe).call(this,t)).querySelectorAll(`magic-link,ext-link-url,free-ext-link,attr-value${n?",link-target,template-name,invoke-module,magic-word#filepath,magic-word#widget":""},image-parameter#link,image-parameter#manualthumb`).reverse().map(a=>{let l;a.is("magic-word")?({name:l}=a,a=a.childNodes[1].lastChild):a.is("image-parameter")&&({name:l}=a);let{type:g,parentNode:u,firstChild:d,lastChild:p,childNodes:f,length:c}=a,{tag:h}=u;if(l!=null||(l=u.name),!(g!=="attr-value"||l==="cite"&&["blockquote","del","ins","q"].includes(h)||l==="src"&&["templatestyles","img"].includes(h)||l==="templatename"&&h==="rss"||l==="file"&&h==="phonos")||!bu(a))return!1;let b=f.filter(T=>T.type==="text").map(({data:T})=>T).join("").trim();if(!b)return!1;try{if(a.is("magic-link")||a.is("ext-link-url")||a.is("free-ext-link"))b=a.getUrl(e);else if(g==="link-target"&&(u.is("link")||u.is("redirect-target")||u.is("category"))){if(/^(?:\.\.)?\//u.test(b))return!1;b=u.link.getUrl(e)}else if(g==="link-target"||g==="template-name")b=u.getAttribute("title").getUrl(e);else if(["invoke-module","parameter-value"].includes(g)||g==="attr-value"&&(l==="src"&&h==="templatestyles"||l==="templatename"&&h==="rss"||l==="file"&&h==="phonos")||g==="image-parameter"&&(l==="manualthumb"||!i.test(b))){if(!n||b.startsWith("/"))return!1;g==="image-parameter"&&l==="manualthumb"||g==="parameter-value"&&l==="filepath"||g==="attr-value"&&h==="phonos"?b=`File:${b}`:g==="parameter-value"?b=`Widget:${b}`:g==="invoke-module"&&(b=`Module:${b}`);let T=v.normalizeTitle(b,g==="attr-value"?10:0,!1,this.config,{temporary:!0});if(!T.valid)return!1;b=T.getUrl()}if(typeof b=="string"&&b.startsWith("//")&&(b=`https:${b}`),b=new URL(b).href,g==="image-parameter"){let T=d.getBoundingClientRect(),{top:x,left:y,height:k,width:A}=c===1?T:p.getBoundingClientRect();return{range:{start:{line:T.top,character:T.left},end:vr(x,y,k,A)},target:b}}return{range:cr(a),target:b}}catch{return!1}}).filter(a=>a!==!1)}async provideReferences(t,e){let r=await C(this,H,qe).call(this,t),{offsetNode:n,offset:i}=xu(r,m(this,Ee),e),s=n.type==="text"?n.parentNode:n,a=i===0&&(s.is("ext-attr-dirty")||s.is("html-attr-dirty"))?s.parentNode.parentNode:s,{type:l}=a,g=zn(a),u=Gn(a);if(!g&&!u&&!yp.has(l))return;let d=zi(a),p=r.querySelectorAll(l==="heading-title"?"heading":l).filter(f=>l==="attr-value"?zn(f)===g||Gn(f)===u:zi(f)===d).reverse().map(f=>({range:cr(f.type==="parameter-key"?f.parentNode:f)}));return p.length===0?void 0:p}async provideDefinition(t,e){let r=await C(this,H,qe).call(this,t),n=r.elementFromPoint(e.character,e.line);if(!n)return;let i=n.is("ext")&&n.name==="ref"?n:n.closest("ext#ref"),s=i==null?void 0:i.getAttr("name");if(!s)return;let a=i.getAttr("group"),l=r.querySelectorAll("ext#ref").filter(g=>g.innerText&&g.getAttr("name")===s&&g.getAttr("group")===a).reverse().map(({lastChild:g})=>({range:cr(g)}));return l.length===0?void 0:l}async resolveRenameLocation(t,e){let r=await C(this,H,qe).call(this,t),n=r.elementFromPoint(e.character,e.line);if(!n)return;let{type:i}=n,s=zn(n),a=Gn(n);return!s&&!a&&(!vu.has(i)||i==="parameter-key"&&/^[1-9]\d*$/u.test(n.parentNode.name)||i==="link-target"&&!["link","redirect-target"].includes(n.parentNode.type))?void 0:cr(n)}async provideRenameEdits(t,e,r){let n=await C(this,H,qe).call(this,t),i=n.elementFromPoint(e.character,e.line);if(!i)return;let{type:s}=i,a=zn(i),l=a&&i.parentNode.parentNode.getAttr("group"),g=Gn(i),u=zi(i),d=n.querySelectorAll(s).filter(p=>{let{type:f}=p.parentNode;return s==="link-target"&&f!=="link"&&f!=="redirect-target"?!1:s==="attr-value"?Gn(p)===g||zn(p)===a&&p.parentNode.parentNode.getAttr("group")===l:zi(p)===u});return d.length===0?void 0:{changes:{"":d.reverse().map(p=>({range:cr(p),newText:r}))}}}async provideHover(t,e){if(!this.data)return;let r=await C(this,H,qe).call(this,t),{offsetNode:n,offset:i}=xu(r,m(this,Ee),e);n.type==="text"&&(i+=n.getRelativeIndex(),n=n.parentNode);let{type:s,parentNode:a,length:l,name:g}=n,u,d,p,f;if(n.is("double-underscore")&&i>0)u=C(this,H,Ro).call(this,n.name);else if(s==="magic-word-name")u=C(this,H,rn).call(this,a.name),d=n.text().trim(),p=a.getAttribute("colon");else if(n.is("magic-word")&&!n.modifier&&l===1&&(i>0||r.posFromIndex(n.getAbsoluteIndex()).left===e.character))u=C(this,H,rn).call(this,g),d=n.firstChild.text().trim(),p=n.getAttribute("colon");else if((n.is("magic-word")||n.is("template"))&&n.modifier&&i>=2&&n.getRelativeIndex(0)>i&&(d=n.modifier.trim().slice(0,-1),u=C(this,H,rn).call(this,d.toLowerCase()),p=":",u)){let c=n.getAbsoluteIndex();f={start:Kn(r,c+2),end:Kn(r,c+n.modifier.trimEnd().length+1)}}return u&&{contents:{kind:"markdown",value:(u.signatures?`${u.signatures.map(c=>`- **{{ ${d}${c.length===0?"**":`${p}** `}${c.map(({label:h,const:b})=>b?h:`*${h}*`).join(" **|** ")} **}}**`).join(`
36
36
  `)}
37
37
 
38
- `:"")+u.description},range:f!=null?f:fr(n)}}async provideSignatureHelp(t,e){if(!this.data)return;let{line:r,character:n}=e,i=t.split(/\r?\n/u,r+1)[r],{lastChild:s}=await C(this,H,Eo).call(this,`${i.slice(0,n+ri(i.slice(n),/[{}<]|$/u))}}}`);if(!s.is("magic-word")||s.length===1)return;let{name:a,childNodes:l,firstChild:g}=s,u=C(this,H,rn).call(this,a);if(!(u!=null&&u.signatures))return;let d=l.length-1,p=u.signatures.filter(b=>{var T;return(b.length>=d||((T=b[b.length-1])==null?void 0:T.rest))&&b.every(({label:x,const:y},k)=>{var I;let A=y&&k<d&&((I=l[k+1])==null?void 0:I.text().trim());return!A||x.toLowerCase().includes(A.toLowerCase())})});if(p.length===0)return;let f=-1;for(let b=s.getAbsoluteIndex()+s.getAttribute("padding");f<d&&(b+=l[f+1].toString().length+1,!(b>n));f++);let c=g.text().trim(),h=s.getAttribute("colon");return{signatures:p.map(b=>({label:`{{${c}${b.length===0?"":h}${b.map(({label:T})=>T).join("|")}}}`,parameters:b.map(({label:T,const:x})=>({label:T,...x?{documentation:"Predefined parameter"}:void 0})),...b.length<d?{activeParameter:Math.min(f,b.length-1)}:void 0})),activeParameter:f}}async provideInlayHints(t){let e=await C(this,H,qe).call(this,t),r=[];for(let n of e.querySelectorAll("template,magic-word#invoke").reverse()){let{type:i,childNodes:s}=n;r=[...r,...s.slice(i==="template"?1:3).filter(({anon:a})=>a).reverse().map(a=>({position:Vn(e,a.getAbsoluteIndex()),label:`${a.name}=`,kind:2}))]}return r}querySelectorAll(t){return m(this,mr).querySelectorAll(t)}findStyleTokens(){return this.querySelectorAll(Tp).filter(({lastChild:t})=>bu(t))}async provideRefactoringAction(t,e){let r,n;if(e){let{start:a,end:l}=e;if(a.line===l.line&&a.character===l.character)return[];r=t.split(/\r?\n/u,l.line+1),n=a.line===l.line?r[l.line].slice(a.character,l.character):`${r[a.line].slice(a.character)}
38
+ `:"")+u.description},range:f!=null?f:cr(n)}}async provideSignatureHelp(t,e){if(!this.data)return;let{line:r,character:n}=e,i=t.split(/\r?\n/u,r+1)[r],{lastChild:s}=await C(this,H,No).call(this,`${i.slice(0,n+ii(i.slice(n),/[{}<]|$/u))}}}`);if(!s.is("magic-word")||s.length===1)return;let{name:a,childNodes:l,firstChild:g}=s,u=C(this,H,rn).call(this,a);if(!(u!=null&&u.signatures))return;let d=l.length-1,p=u.signatures.filter(b=>{var T;return(b.length>=d||((T=b[b.length-1])==null?void 0:T.rest))&&b.every(({label:x,const:y},k)=>{var I;let A=y&&k<d&&((I=l[k+1])==null?void 0:I.text().trim());return!A||x.toLowerCase().includes(A.toLowerCase())})});if(p.length===0)return;let f=-1;for(let b=s.getAbsoluteIndex()+s.getAttribute("padding");f<d&&(b+=l[f+1].toString().length+1,!(b>n));f++);let c=g.text().trim(),h=s.getAttribute("colon");return{signatures:p.map(b=>({label:`{{${c}${b.length===0?"":h}${b.map(({label:T})=>T).join("|")}}}`,parameters:b.map(({label:T,const:x})=>({label:T,...x?{documentation:"Predefined parameter"}:void 0})),...b.length<d?{activeParameter:Math.min(f,b.length-1)}:void 0})),activeParameter:f}}async provideInlayHints(t){let e=await C(this,H,qe).call(this,t),r=[];for(let n of e.querySelectorAll("template,magic-word#invoke").reverse()){let{type:i,childNodes:s}=n;r=[...r,...s.slice(i==="template"?1:3).filter(({anon:a})=>a).reverse().map(a=>({position:Kn(e,a.getAbsoluteIndex()),label:`${a.name}=`,kind:2}))]}return r}querySelectorAll(t){return m(this,fr).querySelectorAll(t)}findStyleTokens(){return this.querySelectorAll(kp).filter(({lastChild:t})=>hu(t))}async provideRefactoringAction(t,e){let r,n;if(e){let{start:a,end:l}=e;if(a.line===l.line&&a.character===l.character)return[];r=t.split(/\r?\n/u,l.line+1),n=a.line===l.line?r[l.line].slice(a.character,l.character):`${r[a.line].slice(a.character)}
39
39
  ${r.slice(a.line+1,l.line).join(`
40
40
  `)}${r.length===2?"":`
41
41
  `}${r[l.line].slice(0,l.character)}`}else if(t)r=t.split(/\r?\n/u),n=r.join(`
42
- `),e={start:{line:0,character:0},end:{line:r.length-1,character:r[r.length-1].length}};else return[];let i=await C(this,H,Eo).call(this,n),{viewOnly:s}=v;return v.viewOnly=!1,Q.internal(()=>{i.escape()},v),v.viewOnly=s,[{title:"Escape with magic words",kind:"refactor.rewrite",edit:{changes:{"":[{range:e,newText:i.toString()}]}}}]}};Ee=new WeakMap,Ot=new WeakMap,yt=new WeakMap,Tt=new WeakMap,mr=new WeakMap,Kn=new WeakMap,nn=new WeakMap,sn=new WeakMap,hr=new WeakMap,H=new WeakSet,Gn=function(){return m(this,nn)===this.config&&m(this,sn)===this.include},qe=async function(t){var e;return t=yr(t),!m(this,yt)&&C(this,H,Gn).call(this)&&m(this,Ee)===t?m(this,mr):(S(this,Ee,t),(e=m(this,yt))!=null||S(this,yt,C(this,H,Lo).call(this)),m(this,yt))},Lo=async function(){var r;(r=this.config)!=null||(this.config=v.getConfig()),S(this,nn,this.config),S(this,sn,this.include);let t=m(this,Ee),e=await ku(t,()=>m(this,Ee),this.include,this.config);return C(this,H,Gn).call(this)&&m(this,Ee)===t?(S(this,mr,e),S(this,yt,void 0),e):(S(this,yt,C(this,H,Lo).call(this)),m(this,yt))},Eo=async function(t){var e;return t=yr(t),!m(this,Tt)&&C(this,H,Gn).call(this)&&m(this,Ot)===t?m(this,Kn):(S(this,Ot,t),(e=m(this,Tt))!=null||S(this,Tt,C(this,H,$o).call(this)),m(this,Tt))},$o=async function(){var r;(r=this.config)!=null||(this.config=v.getConfig()),S(this,nn,this.config),S(this,sn,this.include);let t=m(this,Ot),e=await ku(t,()=>m(this,Ot),this.include,this.config);return C(this,H,Gn).call(this)&&m(this,Ot)===t?(S(this,Kn,e),S(this,Tt,void 0),e):(S(this,Tt,C(this,H,$o).call(this)),m(this,Tt))},Cu=function(){var t;if(!m(this,hr)||m(this,hr)[1]!==this.config){(t=this.config)!=null||(this.config=v.getConfig());let{nsid:e,ext:r,html:n,parserFunction:[i,s,...a],doubleUnderscore:l,protocol:g,img:u}=this.config,d=new Set([r,n].flat(2)),p=new RegExp("(?:"+String.raw`<(\/?\w*)`+"|"+String.raw`(\{{2,4}|\[\[)\s*([^|{}<>[\]\s][^|{}<>[\]#]*)?`+"|"+String.raw`(_(?:_(?:(?!__|_{2})[\p{L}\p{N}_])*)?)`+"|"+String.raw`(_(?:_(?:(?!__|_{2})[\p{L}\p{N}_])*)?)`+"|"+String.raw`(?<!\[)\[([a-z:/]*)`+"|"+String.raw`\[\[\s*(?:${Object.entries(e).filter(([,c])=>c===6).map(([c])=>c).join("|")})\s*:[^[\]{}<>]+\|([^[\]{}<>|=]*)`+"|"+String.raw`<(\w+)(?:\s(?:[^<>{}|=\s]+(?:\s*=\s*(?:[^\s"']\S*|(["']).*?\9))?(?=\s))*)?\s(\w*)`+")$","iu"),f=l.slice(0,2).flat();S(this,hr,[{re:p,ext:r,tags:d,allTags:[...d,"onlyinclude","includeonly","noinclude"],functions:[Object.keys(i),Object.keys(s),a].flat(2),switches:f.filter(jt).map(c=>`__${c}__`),jaSwitches:f.filter(c=>!jt(c)),protocols:g.split("|"),params:Object.keys(u).filter(c=>c.endsWith("$1")||!c.includes("$1")).map(c=>c.replace(/\$1$/u,""))},this.config])}return m(this,hr)[0]},No=function(t){return this.data.behaviorSwitches.find(({aliases:e})=>e.includes(t))},rn=function(t){return this.data.parserFunctions.find(({aliases:e})=>e.some(r=>r.replace(/^#/u,"")===t))}});var Io,$u,Nu,Iu,Qn,Fu,Sp,v,D=L(()=>{Zn();Ae();gn();ae();cu();hu();Io=!0,$u=new _n,Iu=(o,t,e)=>typeof o=="string"?[!!t,e,o]:[!!o,t,e],Qn={config:Xi,get rules(){return Dt},get i18n(){return{...Ko,...Nu}},set i18n(o){Nu=o},get lintConfig(){return $u},set lintConfig(o){$u=new _n(o)},get viewOnly(){return Io},set viewOnly(o){Io&&!o&&Q.rev++,Io=o},internal:!1,getConfig(o){let t=o!=null?o:this.config,{doubleUnderscore:e,ext:r,parserFunction:n,variable:i}=t;for(let s=0;s<2;s++)e[s].length===0&&(e[s]=Object.keys(e[s+2]));return r.includes("translate")&&!i.includes("translationlanguage")&&(i.push("translationlanguage"),n[1].TRANSLATIONLANGUAGE="translationlanguage"),{...Xi,...t,excludes:[]}},msg(o,t=""){var e;return o&&((e=this.i18n[o])!=null?e:o).replace("$1",this.msg(t))},normalizeTitle(o,t=0,e,r=Qn.getConfig(),n){let i;if(n!=null&&n.halfParsed)i=new Wn(o,t,r,n);else{let{Token:s}=(V(),X(Wi));i=Q.run(()=>{let a=new s(o,r);a.type="root",a.pageName=n==null?void 0:n.page,a.parseOnce(0,e).parseOnce();let l=new Wn(a.firstChild.toString(),t,r,n);a.build();let g=["main","fragment"];for(let u of g){let d=l[u];if(d!=null&&d.includes("\0")){let p=a.buildFromStr(d,1);u==="main"?l.main=p:l.setFragment(p)}}return l},this)}return i},parse(o,t,e,r,n){o=yr(o);let i,s,a,l;typeof t=="string"?(i=!!e,s=r,a=n,l=t):(i=!!t,s=e,a=r,l=n),s!=null||(s=11),a!=null||(a=this.getConfig());let g;typeof s!="number"&&(g=Array.isArray(s)?s:[s],s=Math.max(...g.map(p=>Uo[p]||11)));let{Token:u}=(V(),X(Wi));return Q.run(()=>{let p=new u(o,a);return p.type="root",p.pageName=l,p.parse(s,i)})},parseWithRef(o,t,e,r=t.getAttribute("include")){return this.parse(o,r,e,t.getAttribute("config"),t.pageName)},createLanguageService(o={}){var t;{let{LanguageService:e,tasks:r}=(Eu(),X(Lu));return(t=r.get(o))!=null?t:new e(o)}},lint(o,t,e,r){{let[n,i,s]=Iu(t,e,r);return Q.internal(()=>this.parse(o,n,void 0,i,s).lint(),this)}},print(o,t,e,r){{let[n,i,s]=Iu(t,e,r);return Q.internal(()=>this.parse(o,n,void 0,i,s).print(),this)}}},Fu={},Sp=new Set(["lintConfig","normalizeTitle","parse","createLanguageService"]);for(let o in Qn)Sp.has(o)||(Fu[o]={enumerable:!1});Object.defineProperties(Qn,Fu);Object.assign(typeof globalThis=="object"?globalThis:self,{Parser:Qn});v=Qn});D();})();
42
+ `),e={start:{line:0,character:0},end:{line:r.length-1,character:r[r.length-1].length}};else return[];let i=await C(this,H,No).call(this,n),{viewOnly:s}=v;return v.viewOnly=!1,Q.internal(()=>{i.escape()},v),v.viewOnly=s,[{title:"Escape with magic words",kind:"refactor.rewrite",edit:{changes:{"":[{range:e,newText:i.toString()}]}}}]}};Ee=new WeakMap,Ot=new WeakMap,yt=new WeakMap,Tt=new WeakMap,fr=new WeakMap,Qn=new WeakMap,nn=new WeakMap,sn=new WeakMap,mr=new WeakMap,H=new WeakSet,Vn=function(){return m(this,nn)===this.config&&m(this,sn)===this.include},qe=async function(t){var e;return t=yr(t),!m(this,yt)&&C(this,H,Vn).call(this)&&m(this,Ee)===t?m(this,fr):(S(this,Ee,t),(e=m(this,yt))!=null||S(this,yt,C(this,H,$o).call(this)),m(this,yt))},$o=async function(){var r;(r=this.config)!=null||(this.config=v.getConfig()),S(this,nn,this.config),S(this,sn,this.include);let t=m(this,Ee),e=await Tu(t,()=>m(this,Ee),this.include,this.config);return C(this,H,Vn).call(this)&&m(this,Ee)===t?(S(this,fr,e),S(this,yt,void 0),e):(S(this,yt,C(this,H,$o).call(this)),m(this,yt))},No=async function(t){var e;return t=yr(t),!m(this,Tt)&&C(this,H,Vn).call(this)&&m(this,Ot)===t?m(this,Qn):(S(this,Ot,t),(e=m(this,Tt))!=null||S(this,Tt,C(this,H,Io).call(this)),m(this,Tt))},Io=async function(){var r;(r=this.config)!=null||(this.config=v.getConfig()),S(this,nn,this.config),S(this,sn,this.include);let t=m(this,Ot),e=await Tu(t,()=>m(this,Ot),this.include,this.config);return C(this,H,Vn).call(this)&&m(this,Ot)===t?(S(this,Qn,e),S(this,Tt,void 0),e):(S(this,Tt,C(this,H,Io).call(this)),m(this,Tt))},wu=function(){var t;if(!m(this,mr)||m(this,mr)[1]!==this.config){(t=this.config)!=null||(this.config=v.getConfig());let{nsid:e,ext:r,html:n,parserFunction:[i,s,...a],doubleUnderscore:l,protocol:g,img:u}=this.config,d=new Set([r,n].flat(2)),p=new RegExp("(?:"+String.raw`<(\/?\w*)`+"|"+String.raw`(\{{2,4}|\[\[)\s*([^|{}<>[\]\s][^|{}<>[\]#]*)?`+"|"+String.raw`(_(?:_(?:(?!__|_{2})[\p{L}\p{N}_])*)?)`+"|"+String.raw`(_(?:_(?:(?!__|_{2})[\p{L}\p{N}_])*)?)`+"|"+String.raw`(?<!\[)\[([a-z:/]*)`+"|"+String.raw`\[\[\s*(?:${Object.entries(e).filter(([,c])=>c===6).map(([c])=>c).join("|")})\s*:[^[\]{}<>]+\|([^[\]{}<>|=]*)`+"|"+String.raw`<(\w+)(?:\s(?:[^<>{}|=\s]+(?:\s*=\s*(?:[^\s"']\S*|(["']).*?\9))?(?=\s))*)?\s(\w*)`+")$","iu"),f=l.slice(0,2).flat();S(this,mr,[{re:p,ext:r,tags:d,allTags:[...d,"onlyinclude","includeonly","noinclude"],functions:[Object.keys(i),Object.keys(s),a].flat(2),switches:f.filter(At).map(c=>`__${c}__`),jaSwitches:f.filter(c=>!At(c)),protocols:g.split("|"),params:Object.keys(u).filter(c=>c.endsWith("$1")||!c.includes("$1")).map(c=>c.replace(/\$1$/u,""))},this.config])}return m(this,mr)[0]},Ro=function(t){return this.data.behaviorSwitches.find(({aliases:e})=>e.includes(t))},rn=function(t){return this.data.parserFunctions.find(({aliases:e})=>e.some(r=>r.replace(/^#/u,"")===t))}});var Fo,Eu,$u,Nu,Jn,Iu,wp,v,D=L(()=>{ei();ti();Ae();gn();oe();pu();mu();Fo=!0,Eu=new Wn,Nu=(o,t,e)=>typeof o=="string"?[!!t,e,o]:[!!o,t,e],Jn={config:Zi,get rules(){return Wt},get i18n(){return{...Jo,...$u}},set i18n(o){$u=o},get lintConfig(){return Eu},set lintConfig(o){Eu=new Wn(o)},get viewOnly(){return Fo},set viewOnly(o){Fo&&!o&&Q.rev++,Fo=o},internal:!1,getConfig(o){let t=o!=null?o:this.config,{doubleUnderscore:e,ext:r,parserFunction:n,variable:i,variants:s}=t;for(let a=0;a<2;a++)e[a].length===0&&(e[a]=Object.keys(e[a+2]));return r.includes("translate")&&!i.includes("translationlanguage")&&(i.push("translationlanguage"),n[1].TRANSLATIONLANGUAGE="translationlanguage"),t.variants=Ho(s),{...Zi,...t,excludes:[]}},msg(o,t=""){var e;return o&&((e=this.i18n[o])!=null?e:o).replace("$1",this.msg(t))},normalizeTitle(o,t=0,e,r=Jn.getConfig(),n,i=[]){let s;if(n!=null&&n.halfParsed)s=new Dn(o,t,r,n,i);else{let{Token:a}=(V(),X(Ui));s=Q.run(()=>{let l=new a(o,r,i);l.type="root",l.pageName=n==null?void 0:n.page,l.parseOnce(0,e).parseOnce();let g=new Dn(l.firstChild.toString(),t,r,n,i);l.build();let u=["main","fragment"];for(let d of u){let p=g[d];if(p!=null&&p.includes("\0")){let f=l.buildFromStr(p,1);d==="main"?g.main=f:g.setFragment(f)}}return g},this)}return s},parse(o,t,e,r,n){o=yr(o);let i,s,a,l;typeof t=="string"?(i=!!e,s=r,a=n,l=t):(i=!!t,s=e,a=r,l=n),s!=null||(s=11),a!=null||(a=this.getConfig());let g;typeof s!="number"&&(g=Array.isArray(s)?s:[s],s=Math.max(...g.map(p=>zo[p]||11)));let{Token:u}=(V(),X(Ui));return Q.run(()=>{let p=new u(o,a);return p.type="root",p.pageName=l,p.parse(s,i)})},parseWithRef(o,t,e,r=t.getAttribute("include")){return this.parse(o,r,e,t.getAttribute("config"),t.pageName)},createLanguageService(o={}){var t;{let{LanguageService:e,tasks:r}=(Lu(),X(Cu));return(t=r.get(o))!=null?t:new e(o)}},lint(o,t,e,r){{let[n,i,s]=Nu(t,e,r);return Q.internal(()=>this.parse(o,n,void 0,i,s).lint(),this)}},print(o,t,e,r){{let[n,i,s]=Nu(t,e,r);return Q.internal(()=>this.parse(o,n,void 0,i,s).print(),this)}}},Iu={},wp=new Set(["lintConfig","normalizeTitle","parse","createLanguageService"]);for(let o in Jn)wp.has(o)||(Iu[o]={enumerable:!1});Object.defineProperties(Jn,Iu);Object.assign(typeof globalThis=="object"?globalThis:self,{Parser:Jn});v=Jn});D();})();
43
+ /**
44
+ * 二分法查找索引
45
+ * @param haystack 数组
46
+ * @param needle 目标值
47
+ * @param comparator 比较函数
48
+ * @author The Dark Sky Company, LLC <support@darkskyapp.com>
49
+ * @license CC0-1.0
50
+ * @see https://github.com/darkskyapp/binary-search/blob/master/index.js
51
+ */
43
52
  //# sourceMappingURL=bundle-lsp.min.js.map