wikiparser-node 1.26.0 → 1.28.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.
- package/bundle/bundle-es8.min.js +25 -25
- package/bundle/bundle-lsp.min.js +30 -30
- package/bundle/bundle.min.js +24 -25
- package/coverage/badge.svg +1 -1
- package/data/.schema.json +2 -1
- package/data/signatures.json +82 -16
- package/dist/addon/token.js +1 -1
- package/dist/base.d.mts +3 -3
- package/dist/base.d.ts +3 -3
- package/dist/bin/config.js +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -3
- package/dist/internal.d.ts +5 -5
- package/dist/lib/document.js +6 -0
- package/dist/lib/lintConfig.js +19 -12
- package/dist/lib/lsp.d.ts +1 -1
- package/dist/lib/lsp.js +1 -1
- package/dist/lib/node.js +51 -40
- package/dist/lib/text.js +3 -3
- package/dist/mixin/attributesParent.js +59 -57
- package/dist/mixin/elementLike.js +77 -75
- package/dist/mixin/hidden.js +3 -3
- package/dist/mixin/nodeLike.js +2 -2
- package/dist/mixin/padded.js +9 -7
- package/dist/mixin/singleLine.d.ts +1 -1
- package/dist/mixin/singleLine.js +10 -11
- package/dist/parser/commentAndExt.js +1 -1
- package/dist/parser/html.js +1 -1
- package/dist/parser/selector.js +2 -1
- package/dist/src/arg.js +2 -2
- package/dist/src/atom.d.ts +1 -1
- package/dist/src/atom.js +0 -1
- package/dist/src/attribute.d.ts +5 -7
- package/dist/src/attribute.js +32 -23
- package/dist/src/attributes.d.ts +7 -8
- package/dist/src/attributes.js +5 -3
- package/dist/src/commented.d.ts +3 -3
- package/dist/src/converterRule.js +1 -1
- package/dist/src/heading.js +1 -1
- package/dist/src/imageParameter.d.ts +0 -8
- package/dist/src/imageParameter.js +12 -8
- package/dist/src/imagemapLink.js +1 -1
- package/dist/src/index.d.ts +0 -5
- package/dist/src/index.js +3 -6
- package/dist/src/link/base.js +1 -2
- package/dist/src/link/category.js +1 -2
- package/dist/src/link/file.js +17 -9
- package/dist/src/link/galleryImage.d.ts +0 -3
- package/dist/src/link/galleryImage.js +3 -2
- package/dist/src/link/index.js +1 -1
- package/dist/src/magicLink.d.ts +0 -7
- package/dist/src/multiLine/gallery.d.ts +49 -0
- package/dist/src/{gallery.js → multiLine/gallery.js} +24 -37
- package/dist/src/multiLine/imagemap.d.ts +25 -0
- package/dist/src/{imagemap.js → multiLine/imagemap.js} +20 -36
- package/dist/src/multiLine/index.d.ts +17 -0
- package/dist/src/multiLine/index.js +36 -0
- package/dist/src/{paramTag → multiLine}/inputbox.d.ts +1 -1
- package/dist/src/{paramTag → multiLine}/inputbox.js +2 -2
- package/dist/src/multiLine/paramTag.d.ts +20 -0
- package/dist/src/{paramTag/index.js → multiLine/paramTag.js} +10 -24
- package/dist/src/nowiki/base.d.ts +1 -1
- package/dist/src/nowiki/comment.js +3 -1
- package/dist/src/nowiki/commentLine.d.ts +11 -0
- package/dist/src/nowiki/commentLine.js +67 -0
- package/dist/src/nowiki/listBase.js +1 -2
- package/dist/src/nowiki/noinclude.d.ts +6 -0
- package/dist/src/nowiki/noinclude.js +19 -4
- package/dist/src/nowiki/quote.js +2 -2
- package/dist/src/paramLine.d.ts +17 -0
- package/dist/src/paramLine.js +83 -0
- package/dist/src/parameter.d.ts +0 -1
- package/dist/src/parameter.js +2 -1
- package/dist/src/pre.d.ts +6 -8
- package/dist/src/pre.js +3 -2
- package/dist/src/syntax.d.ts +1 -1
- package/dist/src/table/base.d.ts +6 -1
- package/dist/src/table/base.js +96 -46
- package/dist/src/table/index.js +71 -67
- package/dist/src/table/td.d.ts +2 -2
- package/dist/src/table/td.js +8 -7
- package/dist/src/table/tr.d.ts +2 -2
- package/dist/src/table/trBase.d.ts +0 -5
- package/dist/src/table/trBase.js +4 -5
- package/dist/src/{html.d.ts → tag/html.d.ts} +6 -22
- package/dist/src/{html.js → tag/html.js} +43 -131
- package/dist/src/tag/index.d.ts +44 -0
- package/dist/src/tag/index.js +214 -0
- package/dist/src/tag/tvar.d.ts +38 -0
- package/dist/src/tag/tvar.js +169 -0
- package/dist/src/tagPair/ext.js +4 -4
- package/dist/src/tagPair/include.js +1 -1
- package/dist/src/tagPair/index.d.ts +1 -1
- package/dist/src/tagPair/index.js +1 -0
- package/dist/src/tagPair/translate.js +10 -10
- package/dist/src/transclude.d.ts +8 -9
- package/dist/src/transclude.js +8 -5
- package/dist/util/constants.js +1 -1
- package/dist/util/html.js +2 -1
- package/extensions/dist/base.js +1 -1
- package/extensions/ui.css +1 -1
- package/i18n/en.json +14 -13
- package/i18n/zh-hans.json +19 -18
- package/i18n/zh-hant.json +31 -30
- package/package.json +2 -2
- package/dist/mixin/multiLine.d.ts +0 -4
- package/dist/mixin/multiLine.js +0 -33
- package/dist/src/gallery.d.ts +0 -66
- package/dist/src/imagemap.d.ts +0 -49
- package/dist/src/paramTag/index.d.ts +0 -28
package/bundle/bundle.min.js
CHANGED
|
@@ -1,29 +1,28 @@
|
|
|
1
|
-
"use strict";(()=>{var Ha=Object.defineProperty;var fr=t=>{throw TypeError(t)};var Ga=(t,e,s)=>e in t?Ha(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var Va=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var lt=(t,e,s)=>Ga(t,typeof e!="symbol"?e+"":e,s),He=(t,e,s)=>e.has(t)||fr("Cannot "+s);var p=(t,e,s)=>(He(t,e,"read from private field"),s?s.call(t):e.get(t)),k=(t,e,s)=>e.has(t)?fr("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),C=(t,e,s,r)=>(He(t,e,"write to private field"),r?r.call(t,s):e.set(t,s),s),E=(t,e,s)=>(He(t,e,"access private method"),s);var mr=(t,e,s,r)=>({set _(i){C(t,e,i,s)},get _(){return p(t,e,r)}});var Xl=Va((Kl,Ma)=>{var Qa=Object.create,qt=Object.defineProperty,Ji=Object.getOwnPropertyDescriptor,Qs=Object.getOwnPropertyNames,Xa=Object.prototype.hasOwnProperty,Ki=(t,e)=>(e=Symbol[t])?e:Symbol.for("Symbol."+t),Wt=t=>{throw TypeError(t)},Yi=(t,e,s)=>e in t?qt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,vr=(t,e)=>qt(t,"name",{value:e,configurable:!0}),m=(t,e)=>function(){return t&&(e=(0,t[Qs(t)[0]])(t=0)),e},Ja=(t,e)=>function(){return e||(0,t[Qs(t)[0]])((e={exports:{}}).exports,e),e.exports},M=(t,e)=>{for(var s in e)qt(t,s,{get:e[s],enumerable:!0})},Ka=(t,e,s,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Qs(e))!Xa.call(t,i)&&i!==s&&qt(t,i,{get:()=>e[i],enumerable:!(r=Ji(e,i))||r.enumerable});return t},R=t=>Ka(qt({},"__esModule",{value:!0}),t),q=t=>{var e;return[,,,Qa((e=t==null?void 0:t[Ki("metadata")])!=null?e:null)]},Zi=["class","method","getter","setter","accessor","field","value","get","set"],Kt=t=>t!==void 0&&typeof t!="function"?Wt("Function expected"):t,Ya=(t,e,s,r,i)=>({kind:Zi[t],name:e,metadata:r,addInitializer:n=>s._?Wt("Already initialized"):i.push(Kt(n||null))}),Xs=(t,e)=>Yi(e,Ki("metadata"),t[3]),O=(t,e,s,r)=>{for(var i=0,n=t[e>>1],a=n&&n.length;i<a;i++)e&1?n[i].call(s):r=n[i].call(s,r);return r},B=(t,e,s,r,i,n)=>{var a,l,o,d,h,u=e&7,x=!!(e&8),c=!!(e&16),g=u>3?t.length+1:u?x?1:2:0,v=Zi[u+5],A=u>3&&(t[g-1]=[]),_=t[g]||(t[g]=[]),S=u&&(!c&&!x&&(i=i.prototype),u<5&&(u>3||!c)&&Ji(u<4?i:{get[s](){return D(this,n)},set[s](w){return Y(this,n,w)}},s));u?c&&u<4&&vr(n,(u>2?"set ":u>1?"get ":"")+s):vr(i,s);for(var T=r.length-1;T>=0;T--)d=Ya(u,s,o={},t[3],_),u&&(d.static=x,d.private=c,h=d.access={has:c?w=>tl(i,w):w=>s in w},u^3&&(h.get=c?w=>(u^1?D:Bs)(w,i,u^4?n:S.get):w=>w[s]),u>2&&(h.set=c?(w,N)=>Y(w,i,N,u^4?n:S.set):(w,N)=>w[s]=N)),l=(0,r[T])(u?u<4?c?n:S[v]:u>4?void 0:{get:S.get,set:S.set}:i,d),o._=1,u^4||l===void 0?Kt(l)&&(u>4?A.unshift(l):u?c?n=l:S[v]=l:i=l):typeof l!="object"||l===null?Wt("Object expected"):(Kt(a=l.get)&&(S.get=a),Kt(a=l.set)&&(S.set=a),Kt(a=l.init)&&A.unshift(a));return u||Xs(t,i),S&&qt(i,s,S),c?u^4?n:S:i},Za=(t,e,s)=>Yi(t,typeof e!="symbol"?e+"":e,s),Js=(t,e,s)=>e.has(t)||Wt("Cannot "+s),tl=(t,e)=>Object(e)!==e?Wt('Cannot use the "in" operator on this value'):t.has(e),D=(t,e,s)=>(Js(t,e,"read from private field"),s?s.call(t):e.get(t)),gt=(t,e,s)=>e.has(t)?Wt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),Y=(t,e,s,r)=>(Js(t,e,"write to private field"),r?r.call(t,s):e.set(t,s),s),Bs=(t,e,s)=>(Js(t,e,"access private method"),s),el=(t,e,s,r)=>({set _(i){Y(t,e,i,s)},get _(){return D(t,e,r)}});function Z(t,e,s){return s===1?t.replace(/\0(\d+)g\x7F/gu,(r,i)=>Z(String(e[i]),e,2)):s===2?t.replace(/\0(\d+)n\x7F/gu,(r,i)=>String(e[i])):t.replace(/\0(\d+)\x7F/gu,(r,i)=>e[i])}var _t,Ge,de,pe,Ot,It,tn,J,yt,br,wr,qs,en,_r,Ar,ce,Bt,G=m({"util/string.ts"(){"use strict";_t=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,Ge=String.raw`[^[\]<>"\0-\x1F\x7F${_t}\uFFFD]`,de=String.raw`(?:\[[\da-f:.]+\]|${Ge})`,pe=String.raw`(?:${Ge}|\0\d+[cn!~]\x7F)*`,Ot=t=>t.trim().toLowerCase(),It=(t,e)=>s=>s.replace(t,e),tn=It(/[\0\x7F]|\r$/gmu,""),J=It(/\0\d+[cn]\x7F/gu,""),yt=(t,e="")=>t.map(s=>typeof s=="string"?s:s.text()).join(e),br={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},wr=It(/&(?:#(\d+|[Xx][\da-fA-F]+)|([lg]t|[LG]T|[lr]brac[ke]|nbsp|amp|AMP|quot|QUOT));/gu,(t,e,s)=>e?String.fromCodePoint(+((/^x/iu.test(e)?"0":"")+e)):br[s.toLowerCase()]),qs=t=>wr(t),en=It(/&#(\d+|x[\da-f]+);/giu,(t,e)=>String.fromCodePoint(+((/^x/iu.test(e)?"0":"")+e))),_r={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},Ar=t=>It(t,e=>`&${_r[e]};`),ce=Ar(/[&<>]/gu),Bt=(t,e={})=>{const{pre:s="",post:r="",sep:i=""}=e;return s+t.map(n=>n.print()).join(i)+r}}}),sl=Ja({"config/minimum.json"(t,e){e.exports={ext:[],html:[["b","bdi","del","i","ins","u","font","big","small","sub","sup","h1","h2","h3","h4","h5","h6","cite","code","em","s","strike","strong","tt","var","div","center","blockquote","ol","ul","dl","table","caption","pre","ruby","rb","rp","rt","rtc","p","span","abbr","dfn","kbd","samp","data","time","mark","tr","td","th","q","bdo"],["li","dt","dd"],["br","wbr","hr","meta","link"]],namespaces:{0:"",6:"File",10:"Template",14:"Category",828:"Module"},nsid:{"":0,file:6,template:10,category:14,module:828},functionHook:["msgnw"],variable:["!","=","pageid","articlepath","server","servername","scriptpath","stylepath"],parserFunction:[{msgnw:"msgnw",pageid:"pageid",articlepath:"articlepath",server:"server",servername:"servername",scriptpath:"scriptpath",stylepath:"stylepath","#language":"language","#special":"special","#speciale":"speciale","#tag":"tag","#formatdate":"formatdate","#dateformat":"formatdate","#invoke":"invoke","#while":"while","#dowhile":"dowhile","#loop":"loop","#forargs":"forargs","#fornumargs":"fornumargs","#if":"if","#ifeq":"ifeq","#switch":"switch","#ifexist":"ifexist","#ifexpr":"ifexpr","#iferror":"iferror","#time":"time","#timel":"timel","#expr":"expr","#rel2abs":"rel2abs","#titleparts":"titleparts","#categorytree":"categorytree","#urldecode":"urldecode","#choose":"choose","#var":"var","#varexists":"varexists","#var_final":"var_final","#vardefine":"vardefine","#vardefineecho":"vardefineecho","#widget":"widget","#related":"related","#regex":"regex","#regex_var":"regex_var","#regexquote":"regexquote","#regexall":"regexall","#len":"len","#pos":"pos","#rpos":"rpos","#sub":"sub","#count":"count","#rmatch":"rmatch","#rreplace":"rreplace","#replace":"replace","#rsplit":"rsplit","#explode":"explode","#tab":"tab","#seo":"seo","#babel":"babel","#translation":"translation","#commaseparatedlist":"commaseparatedlist","#coordinates":"coordinates","#lst":"lst","#lsth":"lsth","#lstx":"lstx","#assessment":"assessment","#mentor":"mentor","#property":"property","#target":"target","#section":"lst","#section-x":"lstx","#section-h":"lsth","#statements":"statements","#useliquidthreads":"useliquidthreads","#lqtpagelimit":"lqtpagelimit","#avatar":"avatar","#img":"img","#chart":"chart"},{"!":"!","=":"=","#FORMAL":"formal","#bcp47":"bcp47","#dir":"dir","#interwikilink":"interwikilink","#interlanguagelink":"interlanguagelink","#contentmodel":"contentmodel","#timef":"timef","#timefl":"timefl"},["msg","raw"],["subst","safesubst"]],doubleUnderscore:[[],[]],protocol:"bitcoin:|ftp://|ftps://|geo:|git://|gopher://|http://|https://|irc://|ircs://|magnet:|mailto:|matrix:|mms://|news:|nntp://|redis://|sftp://|sip:|sips:|sms:|ssh://|svn://|tel:|telnet://|urn:|wikipedia://|worldwind://|xmpp:",interwiki:[],img:{},redirection:["#redirect"],variants:[]}}}),it,Ws,St=m({"util/constants.ts"(){"use strict";it=11,Ws=sl()}});function ue(t){const e=new Map,s=new WeakMap;return r=>{const i=typeof r=="string"?e:s;if(i.has(r)){const a=i.get(r);return a.lastIndex=0,a}const n=t(r);return i.set(r,n),n}}var Le,sn,xe=m({"../common/dist/index.mjs"(){"use strict";Le=t=>decodeURIComponent(t.replace(/%(?![\da-f]{2})/giu,"%25")),sn=ue}}),yr,Sr,ke,At,rn,fe=m({"util/lint.ts"(){"use strict";ut(),Q(),yr=new Set(["tr","td","th","caption"]),Sr=new Set(["Template:!!","Template:!-"]),ke=t=>{const e=t.childNodes.find(s=>s.text().trim());if(!e||e.type==="text"&&e.data.trim().startsWith("!")||e.is("magic-word")&&e.name==="!"||e.is("template")&&Sr.has(e.name)||e.is("html")&&yr.has(e.name))return!1;if(e.is("arg"))return e.length>1&&ke(e.childNodes[1]);if(e.is("magic-word"))try{const s=e.getPossibleValues().map(ke);return s.includes(2)?2:s.includes(1)&&1}catch{}return e.is("template")||e.is("magic-word")&&e.name==="invoke"?1:2},At=(t,e,s,r)=>{if(t&&(r||U.viewOnly&&t[0]===tt.rev))return t[1];const i=e();return(r||U.viewOnly)&&s([tt.rev,i]),i},rn=(t,e)=>t==="ol"&&e==="type"?["1","a","A","i","I"]:t==="th"&&e==="scope"?["row","col","rowgroup","colgroup"]:e==="dir"?["ltr","rtl","auto"]:e==="aria-hidden"?["true","false"]:[]}}),Tr,Ks,nn=m({"parser/selector.ts"(){"use strict";Tr=(t,e,s)=>{if(t.includes("#")){const r=t.indexOf("#");return(r===0||t.slice(0,r)===e)&&t.slice(r+1)===s}return!t||t===e},Ks=(t,e,s)=>{const r=t.split(",");return({type:i,name:n})=>r.some(a=>Tr(a.trim(),i,n))}}}),je,Ys=m({"mixin/cached.ts"(){"use strict";fe(),je=(t=!0)=>e=>{const s=new WeakMap;return function(...r){return At(s.get(this),()=>e.apply(this,r),i=>{s.set(this,i)},t)}}}}),an,rl=m({"mixin/nodeLike.ts"(){"use strict";an=t=>{class e extends t{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 e}}}),$r,kr,be,Dt,zt,we,Ht,Gt,Vt,bt,ln=m({"lib/node.ts"(){"use strict";fe(),ut(),Ys(),rl(),Q(),kr=[an],$r=[je(!1)],bt=class{constructor(){O(Vt,5,this),Za(this,"childNodes",[]),gt(this,be),gt(this,Dt),gt(this,zt),gt(this,we),gt(this,Ht),gt(this,Gt,{})}get parentNode(){return D(this,be)}get nextSibling(){return D(this,Dt)}get previousSibling(){return D(this,zt)}getChildNodes(){const{childNodes:t}=this;return Object.isFrozen(t)?[...t]:t}getAttribute(t){return t==="padding"?0:this[t]}setAttribute(t,e){switch(t){case"parentNode":Y(this,be,e),e||(Y(this,Dt,void 0),Y(this,zt,void 0));break;case"nextSibling":Y(this,Dt,e);break;case"previousSibling":Y(this,zt,e);break;case"aIndex":U.viewOnly&&Y(this,Ht,[tt.rev,e]);break;default:this[t]=e}}getRootNode(){return At(D(this,we),()=>{var t,e;return(e=(t=this.parentNode)==null?void 0:t.getRootNode())!=null?e:this},t=>{const[,e]=t;e.type==="root"&&Y(this,we,t)})}indexFromPos(t,e){this.lspError("AstNode.indexFromPos")}posFromIndex(t){const{length:e}=String(this);if(t+=t<0?e:0,t>=0&&t<=e){const s=this.getLines(),r=s.findIndex(([,,i])=>t<=i);return{top:r,left:t-s[r][1]}}}getDimension(){const 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){const{parentNode:e}=this;return e?e.getRelativeIndex(e.childNodes.indexOf(this)):0}return At(D(this,Gt)[t],()=>{const{childNodes:e}=this,s=t+(t<0?e.length:0);let r=this.getAttribute("padding");for(let i=0;i<s;i++)U.viewOnly&&(D(this,Gt)[i]=[tt.rev,r]),r+=e[i].toString().length+this.getGaps(i);return r},e=>{D(this,Gt)[t]=e})}getAbsoluteIndex(){return At(D(this,Ht),()=>{const{parentNode:t}=this;return t?t.getAbsoluteIndex()+this.getRelativeIndex():0},t=>{Y(this,Ht,t)})}getBoundingClientRect(){this.lspError("AstNode.getBoundingClientRect")}is(t){return this.type===t}getLines(){const t=[];let e=0;for(const s of String(this).split(`
|
|
2
|
-
`)){const r=e+s.length;t.push([s,e,r]),e=r+1}return t}seal(t,e){const s=!e&&!!this[t];Object.defineProperty(this,t,{enumerable:s,configurable:!0})}lspError(t){throw new Error(`${t} method is only available in the LSP version!`)}},Vt=q(null),be=new WeakMap,Dt=new WeakMap,zt=new WeakMap,we=new WeakMap,Ht=new WeakMap,Gt=new WeakMap,B(Vt,1,"getLines",$r,bt),bt=B(Vt,0,"AstNode",kr,bt),O(Vt,1,bt)}}),on,il=m({"mixin/elementLike.ts"(){"use strict";nn(),on=t=>{var s,Ms;class e extends t{constructor(){super(...arguments);k(this,s)}getElementBy(a){for(const l of this.childNodes){if(l.type==="text")continue;if(a(l))return l;const o=l.getElementBy(a);if(o)return o}}querySelector(a){return this.getElementBy(E(this,s,Ms).call(this,a))}getElementsBy(a,l=[]){for(const o of this.childNodes)o.type!=="text"&&(a(o)&&l.push(o),o.getElementsBy(a,l));return l}querySelectorAll(a){return this.getElementsBy(E(this,s,Ms).call(this,a))}escape(){}}return s=new WeakSet,Ms=function(a){return Ks(a,this)},e}}}),Cr,Ve,Ir,Yt,nl=m({"lib/element.ts"(){"use strict";G(),ut(),nn(),ln(),il(),Cr=[on],Yt=class extends(Ir=bt){get length(){return this.childNodes.length}text(t){return yt(this.childNodes,t)}normalize(){const t=this.getChildNodes(),e=s=>{var r,i;t.splice(s,1),(r=t[s-1])==null||r.setAttribute("nextSibling",t[s]),(i=t[s])==null||i.setAttribute("previousSibling",t[s-1])};for(let s=t.length-1;s>=0;s--){const{type:r,data:i}=t[s];r!=="text"||t.length===1||this.getGaps(s-(s&&1))||i===""&&e(s)}this.setAttribute("childNodes",t)}removeAt(t){this.lspError("AstElement.removeAt")}insertAt(t,e=this.length){return gr(this,e,0,[t]),t}closest(t){const e=Ks(t,this);let{parentNode:s}=this;for(;s;){if(e(s))return s;({parentNode:s}=s)}}append(...t){this.safeAppend(t)}safeAppend(t){for(const e of t)this.insertAt(e)}safeReplaceChildren(t){}setText(t,e=0){e+=e<0?this.length:0;const s=this.childNodes[e],{data:r}=s;return s.replaceData(t),r}toString(t,e=""){return this.childNodes.map(s=>s.toString(t)).join(e)}caretPositionFromIndex(t){this.lspError("AstElement.caretPositionFromIndex")}elementFromIndex(t){this.lspError("AstElement.elementFromIndex")}elementFromPoint(t,e){this.lspError("AstElement.elementFromPoint")}lint(t=this.getAbsoluteIndex(),e){}print(t={}){const e=t.class;return this.toString()?(e===""?"":`<span class="wpb-${e!=null?e:this.type}${this.getAttribute("invalid")?" wpb-invalid":""}">`)+Bt(this.childNodes,t)+(e===""?"":"</span>"):""}json(t,e=this.getAbsoluteIndex()){this.lspError("AstElement.json")}},Ve=q(Ir),Yt=B(Ve,0,"AstElement",Cr,Yt),O(Ve,1,Yt)}}),Us,al=m({"lib/text.ts"(){"use strict";var t,hn,s;G(),ln(),Us=(s=class extends bt{constructor(i){super();k(this,t);lt(this,"data","");this.data=i}get type(){return"text"}toString(i){var n;return i&&!((n=this.parentNode)!=null&&n.getAttribute("built"))?J(this.data):this.data}text(){return this.data}lint(i=this.getAbsoluteIndex(),n){}replaceData(i){E(this,t,hn).call(this,i)}splitText(i){this.lspError("AstText.splitText")}escape(){}print(){return ce(this.data)}},t=new WeakSet,hn=function(i){this.setAttribute("data",i)},s)}}),Tt,Mt=m({"mixin/hidden.ts"(){"use strict";Tt=(t=!0,e=!0)=>s=>{class r extends s{text(){return""}lint(n){}}return r}}}),at,ot=m({"mixin/noEscape.ts"(){"use strict";at=t=>{}}}),$t,Ut=m({"src/syntax.ts"(){"use strict";var t,e;F(),$t=(e=class extends I{constructor(r,i,n,a,l){super(r,n,a,l);k(this,t);C(this,t,i)}get type(){return p(this,t)}lint(r=this.getAbsoluteIndex()){}},t=new WeakMap,e)}}),ht,ft=m({"mixin/padded.ts"(){"use strict";ht=({length:t})=>e=>{class s extends e{getAttribute(i){return i==="padding"?t:super.getAttribute(i)}}return s}}}),V,mt=m({"src/atom.ts"(){"use strict";var t,e;F(),V=(e=class extends I{constructor(r,i,n,a,l){super(r,n,a,l);k(this,t);C(this,t,i)}get type(){return p(this,t)}set type(r){C(this,t,r)}getAttribute(r){var i;return r==="invalid"?this.type==="converter-flag"&&!!((i=this.parentNode)!=null&&i.isInvalidFlag(this)):super.getAttribute(r)}},t=new WeakMap,e)}}),Nr,Qe,Fr,xt,Re=m({"src/link/base.ts"(){"use strict";var t,e,s,r;St(),ft(),ot(),F(),mt(),Nr=[at,ht("[[")],xt=(r=class extends(Fr=I){constructor(n,a,l,o=[],d="|"){super(void 0,l,o,{});k(this,t,!0);k(this,e);k(this,s);if(this.insertAt(new V(n,"link-target",l,o,{})),a!==void 0){const h=new I(a,l,o,{});h.type="link-text",h.setAttribute("stage",it-1),this.insertAt(h)}C(this,e,d)}get link(){}get fragment(){}afterBuild(){C(this,s,this.getTitle()),p(this,e).includes("\0")&&C(this,e,this.buildFromStr(p(this,e),0)),this.setAttribute("name",p(this,s).title),super.afterBuild()}setAttribute(n,a){n==="bracket"?C(this,t,a):n==="title"?C(this,s,a):super.setAttribute(n,a)}toString(n){const a=super.toString(n,p(this,e));return p(this,t)?`[[${a}]]`:a}text(){const n=super.text("|");return p(this,t)?`[[${n}]]`:n}getAttribute(n){return n==="title"?p(this,s):super.getAttribute(n)}getGaps(n){return n===0?p(this,e).length:1}lint(n=this.getAbsoluteIndex(),a){}getTitle(n,a){return this.normalizeTitle(this.firstChild.text(),0,{halfParsed:a,temporary:n,decode:!0,selfLink:!0})}print(){return super.print(p(this,t)?{pre:"[[",post:"]]",sep:p(this,e)}:{sep:p(this,e)})}json(n,a=this.getAbsoluteIndex()){const l=super.json(void 0,a)}},t=new WeakMap,e=new WeakMap,s=new WeakMap,r),Qe=q(Fr),xt=B(Qe,0,"LinkBaseToken",Nr,xt),O(Qe,1,xt)}}),Lr,Xe,Er,nt,kt=m({"src/nowiki/base.ts"(){"use strict";ot(),F(),Lr=[at],nt=class extends(Er=I){get innerText(){return this.firstChild.data}constructor(t="",e,s){super(t,e,s)}},Xe=q(Er),nt=B(Xe,0,"NowikiBaseToken",Lr,nt),O(Xe,1,nt)}}),Pr,Je,jr,z,vt=m({"src/nowiki/noinclude.ts"(){"use strict";Mt(),kt(),Pr=[Tt()],z=class extends(jr=nt){get type(){return"noinclude"}toString(t){return t?"":super.toString()}},Je=q(jr),z=B(Je,0,"NoincludeToken",Pr,z),O(Je,1,z)}}),un,ll=m({"src/link/redirectTarget.ts"(){"use strict";Re(),vt(),un=class extends xt{get type(){return"redirect-target"}constructor(t,e,s,r){super(t,void 0,s,r),e!==void 0&&this.insertAt(new z(e,s,r))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,{halfParsed:!0,decode:!0})}lint(t=this.getAbsoluteIndex()){}}}}),Rr,Ke,Or,Zt,ol=m({"src/redirect.ts"(){"use strict";var t,e,s;Mt(),ot(),F(),Ut(),ll(),Rr=[Tt(!1,!1),at],Zt=(s=class extends(Or=I){constructor(i,n,a,l,o,d,h=[]){super(void 0,d,h);k(this,t);k(this,e);C(this,t,i),C(this,e,o),this.append(new $t(n,"redirect-syntax",d,h),new un(a,l==null?void 0:l.slice(1),d,h))}get type(){return"redirect"}getAttribute(i){return i==="padding"?p(this,t).length:super.getAttribute(i)}toString(i){return p(this,t)+super.toString(i)+p(this,e)}lint(i=this.getAbsoluteIndex()){}print(){return super.print({pre:p(this,t),post:p(this,e)})}},t=new WeakMap,e=new WeakMap,s),Ke=q(Or),Zt=B(Ke,0,"RedirectToken",Rr,Zt),O(Ke,1,Zt)}}),dn={};M(dn,{parseRedirect:()=>pn});var pn,hl=m({"parser/redirect.ts"(){"use strict";Q(),ol(),pn=(t,e,s)=>{var i;(i=e.regexRedirect)!=null||(e.regexRedirect=new RegExp(String.raw`^(\s*)((?:${e.redirection.join("|")})\s*(?::\s*)?)\[\[([^\n|\]]+)(\|.*?)?\]\](\s*)`,"iu"));const r=e.regexRedirect.exec(t);return r&&U.normalizeTitle(r[3],0,!1,e,{halfParsed:!0,temporary:!0,decode:!0}).valid?(t=`\0${s.length}o${t.slice(r[0].length)}`,new Zt(...r.slice(1),e,s),t):!1}}}),Br,Ye,qr,te,ul=m({"src/onlyinclude.ts"(){"use strict";ft(),ot(),F(),Br=[at,ht("<onlyinclude>")],te=class extends(qr=I){get type(){return"onlyinclude"}toString(t){return`<onlyinclude>${super.toString(t)}</onlyinclude>`}isPlain(){return!0}print(){return super.print({pre:'<span class="wpb-ext"><onlyinclude></span>',post:'<span class="wpb-ext"></onlyinclude></span>'})}},Ye=q(qr),te=B(Ye,0,"OnlyincludeToken",Br,te),O(Ye,1,te)}}),me,Oe=m({"mixin/gapped.ts"(){"use strict";me=(t=1)=>e=>{class s extends e{getGaps(){return t}}return s}}}),Wr,Ze,Mr,wt,Zs=m({"src/tagPair/index.ts"(){"use strict";var t,e;Oe(),ot(),F(),Wr=[me(),at],wt=(e=class extends(Mr=I){constructor(r,i,n,a,l,o=[]){super(void 0,l);k(this,t);lt(this,"closed");lt(this,"selfClosing");this.setAttribute("name",r.toLowerCase()),C(this,t,[r,a||r]),this.closed=a!=="",this.selfClosing=a===void 0,this.append(i,n);const d=typeof i=="string"?-1:o.indexOf(i);o.splice(d===-1?1/0:d,0,this)}get innerText(){return this.selfClosing?void 0:this.lastChild.text()}toString(r){const{selfClosing:i,firstChild:n,lastChild:a}=this,[l,o]=p(this,t);return i?`<${l}${n.toString(r)}/>`:`<${l}${n.toString(r)}>${a.toString(r)}${this.closed?`</${o}>`:""}`}text(){const[r,i]=p(this,t);return this.selfClosing?`<${r}${this.firstChild.text()}/>`:`<${r}${super.text(">")}${this.closed?`</${i}>`:""}`}getAttribute(r){return r==="padding"?p(this,t)[0].length+1:super.getAttribute(r)}print(){const[r,i]=p(this,t);return super.print(this.selfClosing?{pre:`<${r}`,post:"/>"}:{pre:`<${r}`,sep:">",post:this.closed?`</${i}>`:""})}},t=new WeakMap,e),Ze=q(Mr),wt=B(Ze,0,"TagPairToken",Wr,wt),O(Ze,1,wt)}}),cn,dl=m({"src/tagPair/translate.ts"(){"use strict";var t,gn,s;F(),Zs(),Ut(),vt(),cn=(s=class extends wt{constructor(i,n,a,l=[]){const o=new $t(i,"translate-attr",a,l);n=n==null?void 0:n.replace(/(<tvar\|[^>]+>)([\s\S]*?)(<\/>)/gu,(h,u,x,c)=>(new z(u,a,l),new z(c,a,l),`\0${l.length-1}n${x}\0${l.length}n`)).replace(/(<tvar\s+name\s*=(?:\s*(?:(["'])[\s\S]*?\2|[^"'\s>]+))?\s*>)([\s\S]*?)(<\/tvar\s*>)/giu,(h,u,x,c,g)=>(new z(u,a,l),new z(g,a,l),`\0${l.length-1}n${c}\0${l.length}n`));const d=new I(n,a,l);d.type="translate-inner";super("translate",o,d,"translate",a,l);k(this,t);this.seal("closed",!0),this.seal("selfClosing",!0)}get type(){return"translate"}toString(i){return i?this.lastChild.toString(!0):super.toString()}text(){return this.lastChild.text()}print(){return`<span class="wpb-ext"><translate${E(this,t,gn).call(this)?'<span class="wpb-ext-attrs"> <span class="wpb-ext-attr"><span class="wpb-attr-key">nowrap</span></span></span>':""}>${this.lastChild.print({class:"ext-inner"})}</translate></span>`}},t=new WeakSet,gn=function(){return this.firstChild.toString()===" nowrap"},s)}}),Ur,ts,Dr,ee,pl=m({"src/tagPair/include.ts"(){"use strict";Mt(),Zs(),Ur=[Tt(!1)],ee=class extends(Dr=wt){get type(){return"include"}constructor(t,e="",s,r,i,n){super(t,e,s!=null?s:"",s===void 0||r!=null?r:"",i,n)}toString(t){return t?"":super.toString()}lint(t=this.getAbsoluteIndex()){}},ts=q(Dr),ee=B(ts,0,"IncludeToken",Ur,ee),O(ts,1,ee)}}),Be,tr=m({"mixin/attributesParent.ts"(){"use strict";Be=(t=0)=>e=>{var r,xn;class s extends e{constructor(){super(...arguments);k(this,r)}hasAttr(l){this.lspError("AttributesParent.hasAttr")}getAttr(l){return E(this,r,xn).call(this).getAttr(l)}}return r=new WeakSet,xn=function(){return this.childNodes[t]},s}}}),K,es,ss,rs,zr,is,Qt,Hr,Gr,Vr,_e,ns,st,fn,mn,vn,cl=m({"util/sharable.ts"(){"use strict";K=new Set(["align"]),es=new Set(["cite"]),ss=new Set(["cite","datetime"]),rs=new Set(["width"]),zr=new Set(["axis","align","bgcolor","height","width","valign"]),is=new Set([...zr,"abbr","headers","scope","rowspan","colspan"]),Qt=new Set(["type"]),Hr=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),Gr=new Set(["clear"]),Vr=new Set(["bgcolor","align","valign"]),_e=new Set(["qid","forcemathmode","type","display"]),ns=new Set(["enclose","inline","lang","line","linelinks","style","class","id","dir","copy","highlight","start"]),st=new Set,fn=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"]),mn={div:K,h1:K,h2:K,h3:K,h4:K,h5:K,h6:K,blockquote:es,q:es,p:K,br:Gr,pre:rs,ins:ss,del:ss,ul:Qt,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...Hr,"border"]),caption:K,tr:Vr,td:is,th:is,font:new Set(["size","color","face"]),hr:rs,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:Qt,poem:K,categorytree:K,combooption:K,math:st,chem:st,ce:st,img:new Set(["alt","src","width","height","loading","srcset"])},vn={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:st,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:new Set(["weight"]),imagemap:st,inputbox:st,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:st,poll:new Set(["id","show-results-before-voting"]),sm2:Qt,flashmp3:Qt,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([..._e,"chem"]),chem:_e,ce:_e,hiero:st,phonos:new Set(["ipa","class","text","lang","wikibase","file"]),section:new Set(["begin","end"]),source:ns,syntaxhighlight:ns,templatedata:st,timeline:new Set(["method","font"]),quiz:new Set(["display","shuffleanswers","points","shuffle","case"]),languages:st}}}),Qr,Xr,Jr,Kr,Ds,gl=m({"src/attribute.ts"(){"use strict";var t,e,s,r,i,bn,a;fe(),G(),St(),cl(),Q(),F(),mt(),Qr=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|src|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,Xr=/(?:^|\s|\*\/)(?:javascript|vbscript)(?:\W|$)/iu,Jr=new Set(["ext","arg","magic-word","template"]),Kr=new Set(["about","property","resource","datatype","typeof","itemid","itemprop","itemref","itemscope","itemtype"]),Ds=(a=class extends I{constructor(o,d,h,u="",x,c=[],g=U.getConfig(),v=[]){const A=new V(h,"attr-key",g,v);let _;if(h==="title"||d==="img"&&h==="alt")_=new I(x,g,v,{}),_.type="attr-value",_.setAttribute("stage",it-1);else if(d==="gallery"&&h==="caption"||d==="choose"&&(h==="before"||h==="after")){const S={...g,excludes:[...g.excludes,"heading","html","table","hr","list"]};_=new I(x,S,v,{}),_.type="attr-value",_.setAttribute("stage",1)}else _=new V(x,"attr-value",g,v,{});super(void 0,g,v);k(this,i);k(this,t);k(this,e);k(this,s);k(this,r);C(this,t,o),this.append(A,_),C(this,s,u),C(this,r,[...c]),C(this,e,d),this.setAttribute("name",Ot(J(h)))}get type(){return p(this,t)}get tag(){return p(this,e)}get balanced(){return!p(this,s)||p(this,r)[0]===p(this,r)[1]}afterBuild(){p(this,s).includes("\0")&&C(this,s,this.buildFromStr(p(this,s),0)),this.parentNode&&C(this,e,this.parentNode.name),this.setAttribute("name",Ot(this.firstChild.text())),super.afterBuild()}toString(o){const[d="",h=""]=p(this,r);return p(this,s)?super.toString(o,p(this,s)+d)+h:this.firstChild.toString(o)}text(){return p(this,s)?`${super.text(`${p(this,s).trim()}"`)}"`:this.firstChild.text()}getGaps(){var o,d;return p(this,s)?p(this,s).length+((d=(o=p(this,r)[0])==null?void 0:o.length)!=null?d:0):0}lint(o=this.getAbsoluteIndex(),d){}getValue(){return p(this,s)?this.lastChild.text().trim():this.type==="ext-attr"||""}escape(){}getAttribute(o){return o==="invalid"?E(this,i,bn).call(this):super.getAttribute(o)}print(){const[o="",d=""]=p(this,r);return p(this,s)?super.print({sep:ce(p(this,s))+o,post:d}):super.print()}json(o,d=this.getAbsoluteIndex()){const h=super.json(void 0,d)}},t=new WeakMap,e=new WeakMap,s=new WeakMap,r=new WeakMap,i=new WeakSet,bn=function(o,d){const{firstChild:h,lastChild:u,type:x,name:c,tag:g,parentNode:v}=this,A=!u.childNodes.some(({type:b})=>Jr.has(b)),_=this.getValue(),S=vn[g],T=mn[g],{length:w}=this.toString();let N="illegal-attr",j,f;if(!(S!=null&&S.has(c))&&!(T!=null&&T.has(c))&&(x==="ext-attr"?S||T:!/\{\{[^{]+\}\}/u.test(c))&&(x==="ext-attr"&&!T||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(c)&&(g==="meta"||g==="link"||!fn.has(c)))||(c==="itemtype"||c==="itemid"||c==="itemref")&&!(v!=null&&v.hasAttr("itemscope"))){if(o===void 0)return!0}else if(c==="style"&&typeof _=="string"&&Qr.test(_)){if(o===void 0)return!0}else if(c==="tabindex"&&typeof _=="string"&&_!=="0"){if(o===void 0)return!0}else if(A&&x!=="ext-attr"){const b=rn(g,c),$=String(_).toLowerCase();if(b.length>0&&b.every(y=>y!==$)&&o===void 0)return!0}else if(typeof _=="string"&&((/^xmlns:[\w:.-]+$/u.test(c)||Kr.has(c))&&Xr.test(_)||A&&(c==="href"||g==="img"&&c==="src")&&!new RegExp(String.raw`^(?:${this.getAttribute("config").protocol}|//)\S+$`,"iu").test(_))&&o===void 0)return!0;return!1},a)}}),as,Yr,qe,er=m({"src/attributes.ts"(){"use strict";var t,e,zs,r;G(),F(),mt(),gl(),as=i=>i.slice(0,-1),Yr=i=>`${as(i)}-dirty`,qe=(r=class extends I{constructor(n,a,l,o,d=[]){super(void 0,o,d,{});k(this,e);k(this,t);if(C(this,t,a),this.setAttribute("name",l),n){const h=/([^\s/](?:(?!\0\d+~\x7F)[^\s/=])*)(?:((?:\s(?:\s|\0\d+[cn]\x7F)*)?(?:=|\0\d+~\x7F)(?:\s|\0\d+[cn]\x7F)*)(?:(["'])([\s\S]*?)(\3|$)|(\S*)))?/gu;let u="",x=h.exec(n),c=0;const g=()=>{u&&(super.insertAt(new V(u,Yr(a),o,d,{})),u="")};for(;x;){const{index:v,0:A,1:_,2:S,3:T,4:w,5:N,6:j}=x;if(u+=n.slice(c,v),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(J(_).trim())){const f=w!=null?w:j,b=[T,N],$=new Ds(as(a),l,_,S,f,b,o,d);g(),super.insertAt($)}else u+=A;({lastIndex:c}=h),x=h.exec(n)}u+=n.slice(c),g()}}get type(){return p(this,t)}afterBuild(){const{parentNode:n}=this;n!=null&&n.is("td")&&this.setAttribute("name",n.subtype),super.afterBuild()}getAttrTokens(n){return this.childNodes.filter(a=>a instanceof Ds&&(!n||a.name===Ot(n)))}hasAttr(n){return this.getAttrTokens(n).length>0}getAttrToken(n){const a=this.getAttrTokens(n);return a[a.length-1]}getAttr(n){var a;return(a=this.getAttrToken(n))==null?void 0:a.getValue()}lint(n=this.getAbsoluteIndex(),a){}getAttribute(n){return n==="invalid"?E(this,e,zs).call(this):super.getAttribute(n)}print(){return this.toString()?`<span class="wpb-${this.type}${E(this,e,zs).call(this)?" wpb-invalid":""}">${this.childNodes.map(n=>n.print(n instanceof V?{class:n.toString().trim()&&"attr-dirty"}:void 0)).join("")}</span>`:""}},t=new WeakMap,e=new WeakSet,zs=function(){const{parentNode:n}=this;return(n==null?void 0:n.type)==="html"&&n.closing&&this.text().trim()!==""},r)}}),wn={};M(wn,{PreToken:()=>_n});var _n,xl=m({"src/pre.ts"(){"use strict";St(),F(),vt(),_n=class extends I{get type(){return"ext-inner"}constructor(t,e,s=[]){if(t){const r=/<nowiki>/giu,i=/<\/nowiki>/giu,{length:n}=r.source;let a=r.exec(t);a&&(i.lastIndex=a.index+n);let l=i.exec(t),o=0,d="";for(;a&&l;)new z(a[0],e,s),new z(l[0],e,s),d+=`${t.slice(o,a.index)}\0${s.length-1}n${t.slice(a.index+n,l.index)}\0${s.length}n`,o=l.index+n+1,r.lastIndex=o,a=r.exec(t),a&&(i.lastIndex=a.index+n),l=i.exec(t);t=d+t.slice(o)}super(t,e,s,{}),this.setAttribute("stage",it-1)}isPlain(){return!0}lint(t=this.getAbsoluteIndex()){}}}}),We,sr=m({"mixin/multiLine.ts"(){"use strict";We=t=>{class e extends t{toString(r){return super.toString(r,`
|
|
1
|
+
"use strict";(()=>{var Ma=Object.defineProperty;var pr=e=>{throw TypeError(e)};var Ua=(e,t,s)=>t in e?Ma(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var za=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var ae=(e,t,s)=>Ua(e,typeof t!="symbol"?t+"":t,s),Mt=(e,t,s)=>t.has(e)||pr("Cannot "+s);var p=(e,t,s)=>(Mt(e,t,"read from private field"),s?s.call(e):t.get(e)),T=(e,t,s)=>t.has(e)?pr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),$=(e,t,s,r)=>(Mt(e,t,"write to private field"),r?r.call(e,s):t.set(e,s),s),O=(e,t,s)=>(Mt(e,t,"access private method"),s);var cr=(e,t,s,r)=>({set _(n){$(e,t,n,s)},get _(){return p(e,t,r)}});var Jl=za((Yl,Ba)=>{var Ha=Object.create,We=Object.defineProperty,zi=Object.getOwnPropertyDescriptor,Hs=Object.getOwnPropertyNames,Da=Object.prototype.hasOwnProperty,Hi=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Me=e=>{throw TypeError(e)},Di=(e,t,s)=>t in e?We(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,gr=(e,t)=>We(e,"name",{value:t,configurable:!0}),m=(e,t)=>function(){return e&&(t=(0,e[Hs(e)[0]])(e=0)),t},Ga=(e,t)=>function(){return t||(0,e[Hs(e)[0]])((t={exports:{}}).exports,t),t.exports},M=(e,t)=>{for(var s in t)We(e,s,{get:t[s],enumerable:!0})},Va=(e,t,s,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Hs(t))!Da.call(e,n)&&n!==s&&We(e,n,{get:()=>t[n],enumerable:!(r=zi(t,n))||r.enumerable});return e},R=e=>Va(We({},"__esModule",{value:!0}),e),W=e=>{var t;return[,,,Ha((t=e==null?void 0:e[Hi("metadata")])!=null?t:null)]},Gi=["class","method","getter","setter","accessor","field","value","get","set"],Xe=e=>e!==void 0&&typeof e!="function"?Me("Function expected"):e,Qa=(e,t,s,r,n)=>({kind:Gi[e],name:t,metadata:r,addInitializer:i=>s._?Me("Already initialized"):n.push(Xe(i||null))}),Ds=(e,t)=>Di(t,Hi("metadata"),e[3]),B=(e,t,s,r)=>{for(var n=0,i=e[t>>1],a=i&&i.length;n<a;n++)t&1?i[n].call(s):r=i[n].call(s,r);return r},j=(e,t,s,r,n,i)=>{var a,l,u,d,o,h=t&7,x=!!(t&8),g=!!(t&16),c=h>3?e.length+1:h?x?1:2:0,v=Gi[h+5],w=h>3&&(e[c-1]=[]),C=e[c]||(e[c]=[]),A=h&&(!g&&!x&&(n=n.prototype),h<5&&(h>3||!g)&&zi(h<4?n:{get[s](){return G(this,i)},set[s](b){return ie(this,i,b)}},s));h?g&&h<4&&gr(i,(h>2?"set ":h>1?"get ":"")+s):gr(n,s);for(var k=r.length-1;k>=0;k--)d=Qa(h,s,u={},e[3],C),h&&(d.static=x,d.private=g,o=d.access={has:g?b=>Ja(n,b):b=>s in b},h^3&&(o.get=g?b=>(h^1?G:Es)(b,n,h^4?i:A.get):b=>b[s]),h>2&&(o.set=g?(b,F)=>ie(b,n,F,h^4?i:A.set):(b,F)=>b[s]=F)),l=(0,r[k])(h?h<4?g?i:A[v]:h>4?void 0:{get:A.get,set:A.set}:n,d),u._=1,h^4||l===void 0?Xe(l)&&(h>4?w.unshift(l):h?g?i=l:A[v]=l:n=l):typeof l!="object"||l===null?Me("Object expected"):(Xe(a=l.get)&&(A.get=a),Xe(a=l.set)&&(A.set=a),Xe(a=l.init)&&w.unshift(a));return h||Ds(e,n),A&&We(n,s,A),g?h^4?i:A:n},Xa=(e,t,s)=>Di(e,typeof t!="symbol"?t+"":t,s),Gs=(e,t,s)=>t.has(e)||Me("Cannot "+s),Ja=(e,t)=>Object(t)!==t?Me('Cannot use the "in" operator on this value'):e.has(t),G=(e,t,s)=>(Gs(e,t,"read from private field"),s?s.call(e):t.get(e)),pe=(e,t,s)=>t.has(e)?Me("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),ie=(e,t,s,r)=>(Gs(e,t,"write to private field"),r?r.call(e,s):t.set(e,s),s),Es=(e,t,s)=>(Gs(e,t,"access private method"),s),Ka=(e,t,s,r)=>({set _(n){ie(e,t,n,s)},get _(){return G(e,t,r)}});function K(e,t,s){return s===1?e.replace(/\0(\d+)g\x7F/gu,(r,n)=>K(String(t[n]),t,2)):s===2?e.replace(/\0(\d+)n\x7F/gu,(r,n)=>String(t[n])):e.replace(/\0(\d+)\x7F/gu,(r,n)=>t[n])}var Ae,Ut,lt,ot,je,Fe,Vi,Q,ye,xr,fr,Ps,Qi,mr,vr,ut,qe,z=m({"util/string.ts"(){"use strict";Ae=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,Ut=String.raw`[^[\]<>"\0-\x1F\x7F${Ae}\uFFFD]`,lt=String.raw`(?:\[[\da-f:.]+\]|${Ut})`,ot=String.raw`(?:${Ut}|\0\d+[cn!~]\x7F)*`,je=e=>e.trim().toLowerCase(),Fe=(e,t)=>s=>s.replace(e,t),Vi=Fe(/[\0\x7F]|\r$/gmu,""),Q=Fe(/\0\d+[cn]\x7F/gu,""),ye=(e,t="")=>e.map(s=>typeof s=="string"?s:s.text()).join(t),xr={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},fr=Fe(/&(?:#(\d+|[Xx][\da-fA-F]+)|([lg]t|[LG]T|[lr]brac[ke]|nbsp|amp|AMP|quot|QUOT));/gu,(e,t,s)=>t?String.fromCodePoint(+((/^x/iu.test(t)?"0":"")+t)):xr[s.toLowerCase()]),Ps=e=>fr(e),Qi=Fe(/&#(\d+|x[\da-f]+);/giu,(e,t)=>String.fromCodePoint(+((/^x/iu.test(t)?"0":"")+t))),mr={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},vr=e=>Fe(e,t=>`&${mr[t]};`),ut=vr(/[&<>]/gu),qe=(e,t={})=>{const{pre:s="",post:r="",sep:n=""}=t;return s+e.map(i=>i.print()).join(n)+r}}}),Ya=Ga({"config/minimum.json"(e,t){t.exports={ext:[],html:[["b","bdi","del","i","ins","u","font","big","small","sub","sup","h1","h2","h3","h4","h5","h6","cite","code","em","s","strike","strong","tt","var","div","center","blockquote","ol","ul","dl","table","caption","pre","ruby","rb","rp","rt","rtc","p","span","abbr","dfn","kbd","samp","data","time","mark","tr","td","th","q","bdo"],["li","dt","dd"],["br","wbr","hr","meta","link"]],namespaces:{0:"",6:"File",10:"Template",14:"Category",828:"Module"},nsid:{"":0,file:6,template:10,category:14,module:828},functionHook:["msgnw"],variable:["!","=","pageid","articlepath","server","servername","scriptpath","stylepath"],parserFunction:[{msgnw:"msgnw",pageid:"pageid",articlepath:"articlepath",server:"server",servername:"servername",scriptpath:"scriptpath",stylepath:"stylepath","#language":"language","#special":"special","#speciale":"speciale","#tag":"tag","#formatdate":"formatdate","#dateformat":"formatdate","#invoke":"invoke","#while":"while","#dowhile":"dowhile","#loop":"loop","#forargs":"forargs","#fornumargs":"fornumargs","#if":"if","#ifeq":"ifeq","#switch":"switch","#ifexist":"ifexist","#ifexpr":"ifexpr","#iferror":"iferror","#time":"time","#timel":"timel","#expr":"expr","#rel2abs":"rel2abs","#titleparts":"titleparts","#categorytree":"categorytree","#urldecode":"urldecode","#choose":"choose","#var":"var","#varexists":"varexists","#var_final":"var_final","#vardefine":"vardefine","#vardefineecho":"vardefineecho","#widget":"widget","#related":"related","#regex":"regex","#regex_var":"regex_var","#regexquote":"regexquote","#regexall":"regexall","#len":"len","#pos":"pos","#rpos":"rpos","#sub":"sub","#count":"count","#rmatch":"rmatch","#rreplace":"rreplace","#replace":"replace","#rsplit":"rsplit","#explode":"explode","#tab":"tab","#seo":"seo","#babel":"babel","#translation":"translation","#commaseparatedlist":"commaseparatedlist","#coordinates":"coordinates","#lst":"lst","#lsth":"lsth","#lstx":"lstx","#assessment":"assessment","#mentor":"mentor","#property":"property","#target":"target","#section":"lst","#section-x":"lstx","#section-h":"lsth","#statements":"statements","#useliquidthreads":"useliquidthreads","#lqtpagelimit":"lqtpagelimit","#avatar":"avatar","#img":"img","#chart":"chart"},{"!":"!","=":"=","#FORMAL":"formal","#bcp47":"bcp47","#dir":"dir","#interwikilink":"interwikilink","#interlanguagelink":"interlanguagelink","#contentmodel":"contentmodel","#timef":"timef","#timefl":"timefl"},["msg","raw"],["subst","safesubst"]],doubleUnderscore:[[],[]],protocol:"bitcoin:|ftp://|ftps://|geo:|git://|gopher://|http://|https://|irc://|ircs://|magnet:|mailto:|matrix:|mms://|news:|nntp://|redis://|sftp://|sip:|sips:|sms:|ssh://|svn://|tel:|telnet://|urn:|wikipedia://|worldwind://|xmpp:",interwiki:[],img:{},redirection:["#redirect"],variants:[]}}}),Y,Os,fe=m({"util/constants.ts"(){"use strict";Y=11,Os=Ya()}});function at(e){const t=new Map,s=new WeakMap;return r=>{const n=typeof r=="string"?t:s;if(n.has(r)){const a=n.get(r);return a.lastIndex=0,a}const i=e(r);return n.set(r,i),i}}var Rs,Xi,Ct=m({"../common/dist/index.mjs"(){"use strict";Rs=e=>decodeURIComponent(e.replace(/%(?![\da-f]{2})/giu,"%25")),Xi=at}}),br,wr,_t,It,Ji,Ft=m({"util/lint.ts"(){"use strict";Ce(),J(),br=new Set(["tr","td","th","caption"]),wr=new Set(["Template:!!","Template:!-"]),_t=e=>{const t=e.childNodes.find(s=>s.text().trim());if(!t||t.type==="text"&&t.data.trim().startsWith("!")||t.is("magic-word")&&t.name==="!"||t.is("template")&&wr.has(t.name)||t.is("html")&&br.has(t.name))return!1;if(t.is("arg"))return t.length>1&&_t(t.childNodes[1]);if(t.is("magic-word"))try{const s=t.getPossibleValues().map(_t);return s.includes(2)?2:s.includes(1)&&1}catch{}return t.is("template")||t.is("magic-word")&&t.name==="invoke"?1:2},It=(e,t,s,r)=>{if(e&&(r||H.viewOnly&&e[0]===xe.rev))return e[1];const n=t();return(r||H.viewOnly)&&s([xe.rev,n]),n},Ji=(e,t)=>e==="ol"&&t==="type"?["1","a","A","i","I"]:e==="th"&&t==="scope"?["row","col","rowgroup","colgroup"]:t==="dir"?["ltr","rtl","auto"]:t==="aria-hidden"?["true","false"]:[]}}),_r,Ki,Za=m({"parser/selector.ts"(){"use strict";_r=(e,t,s)=>{if(e.includes("#")){const r=e.indexOf("#");return(r===0||e.slice(0,r)===t)&&e.slice(r+1)===s}return!e||e===t},Ki=(e,t,s)=>{const r=e.split(",");return(({type:n,name:i})=>r.some(a=>_r(a.trim(),n,i)))}}}),Nt,Vs=m({"mixin/cached.ts"(){"use strict";Ft(),Nt=(e=!0)=>t=>{const s=new WeakMap;return function(...r){return It(s.get(this),()=>t.apply(this,r),n=>{s.set(this,n)},e)}}}}),Yi,el=m({"mixin/nodeLike.ts"(){"use strict";Yi=e=>{class t extends e{get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get offsetHeight(){}get offsetWidth(){}}return t}}}),Ar,yr,ct,ze,He,gt,Sr,Tr,De,we,Zi=m({"lib/node.ts"(){"use strict";Ft(),Vs(),el(),yr=[Yi],Ar=[Nt(!1)],we=class{constructor(){B(De,5,this),Xa(this,"childNodes",[]),pe(this,ct),pe(this,ze),pe(this,He),pe(this,gt),pe(this,Sr),pe(this,Tr,{})}get parentNode(){return G(this,ct)}get nextSibling(){return G(this,ze)}get previousSibling(){return G(this,He)}getChildNodes(){const{childNodes:e}=this;return Object.isFrozen(e)?[...e]:e}getAttribute(e){return e==="padding"?0:this[e]}setAttribute(e,t){switch(e){case"parentNode":ie(this,ct,t),t||(ie(this,ze,void 0),ie(this,He,void 0));break;case"nextSibling":ie(this,ze,t);break;case"previousSibling":ie(this,He,t);break;case"aIndex":break;default:this[e]=t}}getRootNode(){return It(G(this,gt),()=>{var e,t;return(t=(e=this.parentNode)==null?void 0:e.getRootNode())!=null?t:this},e=>{const[,t]=e;t.type==="root"&&ie(this,gt,e)})}indexFromPos(e,t){this.lspError("AstNode.indexFromPos")}posFromIndex(e){}getDimension(){}getGaps(e){return 0}getRelativeIndex(e){}getAbsoluteIndex(){}getBoundingClientRect(){this.lspError("AstNode.getBoundingClientRect")}is(e){return this.type===e}getLines(){}seal(e,t){const s=!t&&!!this[e];Object.defineProperty(this,e,{enumerable:s,configurable:!0})}lspError(e){throw new Error(`${e} method is only available in the LSP version!`)}},De=W(null),ct=new WeakMap,ze=new WeakMap,He=new WeakMap,gt=new WeakMap,Sr=new WeakMap,Tr=new WeakMap,j(De,1,"getLines",Ar,we),we=j(De,0,"AstNode",yr,we),B(De,1,we)}}),en,tl=m({"mixin/elementLike.ts"(){"use strict";en=e=>{}}}),$r,zt,kr,Je,sl=m({"lib/element.ts"(){"use strict";z(),Ce(),Za(),Zi(),tl(),$r=[en],Je=class extends(kr=we){get length(){return this.childNodes.length}text(e){return ye(this.childNodes,e)}normalize(){const e=this.getChildNodes(),t=s=>{var r,n;e.splice(s,1),(r=e[s-1])==null||r.setAttribute("nextSibling",e[s]),(n=e[s])==null||n.setAttribute("previousSibling",e[s-1])};for(let s=e.length-1;s>=0;s--){const{type:r,data:n}=e[s];r!=="text"||e.length===1||this.getGaps(s-(s&&1))||n===""&&t(s)}this.setAttribute("childNodes",e)}removeAt(e){this.lspError("AstElement.removeAt")}insertAt(e,t=this.length){return hr(this,t,0,[e]),e}closest(e){const t=Ki(e,this);let{parentNode:s}=this;for(;s;){if(t(s))return s;({parentNode:s}=s)}}append(...e){this.safeAppend(e)}safeAppend(e){for(const t of e)this.insertAt(t)}safeReplaceChildren(e){}setText(e,t=0){t+=t<0?this.length:0;const s=this.childNodes[t],{data:r}=s;return s.replaceData(e),r}toString(e,t=""){return this.childNodes.map(s=>s.toString(e)).join(t)}caretPositionFromIndex(e){this.lspError("AstElement.caretPositionFromIndex")}elementFromIndex(e){this.lspError("AstElement.elementFromIndex")}elementFromPoint(e,t){this.lspError("AstElement.elementFromPoint")}lint(e=this.getAbsoluteIndex(),t){}print(e={}){const t=e.class;return this.toString()?(t===""?"":`<span class="wpb-${t!=null?t:this.type}${this.getAttribute("invalid")?" wpb-invalid":""}">`)+qe(this.childNodes,e)+(t===""?"":"</span>"):""}json(e,t=this.getAbsoluteIndex()){}},zt=W(kr),Je=j(zt,0,"AstElement",$r,Je),B(zt,1,Je)}}),Bs,rl=m({"lib/text.ts"(){"use strict";var e,tn,s;z(),Zi(),Bs=(s=class extends we{constructor(n){super();T(this,e);ae(this,"data","");this.data=n}get type(){return"text"}toString(n){var i;return n&&!((i=this.parentNode)!=null&&i.getAttribute("built"))?Q(this.data):this.data}text(){return this.data}lint(n=this.getAbsoluteIndex(),i){}replaceData(n){O(this,e,tn).call(this,n)}splitText(n){this.lspError("AstText.splitText")}escape(){}print(){return ut(this.data)}},e=new WeakSet,tn=function(n){this.setAttribute("data",n)},s)}}),me,Se=m({"mixin/hidden.ts"(){"use strict";me=(e=!0,t=!0)=>s=>{class r extends s{text(){return""}lint(i){}}return r}}}),ne,le=m({"mixin/noEscape.ts"(){"use strict";ne=e=>{}}}),ve,Te=m({"src/syntax.ts"(){"use strict";var e,t;N(),ve=(t=class extends I{constructor(r,n,i,a,l){super(r,i,a,l);T(this,e);$(this,e,n)}get type(){return p(this,e)}lint(r=this.getAbsoluteIndex()){}},e=new WeakMap,t)}}),oe,be=m({"mixin/padded.ts"(){"use strict";oe=({length:e})=>t=>{}}}),V,$e=m({"src/atom.ts"(){"use strict";var e,t;N(),V=(t=class extends I{constructor(r,n,i,a,l){super(r,i,a,l);T(this,e);$(this,e,n)}get type(){return p(this,e)}set type(r){$(this,e,r)}getAttribute(r){var n;return r==="invalid"?this.type==="converter-flag"&&!!((n=this.parentNode)!=null&&n.isInvalidFlag(this)):super.getAttribute(r)}},e=new WeakMap,t)}}),Cr,Ht,Ir,ce,Lt=m({"src/link/base.ts"(){"use strict";var e,t,s,r;fe(),be(),le(),N(),$e(),Cr=[ne,oe("[[")],ce=(r=class extends(Ir=I){constructor(i,a,l,u=[],d="|"){super(void 0,l,u,{});T(this,e,!0);T(this,t);T(this,s);if(this.insertAt(new V(i,"link-target",l,u,{})),a!==void 0){const o=new I(a,l,u,{});o.type="link-text",o.setAttribute("stage",Y-1),this.insertAt(o)}$(this,t,d)}get link(){}get fragment(){}afterBuild(){$(this,s,this.getTitle()),p(this,t).includes("\0")&&$(this,t,this.buildFromStr(p(this,t),0)),this.setAttribute("name",p(this,s).title),super.afterBuild()}setAttribute(i,a){i==="bracket"?$(this,e,a):i==="title"?$(this,s,a):super.setAttribute(i,a)}toString(i){const a=super.toString(i,p(this,t));return p(this,e)?`[[${a}]]`:a}text(){const i=super.text("|");return p(this,e)?`[[${i}]]`:i}getAttribute(i){return i==="title"?p(this,s):super.getAttribute(i)}getGaps(i){return i===0?p(this,t).length:1}lint(i=this.getAbsoluteIndex(),a){}getTitle(i,a){return this.normalizeTitle(this.firstChild.text(),0,{halfParsed:a,temporary:i,decode:!0,selfLink:!0})}print(){return super.print(p(this,e)?{pre:"[[",post:"]]",sep:p(this,t)}:{sep:p(this,t)})}json(i,a=this.getAbsoluteIndex()){}},e=new WeakMap,t=new WeakMap,s=new WeakMap,r),Ht=W(Ir),ce=j(Ht,0,"LinkBaseToken",Cr,ce),B(Ht,1,ce)}}),Fr,Dt,Nr,re,ke=m({"src/nowiki/base.ts"(){"use strict";le(),N(),Fr=[ne],re=class extends(Nr=I){get innerText(){return this.firstChild.data}constructor(e="",t,s){super(e,t,s)}},Dt=W(Nr),re=j(Dt,0,"NowikiBaseToken",Fr,re),B(Dt,1,re)}}),Lr,Gt,Er,Z,Ue=m({"src/nowiki/noinclude.ts"(){"use strict";Se(),ke(),Lr=[me()],Z=class extends(Er=re){get type(){return"noinclude"}toString(e){return e?"":super.toString()}},Gt=W(Er),Z=j(Gt,0,"NoincludeToken",Lr,Z),B(Gt,1,Z)}}),sn,il=m({"src/link/redirectTarget.ts"(){"use strict";Lt(),Ue(),sn=class extends ce{get type(){return"redirect-target"}constructor(e,t,s,r){super(e,void 0,s,r),t!==void 0&&this.insertAt(new Z(t,s,r))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,{halfParsed:!0,decode:!0})}lint(e=this.getAbsoluteIndex()){}}}}),Pr,Vt,Or,Ke,nl=m({"src/redirect.ts"(){"use strict";var e,t,s;Se(),le(),N(),Te(),il(),Pr=[me(!1,!1),ne],Ke=(s=class extends(Or=I){constructor(n,i,a,l,u,d,o=[]){super(void 0,d,o);T(this,e);T(this,t);$(this,e,n),$(this,t,u),this.append(new ve(i,"redirect-syntax",d,o),new sn(a,l==null?void 0:l.slice(1),d,o))}get type(){return"redirect"}getAttribute(n){return n==="padding"?p(this,e).length:super.getAttribute(n)}toString(n){return p(this,e)+super.toString(n)+p(this,t)}lint(n=this.getAbsoluteIndex()){}print(){return super.print({pre:p(this,e),post:p(this,t)})}},e=new WeakMap,t=new WeakMap,s),Vt=W(Or),Ke=j(Vt,0,"RedirectToken",Pr,Ke),B(Vt,1,Ke)}}),rn={};M(rn,{parseRedirect:()=>nn});var nn,al=m({"parser/redirect.ts"(){"use strict";J(),nl(),nn=(e,t,s)=>{var n;(n=t.regexRedirect)!=null||(t.regexRedirect=new RegExp(String.raw`^(\s*)((?:${t.redirection.join("|")})\s*(?::\s*)?)\[\[([^\n|\]]+)(\|.*?)?\]\](\s*)`,"iu"));const r=t.regexRedirect.exec(e);return r&&H.normalizeTitle(r[3],0,!1,t,{halfParsed:!0,temporary:!0,decode:!0}).valid?(e=`\0${s.length}o${e.slice(r[0].length)}`,new Ke(...r.slice(1),t,s),e):!1}}}),Rr,Qt,Br,Ye,ll=m({"src/onlyinclude.ts"(){"use strict";be(),le(),N(),Rr=[ne,oe("<onlyinclude>")],Ye=class extends(Br=I){get type(){return"onlyinclude"}toString(e){return`<onlyinclude>${super.toString(e)}</onlyinclude>`}isPlain(){return!0}print(){return super.print({pre:'<span class="wpb-ext"><onlyinclude></span>',post:'<span class="wpb-ext"></onlyinclude></span>'})}},Qt=W(Br),Ye=j(Qt,0,"OnlyincludeToken",Rr,Ye),B(Qt,1,Ye)}}),dt,Et=m({"mixin/gapped.ts"(){"use strict";dt=(e=1)=>t=>{class s extends t{getGaps(){return e}}return s}}}),jr,Xt,qr,_e,Qs=m({"src/tagPair/index.ts"(){"use strict";var e,t;Et(),le(),N(),jr=[dt(),ne],_e=(t=class extends(qr=I){constructor(r,n,i,a,l,u=[]){super(void 0,l);T(this,e);ae(this,"closed");ae(this,"selfClosing");this.setAttribute("name",r.toLowerCase()),$(this,e,[r,a||r]),this.closed=a!=="",this.selfClosing=a===void 0,this.append(n,i);const d=typeof n=="string"?-1:u.indexOf(n);u.splice(d===-1?1/0:d,0,this)}get innerText(){return this.selfClosing?void 0:this.lastChild.text()}toString(r){const{selfClosing:n,firstChild:i,lastChild:a}=this,[l,u]=p(this,e);return n?`<${l}${i.toString(r)}/>`:`<${l}${i.toString(r)}>${a.toString(r)}${this.closed?`</${u}>`:""}`}text(){const[r,n]=p(this,e);return this.selfClosing?`<${r}${this.firstChild.text()}/>`:`<${r}${super.text(">")}${this.closed?`</${n}>`:""}`}getAttribute(r){return r==="padding"?p(this,e)[0].length+1:super.getAttribute(r)}print(){const[r,n]=p(this,e);return super.print(this.selfClosing?{pre:`<${r}`,post:"/>"}:{pre:`<${r}`,sep:">",post:this.closed?`</${n}>`:""})}},e=new WeakMap,t),Xt=W(qr),_e=j(Xt,0,"TagPairToken",jr,_e),B(Xt,1,_e)}}),Xs,an=m({"src/tag/index.ts"(){"use strict";var e,t,s,r;N(),Xs=(r=class extends I{constructor(i,a,l,u,d){super(void 0,u,d);T(this,e);T(this,t);T(this,s);this.insertAt(a),$(this,e,l),$(this,t,i)}get closing(){return p(this,e)}toString(i){return`<${p(this,e)?"/":""}${p(this,t)}${super.toString(i)}${this.selfClosing?"/":""}>`}text(i=""){const{closing:a}=this;return`<${a&&!i?"/":""}${p(this,t)}${a?"":super.text()}${i}>`}getAttribute(i){return i==="padding"?p(this,t).length+(p(this,e)?2:1):super.getAttribute(i)}findMatchingTag(){}print(){return super.print({pre:`<${p(this,e)?"/":""}${p(this,t)}`,post:`${this.selfClosing?"/":""}>`})}json(i,a=this.getAbsoluteIndex()){}},e=new WeakMap,t=new WeakMap,s=new WeakMap,r)}}),Wr,Jt,Mr,ge,ol=m({"src/tag/tvar.ts"(){"use strict";Se(),an(),Te(),Wr=[me()],ge=class extends(Mr=Xs){get type(){return"tvar"}constructor(e,t,s,r,n){const i=new ve(t,"tvar-name",r,n);super(e,i,s,r,n)}},Jt=W(Mr),ge=j(Jt,0,"TvarToken",Wr,ge),B(Jt,1,ge)}}),ln,ul=m({"src/tagPair/translate.ts"(){"use strict";var e,on,s;N(),Qs(),Te(),ol(),ln=(s=class extends _e{constructor(n,i,a,l=[]){const u=new ve(n,"translate-attr",a,l);i=i==null?void 0:i.replace(/<tvar(\|[^>]+)>([\s\S]*?)<\/>/gu,(o,h,x)=>(new ge("tvar",h,!1,a,l),new ge("","",!0,a,l),`\0${l.length-2}n${x}\0${l.length}n`)).replace(/<(tvar)(\s+name\s*=(?:\s*(?:(["'])[\s\S]*?\3|[^"'\s>]+))?\s*)>([\s\S]*?)<\/(tvar)(\s*)>/giu,(o,h,x,g,c,v,w)=>(new ge(h,x,!1,a,l),new ge(v,w,!0,a,l),`\0${l.length-2}n${c}\0${l.length}n`));const d=new I(i,a,l);d.type="translate-inner";super("translate",u,d,"translate",a,l);T(this,e);this.seal("closed",!0),this.seal("selfClosing",!0)}get type(){return"translate"}toString(n){return n?this.lastChild.toString(!0):super.toString()}text(){return this.lastChild.text()}print(){return`<span class="wpb-ext"><translate${O(this,e,on).call(this)?'<span class="wpb-ext-attrs"> <span class="wpb-ext-attr"><span class="wpb-attr-key">nowrap</span></span></span>':""}>${this.lastChild.print({class:"ext-inner"})}</translate></span>`}},e=new WeakSet,on=function(){return this.firstChild.toString()===" nowrap"},s)}}),Ur,Kt,zr,Ze,hl=m({"src/tagPair/include.ts"(){"use strict";Se(),Qs(),Ur=[me(!1)],Ze=class extends(zr=_e){get type(){return"include"}constructor(e,t="",s,r,n,i){super(e,t,s!=null?s:"",s===void 0||r!=null?r:"",n,i)}toString(e){return e?"":super.toString()}lint(e=this.getAbsoluteIndex()){}},Kt=W(zr),Ze=j(Kt,0,"IncludeToken",Ur,Ze),B(Kt,1,Ze)}}),Pt,Js=m({"mixin/attributesParent.ts"(){"use strict";Pt=(e=0)=>t=>{}}}),X,Yt,Zt,es,Hr,ts,Ge,Dr,Gr,Vr,xt,ss,te,un,hn,dn,dl=m({"util/sharable.ts"(){"use strict";X=new Set(["align"]),Yt=new Set(["cite"]),Zt=new Set(["cite","datetime"]),es=new Set(["width"]),Hr=new Set(["axis","align","bgcolor","height","width","valign"]),ts=new Set([...Hr,"abbr","headers","scope","rowspan","colspan"]),Ge=new Set(["type"]),Dr=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),Gr=new Set(["clear"]),Vr=new Set(["bgcolor","align","valign"]),xt=new Set(["qid","forcemathmode","type","display"]),ss=new Set(["enclose","inline","lang","line","linelinks","style","class","id","dir","copy","highlight","start"]),te=new Set,un=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"]),hn={div:X,h1:X,h2:X,h3:X,h4:X,h5:X,h6:X,blockquote:Yt,q:Yt,p:X,br:Gr,pre:es,ins:Zt,del:Zt,ul:Ge,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...Dr,"border"]),caption:X,tr:Vr,td:ts,th:ts,font:new Set(["size","color","face"]),hr:es,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:Ge,poem:X,categorytree:X,combooption:X,math:te,chem:te,ce:te,img:new Set(["alt","src","width","height","loading","srcset"])},dn={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:te,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:new Set(["weight"]),imagemap:te,inputbox:te,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:te,poll:new Set(["id","show-results-before-voting"]),sm2:Ge,flashmp3:Ge,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([...xt,"chem"]),chem:xt,ce:xt,hiero:te,phonos:new Set(["ipa","class","text","lang","wikibase","file"]),section:new Set(["begin","end"]),source:ss,syntaxhighlight:ss,templatedata:te,timeline:new Set(["method","font"]),quiz:new Set(["display","shuffleanswers","points","shuffle","case"]),languages:te}}}),Qr,Xr,Jr,Kr,js,pl=m({"src/attribute.ts"(){"use strict";var e,t,s,r,n,pn,cn,l;Ft(),z(),fe(),dl(),J(),N(),$e(),Qr=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|src|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,Xr=/(?:^|\s|\*\/)(?:javascript|vbscript)(?:\W|$)/iu,Jr=new Set(["ext","arg","magic-word","template"]),Kr=new Set(["about","property","resource","datatype","typeof","itemid","itemprop","itemref","itemscope","itemtype"]),js=(l=class extends I{constructor(d,o,h,x="",g,c=[],v=H.getConfig(),w=[]){const C=new V(h,"attr-key",v,w);let A;if(h==="title"||o==="img"&&h==="alt")A=new I(g,v,w,{}),A.type="attr-value",A.setAttribute("stage",Y-1);else if(o==="gallery"&&h==="caption"||o==="choose"&&(h==="before"||h==="after")){const k={...v,excludes:[...v.excludes,"heading","html","table","hr","list"]};A=new I(g,k,w,{}),A.type="attr-value",A.setAttribute("stage",1)}else A=new V(g,"attr-value",v,w,{});super(void 0,v,w);T(this,n);T(this,e);T(this,t);T(this,s);T(this,r);$(this,e,d),this.append(C,A),$(this,s,x),$(this,r,[...c]),$(this,t,o),this.setAttribute("name",je(Q(h)))}get type(){return p(this,e)}get tag(){return p(this,t)}get balanced(){}afterBuild(){p(this,s).includes("\0")&&$(this,s,this.buildFromStr(p(this,s),0)),this.parentNode&&$(this,t,this.parentNode.name),O(this,n,pn).call(this),super.afterBuild()}toString(d){const[o="",h=""]=p(this,r);return p(this,s)?super.toString(d,p(this,s)+o)+h:this.firstChild.toString(d)}text(){return p(this,s)?`${super.text(`${p(this,s).trim()}"`)}"`:this.firstChild.text()}getGaps(){var d,o;return p(this,s)?p(this,s).length+((o=(d=p(this,r)[0])==null?void 0:d.length)!=null?o:0):0}lint(d=this.getAbsoluteIndex(),o){}getValue(){return p(this,s)?this.lastChild.text().trim():this.type==="ext-attr"||""}escape(){}getAttribute(d){return d==="invalid"?O(this,n,cn).call(this):super.getAttribute(d)}print(){const[d="",o=""]=p(this,r);return p(this,s)?super.print({sep:ut(p(this,s))+d,post:o}):super.print()}json(d,o=this.getAbsoluteIndex()){}},e=new WeakMap,t=new WeakMap,s=new WeakMap,r=new WeakMap,n=new WeakSet,pn=function(){this.setAttribute("name",je(this.firstChild.text()))},cn=function(d,o){const{firstChild:h,lastChild:x,type:g,name:c,tag:v,parentNode:w}=this,C=!x.childNodes.some(({type:y})=>Jr.has(y)),A=this.getValue(),k=dn[v],b=hn[v],{length:F}=this.toString();let P="illegal-attr",f,_;if(!(k!=null&&k.has(c))&&!(b!=null&&b.has(c))&&(g==="ext-attr"?k||b:!/\{\{[^{]+\}\}/u.test(c))&&(g==="ext-attr"&&!b||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(c)&&(v==="meta"||v==="link"||!un.has(c)))||(c==="itemtype"||c==="itemid"||c==="itemref")&&!(w!=null&&w.hasAttr("itemscope"))){if(d===void 0)return!0}else if(c==="style"&&typeof A=="string"&&Qr.test(A)){if(d===void 0)return!0}else if(c==="tabindex"&&typeof A=="string"&&A!=="0"){if(d===void 0)return!0}else if(typeof A=="string"&&((/^xmlns:[\w:.-]+$/u.test(c)||Kr.has(c))&&Xr.test(A)||C&&(c==="href"||v==="img"&&c==="src")&&!new RegExp(String.raw`^(?:${this.getAttribute("config").protocol}|//)\S+$`,"iu").test(A))){if(d===void 0)return!0}else if(C&&g!=="ext-attr"){const y=Ji(v,c),S=String(A).toLowerCase();if(y.length>0&&y.every(q=>q!==S)&&d===void 0)return!0}return!1},l)}}),rs,Yr,Ot,Ks=m({"src/attributes.ts"(){"use strict";var e,t,qs,r;z(),N(),$e(),pl(),rs=n=>n.slice(0,-1),Yr=n=>`${rs(n)}-dirty`,Ot=(r=class extends I{constructor(i,a,l,u,d=[]){super(void 0,u,d,{});T(this,t);T(this,e);if($(this,e,a),this.setAttribute("name",l),i){const o=/([^\s/](?:(?!\0\d+~\x7F)[^\s/=])*)(?:((?:\s(?:\s|\0\d+[cn]\x7F)*)?(?:=|\0\d+~\x7F)(?:\s|\0\d+[cn]\x7F)*)(?:(["'])([\s\S]*?)(\3|$)|(\S*)))?/gu;let h="",x=o.exec(i),g=0;const c=(()=>{h&&(super.insertAt(new V(h,Yr(a),u,d,{})),h="")});for(;x;){const{index:v,0:w,1:C,2:A,3:k,4:b,5:F,6:P}=x;if(h+=i.slice(g,v),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(Q(C).trim())){const f=b!=null?b:P,_=[k,F],y=new js(rs(a),l,C,A,f,_,u,d);c(),super.insertAt(y)}else h+=w;({lastIndex:g}=o),x=o.exec(i)}h+=i.slice(g),c()}}get type(){return p(this,e)}afterBuild(){const{parentNode:i}=this;i!=null&&i.is("td")&&this.setAttribute("name",i.subtype),super.afterBuild()}getAttrTokens(i){return this.childNodes.filter(a=>a instanceof js&&(!i||a.name===je(i)))}hasAttr(i){return this.getAttrTokens(i).length>0}getAttrToken(i){}getAttr(i){}lint(i=this.getAbsoluteIndex(),a){}getAttribute(i){return i==="invalid"?O(this,t,qs).call(this):super.getAttribute(i)}print(){return this.toString()?`<span class="wpb-${this.type}${O(this,t,qs).call(this)?" wpb-invalid":""}">${this.childNodes.map(i=>i.print(i instanceof V?{class:i.toString().trim()&&"attr-dirty"}:void 0)).join("")}</span>`:""}},e=new WeakMap,t=new WeakSet,qs=function(){const{parentNode:i}=this;return(i==null?void 0:i.type)==="html"&&i.closing&&this.text().trim()!==""},r)}}),gn={};M(gn,{PreToken:()=>xn});var xn,cl=m({"src/pre.ts"(){"use strict";fe(),N(),Ue(),xn=class extends I{get type(){return"ext-inner"}constructor(e,t,s=[]){if(e){const r=/<nowiki>/giu,n=/<\/nowiki>/giu,{length:i}=r.source;let a=r.exec(e);a&&(n.lastIndex=a.index+i);let l=n.exec(e),u=0,d="";for(;a&&l;)new Z(a[0],t,s,!0),new Z(l[0],t,s,!0),d+=`${e.slice(u,a.index)}\0${s.length-1}n${e.slice(a.index+i,l.index)}\0${s.length}n`,u=l.index+i+1,r.lastIndex=u,a=r.exec(e),a&&(n.lastIndex=a.index+i),l=n.exec(e);e=d+e.slice(u)}super(e,t,s,{}),this.setAttribute("stage",Y-1)}isPlain(){return!0}lint(e=this.getAbsoluteIndex()){}}}}),Rt,Ys=m({"src/multiLine/index.ts"(){"use strict";N(),Rt=class extends I{get type(){return"ext-inner"}toString(e){return super.toString(e,`
|
|
3
2
|
`)}text(){return super.text(`
|
|
4
3
|
`).replace(/\n\s*\n/gu,`
|
|
5
4
|
`)}getGaps(){return 1}print(){return super.print({sep:`
|
|
6
|
-
`})}}return
|
|
7
|
-
`).map(a=>i?a:ve(a,s,r,t)).map(a=>new n(a,"param-line",s,r,{})))}r.splice(r.indexOf(this),1),r.push(this)}lint(t=this.getAbsoluteIndex()){}},ls=q(ti),Nt=B(ls,0,"ParamTagToken",Zr,Nt),O(ls,1,Nt)}}),ei,os,si,Ft,Sn=m({"src/heading.ts"(){"use strict";var t,e,Ce,r;ot(),F(),Ut(),ei=[at],Ft=(r=class extends(si=I){constructor(n,a,l,o=[]){super(void 0,l,o);k(this,e);k(this,t);C(this,t,n);const d=new I(a[0],l,o);d.type="heading-title",d.setAttribute("stage",2);const h=new $t(a[1],"heading-trail",l,o);this.append(d,h)}get type(){return"heading"}get level(){return p(this,t)}toString(n){const a=E(this,e,Ce).call(this);return a+this.firstChild.toString(n)+a+this.lastChild.toString(n)}text(){const n=E(this,e,Ce).call(this);return n+this.firstChild.text()+n}getAttribute(n){return n==="invalid"?this.inHtmlAttrs()===2:n==="padding"?this.level:super.getAttribute(n)}getGaps(){return this.level}lint(n=this.getAbsoluteIndex(),a){}print(){const n=E(this,e,Ce).call(this);return super.print({pre:n,sep:n})}json(n,a=this.getAbsoluteIndex()){const l=super.json(void 0,a)}},t=new WeakMap,e=new WeakSet,Ce=function(){return"=".repeat(this.level)},r),os=q(si),Ft=B(os,0,"HeadingToken",ei,Ft),O(os,1,Ft)}}),Tn,fl=m({"src/parameter.ts"(){"use strict";F(),Tn=class extends I{get type(){return"parameter"}get anon(){return this.firstChild.length===0}get duplicated(){}constructor(t,e,s,r=[]){super(void 0,s,r);const i=new I(typeof t=="number"?void 0:t,s,r,{}),n=new I(e,s,r);i.type="parameter-key",i.setAttribute("stage",2),n.type="parameter-value",n.setAttribute("stage",2),this.append(i,n)}trimName(t,e=!0){const s=(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",s),s}afterBuild(){if(!this.anon){const{parentNode:t,firstChild:e}=this,s=this.trimName(e);t&&t.getArgs(s,!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){}print(){return super.print({sep:this.anon?"":"="})}json(t,e=this.getAbsoluteIndex()){const s=super.json(void 0,e)}}}}),ri,hs,ii,Lt,ml=m({"src/transclude.ts"(){"use strict";var t,e,s,r,i,n,Hs,$n,o;G(),ut(),Oe(),ot(),F(),fl(),mt(),Ut(),ri=[at,me()],Lt=(o=class extends(ii=I){constructor(h,u,x,c=[]){var y,W;let g;const v=/^(?:\s|\0\d+[cn]\x7F)*\0(\d+)h\x7F(?:\s|\0\d+[cn]\x7F)*/u.exec(h);v&&(g=Number(v[1]),h=h.replace(`\0${g}h`,c[g].toString().replace(/^\n/u,"")));super(void 0,x,c,{});k(this,n);lt(this,"modifier","");k(this,t,"template");k(this,e,":");k(this,s,!1);k(this,r,new Map);k(this,i);const{parserFunction:[A,_],variable:S,functionHook:T}=x,w=(y=/^(?:\s|\0\d+[cn]\x7F)*\0\d+s\x7F/u.exec(h))==null?void 0:y[0];if(w)this.setAttribute("modifier",w),h=h.slice(w.length);else if(h.includes(":")){const[P,...L]=h.split(":"),[H]=/^(?:\s|\0\d+[cn]\x7F)*/u.exec((W=L[0])!=null?W:"");this.setModifier(`${P}:${H}`)&&(h=L.join(":").slice(H.length))}const N=h.search(/[::]/u),j=h[N]===":",f=N!==-1;if(f||u.length===0&&!p(this,s)){const P=f?h.slice(0,N):h,L=f&&h.slice(N+1),H=J(P),X=f?H.slice(H.search(/\S/u))+(j?":":""):H.trim(),Ct=X.toLowerCase(),dt=Array.isArray(_),et=dt?_.includes(X):Object.prototype.hasOwnProperty.call(_,X),pt=!dt&&et?_[X]:Object.prototype.hasOwnProperty.call(A,Ct)&&A[Ct],De=dt&&et||!("functionHook"in x)||T.includes(pt),Ua=dt&&et||S.includes(pt);if(f?pt&&De:Ua){this.setAttribute("name",pt||Ct.replace(/^#|:$/u,"")),C(this,t,"magic-word"),j&&C(this,e,":");const Da=new $t(P,"magic-word-name",x,c);if(super.insertAt(Da),L!==!1&&u.unshift([L]),this.name==="invoke")for(let ze=0;ze<2;ze++){const xr=u.shift();if(!xr)break;const za=new V(xr.join("="),`invoke-${ze?"function":"module"}`,x,c);super.insertAt(za)}}}if(this.type==="template"){const P=J(h).trim();if(!this.normalizeTitle(P,10,{halfParsed:!0,temporary:!0}).valid)throw c.pop(),new SyntaxError("Invalid template name");const L=new V(h,"template-name",x,c,{});super.insertAt(L)}typeof g=="number"&&(c[g]=void 0);const b=this.isTemplate();let $=1;for(let P=0;P<u.length;P++){const L=u[P];b||this.name==="switch"&&P>0||this.name==="tag"&&P>1||(L[0]=L.join("="),L.length=1),L.length===1&&(L.unshift($),$++),this.insertAt(new Tn(...L,x,c))}this.seal("modifier")}get type(){return p(this,t)}get module(){}get function(){}setModifier(h){const{parserFunction:[,,u,x]}=this.getAttribute("config"),c=J(h).trim();if(h&&!c.endsWith(":"))return!1;const g=c.slice(0,-1).toLowerCase(),v=u.includes(g),A=x.includes(g);return p(this,s)&&v||!p(this,s)&&(A||!h)||(tt.running||this.length>1)&&(v||A||!h)?(this.setAttribute("modifier",h),C(this,s,v),!!h):!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"&&(C(this,i,E(this,n,Hs).call(this)),this.setAttribute("name",p(this,i).title))}toString(h){const{childNodes:u,length:x,firstChild:c,modifier:g,type:v}=this;return`{{${g}${v==="magic-word"?c.toString(h)+(x===1?"":p(this,e))+u.slice(1).map(A=>A.toString(h)).join("|"):super.toString(h,"|")}}}`}text(){const{childNodes:h,length:u,firstChild:x,modifier:c,type:g,name:v}=this;return g==="magic-word"&&v==="vardefine"?"":`{{${c}${g==="magic-word"?x.text()+(u===1?"":p(this,e))+yt(h.slice(1),"|"):super.text("|")}}}`}getAttribute(h){switch(h){case"padding":return this.modifier.length+2;case"title":return p(this,i);case"colon":return p(this,e);case"invalid":return this.type==="magic-word"&&this.name==="invoke"&&(this.length===2||!E(this,n,Hs).call(this).valid);default:return super.getAttribute(h)}}lint(h=this.getAbsoluteIndex(),u){}insertAt(h,u=this.length){return super.insertAt(h,u),h.anon?E(this,n,$n).call(this,h):h.name&&this.getArgs(h.name,!1,!1).add(h),h}getAllArgs(){return this.childNodes.filter(cr("parameter"))}getAnonArgs(){return this.getAllArgs().filter(({anon:h})=>h)}getArgs(h,u,x=!0){const c=String(h).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1");let g;return p(this,r).has(c)?g=p(this,r).get(c):(g=new Set(this.getAllArgs().filter(({name:v})=>c===v)),p(this,r).set(c,g)),g}getDuplicatedArgs(){return[...p(this,r)].filter(([,{size:h}])=>h>1).map(([h,u])=>[h,[...u]])}getPossibleValues(){const{type:h,name:u,childNodes:x}=this;if(h==="template")throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!");let c,g;switch(u){case"if":case"ifexist":case"ifexpr":case"iferror":c=2;break;case"ifeq":c=3;break;case"switch":{const v=x.slice(2),A=v[v.length-1];g=[...v.filter(({anon:_})=>!_),...A!=null&&A.anon?[A]:[]].map(({lastChild:_})=>_);break}default:throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!")}g!=null||(g=x.slice(c,c+2).map(({lastChild:v})=>v));for(let v=0;v<g.length;){const{length:A,0:_}=g[v].childNodes.filter(S=>S.text().trim());if(A===0)g.splice(v,1);else if(A>1||_.type!=="magic-word")v++;else try{const S=_.getPossibleValues();g.splice(v,1,...S),v+=S.length}catch{v++}}return g}print(){const{childNodes:h,length:u,firstChild:x,modifier:c,type:g}=this;return`<span class="wpb-${g}${this.getAttribute("invalid")?" wpb-invalid":""}">{{${g==="magic-word"?ce(c)+x.print()+(u===1?"":p(this,e))+Bt(h.slice(1),{sep:"|"}):(c?`<span class="wpb-magic-word">${ce(c)}</span>`:"")+Bt(h,{sep:"|"})}}}</span>`}},t=new WeakMap,e=new WeakMap,s=new WeakMap,r=new WeakMap,i=new WeakMap,n=new WeakSet,Hs=function(){const h=this.type==="template";return this.normalizeTitle(this.childNodes[h?0:1].text(),h?10:828,{temporary:!0})},$n=function(h){const u=this.getAnonArgs(),x=typeof h!="number";for(let c=x?u.indexOf(h):h-1;c<u.length;c++){const g=u[c],{name:v}=g,A=String(c+1);(v!==A||g===h)&&(g.setAttribute("name",A),this.getArgs(A,!1,!1).add(g))}},o),hs=q(ii),Lt=B(hs,0,"TranscludeToken",ri,Lt),O(hs,1,Lt)}}),ni,us,ai,se,vl=m({"src/hidden.ts"(){"use strict";Mt(),F(),ni=[Tt()],se=class extends(ai=I){get type(){return"hidden"}getAttribute(t){return t==="invalid"||super.getAttribute(t)}},us=q(ai),se=B(us,0,"HiddenToken",ni,se),O(us,1,se)}}),li,ds,oi,re,bl=m({"src/arg.ts"(){"use strict";var t,wl,s;G(),ft(),Oe(),ot(),F(),mt(),vl(),li=[at,ht("{{{"),me()],re=(s=class extends(oi=I){constructor(i,n,a=[]){super(void 0,n,a,{});k(this,t);for(let l=0;l<i.length;l++){const o=i[l];if(l===0){const d=new V(o,"arg-name",n,a,{});super.insertAt(d)}else if(l>1){const d=new se(o,n,a);super.insertAt(d)}else{const d=new I(o,n,a);d.type="arg-default",d.setAttribute("stage",2),super.insertAt(d)}}}get type(){return"arg"}get default(){}toString(i){return`{{{${super.toString(i,"|")}}}}`}text(){return`{{{${yt(this.childNodes.slice(0,2),"|")}}}}`}afterBuild(){super.afterBuild()}lint(i=this.getAbsoluteIndex(),n){}print(){return super.print({pre:"{{{",post:"}}}",sep:"|"})}json(i,n=this.getAbsoluteIndex()){const a=super.json(void 0,n)}},t=new WeakSet,wl=function(){},s),ds=q(oi),re=B(ds,0,"ArgToken",li,re),O(ds,1,re)}}),kn={};M(kn,{parseBraces:()=>Me});var hi,ps,Ae,cs,gs,xs,ui,fs,Me,rr=m({"parser/braces.ts"(){"use strict";xe(),G(),Sn(),ml(),bl(),hi={"=":String.raw`\n(?!(?:[^\S\n]|\0\d+[cn]\x7F)*\n)`,"{":String.raw`\}{2,}|\|`,"-":String.raw`\}-`,"[":String.raw`\]\]`},ps=String.raw`\[(?!\[)`,Ae=String.raw`\n(?![=\0])`,cs=String.raw`|\{{2,}`,gs=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"],["server","m"]]),xs=ue(t=>new RegExp(t,"gmu")),ui=new RegExp(String.raw`\{\{((?:[^\n{}[]|${ps}|${Ae})*)\}\}(?!\})`+"|"+String.raw`\[\[(?:[^\n[\]{]|${Ae})*\]\]`+"|"+String.raw`-\{(?:[^\n{}[]|${ps}|${Ae})*\}-`,"gu"),fs=t=>{const e=Ot(J(t));return gs.has(e)?gs.get(e):/^(?:filepath|(?:full|canonical)urle?):./u.test(e)?"m":/^#vardefine:./u.test(e)?"n":"t"},Me=(t,e,s)=>{var g,v,A,_,S;const r=String.raw`${e.excludes.includes("heading")?"":String.raw`^((?:\0\d+[cno]\x7F)*)={1,6}|`}\[\[|-\{(?!\{)`,{parserFunction:[,,,i]}=e,n=[],a=[],l=(T,w,N,j)=>{w[w.length-1].push(Z(T.slice(N,j),a))};let o;do o!==void 0&&(t=o),o=t.replace(ui,(T,w,N)=>{if(w!==void 0||typeof N=="string")try{const{length:j}=s,f=(w!=null?w:N).split("|");return new Lt(Z(f[0],a),f.slice(1).map(b=>{const $=b.indexOf("=");return($===-1?[b]:[b.slice(0,$),b.slice($+1)]).map(y=>Z(y,a))}),e,s),`\0${j}${fs(f[0])}`}catch(j){if(!(j instanceof SyntaxError)||j.message!=="Invalid template name")throw j}return a.push(Z(T,a)),`\0${a.length-1}`});while(o!==t);t=o;const d=t.lastIndexOf("}}")-t.length;let h=d+t.length!==-1,u=xs(r+(h?cs:"")),x=u.exec(t),c;for(;x||c!==void 0&&c<=t.length&&((v=(g=n[n.length-1])==null?void 0:g[0])!=null&&v.startsWith("="));){if(x!=null&&x[1]){const[,{length:L}]=x;x[0]=x[0].slice(L),x.index+=L}const{0:T,index:w}=x!=null?x:{0:`
|
|
8
|
-
`,index:
|
|
9
|
-
`){
|
|
10
|
-
`)||(
|
|
11
|
-
)`:""}(\s*)$`,"u")),
|
|
12
|
-
`))!=null?
|
|
13
|
-
`),
|
|
14
|
-
`)}getAttr(
|
|
15
|
-
|}`,
|
|
16
|
-
`);let l=
|
|
17
|
-
${a.shift()}`,
|
|
18
|
-
${
|
|
19
|
-
${
|
|
20
|
-
${
|
|
21
|
-
${
|
|
22
|
-
${
|
|
23
|
-
${
|
|
24
|
-
`)&&(A=J(x).trim());const{ns:S,valid:T}=U.normalizeTitle(A,0,!1,e,{halfParsed:!0,temporary:!0,decode:!0,selfLink:!0});if(T){if(d){if(S!==6){a+=`[[${g}`;continue}let N=!1;for(o++;o<n.length;o++){const j=n[o],f=j.split("]]");if(f.length>2){N=!0,x+=`[[${f[0]}]]${f[1]}`,c=f.slice(2).join("]]");break}else if(f.length===2)x+=`[[${f[0]}]]${f[1]}`;else{x+=`[[${j}`;break}}if(x=Vs(x,e,s,r),!N){a+=`[[${h}${u}${x}`;continue}}}else{a+=`[[${g}`;continue}x&&(x=dr(x,e,s,r));let w=nr;_||(S===6?(x&&(x=pr(x,e,s,!0)),w=ir):S===14&&(w=fa)),x===void 0&&u&&(x=""),a+=`\0${s.length}l${c}`,new w(h,x,e,s,u)}return a}}}),va={};M(va,{parseMagicLinks:()=>ba});var Fs,Ls,Es,Ps,ba,Wl=m({"parser/magicLinks.ts"(){"use strict";G(),ar(),Fs=String.raw`[${_t}\t]| |�*160;|�*a0;`,Ls=`(?:${Fs})+`,Es=`(?:${Fs}|-)`,Ps=String.raw`(?:RFC|PMID)${Ls}\d+\b|ISBN${Ls}(?:97[89]${Es}?)?(?:\d${Es}?){9}[\dx]\b`,ba=(t,e,s)=>{if(!e.regexMagicLinks)try{e.regexMagicLinks=new RegExp(String.raw`(^|[^\p{L}\p{N}_])(?:(?:${e.protocol})(${de}${pe})|${Ps})`,"giu")}catch{e.regexMagicLinks=new RegExp(String.raw`(^|\W)(?:(?:${e.protocol})(${de}${pe})|${Ps})`,"giu")}return t.replace(e.regexMagicLinks,(r,i,n)=>{let a=i?r.slice(i.length):r;if(n){let l="";const o=/&(?:lt|gt|nbsp|#x0*(?:3[ce]|a0)|#0*(?:6[02]|160));/iu.exec(a);o&&(l=a.slice(o.index),a=a.slice(0,o.index));const d=a.includes("(")?/[^,;\\.:!?][,;\\.:!?]+$/u:/[^,;\\.:!?)][,;\\.:!?)]+$/u,h=d.exec(a);if(h){let u=1;h[0][1]===";"&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(a.slice(0,h.index))&&(u=2),l=a.slice(h.index+u)+l,a=a.slice(0,h.index+u)}return l.length>=n.length?r:(new ge(a,void 0,e,s),`${i}\0${s.length-1}w${l}`)}else if(!/^(?:RFC|PMID|ISBN)/u.test(a))return r;return new ge(a,"magic-link",e,s),`${i}\0${s.length-1}i`})}}}),wa,Ml=m({"util/html.ts"(){"use strict";wa=(t,e)=>t.startsWith(e)?e.length:[...e].findIndex((s,r)=>s!==t[r])}}),_a,Ul=m({"src/nowiki/list.ts"(){"use strict";ia(),_a=class extends hr{get type(){return"list"}}}}),Aa={};M(Aa,{parseList:()=>ya});var ya,Dl=m({"parser/list.ts"(){"use strict";Ml(),Ul(),na(),ya=(t,e,s,r)=>{const i=/^((?:\0\d+[cno]\x7F)*)([;:*#]+)(\s*)/u.exec(t);if(!i)return e.lastPrefix="",t;const[n,a,l,o]=i,d=l.replace(/;/gu,":"),h=wa(d,e.lastPrefix),u=((h>1?l.slice(h-1):l)+o).split(/(?=;)/u),x=u[0].startsWith(";");let c=u.length-(x?0:1);if(h>1){const y=l.slice(0,h-1);if(x){const W=y.split(/(?=;)/u);u.unshift(...W),c+=y.includes(";")?W.length:0}else u[0]=y+u[0]}e.lastPrefix=d;let g=a+u.map((y,W)=>`\0${r.length+W}d`).join("")+t.slice(n.length);for(const y of u)new _a(y,s,r);if(!c)return g;const{html:[v,,A]}=s,_=/:+|-\{|\0\d+[xq]\x7F/gu;let S=_,T=S.exec(g),w=0,N=!1,j=!1,f=0;const b=(y,W)=>(new ur(y,s,r),`${g.slice(0,W)}\0${r.length-1}d${g.slice(W+y.length)}`),$=y=>{y?w&&w--:w++};for(;T&&c;){const{0:y,index:W}=T;if(y==="-{"){if(!f){const{lastIndex:P}=S;S=/-\{|\}-/gu,S.lastIndex=P}f++}else if(y==="}-"){if(f--,!f){const{lastIndex:P}=S;S=_,S.lastIndex=P}}else if(y.endsWith("x")){const{name:P,closing:L,selfClosing:H}=r[Number(y.slice(1,-2))];(v.includes(P)||!H&&!A.includes(P))&&$(L)}else if(y.endsWith("q")){const{bold:P,italic:L}=r[Number(y.slice(1,-2))];P&&($(N),N=!N),L&&($(j),j=!j)}else if(w===0){if(y.length>=c)return b(y.slice(0,c),W);c-=y.length,S.lastIndex=W+4+String(r.length).length,g=b(y,W)}T=S.exec(g)}return g}}}),zi,Hi,js,Gi,oe,zl=m({"src/converterFlags.ts"(){"use strict";var t,e;Oe(),F(),mt(),zi=new Set(["A","T","R","D","-","H","N"]),Hi=[me()],oe=(e=class extends(Gi=I){constructor(r,i,n=[]){super(void 0,i,n,{});k(this,t);this.safeAppend(r.map(a=>new V(a,"converter-flag",i,n)))}get type(){return"converter-flags"}afterBuild(){C(this,t,this.childNodes.map(r=>r.text().trim())),super.afterBuild()}toString(r){return super.toString(r,";")}text(){return super.text(";")}getUnknownFlags(){return new Set(p(this,t).filter(r=>/\{{3}[^{}]+\}{3}/u.test(r)))}getVariantFlags(){const r=new Set(this.getAttribute("config").variants);return new Set(p(this,t).filter(i=>r.has(i)))}isInvalidFlag(r,i,n,a){return typeof r=="object"&&(r=r.text().trim(),i=this.getVariantFlags(),n=this.getUnknownFlags(),a=new Set(p(this,t).filter(l=>zi.has(l)))),!!r&&!i.has(r)&&!n.has(r)&&(i.size>0||!a.has(r))}lint(r=this.getAbsoluteIndex(),i){}print(){return super.print({sep:";"})}},t=new WeakMap,e),js=q(Gi),oe=B(js,0,"ConverterFlagsToken",Hi,oe),O(js,1,oe)}}),Fe,Hl=m({"src/converterRule.ts"(){"use strict";Q(),F(),mt(),Fe=class extends I{get type(){return"converter-rule"}get variant(){}constructor(t,e=!0,s=U.getConfig(),r=[]){super(void 0,s,r);const i=t.indexOf(":"),n=t.slice(0,i).indexOf("=>"),a=n===-1?t.slice(0,i):t.slice(n+2,i);e&&s.variants.includes(a.trim().toLowerCase())?(super.insertAt(new V(a,"converter-rule-variant",s,r)),super.insertAt(new V(t.slice(i+1),"converter-rule-to",s,r)),n!==-1&&super.insertAt(new V(t.slice(0,n),"converter-rule-from",s,r),0)):super.insertAt(new V(t,"converter-rule-to",s,r))}toString(t){const{childNodes:e,firstChild:s,lastChild:r}=this;return e.length===3?`${s.toString(t)}=>${e[1].toString(t)}:${r.toString(t)}`:super.toString(t,":")}text(){const{childNodes:t,firstChild:e,lastChild:s}=this;return t.length===3?`${e.text()}=>${t[1].text()}:${s.text()}`:super.text(":")}getGaps(t){return t===0&&this.length===3?2:1}print(){const{childNodes:t}=this;if(t.length===3){const[e,s,r]=t;return`<span class="wpb-converter-rule">${e.print()}=>${s.print()}:${r.print()}</span>`}return super.print({sep:":"})}json(t,e=this.getAbsoluteIndex()){const s=super.json(void 0,e)}}}}),Vi,Rs,Qi,he,Gl=m({"src/converter.ts"(){"use strict";G(),ft(),ot(),F(),zl(),Hl(),Vi=[at,ht("-{")],he=class extends(Qi=I){get type(){return"converter"}constructor(t,e,s,r=[]){super(void 0,s,r),this.insertAt(new oe(t,s,r));const[i]=e,n=i.includes(":"),a=new Fe(i,n,s,r);n&&a.length===1||!n&&e.length===2&&!J(e[1]).trim()?this.insertAt(new Fe(e.join(";"),!1,s,r)):this.append(a,...e.slice(1).map(l=>new Fe(l,!0,s,r)))}toString(t){const{childNodes:[e,...s]}=this;return`-{${e.toString(t)}${e.length>0?"|":""}${s.map(r=>r.toString(t)).join(";")}}-`}text(){const{childNodes:[t,...e]}=this;return`-{${t.text()}|${yt(e,";")}}-`}getGaps(t){return t||this.firstChild.length>0?1:0}print(){const{childNodes:[t,...e]}=this;return`<span class="wpb-converter">-{${t.print()}${t.length>0?"|":""}${Bt(e,{sep:";"})}}-</span>`}},Rs=q(Qi),he=B(Rs,0,"ConverterToken",Vi,he),O(Rs,1,he)}}),Sa={};M(Sa,{parseConverter:()=>Ta});var Ta,Vl=m({"parser/converter.ts"(){"use strict";Gl(),Ta=(t,e,s)=>{var o;(o=e.regexConverter)!=null||(e.regexConverter=new RegExp(String.raw`;(?=(?:[^;]*?=>)?\s*(?:${e.variants.join("|")})\s*:|(?:\s|\0\d+[cn]\x7F)*$)`,"iu"));const r=/-\{/gu,i=/-\{|\}-/gu,n=[];let a=r,l=a.exec(t);for(;l;){const{0:d,index:h}=l;if(d==="}-"){const u=n.pop(),{length:x}=s,c=t.slice(u.index+2,h),g=c.indexOf("|"),[v,A]=g===-1?[[],c]:[c.slice(0,g).split(";"),c.slice(g+1)],_=A.replace(/(&[#a-z\d]+);/giu,"$1"),S=_.split(e.regexConverter).map(T=>T.replace(/\x01/gu,";"));new he(v,S,e,s),t=`${t.slice(0,u.index)}\0${x}v${t.slice(h+2)}`,n.length===0&&(a=r),a.lastIndex=u.index+3+String(x).length}else n.push(l),a=i,a.lastIndex=h+2;l=a.exec(t)}return t}}}),Pe={};M(Pe,{Token:()=>I});var I,F=m({"src/index.ts"(){"use strict";var t,e,s,r,i,n,a,l,$a,ka,Ca,Ia,Na,Fa,La,Ea,Pa,ja,Ra,Oa,w;G(),St(),fe(),ut(),Q(),nl(),al(),I=(w=class extends Yt{constructor(f,b=U.getConfig(),$=[],y){super();k(this,l);k(this,t,"plain");k(this,e,0);k(this,s);k(this,r);k(this,i);k(this,n,!1);k(this,a);typeof f=="string"&&this.insertAt(f),C(this,s,b),C(this,r,$),$.push(this)}get type(){return p(this,t)}set type(f){C(this,t,f)}parseOnce(f=p(this,e),b=!1,$){if(f<p(this,e)||this.length===0||!this.isPlain())return this;if(p(this,e)>=it)return this;switch(f){case 0:if(this.type==="root"){p(this,r).pop();const y=E(this,l,$a).call(this);b&&(b=!y)}C(this,i,b),E(this,l,ka).call(this,b);break;case 1:E(this,l,Ca).call(this);break;case 2:E(this,l,Ia).call(this);break;case 3:E(this,l,Na).call(this);break;case 4:E(this,l,Fa).call(this);break;case 5:E(this,l,La).call(this,$);break;case 6:E(this,l,Ea).call(this,$);break;case 7:E(this,l,Pa).call(this);break;case 8:E(this,l,ja).call(this);break;case 9:E(this,l,Ra).call(this);break;case 10:E(this,l,Oa).call(this)}if(this.type==="root")for(const y of p(this,r))y==null||y.parseOnce(f,b,$);return mr(this,e)._++,this}buildFromStr(f,b){const $=f.split(/[\0\x7F]/u).map((y,W)=>{if(W%2===0)return new Us(y);if(isNaN(y.slice(-1)))return p(this,r)[Number(y.slice(0,-1))];throw new Error(`Failed to build! Unrecognized token: ${y}`)});return b===0?$.map(String).join(""):b===1?yt($):$}build(){C(this,e,it);const{length:f,firstChild:b}=this,$=b==null?void 0:b.toString();if(f===1&&b.type==="text"&&$.includes("\0")&&(gr(this,0,1,this.buildFromStr($)),this.normalize(),this.type==="root"))for(const y of p(this,r))y==null||y.build()}afterBuild(){if(this.type==="root")for(const f of p(this,r))f==null||f.afterBuild();C(this,n,!0)}parse(f=it,b,$){for(f=Math.min(f,it);p(this,e)<f;)this.parseOnce(p(this,e),b,$);return f&&(this.build(),this.afterBuild()),this}isPlain(){return this.constructor===w}getAttribute(f){var b;switch(f){case"config":return p(this,s);case"include":return(b=p(this,i))!=null?b:!!p(this.getRootNode(),i);case"accum":return p(this,r);case"built":return p(this,n);case"stage":return p(this,e);case"invalid":return this.type==="table-inter"&&ke(this)===2;default:return super.getAttribute(f)}}setAttribute(f,b){switch(f){case"stage":p(this,e)===0&&this.type==="root"&&p(this,r).shift(),C(this,e,b);break;default:super.setAttribute(f,b)}}insertAt(f,b=this.length){const $=typeof f=="string"?new Us(f):f;super.insertAt($,b);const{type:y}=$;return y==="root"&&($.type="plain"),$}normalizeTitle(f,b=0,$){return U.normalizeTitle(f,b,p(this,i),p(this,s),$)}inTableAttrs(){var f,b;return((f=this.closest("table-attrs,ext"))==null?void 0:f.type)==="table-attrs"&&((b=this.closest("table-attrs,arg,magic-word,template"))!=null&&b.is("table-attrs")?2:1)}inHtmlAttrs(){var f;return(f=this.closest("html-attrs,ext"))!=null&&f.is("html-attrs")?2:this.inTableAttrs()}lint(f=this.getAbsoluteIndex(),b){}toString(f,b){return f?super.toString(!0,b):At(p(this,a),()=>super.toString(!1,b),$=>{const y=this.getRootNode();y.type==="root"&&p(y,n)&&C(this,a,$)})}},t=new WeakMap,e=new WeakMap,s=new WeakMap,r=new WeakMap,i=new WeakMap,n=new WeakMap,a=new WeakMap,l=new WeakSet,$a=function(){const{parseRedirect:f}=(hl(),R(dn)),b=this.firstChild.toString(),$=f(b,p(this,s),p(this,r));return $&&this.setText($),!!$},ka=function(f){const{parseCommentAndExt:b}=(Ue(),R(Kn));this.setText(b(this.firstChild.toString(),p(this,s),p(this,r),f))},Ca=function(){const{parseBraces:f}=(rr(),R(kn)),b=this.type==="root"?this.firstChild.toString():`\0${this.firstChild.toString()}`,$=f(b,p(this,s),p(this,r));this.setText(this.type==="root"?$:$.slice(1))},Ia=function(){if(p(this,s).excludes.includes("html"))return;const{parseHtml:f}=(Nl(),R(Yn));this.setText(f(this.firstChild.toString(),p(this,s),p(this,r)))},Na=function(){if(p(this,s).excludes.includes("table"))return;const{parseTable:f}=(El(),R(aa));this.setText(f(this,p(this,s),p(this,r)))},Fa=function(){if(p(this,s).excludes.includes("hr"))return;const{parseHrAndDoubleUnderscore:f}=(Rl(),R(ha));this.setText(f(this,p(this,s),p(this,r)))},La=function(f){const{parseLinks:b}=(ql(),R(ma));this.setText(b(this.firstChild.toString(),p(this,s),p(this,r),f))},Ea=function(f){if(p(this,s).excludes.includes("quote"))return;const{parseQuotes:b}=(ca(),R(pa)),$=this.firstChild.toString().split(`
|
|
25
|
-
`);for(let
|
|
26
|
-
`))},
|
|
27
|
-
`),
|
|
28
|
-
`))},
|
|
5
|
+
`})}}}}),fn,gl=m({"src/paramLine.ts"(){"use strict";N(),fn=class extends I{get type(){return"param-line"}}}}),mn={};M(mn,{ParamTagToken:()=>Zs});var Zs,vn=m({"src/multiLine/paramTag.ts"(){"use strict";jt(),J(),Ys(),gl(),Zs=class extends Rt{constructor(e,t,s=H.getConfig(),r=[],n){super(void 0,s,r,{}),t&&this.append(...t.split(`
|
|
6
|
+
`).map(i=>n?i:pt(i,s,r,e)).map(i=>new fn(i,s,r,{}))),r.splice(r.indexOf(this),1),r.push(this)}lint(e=this.getAbsoluteIndex()){}}}}),Zr,is,ei,Ne,bn=m({"src/heading.ts"(){"use strict";var e,t,At,r;le(),N(),Te(),Zr=[ne],Ne=(r=class extends(ei=I){constructor(i,a,l,u=[]){super(void 0,l,u);T(this,t);T(this,e);$(this,e,i);const d=new I(a[0],l,u);d.type="heading-title",d.setAttribute("stage",2);const o=new ve(a[1],"heading-trail",l,u);this.append(d,o)}get type(){return"heading"}get level(){return p(this,e)}toString(i){const a=O(this,t,At).call(this);return a+this.firstChild.toString(i)+a+this.lastChild.toString(i)}text(){const i=O(this,t,At).call(this);return i+this.firstChild.text()+i}getAttribute(i){return i==="invalid"?this.inHtmlAttrs()===2:i==="padding"?this.level:super.getAttribute(i)}getGaps(){return this.level}lint(i=this.getAbsoluteIndex(),a){}print(){const i=O(this,t,At).call(this);return super.print({pre:i,sep:i})}json(i,a=this.getAbsoluteIndex()){}},e=new WeakMap,t=new WeakSet,At=function(){return"=".repeat(this.level)},r),is=W(ei),Ne=j(is,0,"HeadingToken",Zr,Ne),B(is,1,Ne)}}),wn,xl=m({"src/parameter.ts"(){"use strict";N(),wn=class extends I{get type(){return"parameter"}get anon(){return this.firstChild.length===0}get duplicated(){}constructor(e,t,s,r=[]){super(void 0,s,r);const n=new I(typeof e=="number"?void 0:e,s,r,{}),i=new I(t,s,r);n.type="parameter-key",n.setAttribute("stage",2),i.type="parameter-value",i.setAttribute("stage",2),this.append(n,i)}trimName(e,t=!0){const s=(typeof e=="string"?e:e.toString(!0)).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1");return this.setAttribute("name",s),s}afterBuild(){if(!this.anon){const{parentNode:e,firstChild:t}=this,s=this.trimName(t);e&&e.getArgs(s,!1,!1).add(this)}super.afterBuild()}toString(e){return this.anon?this.lastChild.toString(e):super.toString(e,"=")}text(){return this.anon?this.lastChild.text():super.text("=")}getGaps(){return this.anon?0:1}lint(e=this.getAbsoluteIndex(),t){}print(){return super.print({sep:this.anon?"":"="})}json(e,t=this.getAbsoluteIndex()){}}}}),ti,ns,si,Le,fl=m({"src/transclude.ts"(){"use strict";var e,t,s,r,n,i,Ws,_n,u;z(),Ce(),Et(),le(),N(),xl(),$e(),Te(),ti=[ne,dt()],Le=(u=class extends(si=I){constructor(o,h,x,g=[]){var S,q;let c;const v=/^(?:\s|\0\d+[cn]\x7F)*\0(\d+)h\x7F(?:\s|\0\d+[cn]\x7F)*/u.exec(o);v&&(c=Number(v[1]),o=o.replace(`\0${c}h`,g[c].toString().replace(/^\n/u,"")));super(void 0,x,g,{});T(this,i);ae(this,"modifier","");T(this,e,"template");T(this,t,":");T(this,s,!1);T(this,r,new Map);T(this,n);const{parserFunction:[w,C],variable:A,functionHook:k}=x,b=(S=/^(?:\s|\0\d+[cn]\x7F)*\0\d+s\x7F/u.exec(o))==null?void 0:S[0];if(b)this.setAttribute("modifier",b),o=o.slice(b.length);else if(o.includes(":")){const[E,...L]=o.split(":"),[U]=/^(?:\s|\0\d+[cn]\x7F)*/u.exec((q=L[0])!=null?q:"");this.setModifier(`${E}:${U}`)&&(o=L.join(":").slice(U.length))}const F=o.search(/[::]/u),P=o[F]===":",f=F!==-1;if(f||h.length===0&&!p(this,s)){const E=f?o.slice(0,F):o,L=f&&o.slice(F+1),U=Q(E),D=f?U.slice(U.search(/\S/u))+(P?":":""):U.trim(),Ie=D.toLowerCase(),ue=Array.isArray(C),ee=ue?C.includes(D):Object.prototype.hasOwnProperty.call(C,D),he=!ue&&ee?C[D]:Object.prototype.hasOwnProperty.call(w,Ie)&&w[Ie],qt=ue&&ee||!("functionHook"in x)||k.includes(he),ja=ue&&ee||A.includes(he);if(f?he&&qt:ja){this.setAttribute("name",he||Ie.replace(/^#|:$/u,"")),$(this,e,"magic-word"),P&&$(this,t,":");const qa=new ve(E,"magic-word-name",x,g);if(super.insertAt(qa),L!==!1&&h.unshift([L]),this.name==="invoke")for(let Wt=0;Wt<2;Wt++){const dr=h.shift();if(!dr)break;const Wa=new V(dr.join("="),`invoke-${Wt?"function":"module"}`,x,g);super.insertAt(Wa)}}}if(this.type==="template"){const E=Q(o).trim();if(!this.normalizeTitle(E,10,{halfParsed:!0,temporary:!0}).valid)throw g.pop(),new SyntaxError("Invalid template name");const L=new V(o,"template-name",x,g,{});super.insertAt(L)}typeof c=="number"&&(g[c]=void 0);const _=this.isTemplate();let y=1;for(let E=0;E<h.length;E++){const L=h[E];_||this.name==="switch"&&E>0||this.name==="tag"&&E>1||(L[0]=L.join("="),L.length=1),L.length===1&&(L.unshift(y),y++),this.insertAt(new wn(...L,x,g))}this.seal("modifier")}get type(){return p(this,e)}get module(){}get function(){}setModifier(o){const{parserFunction:[,,h,x]}=this.getAttribute("config"),g=Q(o).trim();if(o&&!g.endsWith(":"))return!1;const c=g.slice(0,-1).toLowerCase(),v=h.includes(c),w=x.includes(c);return p(this,s)&&v||!p(this,s)&&(w||!o)||(xe.running||this.length>1)&&(v||w||!o)?(this.setAttribute("modifier",o),$(this,s,v),!!o):!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"&&($(this,n,O(this,i,Ws).call(this)),this.setAttribute("name",p(this,n).title))}toString(o){const{childNodes:h,length:x,firstChild:g,modifier:c,type:v}=this;return`{{${c}${v==="magic-word"?g.toString(o)+(x===1?"":p(this,t))+h.slice(1).map(w=>w.toString(o)).join("|"):super.toString(o,"|")}}}`}text(){const{childNodes:o,length:h,firstChild:x,modifier:g,type:c,name:v}=this;return c==="magic-word"&&v==="vardefine"?"":`{{${g}${c==="magic-word"?x.text()+(h===1?"":p(this,t))+ye(o.slice(1),"|"):super.text("|")}}}`}getAttribute(o){switch(o){case"padding":return this.modifier.length+2;case"title":return p(this,n);case"colon":return p(this,t);case"invalid":return this.type==="magic-word"&&this.name==="invoke"&&(this.length===2||!O(this,i,Ws).call(this).valid);default:return super.getAttribute(o)}}lint(o=this.getAbsoluteIndex(),h){}insertAt(o,h=this.length){return super.insertAt(o,h),o.anon?O(this,i,_n).call(this,o):o.name&&this.getArgs(o.name,!1,!1).add(o),o}getAllArgs(){return this.childNodes.filter(ur("parameter"))}getAnonArgs(){return this.getAllArgs().filter(({anon:o})=>o)}getArgs(o,h,x=!0){const g=String(o).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1");let c;return p(this,r).has(g)?c=p(this,r).get(g):(c=new Set(this.getAllArgs().filter(({name:v})=>g===v)),p(this,r).set(g,c)),c}getDuplicatedArgs(){}getPossibleValues(){const{type:o,name:h,childNodes:x}=this;if(o==="template")throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!");let g,c;switch(h){case"if":case"ifexist":case"ifexpr":case"iferror":g=2;break;case"ifeq":g=3;break;case"switch":{const v=x.slice(2),w=v[v.length-1];c=[...v.filter(({anon:C})=>!C),...w!=null&&w.anon?[w]:[]].map(({lastChild:C})=>C);break}default:throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!")}c!=null||(c=x.slice(g,g+2).map(({lastChild:v})=>v));for(let v=0;v<c.length;){const{length:w,0:C}=c[v].childNodes.filter(A=>A.text().trim());if(w===0)c.splice(v,1);else if(w>1||C.type!=="magic-word")v++;else try{const A=C.getPossibleValues();c.splice(v,1,...A),v+=A.length}catch{v++}}return c}print(){const{childNodes:o,length:h,firstChild:x,modifier:g,type:c}=this;return`<span class="wpb-${c}${this.getAttribute("invalid")?" wpb-invalid":""}">{{${c==="magic-word"?ut(g)+x.print()+(h===1?"":p(this,t))+qe(o.slice(1),{sep:"|"}):(g?`<span class="wpb-magic-word">${ut(g)}</span>`:"")+qe(o,{sep:"|"})}}}</span>`}},e=new WeakMap,t=new WeakMap,s=new WeakMap,r=new WeakMap,n=new WeakMap,i=new WeakSet,Ws=function(){const o=this.type==="template";return this.normalizeTitle(this.childNodes[o?0:1].text(),o?10:828,{temporary:!0})},_n=function(o){const h=this.getAnonArgs(),x=typeof o!="number";for(let g=x?h.indexOf(o):o-1;g<h.length;g++){const c=h[g],{name:v}=c,w=String(g+1);(v!==w||c===o)&&(c.setAttribute("name",w),this.getArgs(w,!1,!1).add(c))}},u),ns=W(si),Le=j(ns,0,"TranscludeToken",ti,Le),B(ns,1,Le)}}),ri,as,ii,et,ml=m({"src/hidden.ts"(){"use strict";Se(),N(),ri=[me()],et=class extends(ii=I){get type(){return"hidden"}getAttribute(e){return e==="invalid"||super.getAttribute(e)}},as=W(ii),et=j(as,0,"HiddenToken",ri,et),B(as,1,et)}}),ni,ls,ai,tt,vl=m({"src/arg.ts"(){"use strict";var e,bl,s;z(),be(),Et(),le(),N(),$e(),ml(),ni=[ne,oe("{{{"),dt()],tt=(s=class extends(ai=I){constructor(n,i,a=[]){super(void 0,i,a,{});T(this,e);for(let l=0;l<n.length;l++){const u=n[l];if(l===0){const d=new V(u,"arg-name",i,a,{});super.insertAt(d)}else if(l>1){const d=new et(u,i,a);super.insertAt(d)}else{const d=new I(u,i,a);d.type="arg-default",d.setAttribute("stage",2),super.insertAt(d)}}}get type(){return"arg"}get default(){}toString(n){return`{{{${super.toString(n,"|")}}}}`}text(){return`{{{${ye(this.childNodes.slice(0,2),"|")}}}}`}afterBuild(){super.afterBuild()}lint(n=this.getAbsoluteIndex(),i){}print(){return super.print({pre:"{{{",post:"}}}",sep:"|"})}json(n,i=this.getAbsoluteIndex()){}},e=new WeakSet,bl=function(){},s),ls=W(ai),tt=j(ls,0,"ArgToken",ni,tt),B(ls,1,tt)}}),An={};M(An,{parseBraces:()=>Bt});var li,os,ft,us,hs,ds,oi,ps,Bt,er=m({"parser/braces.ts"(){"use strict";Ct(),z(),bn(),fl(),vl(),li={"=":String.raw`\n(?!(?:[^\S\n]|\0\d+[cn]\x7F)*\n)`,"{":String.raw`\}{2,}|\|`,"-":String.raw`\}-`,"[":String.raw`\]\]`},os=String.raw`\[(?!\[)`,ft=String.raw`\n(?![=\0])`,us=String.raw`|\{{2,}`,hs=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"],["server","m"]]),ds=at(e=>new RegExp(e,"gmu")),oi=new RegExp(String.raw`\{\{((?:[^\n{}[]|${os}|${ft})*)\}\}(?!\})`+"|"+String.raw`\[\[(?:[^\n[\]{]|${ft})*\]\]`+"|"+String.raw`-\{(?:[^\n{}[]|${os}|${ft})*\}-`,"gu"),ps=e=>{const t=je(Q(e));return hs.has(t)?hs.get(t):/^(?:filepath|(?:full|canonical)urle?):./u.test(t)?"m":/^#vardefine:./u.test(t)?"n":"t"},Bt=(e,t,s)=>{var c,v,w,C,A;const r=String.raw`${t.excludes.includes("heading")?"":String.raw`^((?:\0\d+[cno]\x7F)*)={1,6}|`}\[\[|-\{(?!\{)`,{parserFunction:[,,,n]}=t,i=[],a=[],l=(k,b,F,P)=>{b[b.length-1].push(K(k.slice(F,P),a))};let u;do u!==void 0&&(e=u),u=e.replace(oi,(k,b,F)=>{if(b!==void 0||typeof F=="string")try{const{length:P}=s,f=(b!=null?b:F).split("|");return new Le(K(f[0],a),f.slice(1).map(_=>{const y=_.indexOf("=");return(y===-1?[_]:[_.slice(0,y),_.slice(y+1)]).map(S=>K(S,a))}),t,s),`\0${P}${ps(f[0])}`}catch(P){if(!(P instanceof SyntaxError)||P.message!=="Invalid template name")throw P}return a.push(K(k,a)),`\0${a.length-1}`});while(u!==e);e=u;const d=e.lastIndexOf("}}")-e.length;let o=d+e.length!==-1,h=ds(r+(o?us:"")),x=h.exec(e),g;for(;x||g!==void 0&&g<=e.length&&((v=(c=i[i.length-1])==null?void 0:c[0])!=null&&v.startsWith("="));){if(x!=null&&x[1]){const[,{length:L}]=x;x[0]=x[0].slice(L),x.index+=L}const{0:k,index:b}=x!=null?x:{0:`
|
|
7
|
+
`,index:e.length},F=(w=i.pop())!=null?w:{},{0:P,index:f,parts:_,findEqual:y,pos:S}=F,q=k==="="&&y;if(k==="]]"||k==="}-")g=b+2;else if(k===`
|
|
8
|
+
`){g=b+1;const{pos:L,findEqual:U}=(C=i[i.length-1])!=null?C:{};if(L===void 0||U||Q(e.slice(L,f))!==""){const D=/^(={1,6})(.+)\1((?:\s|\0\d+[cn]\x7F)*)$/u.exec(e.slice(f,b));D&&(D[2]=K(D[2],a),D[2].includes(`
|
|
9
|
+
`)||(e=`${e.slice(0,f)}\0${s.length}h${e.slice(b)}`,g=f+4+String(s.length).length,new Ne(D[1].length,D.slice(2),t,s)))}}else if(k==="|"||q)g=b+1,l(e,_,S,b),k==="|"&&_.push([]),F.pos=g,F.findEqual=k==="|",i.push(F);else if(k.startsWith("}}")){const L=k.slice(0,Math.min(P.length,3)),U=P.length-L.length,{length:D}=s;g=b+L.length,l(e,_,S,b);let Ie=!1,ue="t";if(L.length===3){const ee=_.map(qt=>qt.join("=")),he=ee.length>1&&Q(ee[1]).trim();new tt(ee,t,s),he&&he.endsWith(":")&&n.includes(he.slice(0,-1).toLowerCase())&&(ue="s")}else try{new Le(_[0][0],_.slice(1),t,s),ue=ps(_[0][0])}catch(ee){if(ee instanceof SyntaxError&&ee.message==="Invalid template name")Ie=!0;else throw ee}Ie||(e=`${e.slice(0,f+U)}\0${D}${ue}${e.slice(g)}`,g=f+U+3+String(D).length,U>1?i.push({0:P.slice(0,U),index:f,pos:f+U,parts:[[]]}):U===1&&e[f-1]==="-"&&i.push({0:"-{",index:f-1,pos:f+1,parts:[[]]}))}else g=b+k.length,k.startsWith("{")&&(x.pos=g,x.parts=[[]]),i.push(..."0"in F?[F]:[],x);let E=i[i.length-1];if(o&&d+e.length<g)for(o=!1;(A=E==null?void 0:E[0])!=null&&A.startsWith("{");)i.pop(),E=i[i.length-1];h=ds(r+(o?us:"")+(E?`|${li[E[0][0]]}${E.findEqual?"|=":""}`:"")),h.lastIndex=g,x=h.exec(e)}return K(e,a)}}}),yn={};M(yn,{InputboxToken:()=>Sn});var Sn,wl=m({"src/multiLine/inputbox.ts"(){"use strict";jt(),er(),J(),vn(),Sn=class extends Zs{constructor(e,t,s=H.getConfig(),r=[]){const n=Symbol("InputboxToken"),i=s.excludes.includes("heading")?s:{...s,excludes:[...s.excludes,"heading"]},{length:a}=r;r.push(n),t&&(t=pt(t,i,r,e)),t&&(t=Bt(t,i,r)),r.splice(a,1),super(e,t,i,r,{})}}}}),yt={};M(yt,{NestedToken:()=>Tn});var Tn,cs=m({"src/nested.ts"(){"use strict";var e,t,s;jt(),er(),N(),Vn(),Ue(),Tn=(s=class extends I{constructor(n,i,a,l,u=[]){if(typeof i=="boolean"){const d=Symbol("NestedToken"),{length:o}=u;u.push(d),n&&(n=pt(n,l,u,i)),n&&(n=Bt(n,l,u)),u.splice(o,1)}else n&&(n=n.replace(i,(d,o,h,x,g)=>{const c=`\0${u.length+1}e`;return new Re(o,h,x,g,l,!1,u),c}));n&&(n=n.replace(/(^|\0\d+.\x7F)([^\0]+)(?=$|\0\d+.\x7F)/gu,(d,o,h)=>(new Z(h,l,u),`${o}\0${u.length}n`)));super(n,l,u);T(this,e);T(this,t);$(this,e,[...a]),$(this,t,i)}get type(){return"ext-inner"}lint(n=this.getAbsoluteIndex(),i){}},e=new WeakMap,t=new WeakMap,s)}});function ui(e,t,s,r,n){t=Q(t).trim();let i=t.replace(e==="link"?/\0\d+[tq]\x7F/gu:/\0\d+t\x7F/gu,"").trim();switch(e){case"width":return!i&&!!t||/^(?:\d+x?|\d*x\d+)(?:\s*px)?$/u.test(i);case"link":{if(i){if($n(s.protocol).test(i))return kn(s.protocol).test(i)&&t;i.startsWith("[[")&&i.endsWith("]]")&&(i=i.slice(2,-2))}else return t;const a=H.normalizeTitle(i,0,!1,s,{halfParsed:r,decode:!0,selfLink:!0});return a.valid&&a}case"lang":return(n==="svg"||n==="svgz")&&!/[^a-z\d-]/u.test(i);case"alt":case"class":case"manualthumb":return!0;case"page":return(n==="djvu"||n==="djv"||n==="pdf")&&Number(i)>0;default:return!!i&&!isNaN(i)}}var $n,kn,hi,di,Cn,_l=m({"src/imageParameter.ts"(){"use strict";var e,t,Al,n;Ct(),z(),fe(),J(),N(),$n=at(i=>new RegExp(String.raw`^(?:${i}|//|\0\d+m\x7F)`,"iu")),kn=at(i=>new RegExp(String.raw`^(?:(?:${i}|//)${lt}|\0\d+m\x7F)${ot}$`,"iu")),hi=at(i=>new RegExp(String.raw`^(\s*(?!\s))${i.replace("$1","(.*)")}${i.endsWith("$1")?`(?=$|
|
|
10
|
+
)`:""}(\s*)$`,"u")),di=new Set(["alt","link","lang","page","caption"]),Cn=(n=class extends I{constructor(a,l,u,d){var i=(...r)=>(super(...r),T(this,t),T(this,e,""),this);let o;const h=Object.entries(u.img).map(([g,c])=>[g,c,hi(g)]),x=h.find(([,g,c])=>(o=c.exec(a),o&&(o.length!==4||ui(g,o[2],u,!0,l)!==!1)));if(x&&o){o.length===3?(i(void 0,u,d),$(this,e,a)):(i(o[2],u,d,{}),$(this,e,o[1]+x[0]+o[3])),this.setAttribute("name",x[1]),x[1]==="alt"&&this.setAttribute("stage",Y-1);return}i(a,u.excludes.includes("list")?u:{...u,excludes:[...u.excludes,"list"]},d),this.setAttribute("name","caption"),this.setAttribute("stage",7)}get type(){return"image-parameter"}get link(){return this.name==="link"?ui("link",super.text(),this.getAttribute("config")):void 0}afterBuild(){var a;(a=this.parentNode)!=null&&a.is("gallery-image")&&!di.has(this.name)&&this.setAttribute("name","invalid"),super.afterBuild()}toString(a){return p(this,e)?p(this,e).replace("$1",super.toString(a)):super.toString(a)}text(){return p(this,e)?p(this,e).replace("$1",super.text()).trim():super.text().trim()}isPlain(){return this.name==="caption"||this.name==="alt"}getAttribute(a){return a==="invalid"?this.name==="invalid":a==="padding"?Math.max(0,p(this,e).indexOf("$1")):super.getAttribute(a)}lint(a=this.getAbsoluteIndex(),l){}getValue(){}print(){return p(this,e)?`<span class="wpb-image-parameter${this.name==="invalid"?" wpb-invalid":""}">${p(this,e).replace("$1",`<span class="wpb-image-caption">${qe(this.childNodes)}</span>`)}</span>`:super.print({class:"image-caption"})}},e=new WeakMap,t=new WeakSet,Al=function(){},n)}}),pi,tr,In=m({"src/link/file.ts"(){"use strict";Lt(),_l(),pi=e=>{if(e===void 0)return[];const t=/-\{|\}-|\|/gu,s=[];let r=t.exec(e),n=0,i=0;for(;r;){const{0:a,index:l}=r;a!=="|"?n+=a==="-{"?1:-1:n===0&&(s.push(e.slice(i,l)),{lastIndex:i}=t),r=t.exec(e)}return s.push(e.slice(i)),s},tr=class extends ce{get type(){return"file"}get extension(){}constructor(e,t,s,r=[],n="|"){super(e,void 0,s,r,n);const{extension:i}=this.getTitle(!0,!0);this.safeAppend(pi(t).map(a=>new Cn(a,i,s,r)))}lint(e=this.getAbsoluteIndex(),t){}getAllArgs(){}getArgs(e){}getArg(e){}getValue(e){}json(e,t=this.getAbsoluteIndex()){}}}}),ci,gs,gi,Ee,Fn=m({"src/link/galleryImage.ts"(){"use strict";var e,Nn,s;fe(),be(),N(),In(),ci=[oe("")],Ee=(s=class extends(gi=tr){constructor(n,i,a,l,u=[]){let d;if(a!==void 0){const{length:o}=u;d=new I(a,l,u);for(let h=0;h<Y-1;h++)d.parseOnce();u.splice(o,1)}super(i,d==null?void 0:d.toString(),l,u);T(this,e);ae(this,"privateType","imagemap-image");this.setAttribute("bracket",!1),this.privateType=`${n}-image`,this.seal("privateType",!0)}get type(){return this.privateType}getTitle(n){const i=this.type==="imagemap-image";return this.normalizeTitle(this.firstChild.toString(),i?0:6,{halfParsed:!0,temporary:n,decode:!i})}lint(n=this.getAbsoluteIndex(),i){}getAttribute(n){return n==="invalid"?O(this,e,Nn).call(this):super.getAttribute(n)}},e=new WeakSet,Nn=function(){const{ns:n}=this.getAttribute("title");return n!==6},s),gs=W(gi),Ee=j(gs,0,"GalleryImageToken",ci,Ee),B(gs,1,Ee)}}),$t,Ln=m({"src/nowiki/commentLine.ts"(){"use strict";Ue(),$t=class extends Z{}}}),En={};M(En,{GalleryToken:()=>Pn});var Pn,yl=m({"src/multiLine/gallery.ts"(){"use strict";var e,On,Sl,r;Ys(),Fn(),Ln(),Pn=(r=class extends Rt{constructor(i,a,l=[]){var u;super(void 0,a,l,{});T(this,e);for(const d of(u=i==null?void 0:i.split(`
|
|
11
|
+
`))!=null?u:[]){const o=/^([^|]+)(?:\|(.*))?/u.exec(d);if(!o){super.insertAt(d.trim()?new $t(d,a,l):d);continue}const[,h,x]=o;O(this,e,On).call(this,h)?super.insertAt(new Ee("gallery",h,x,a,l)):super.insertAt(new $t(d,a,l))}}get widths(){}get heights(){}lint(i=this.getAbsoluteIndex(),a){}json(i,a=this.getAbsoluteIndex()){}},e=new WeakSet,On=function(i){return this.normalizeTitle(i,6,{halfParsed:!0,temporary:!0,decode:!0}).valid},Sl=function(i){},r)}}),sr,Rn=m({"src/link/index.ts"(){"use strict";Lt(),sr=class extends ce{get type(){return"link"}get innerText(){}lint(e=this.getAbsoluteIndex(),t){}}}}),xi,fi,ht,rr=m({"src/magicLink.ts"(){"use strict";var e,t,Bn,r;z(),J(),N(),xi=String.raw`(?:[${Ae}\t]| |�*160;|&#[xX]0*[aA]0;)`,fi=new RegExp(`${xi}+`,"gu"),ht=(r=class extends I{constructor(i,a="free-ext-link",l=H.getConfig(),u){super(i,l,u,{});T(this,t);T(this,e);$(this,e,a)}get type(){return p(this,e)}get innerText(){const i=new Map([["!","|"],["=","="]]);let a=ye(this.childNodes.map(l=>{const{type:u}=l,d=String(l.name);return u==="magic-word"&&i.has(d)?i.get(d):l}));return this.type==="magic-link"&&(a=a.replace(fi," ")),a}get link(){const{innerText:i}=this;return this.type==="magic-link"?i.startsWith("ISBN")?`ISBN ${i.slice(5).replace(/[- ]/gu,"").replace(/x$/u,"X")}`:i:Qi(i).replace(/\n/gu,"%0A")}lint(i=this.getAbsoluteIndex(),a){}getUrl(i){this.lspError("MagicLinkToken.getUrl")}getAttribute(i){return i==="invalid"?O(this,t,Bn).call(this):super.getAttribute(i)}},e=new WeakMap,t=new WeakSet,Bn=function(){if(this.type==="magic-link"){const{link:i}=this;if(i.startsWith("ISBN")){const a=[...i.slice(5)].map(l=>l==="X"?10:Number(l));return a.length===10?a.reduce((l,u,d)=>l+u*(10-d),0)%11!==0:a.length===13&&(a[12]===10||a.reduce((l,u,d)=>l+u*(d%2?3:1),0)%10!==0)}}return!1},r)}}),mi,xs,vi,Pe,jn=m({"src/extLink.ts"(){"use strict";var e,t;fe(),be(),N(),rr(),mi=[oe("[")],Pe=(t=class extends(vi=I){constructor(r,n="",i="",a,l=[]){super(void 0,a,l,{});T(this,e);const u=r&&/^\0\d+f\x7F$/u.test(r)?l[Number(r.slice(1,-2))]:new ht(r,"ext-link-url",a,l);if(this.insertAt(u),$(this,e,n),i){const d=new I(i,a,l,{});d.type="ext-link-text",d.setAttribute("stage",Y-1),this.insertAt(d)}}get type(){return"ext-link"}toString(r){return this.length===1?`[${super.toString(r)}${p(this,e)}]`:`[${super.toString(r,p(this,e))}]`}text(){return`[${super.text(" ")}]`}getGaps(){return p(this,e).length}lint(r=this.getAbsoluteIndex(),n){}print(){return super.print(this.length===1?{pre:"[",post:`${p(this,e)}]`}:{pre:"[",sep:p(this,e),post:"]"})}},e=new WeakMap,t),xs=W(vi),Pe=j(xs,0,"ExtLinkToken",mi,Pe),B(xs,1,Pe)}}),Ms,Tl=m({"src/imagemapLink.ts"(){"use strict";N(),Ue(),Rn(),jn(),Ms=class extends I{get type(){return"imagemap-link"}constructor(e,t,s,r,n=[]){super(void 0,r,n),this.append(e,t.length===2?new sr(...t,r,n):new Pe(...t,r,n),new Z(s,r,n))}}}}),qn={};M(qn,{ImagemapToken:()=>Wn});var Wn,$l=m({"src/multiLine/imagemap.ts"(){"use strict";Ce(),J(),Ys(),Ln(),Fn(),Tl(),Wn=class extends Rt{get image(){return this.childNodes.find(ur("imagemap-image"))}constructor(e,t=H.getConfig(),s=[]){if(super(void 0,t,s,{}),!e)return;const r=e.split(`
|
|
12
|
+
`),n=new Set(t.protocol.split("|"));let i=!0,a=!1;for(const l of r){const u=l.trim();if(!(a||!u||u.startsWith("#"))){if(i){const d=l.indexOf("|"),o=d===-1?l:l.slice(0,d),{valid:h,ns:x}=this.normalizeTitle(o,0,{halfParsed:!0,temporary:!0});if(h&&x===6){const g=new Ee("imagemap",o,d===-1?void 0:l.slice(d+1),t,s);super.insertAt(g),i=!1;continue}else a=!0}else if(l.trim().split(/[\t ]/u,1)[0]==="desc"){super.insertAt(l);continue}else if(l.includes("[")){const d=l.indexOf("["),o=l.slice(d),h=/^\[\[([^|]+)(?:\|([^\]]*))?\]\][\w\s]*$/u.exec(o);if(h){if(this.normalizeTitle(h[1],0,{halfParsed:!0,temporary:!0,selfLink:!0}).valid){super.insertAt(new Ms(l.slice(0,d),h.slice(1),o.slice(o.indexOf("]]")+2),t,s));continue}}else if(o.startsWith("[//")||n.has(o.slice(1,o.indexOf(":")+1))||n.has(o.slice(1,o.indexOf("//")+2))){const x=/^\[([^\]\s]+)(?:(\s+(?!\s))([^\]]*))?\][\w\s]*$/u.exec(o);if(x){super.insertAt(new Ms(l.slice(0,d),x.slice(1),o.slice(o.indexOf("]")+1),t,s));continue}}}}super.insertAt(new $t(l,t,s))}}lint(e=this.getAbsoluteIndex(),t){}getAttribute(e){return e==="invalid"?!this.image:super.getAttribute(e)}}}}),bi,fs,wi,Oe,Mn=m({"src/nowiki/comment.ts"(){"use strict";Se(),be(),ke(),bi=[me(!1),oe("<!--")],Oe=class extends(wi=re){constructor(t,s,r,n){super(t,r,n);ae(this,"closed");this.closed=s}get type(){return"comment"}lint(t=this.getAbsoluteIndex()){}toString(t){return t?"":`<!--${this.innerText}${this.closed?"-->":""}`}print(){return super.print({pre:"<!--",post:this.closed?"-->":""})}},fs=W(wi),Oe=j(fs,0,"CommentToken",bi,Oe),B(fs,1,Oe)}}),Un={};M(Un,{CommentedToken:()=>zn});var zn,kl=m({"src/commented.ts"(){"use strict";N(),Mn(),zn=class extends I{get type(){return"ext-inner"}constructor(e,t,s=[]){if(super(void 0,t,s,{AstText:":",CommentToken:":"}),e){let r=e.indexOf("<!--"),n=r!==-1&&e.indexOf("-->",r+4),i=0;for(;n!==!1&&n!==-1;)r>i&&this.insertAt(e.slice(i,r)),this.insertAt(new Oe(e.slice(r+4,n),!0,t,s)),i=n+3,r=e.indexOf("<!--",i),n=r!==-1&&e.indexOf("-->",r+4);i<e.length&&this.insertAt(e.slice(i))}}lint(e=this.getAbsoluteIndex()){}}}}),Hn={};M(Hn,{NowikiToken:()=>Dn});var _i,Dn,Cl=m({"src/nowiki/index.ts"(){"use strict";var e,Gn,s;ke(),_i=new Set(["languages","section","templatestyles"]),Dn=(s=class extends re{constructor(){super(...arguments);T(this,e)}get type(){return"ext-inner"}lint(n=this.getAbsoluteIndex()){}getAttribute(n){return n==="invalid"?O(this,e,Gn).call(this):super.getAttribute(n)}},e=new WeakSet,Gn=function(){const{name:n,firstChild:{data:i}}=this;return _i.has(n)&&!!i},s)}}),Ai,ms,yi,Re,Vn=m({"src/tagPair/ext.ts"(){"use strict";J(),Js(),N(),Qs(),Ks(),Ai=[Pt()],Re=class extends(yi=_e){get type(){return"ext"}constructor(e,t,s,r,n=H.getConfig(),i=!1,a=[]){const l=e.toLowerCase(),u=new Ot(!t||/^\s/u.test(t)?t:` ${t}`,"ext-attrs",l,n,a),d={...n,ext:n.ext.filter(h=>h!==l),excludes:[...n.excludes],inExt:!0};let o;switch(l){case"tab":d.ext=d.ext.filter(h=>h!=="tabs");case"indicator":case"poem":case"ref":case"option":case"combooption":case"tabs":case"poll":case"seo":case"langconvert":case"phonos":l==="poem"&&d.excludes.push("heading"),o=new I(s,d,a);break;case"pre":{const{PreToken:h}=(cl(),R(gn));o=new h(s,d,a);break}case"dynamicpagelist":{const{ParamTagToken:h}=(vn(),R(mn));o=new h(i,s,d,a);break}case"inputbox":{const{InputboxToken:h}=(wl(),R(yn));o=new h(i,s,d,a);break}case"references":{const{NestedToken:h}=(cs(),R(yt));d.excludes.push("heading"),o=new h(s,i,["ref"],d,a);break}case"choose":{const{NestedToken:h}=(cs(),R(yt));o=new h(s,/<(option|choicetemplate)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(\1)>)/gu,["option","choicetemplate"],d,a);break}case"combobox":{const{NestedToken:h}=(cs(),R(yt));o=new h(s,/<(combooption)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(combooption\s*)>)/giu,["combooption"],d,a);break}case"gallery":{const{GalleryToken:h}=(yl(),R(En));o=new h(s,d,a);break}case"imagemap":{const{ImagemapToken:h}=($l(),R(qn));o=new h(s,d,a);break}case"hiero":{const{CommentedToken:h}=(kl(),R(Un));o=new h(s,d,a);break}default:{const{NowikiToken:h}=(Cl(),R(Hn));o=new h(s,d,a)}}o.setAttribute("name",l),o.type==="plain"&&(o.type="ext-inner"),super(e,u,o,r,n,a),this.seal("closed",!0)}lint(e=this.getAbsoluteIndex(),t){}},ms=W(yi),Re=j(ms,0,"ExtToken",Ai,Re),B(ms,1,Re)}}),Qn={};M(Qn,{parseCommentAndExt:()=>pt});var vs,Si,mt,Ti,bs,pt,jt=m({"parser/commentAndExt.ts"(){"use strict";Ct(),z(),ll(),Ue(),ul(),hl(),Vn(),Mn(),vs="<onlyinclude>",Si="</onlyinclude>",{length:mt}=vs,Ti=[!1,!0].map(e=>{const t=e?"includeonly":"(?:no|only)include",s=e?"noinclude":"includeonly";return Xi(r=>new RegExp(String.raw`<!--[\s\S]*?(?:-->|$)|<${t}(?:\s[^>]*)?/?>|</${t}\s*>|<(${r.join("|")})(\s[^>]*?)?(?:/>|>([\s\S]*?)</(${"\\1"}\s*)>)|<(${s})(\s[^>]*?)?(?:/>|>([\s\S]*?)(?:</(${s}\s*)>|$))`,"giu"))}),bs=e=>{const t=e.indexOf(vs);return{i:t,j:e.indexOf(Si,t+mt)}},pt=(e,t,s,r)=>{if(r){let{i:l,j:u}=bs(e);if(l!==-1&&u!==-1){let d="";const o=h=>{new Z(h,t,s),d+=`\0${s.length-1}n`};for(;l!==-1&&u!==-1;){const h=`\0${s.length}e`;new Ye(e.slice(l+mt,u),t,s),l>0&&o(e.slice(0,l)),d+=h,e=e.slice(u+mt+1),{i:l,j:u}=bs(e)}return e&&o(e),d}}const{ext:n}=t,i=n.filter(l=>l!=="translate"&&l!=="tvar"),a={...t,ext:i};if(n.includes("translate")){const l=[];e=e.replace(/<nowiki>[\s\S]*?<\/nowiki>/giu,u=>(l.push(u),`\0${l.length-1}`)).replace(/<translate( nowrap)?>([\s\S]+?)?<\/translate>/gu,(u,d,o)=>{const h=s.length;return new ln(d,o&&K(o,l),a,s),`\0${h}g`}),e=K(e,l)}return e.replace(Ti[r?1:0](i),(l,u,d,o,h,x,g,c,v)=>{const w=s.length;let C="n";if(u)C="e",new Re(u,d,o,h,a,x,s);else if(l.startsWith("<!--")){C="c";const A=l.endsWith("-->");new Oe(K(l,s,1).slice(4,A?-3:void 0),A,t,s)}else x?new Ze(x,g&&K(g,s,1),c&&K(c,s,1),v,t,s):new Z(l,t,s,!0);return`\0${w}${C}`})}}}),$i,ws,ki,st,Il=m({"src/tag/html.ts"(){"use strict";var e,t;Js(),an(),$i=[Pt()],st=(t=class extends(ki=Xs){constructor(r,n,i,a,l,u){super(r,n,i,l,u);T(this,e);this.setAttribute("name",r.toLowerCase()),$(this,e,a)}get type(){return"html"}get selfClosing(){return p(this,e)}text(){const{closing:r,selfClosing:n,name:i}=this,{html:[,,a]}=this.getAttribute("config");return a.includes(i)?r&&i!=="br"?"":super.text("/"):super.text(n&&!r?"/":"")}lint(r=this.getAbsoluteIndex(),n){}getAttribute(r){return r==="invalid"?this.inTableAttrs()===2:super.getAttribute(r)}json(r,n=this.getAbsoluteIndex()){}},e=new WeakMap,t),ws=W(ki),st=j(ws,0,"HtmlToken",$i,st),B(ws,1,st)}}),Xn={};M(Xn,{parseHtml:()=>Jn});var Ci,Jn,Fl=m({"parser/html.ts"(){"use strict";Ks(),Il(),Ci=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,Jn=(e,t,s)=>{var a;const{html:r}=t;(a=t.htmlElements)!=null||(t.htmlElements=new Set([...r[0],...r[1],...r[2]]));const n=e.split("<");let i=n.shift();for(const l of n){const u=Ci.exec(l),d=u==null?void 0:u[2],o=d==null?void 0:d.toLowerCase();if(!u||!t.htmlElements.has(o)){i+=`<${l}`;continue}const[,h,,x="",g,c]=u,{length:v}=s,w=new Ot(x,"html-attrs",o,t,s),C=w.hasAttr("itemprop");if(o==="meta"&&!(C&&w.hasAttr("content"))||o==="link"&&!(C&&w.hasAttr("href"))){i+=`<${l}`,s.length=v;continue}i+=`\0${s.length}x${c}`,new st(d,w,h==="/",g==="/>",t,s)}return i}}}),Ii,_s,Fi,Be,Kn=m({"src/table/base.ts"(){"use strict";Js(),N(),Te(),Ks(),Ii=[Pt(1)],Be=class extends(Fi=I){constructor(e,t,s,r,n,i=[],a){super(void 0,n,i,a),this.append(new ve(t,"table-syntax",n,i),new Ot(r,"table-attrs",s,n,i))}escape(){}},_s=W(Fi),Be=j(_s,0,"TableBaseToken",Ii,Be),B(_s,1,Be)}}),Ni,As,se,vt,Ve,Qe,Us,Nl=m({"src/table/td.ts"(){"use strict";Vs(),N(),Kn(),Us=class extends(As=Be,Ni=[Nt(!1)],As){constructor(e,t,s,r=[]){var l;let n=/\||\0\d+!\x7F/u.exec(t!=null?t:""),i=n?t.slice(0,n.index):"";/\[\[|-\{/u.test(i)&&(n=null,i=""),super(/^(?:\n[^\S\n]*(?:[|!]|\|\+|\{\{\s*!\s*\}\}\+?)|(?:\||\{\{\s*!\s*\}\}){2}|!!|\{\{\s*!!\s*\}\})$/u,e,"td",i,s,r),B(vt,5,this),pe(this,Ve),pe(this,se,""),n&&([Ka(this,se)._]=n);const a=new I(t==null?void 0:t.slice(((l=n==null?void 0:n.index)!=null?l:NaN)+G(this,se).length),s,r);a.type="td-inner",a.setAttribute("stage",4),this.insertAt(a)}get type(){return"td"}get rowspan(){}get colspan(){}get subtype(){return Es(this,Ve,Qe).call(this).subtype}afterBuild(){G(this,se).includes("\0")&&ie(this,se,this.buildFromStr(G(this,se),0)),super.afterBuild()}toString(e){const{childNodes:[t,s,r]}=this;return t.toString(e)+s.toString(e)+G(this,se)+r.toString(e)}text(){const{childNodes:[e,t,s]}=this;return e.text()+t.text()+G(this,se)+s.text()}getGaps(e){return e===1?G(this,se).length:0}lint(e=this.getAbsoluteIndex(),t){}isIndependent(){return this.firstChild.text().startsWith(`
|
|
13
|
+
`)}getAttr(e){}escape(){}print(){const{childNodes:[e,t,s]}=this;return`<span class="wpb-td">${e.print()}${t.print()}${G(this,se)}${s.print()}</span>`}json(e,t=this.getAbsoluteIndex()){}},vt=W(As),se=new WeakMap,Ve=new WeakSet,Qe=function(){var e;const t=this.firstChild.text(),s=t.slice(-1);let r="td";if(s==="!"?r="th":s==="+"&&(r="caption"),this.isIndependent())return{subtype:r};const{previousSibling:n}=this;return{...Es(e=n,Ve,Qe).call(e)}},Qe=j(vt,17,"#getSyntax",Ni,Ve,Qe),Ds(vt,Us)}}),ir,Yn=m({"src/table/trBase.ts"(){"use strict";Kn(),ir=class extends Be{lint(e=this.getAbsoluteIndex(),t){}getRowCount(){}}}}),Li,ys,bt,St,Ll=m({"src/table/index.ts"(){"use strict";Ce(),Vs(),Yn(),Te(),St=class extends(ys=ir,Li=[Nt(!1)],ys){constructor(e,t,s,r){super(/^(?:\{\||\{\{\{\s*!\s*\}\}|\{\{\s*\(!\s*\}\})$/u,e,"table",t,s,r,{}),B(bt,5,this)}get type(){return"table"}get closed(){}lint(e=this.getAbsoluteIndex(),t){}close(e=`
|
|
14
|
+
|}`,t){const s=this.getAttribute("config"),r=this.getAttribute("accum");xe.run(()=>{const n=new ve(t?e:void 0,"table-syntax",s,r);super.insertAt(n)})}getLayout(e){}getAllRows(){}getNthRow(e,t,s){}json(e,t=this.getAbsoluteIndex()){}},bt=W(ys),j(bt,1,"getLayout",Li,St),Ds(bt,St)}}),Zn,El=m({"src/table/tr.ts"(){"use strict";Yn(),Zn=class extends ir{get type(){return"tr"}constructor(e,t,s,r){super(/^\n[^\S\n]*(?:\|-+|\{\{\s*!\s*\}\}-+|\{\{\s*!-\s*\}\}-*)$/u,e,"tr",t,s,r)}}}}),nr,ea=m({"src/nowiki/listBase.ts"(){"use strict";ke(),nr=class extends re{get indent(){}json(e,t=this.getAbsoluteIndex()){}}}}),ar,ta=m({"src/nowiki/dd.ts"(){"use strict";ea(),ar=class extends nr{get type(){return"dd"}}}}),sa={};M(sa,{parseTable:()=>ra});var Ei,Ss,ra,Pl=m({"parser/table.ts"(){"use strict";N(),Ll(),El(),Nl(),ta(),Ei=e=>e.lastChild.constructor!==I,Ss=(e,t)=>e.is("td")?t.pop():e,ra=({firstChild:{data:e},type:t,name:s},r,n)=>{const i=[],a=e.split(`
|
|
15
|
+
`);let l=t==="root"||t==="parameter-value"||t==="ext-inner"&&s==="poem"?"":`
|
|
16
|
+
${a.shift()}`,u;const d=(o,h)=>{if(!h){l+=o;return}const{lastChild:x}=h;if(Ei(h)){const g=new I(o,r,n);g.type="table-inter",g.setAttribute("stage",3),h.insertAt(g)}else x.setText(x.toString()+o)};for(const o of a){u=i.pop();const[h]=/^(?:\s|\0\d+[cno]\x7F)*/u.exec(o),x=o.slice(h.length),g=/^(:*)((?:\s|\0\d+[cn]\x7F)*)(\{\||\{(?:\0\d+[cn]\x7F)*\0\d+!\x7F|\0\d+\{\x7F)(.*)$/u.exec(x);if(g){for(;u&&!u.is("td");)u=i.pop();const[,k,b,F,P]=g;k&&new ar(k,r,n),d(`
|
|
17
|
+
${h}${k&&`\0${n.length-1}d`}${b}\0${n.length}b`,u),i.push(...u?[u]:[],new St(F,P,r,n));continue}else if(!u){l+=`
|
|
18
|
+
${o}`;continue}const c=/^(?:(\|\}|\0\d+!\x7F\}|\0\d+\}\x7F)|(\|-+|\0\d+!\x7F-+|\0\d+-\x7F-*)(?!-)|(!|(?:\||\0\d+!\x7F)\+?))(.*)$/u.exec(x);if(!c){d(`
|
|
19
|
+
${o}`,u),i.push(u);continue}const[,v,w,C,A]=c;if(v){for(;!u.is("table");)u=i.pop();u.close(`
|
|
20
|
+
${h}${v}`,!0),d(A,i[i.length-1])}else if(w){u=Ss(u,i),u.is("tr")&&(u=i.pop());const k=new Zn(`
|
|
21
|
+
${h}${w}`,A,r,n);i.push(u,k),u.insertAt(k)}else{u=Ss(u,i);const k=C==="!"?/!!|(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu:/(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu;let b=k.exec(A),F=0,P=`
|
|
22
|
+
${h}${C}`;const f=_=>{const y=new Us(P,A.slice(F,b==null?void 0:b.index),r,n);return _.insertAt(y),y};for(;b;)f(u),{lastIndex:F}=k,[P]=b,b=k.exec(A);i.push(u,f(u))}}return l.slice(1)}}}),ia,Ol=m({"src/nowiki/hr.ts"(){"use strict";ke(),ia=class extends re{get type(){return"hr"}}}}),Pi,Ts,Oi,rt,Rl=m({"src/nowiki/doubleUnderscore.ts"(){"use strict";Se(),be(),ke(),Pi=[me(),oe("__")],rt=class extends(Oi=re){get type(){return"double-underscore"}constructor(e,t,s,r){var l,u;super(e,s,r);const n=e.toLowerCase(),{doubleUnderscore:[,,i,a]}=s;this.setAttribute("name",(u=t?(l=a==null?void 0:a[e])==null?void 0:l.toLowerCase():i==null?void 0:i[n])!=null?u:n)}toString(){return`__${this.innerText}__`}print(){return super.print({pre:"__",post:"__"})}},Ts=W(Oi),rt=j(Ts,0,"DoubleUnderscoreToken",Pi,rt),B(Ts,1,rt)}}),na={};M(na,{parseHrAndDoubleUnderscore:()=>aa});var aa,Bl=m({"parser/hrAndDoubleUnderscore.ts"(){"use strict";Ol(),Rl(),bn(),aa=({firstChild:{data:e},type:t,name:s},r,n)=>{var u,d,o;const{doubleUnderscore:[i,a,l]}=r;return(u=r.insensitiveDoubleUnderscore)!=null||(r.insensitiveDoubleUnderscore=new Set(i)),(d=r.sensitiveDoubleUnderscore)!=null||(r.sensitiveDoubleUnderscore=new Set(a)),(o=r.regexHrAndDoubleUnderscore)!=null||(r.regexHrAndDoubleUnderscore=new RegExp(`__(${[...i,...a].join("|")})__`,"giu")),t!=="root"&&(t!=="ext-inner"||s!=="poem")&&(e=`\0${e}`),e=e.replace(/^((?:\0\d+[cno]\x7F)*)(-{4,})/gmu,(h,x,g)=>(new ia(g,r,n),`${x}\0${n.length-1}r`)).replace(r.regexHrAndDoubleUnderscore,(h,x)=>{var w;const g=r.sensitiveDoubleUnderscore.has(x),c=x.toLowerCase(),v=r.insensitiveDoubleUnderscore.has(c);return g||v?(new rt(x,g,r,n),`\0${n.length-1}${v&&((w=l==null?void 0:l[c])!=null?w:c)==="toc"?"u":"n"}`):h}),r.excludes.includes("heading")||(e=e.replace(/^((?:\0\d+[cn]\x7F)*)(={1,6})(.+)\2((?:\s|\0\d+[cn]\x7F)*)$/gmu,(h,x,g,c,v)=>{const w=`${x}\0${n.length}h`;return new Ne(g.length,[c,v],r,n),w})),t==="root"||t==="ext-inner"&&s==="poem"?e:e.slice(1)}}}),la,jl=m({"src/nowiki/quote.ts"(){"use strict";var e,t;ke(),la=(t=class extends re{constructor(r,n,i,a){super(r,i,a);T(this,e);$(this,e,n)}get type(){return"quote"}get bold(){return this.innerText.length!==2}get italic(){return this.innerText.length!==3}get closing(){}text(){const{parentNode:r,innerText:n}=this;return r!=null&&r.is("image-parameter")&&r.name!=="caption"?"":n}lint(r=this.getAbsoluteIndex()){}json(r,n=this.getAbsoluteIndex()){}},e=new WeakMap,t)}}),oa={};M(oa,{parseQuotes:()=>lr});var lr,ua=m({"parser/quotes.ts"(){"use strict";jl(),lr=(e,t,s,r)=>{var g;const n=e.split(/('{2,})/u),{length:i}=n;if(i===1)return e;let a=0,l=0,u,d,o;for(let c=1;c<i;c+=2){const v=n[c].length;switch(v){case 2:l++;break;case 4:n[c-1]+="'",n[c]="'''";case 3:if(a++,u!==void 0)break;n[c-1].endsWith(" ")?d===void 0&&o===void 0&&(o=c):n[c-1].slice(-2,-1)===" "?u=c:d!=null||(d=c);break;default:n[c-1]+="'".repeat(v-5),n[c]="'''''",l++,a++}}if(l%2===1&&a%2===1){const c=(g=u!=null?u:d)!=null?g:o;c!==void 0&&(n[c]="''",n[c-1]+="'")}let h=!0,x=!0;for(let c=1;c<i;c+=2){const v=n[c].length,w=v!==2,C=v!==3;w&&(h=!h),C&&(x=!x),new la(n[c],{bold:w&&h,italic:C&&x},t,s),n[c]=`\0${s.length-1}q`}return n.join("")}}}),ha={};M(ha,{parseExternalLinks:()=>or});var or,da=m({"parser/externalLinks.ts"(){"use strict";z(),jn(),rr(),or=(e,t,s,r)=>{var n;return(n=t.regexExternalLinks)!=null||(t.regexExternalLinks=new RegExp(String.raw`\[((?:\0\d+[cn]\x7F)*(?:\0\d+f\x7F|(?:(?:${t.protocol}|//)${lt}|\0\d+m\x7F)${ot}(?=[[\]<>"\t${Ae}]|\0\d)))([${Ae}]*(?![${Ae}]))([^\]\x01-\x08\x0A-\x1F\uFFFD]*)\]`,"giu")),e.replace(t.regexExternalLinks,(i,a,l,u)=>{const{length:d}=s,o=/&[lg]t;/u.exec(a);return o&&(l="",u=a.slice(o.index)+l+u,a=a.slice(0,o.index)),r?(new ht(a,"ext-link-url",t,s),`[\0${d}f${l}${u}]`):(new Pe(a,l,u,t,s),`\0${d}w`)})}}}),pa,ql=m({"src/link/category.ts"(){"use strict";Lt(),pa=class extends ce{get type(){return"category"}get sortkey(){}json(e,t=this.getAbsoluteIndex()){}}}}),ca={};M(ca,{parseLinks:()=>zs});var Ri,zs,Wl=m({"parser/links.ts"(){"use strict";z(),J(),ua(),da(),Rn(),In(),ql(),Ri=/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(\||\0\d+!\x7F)([\s\S]*)$/u,zs=(e,t,s,r)=>{var l;(l=t.regexLinks)!=null||(t.regexLinks=new RegExp(String.raw`^\s*(?:${t.protocol}|//)`,"iu"));const n=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,i=e.split("[[");let a=i.shift();for(let u=0;u<i.length;u++){let d=!1,o,h,x,g;const c=i[u],v=n.exec(c);if(v)[,o,h,x,g]=v,g.startsWith("]")&&(x!=null&&x.includes("["))&&(x+="]",g=g.slice(1));else{const F=Ri.exec(c);F&&(d=!0,[,o,h,x]=F)}if(o===void 0||t.regexLinks.test(o)||/\0\d+[exhbru]\x7F/u.test(o)){a+=`[[${c}`;continue}let w=Q(o).trim();const C=w.startsWith(":");if(C&&d){a+=`[[${c}`;continue}else!w&&x&&!x.includes(`
|
|
23
|
+
`)&&(w=Q(x).trim());const{ns:A,valid:k}=H.normalizeTitle(w,0,!1,t,{halfParsed:!0,temporary:!0,decode:!0,selfLink:!0});if(k){if(d){if(A!==6){a+=`[[${c}`;continue}let F=!1;for(u++;u<i.length;u++){const P=i[u],f=P.split("]]");if(f.length>2){F=!0,x+=`[[${f[0]}]]${f[1]}`,g=f.slice(2).join("]]");break}else if(f.length===2)x+=`[[${f[0]}]]${f[1]}`;else{x+=`[[${P}`;break}}if(x=zs(x,t,s,r),!F){a+=`[[${o}${h}${x}`;continue}}}else{a+=`[[${c}`;continue}x&&(x=lr(x,t,s,r));let b=sr;C||(A===6?(x&&(x=or(x,t,s,!0)),b=tr):A===14&&(b=pa)),x===void 0&&h&&(x=""),a+=`\0${s.length}l${g}`,new b(o,x,t,s,h)}return a}}}),ga={};M(ga,{parseMagicLinks:()=>xa});var $s,ks,Cs,Is,xa,Ml=m({"parser/magicLinks.ts"(){"use strict";z(),rr(),$s=String.raw`[${Ae}\t]| |�*160;|�*a0;`,ks=`(?:${$s})+`,Cs=`(?:${$s}|-)`,Is=String.raw`(?:RFC|PMID)${ks}\d+\b|ISBN${ks}(?:97[89]${Cs}?)?(?:\d${Cs}?){9}[\dx]\b`,xa=(e,t,s)=>{if(!t.regexMagicLinks)try{t.regexMagicLinks=new RegExp(String.raw`(^|[^\p{L}\p{N}_])(?:(?:${t.protocol})(${lt}${ot})|${Is})`,"giu")}catch{t.regexMagicLinks=new RegExp(String.raw`(^|\W)(?:(?:${t.protocol})(${lt}${ot})|${Is})`,"giu")}return e.replace(t.regexMagicLinks,(r,n,i)=>{let a=n?r.slice(n.length):r;if(i){let l="";const u=/&(?:lt|gt|nbsp|#x0*(?:3[ce]|a0)|#0*(?:6[02]|160));/iu.exec(a);u&&(l=a.slice(u.index),a=a.slice(0,u.index));const d=a.includes("(")?/[^,;\\.:!?][,;\\.:!?]+$/u:/[^,;\\.:!?)][,;\\.:!?)]+$/u,o=d.exec(a);if(o){let h=1;o[0][1]===";"&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(a.slice(0,o.index))&&(h=2),l=a.slice(o.index+h)+l,a=a.slice(0,o.index+h)}return l.length>=i.length?r:(new ht(a,void 0,t,s),`${n}\0${s.length-1}w${l}`)}else if(!/^(?:RFC|PMID|ISBN)/u.test(a))return r;return new ht(a,"magic-link",t,s),`${n}\0${s.length-1}i`})}}}),fa,Ul=m({"util/html.ts"(){"use strict";fa=(e,t)=>e.startsWith(t)?t.length:[...t].findIndex((s,r)=>s!==e[r])}}),ma,zl=m({"src/nowiki/list.ts"(){"use strict";ea(),ma=class extends nr{get type(){return"list"}}}}),va={};M(va,{parseList:()=>ba});var ba,Hl=m({"parser/list.ts"(){"use strict";Ul(),zl(),ta(),ba=(e,t,s,r)=>{const n=/^((?:\0\d+[cno]\x7F)*)([;:*#]+)(\s*)/u.exec(e);if(!n)return t.lastPrefix="",e;const[i,a,l,u]=n,d=l.replace(/;/gu,":"),o=fa(d,t.lastPrefix),h=((o>1?l.slice(o-1):l)+u).split(/(?=;)/u),x=h[0].startsWith(";");let g=h.length-(x?0:1);if(o>1){const S=l.slice(0,o-1);if(x){const q=S.split(/(?=;)/u);h.unshift(...q),g+=S.includes(";")?q.length:0}else h[0]=S+h[0]}t.lastPrefix=d;let c=a+h.map((S,q)=>`\0${r.length+q}d`).join("")+e.slice(i.length);for(const S of h)new ma(S,s,r);if(!g)return c;const{html:[v,,w]}=s,C=/:+|-\{|\0\d+[xq]\x7F/gu;let A=C,k=A.exec(c),b=0,F=!1,P=!1,f=0;const _=(S,q)=>(new ar(S,s,r),`${c.slice(0,q)}\0${r.length-1}d${c.slice(q+S.length)}`),y=S=>{S?b&&b--:b++};for(;k&&g;){const{0:S,index:q}=k;if(S==="-{"){if(!f){const{lastIndex:E}=A;A=/-\{|\}-/gu,A.lastIndex=E}f++}else if(S==="}-"){if(f--,!f){const{lastIndex:E}=A;A=C,A.lastIndex=E}}else if(S.endsWith("x")){const{name:E,closing:L,selfClosing:U}=r[Number(S.slice(1,-2))];(v.includes(E)||!U&&!w.includes(E))&&y(L)}else if(S.endsWith("q")){const{bold:E,italic:L}=r[Number(S.slice(1,-2))];E&&(y(F),F=!F),L&&(y(P),P=!P)}else if(b===0){if(S.length>=g)return _(S.slice(0,g),q);g-=S.length,A.lastIndex=q+4+String(r.length).length,c=_(S,q)}k=A.exec(c)}return c}}}),Bi,ji,Fs,qi,it,Dl=m({"src/converterFlags.ts"(){"use strict";var e,t;Et(),N(),$e(),Bi=new Set(["A","T","R","D","-","H","N"]),ji=[dt()],it=(t=class extends(qi=I){constructor(r,n,i=[]){super(void 0,n,i,{});T(this,e);this.safeAppend(r.map(a=>new V(a,"converter-flag",n,i)))}get type(){return"converter-flags"}afterBuild(){$(this,e,this.childNodes.map(r=>r.text().trim())),super.afterBuild()}toString(r){return super.toString(r,";")}text(){return super.text(";")}getUnknownFlags(){return new Set(p(this,e).filter(r=>/\{{3}[^{}]+\}{3}/u.test(r)))}getVariantFlags(){const r=new Set(this.getAttribute("config").variants);return new Set(p(this,e).filter(n=>r.has(n)))}isInvalidFlag(r,n,i,a){return typeof r=="object"&&(r=r.text().trim(),n=this.getVariantFlags(),i=this.getUnknownFlags(),a=new Set(p(this,e).filter(l=>Bi.has(l)))),!!r&&!n.has(r)&&!i.has(r)&&(n.size>0||!a.has(r))}lint(r=this.getAbsoluteIndex(),n){}print(){return super.print({sep:";"})}},e=new WeakMap,t),Fs=W(qi),it=j(Fs,0,"ConverterFlagsToken",ji,it),B(Fs,1,it)}}),Tt,Gl=m({"src/converterRule.ts"(){"use strict";J(),N(),$e(),Tt=class extends I{get type(){return"converter-rule"}get variant(){}constructor(e,t=!0,s=H.getConfig(),r=[]){super(void 0,s,r);const n=e.indexOf(":"),i=e.slice(0,n).indexOf("=>"),a=i===-1?e.slice(0,n):e.slice(i+2,n);t&&s.variants.includes(a.trim().toLowerCase())?(super.insertAt(new V(a,"converter-rule-variant",s,r)),super.insertAt(new V(e.slice(n+1),"converter-rule-to",s,r)),i!==-1&&super.insertAt(new V(e.slice(0,i),"converter-rule-from",s,r),0)):super.insertAt(new V(e,"converter-rule-to",s,r))}toString(e){const{childNodes:t,firstChild:s,lastChild:r}=this;return t.length===3?`${s.toString(e)}=>${t[1].toString(e)}:${r.toString(e)}`:super.toString(e,":")}text(){const{childNodes:e,firstChild:t,lastChild:s}=this;return e.length===3?`${t.text()}=>${e[1].text()}:${s.text()}`:super.text(":")}getGaps(e){return e===0&&this.length===3?2:1}print(){const{childNodes:e}=this;if(e.length===3){const[t,s,r]=e;return`<span class="wpb-converter-rule">${t.print()}=>${s.print()}:${r.print()}</span>`}return super.print({sep:":"})}json(e,t=this.getAbsoluteIndex()){}}}}),Wi,Ns,Mi,nt,Vl=m({"src/converter.ts"(){"use strict";z(),be(),le(),N(),Dl(),Gl(),Wi=[ne,oe("-{")],nt=class extends(Mi=I){get type(){return"converter"}constructor(e,t,s,r=[]){super(void 0,s,r),this.insertAt(new it(e,s,r));const[n]=t,i=n.includes(":"),a=new Tt(n,i,s,r);i&&a.length===1||!i&&t.length===2&&!Q(t[1]).trim()?this.insertAt(new Tt(t.join(";"),!1,s,r)):this.append(a,...t.slice(1).map(l=>new Tt(l,!0,s,r)))}toString(e){const{childNodes:[t,...s]}=this;return`-{${t.toString(e)}${t.length>0?"|":""}${s.map(r=>r.toString(e)).join(";")}}-`}text(){const{childNodes:[e,...t]}=this;return`-{${e.text()}|${ye(t,";")}}-`}getGaps(e){return e||this.firstChild.length>0?1:0}print(){const{childNodes:[e,...t]}=this;return`<span class="wpb-converter">-{${e.print()}${e.length>0?"|":""}${qe(t,{sep:";"})}}-</span>`}},Ns=W(Mi),nt=j(Ns,0,"ConverterToken",Wi,nt),B(Ns,1,nt)}}),wa={};M(wa,{parseConverter:()=>_a});var _a,Ql=m({"parser/converter.ts"(){"use strict";Vl(),_a=(e,t,s)=>{var u;(u=t.regexConverter)!=null||(t.regexConverter=new RegExp(String.raw`;(?=(?:[^;]*?=>)?\s*(?:${t.variants.join("|")})\s*:|(?:\s|\0\d+[cn]\x7F)*$)`,"iu"));const r=/-\{/gu,n=/-\{|\}-/gu,i=[];let a=r,l=a.exec(e);for(;l;){const{0:d,index:o}=l;if(d==="}-"){const h=i.pop(),{length:x}=s,g=e.slice(h.index+2,o),c=g.indexOf("|"),[v,w]=c===-1?[[],g]:[g.slice(0,c).split(";"),g.slice(c+1)],C=w.replace(/(&[#a-z\d]+);/giu,"$1"),A=C.split(t.regexConverter).map(k=>k.replace(/\x01/gu,";"));new nt(v,A,t,s),e=`${e.slice(0,h.index)}\0${x}v${e.slice(o+2)}`,i.length===0&&(a=r),a.lastIndex=h.index+3+String(x).length}else i.push(l),a=n,a.lastIndex=o+2;l=a.exec(e)}return e}}}),kt={};M(kt,{Token:()=>I});var I,N=m({"src/index.ts"(){"use strict";var e,t,s,r,n,i,a,l,Aa,ya,Sa,Ta,$a,ka,Ca,Ia,Fa,Na,La,Ea,b;z(),fe(),Ft(),Ce(),J(),sl(),rl(),I=(b=class extends Je{constructor(f,_=H.getConfig(),y=[],S){super();T(this,l);T(this,e,"plain");T(this,t,0);T(this,s);T(this,r);T(this,n);T(this,i,!1);T(this,a);typeof f=="string"&&this.insertAt(f),$(this,s,_),$(this,r,y),y.push(this)}get type(){return p(this,e)}set type(f){$(this,e,f)}parseOnce(f=p(this,t),_=!1,y){if(f<p(this,t)||this.length===0||!this.isPlain())return this;if(p(this,t)>=Y)return this;switch(f){case 0:if(this.type==="root"){p(this,r).pop();const S=O(this,l,Aa).call(this);_&&(_=!S)}$(this,n,_),O(this,l,ya).call(this,_);break;case 1:O(this,l,Sa).call(this);break;case 2:O(this,l,Ta).call(this);break;case 3:O(this,l,$a).call(this);break;case 4:O(this,l,ka).call(this);break;case 5:O(this,l,Ca).call(this,y);break;case 6:O(this,l,Ia).call(this,y);break;case 7:O(this,l,Fa).call(this);break;case 8:O(this,l,Na).call(this);break;case 9:O(this,l,La).call(this);break;case 10:O(this,l,Ea).call(this)}if(this.type==="root")for(const S of p(this,r))S==null||S.parseOnce(f,_,y);return cr(this,t)._++,this}buildFromStr(f,_){const y=f.split(/[\0\x7F]/u).map((S,q)=>{if(q%2===0)return new Bs(S);if(isNaN(S.slice(-1)))return p(this,r)[Number(S.slice(0,-1))];throw new Error(`Failed to build! Unrecognized token: ${S}`)});return _===0?y.map(String).join(""):_===1?ye(y):y}build(){$(this,t,Y);const{length:f,firstChild:_}=this,y=_==null?void 0:_.toString();if(f===1&&_.type==="text"&&y.includes("\0")&&(hr(this,0,1,this.buildFromStr(y)),this.normalize(),this.type==="root"))for(const S of p(this,r))S==null||S.build()}afterBuild(){if(this.type==="root")for(const f of p(this,r))f==null||f.afterBuild();$(this,i,!0)}parse(f=Y,_,y){for(f=Math.min(f,Y);p(this,t)<f;)this.parseOnce(p(this,t),_,y);return f&&(this.build(),this.afterBuild()),this}isPlain(){return this.constructor===b}getAttribute(f){var _;switch(f){case"config":return p(this,s);case"include":return(_=p(this,n))!=null?_:!!p(this.getRootNode(),n);case"accum":return p(this,r);case"built":return p(this,i);case"stage":return p(this,t);case"invalid":return this.type==="table-inter"&&_t(this)===2;default:return super.getAttribute(f)}}setAttribute(f,_){switch(f){case"stage":p(this,t)===0&&this.type==="root"&&p(this,r).shift(),$(this,t,_);break;default:super.setAttribute(f,_)}}insertAt(f,_=this.length){const y=typeof f=="string"?new Bs(f):f;super.insertAt(y,_);const{type:S}=y;return S==="root"&&(y.type="plain"),y}normalizeTitle(f,_=0,y){return H.normalizeTitle(f,_,p(this,n),p(this,s),y)}inTableAttrs(){var f,_;return((f=this.closest("table-attrs,ext"))==null?void 0:f.type)==="table-attrs"&&((_=this.closest("table-attrs,arg,magic-word,template"))!=null&&_.is("table-attrs")?2:1)}inHtmlAttrs(){var f;return(f=this.closest("html-attrs,ext"))!=null&&f.is("html-attrs")?2:this.inTableAttrs()}lint(f=this.getAbsoluteIndex(),_){}toString(f,_){return f?super.toString(!0,_):It(p(this,a),()=>super.toString(!1,_),y=>{const S=this.getRootNode();S.type==="root"&&p(S,i)&&$(this,a,y)})}},e=new WeakMap,t=new WeakMap,s=new WeakMap,r=new WeakMap,n=new WeakMap,i=new WeakMap,a=new WeakMap,l=new WeakSet,Aa=function(){const{parseRedirect:f}=(al(),R(rn)),_=this.firstChild.toString(),y=f(_,p(this,s),p(this,r));return y&&this.setText(y),!!y},ya=function(f){const{parseCommentAndExt:_}=(jt(),R(Qn));this.setText(_(this.firstChild.toString(),p(this,s),p(this,r),f))},Sa=function(){const{parseBraces:f}=(er(),R(An)),_=this.type==="root"?this.firstChild.toString():`\0${this.firstChild.toString()}`,y=f(_,p(this,s),p(this,r));this.setText(this.type==="root"?y:y.slice(1))},Ta=function(){if(p(this,s).excludes.includes("html"))return;const{parseHtml:f}=(Fl(),R(Xn));this.setText(f(this.firstChild.toString(),p(this,s),p(this,r)))},$a=function(){if(p(this,s).excludes.includes("table"))return;const{parseTable:f}=(Pl(),R(sa));this.setText(f(this,p(this,s),p(this,r)))},ka=function(){if(p(this,s).excludes.includes("hr"))return;const{parseHrAndDoubleUnderscore:f}=(Bl(),R(na));this.setText(f(this,p(this,s),p(this,r)))},Ca=function(f){const{parseLinks:_}=(Wl(),R(ca));this.setText(_(this.firstChild.toString(),p(this,s),p(this,r),f))},Ia=function(f){if(p(this,s).excludes.includes("quote"))return;const{parseQuotes:_}=(ua(),R(oa)),y=this.firstChild.toString().split(`
|
|
24
|
+
`);for(let S=0;S<y.length;S++)y[S]=_(y[S],p(this,s),p(this,r),f);this.setText(y.join(`
|
|
25
|
+
`))},Fa=function(){if(p(this,s).excludes.includes("extLink"))return;const{parseExternalLinks:f}=(da(),R(ha));this.setText(f(this.firstChild.toString(),p(this,s),p(this,r)))},Na=function(){if(p(this,s).excludes.includes("magicLink"))return;const{parseMagicLinks:f}=(Ml(),R(ga));this.setText(f(this.firstChild.toString(),p(this,s),p(this,r)))},La=function(){if(p(this,s).excludes.includes("list"))return;const{parseList:f}=(Hl(),R(va)),{firstChild:_,type:y,name:S}=this,q=_.toString().split(`
|
|
26
|
+
`),E={lastPrefix:""};let L=y==="root"||y==="ext-inner"&&S==="poem"?0:1;for(;L<q.length;L++)q[L]=f(q[L],E,p(this,s),p(this,r));this.setText(q.join(`
|
|
27
|
+
`))},Ea=function(){if(p(this,s).variants.length>0){const{parseConverter:f}=(Ql(),R(wa));this.setText(f(this.firstChild.toString(),p(this,s),p(this,r)))}},b)}}),xe,ur,hr,Ce=m({"util/debug.ts"(){"use strict";xe={running:!1,run(e){const{running:t}=this;this.running=!0;try{const{Token:s}=(N(),R(kt)),r=e();return r instanceof s&&!r.getAttribute("built")&&r.afterBuild(),this.running=t,r}catch(s){throw this.running=t,s}},rev:0},ur=e=>t=>t.type===e,hr=(e,t,s,r=[])=>{var a,l;let n=e.getChildNodes(),i;n.length===s?(i=n,n=r):i=n.splice(t,s,...r);for(let u=0;u<r.length;u++){const d=r[u];d.setAttribute("parentNode",e),d.setAttribute("nextSibling",n[t+u+1]),d.setAttribute("previousSibling",n[t+u-1])}return(a=n[t-1])==null||a.setAttribute("nextSibling",n[t]),(l=n[t+r.length])==null||l.setAttribute("previousSibling",n[t+r.length-1]),n===r&&e.setAttribute("childNodes",n),i}}}),Pa={};M(Pa,{Title:()=>Oa});var Oa,Xl=m({"lib/title.ts"(){"use strict";var e,t,s,r,n,i;Ct(),z(),Oa=(i=class{constructor(a,l,u,{temporary:d,decode:o,selfLink:h}={}){T(this,e);T(this,t);T(this,s);T(this,r);T(this,n);ae(this,"valid");ae(this,"encoded",!1);const x=a.trim().startsWith("../");if(o&&a.includes("%"))try{const c=/%(?!21|3[ce]|5[bd]|7[b-d])[\da-f]{2}/iu.test(a);a=Rs(a),this.encoded=c}catch{}if(a=Ps(a).replace(/[_ ]+/gu," ").trim(),x)$(this,r,0);else{let c=l;a.startsWith(":")&&(c=0,a=a.slice(1).trim());const v=a.split(":");if(v.length>1){const w=je(v[0]),C=Object.prototype.hasOwnProperty.call(u.nsid,w)&&u.nsid[w];C&&(c=C,a=v.slice(1).join(":").trim())}$(this,r,c)}const g=a.indexOf("#");if(g!==-1){let c=a.slice(g).trim().slice(1);if(c.includes("%"))try{c=Rs(c)}catch{}$(this,n,c.replace(/ /gu,"_")),a=a.slice(0,g).trim()}this.valid=!!(a||h&&this.ns===0&&p(this,n)!==void 0)&&Ps(a)===a&&!/^:|\0\d+[eh!+-]\x7F|[<>[\]{}|\n]|%[\da-f]{2}|(?:^|\/)\.{1,2}(?:$|\/)/iu.test(x?/^(?:\.\.\/)+(.*)/u.exec(a)[1]:a),this.main=a,$(this,t,u.namespaces),$(this,s,u.articlePath||"/wiki/$1"),p(this,s).includes("$1")||$(this,s,p(this,s)+`${p(this,s).endsWith("/")?"":"/"}$1`),d||Object.defineProperties(this,{encoded:{enumerable:!1,writable:!1}})}get ns(){return p(this,r)}get fragment(){return p(this,n)}get main(){return p(this,e)}set main(a){a=a.replace(/_/gu," ").trim(),$(this,e,a&&a[0].toUpperCase()+a.slice(1))}get prefix(){const a=p(this,t)[this.ns];return a+(a&&":")}get title(){return this.getRedirection()[1]}get extension(){const{main:a}=this,l=a.lastIndexOf(".");return l===-1?void 0:a.slice(l+1).toLowerCase()}getRedirection(){return[!1,(this.prefix+this.main).replace(/ /gu,"_")]}setFragment(a){$(this,n,a)}getUrl(a){throw new Error("Title.getUrl method is only available in the LSP version!")}},e=new WeakMap,t=new WeakMap,s=new WeakMap,r=new WeakMap,n=new WeakMap,i)}}),Ra={};M(Ra,{default:()=>H});Ba.exports=R(Ra);var wt,de,Ls,Ui,H,J=m({"index.ts"(){Ce(),fe(),z(),wt=!0,de={config:Os,get rules(){},get i18n(){},set i18n(e){},get lintConfig(){},set lintConfig(e){},get viewOnly(){return wt},set viewOnly(e){wt&&!e&&xe.rev++,wt=e},getConfig(e){const t=e!=null?e:this.config,{doubleUnderscore:s,ext:r,parserFunction:n,variable:i}=t;for(let a=0;a<2;a++)s.length>a+2&&s[a].length===0&&(s[a]=Object.keys(s[a+2]));return r.includes("translate")&&!i.includes("translationlanguage")&&(i.push("translationlanguage"),Array.isArray(n[1])?n[1].push("TRANSLATIONLANGUAGE"):n[1].TRANSLATIONLANGUAGE="translationlanguage"),{...Os,...t,excludes:[]}},msg(e,t=""){},normalizeTitle(e,t=0,s,r=de.getConfig(),n){const{Title:i}=(Xl(),R(Pa));let a;if(n!=null&&n.halfParsed)a=new i(e,t,r,n);else{const{Token:l}=(N(),R(kt));a=xe.run(()=>{const u=new l(e,r);u.type="root",u.parseOnce(0,s).parseOnce();const d=new i(u.toString(),t,r,n);u.build();for(const o of["main","fragment"]){const h=d[o];if(h!=null&&h.includes("\0")){const x=u.buildFromStr(h,1);o==="main"?d.main=x:d.setFragment(x)}}return d})}return a},parse(e,t,s=Y,r=de.getConfig()){e=Vi(e);let n;const{Token:i}=(N(),R(kt));return xe.run(()=>{const l=new i(e,r);return l.type="root",l.parse(s,t)})},async partialParse(e,t,s,r=de.getConfig()){},createLanguageService(e={}){throw new Error("Parser.createLanguageService method is only available in the LSP version!")}},Ls={},Ui=new Set(["lintConfig","normalizeTitle","parse","createLanguageService"]);for(const e in de)Ui.has(e)||(Ls[e]={enumerable:!1});Object.defineProperties(de,Ls),Object.assign(typeof globalThis=="object"?globalThis:self,{Parser:de}),H=de}});J()});Jl();})();
|
|
29
28
|
//# sourceMappingURL=bundle.min.js.map
|