wikiparser-node 1.28.0 → 1.28.1
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 +24 -24
- package/bundle/bundle-lsp.min.js +28 -28
- package/bundle/bundle.min.js +22 -22
- package/config/default.json +15 -16
- package/config/jawiki.json +15 -16
- package/dist/base.d.mts +1 -1
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -0
- package/dist/base.mjs +1 -0
- package/dist/bin/config.js +11 -11
- package/dist/lib/lintConfig.js +2 -0
- package/dist/lib/lsp.js +4 -1
- package/dist/parser/commentAndExt.js +4 -1
- package/dist/parser/hrAndDoubleUnderscore.js +9 -8
- package/dist/src/arg.js +2 -3
- package/dist/src/attribute.js +1 -0
- package/dist/src/imageParameter.js +49 -19
- package/dist/src/link/file.js +1 -4
- package/dist/src/magicLink.js +12 -1
- package/dist/src/nowiki/doubleUnderscore.d.ts +2 -1
- package/dist/src/nowiki/doubleUnderscore.js +10 -4
- package/dist/src/tagPair/ext.js +10 -3
- package/extensions/dist/base.js +1 -1
- package/i18n/en.json +2 -0
- package/i18n/zh-hans.json +2 -0
- package/i18n/zh-hant.json +2 -0
- package/package.json +4 -4
package/bundle/bundle.min.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
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,`
|
|
1
|
+
"use strict";(()=>{var Ma=Object.defineProperty;var cr=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),Ut=(e,t,s)=>t.has(e)||cr("Cannot "+s);var p=(e,t,s)=>(Ut(e,t,"read from private field"),s?s.call(e):t.get(e)),T=(e,t,s)=>t.has(e)?cr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),k=(e,t,s,r)=>(Ut(e,t,"write to private field"),r?r.call(e,s):t.set(e,s),s),O=(e,t,s)=>(Ut(e,t,"access private method"),s);var gr=(e,t,s,r)=>({set _(n){k(e,t,n,s)},get _(){return p(e,t,r)}});var Yl=za((eo,Ra)=>{var Ha=Object.create,We=Object.defineProperty,zi=Object.getOwnPropertyDescriptor,Ds=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,xr=(e,t)=>We(e,"name",{value:t,configurable:!0}),m=(e,t)=>function(){return e&&(t=(0,e[Ds(e)[0]])(e=0)),t},Ga=(e,t)=>function(){return t||(0,e[Ds(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 Ds(t))!Da.call(e,n)&&n!==s&&We(e,n,{get:()=>t[n],enumerable:!(r=zi(t,n))||r.enumerable});return e},B=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))}),Gs=(e,t)=>Di(t,Hi("metadata"),e[3]),R=(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,g=!!(t&8),x=!!(t&16),c=h>3?e.length+1:h?g?1:2:0,v=Gi[h+5],w=h>3&&(e[c-1]=[]),$=e[c]||(e[c]=[]),_=h&&(!x&&!g&&(n=n.prototype),h<5&&(h>3||!x)&&zi(h<4?n:{get[s](){return G(this,i)},set[s](b){return ie(this,i,b)}},s));h?x&&h<4&&xr(i,(h>2?"set ":h>1?"get ":"")+s):xr(n,s);for(var C=r.length-1;C>=0;C--)d=Qa(h,s,u={},e[3],$),h&&(d.static=g,d.private=x,o=d.access={has:x?b=>Ja(n,b):b=>s in b},h^3&&(o.get=x?b=>(h^1?G:Ps)(b,n,h^4?i:_.get):b=>b[s]),h>2&&(o.set=x?(b,F)=>ie(b,n,F,h^4?i:_.set):(b,F)=>b[s]=F)),l=(0,r[C])(h?h<4?x?i:_[v]:h>4?void 0:{get:_.get,set:_.set}:n,d),u._=1,h^4||l===void 0?Xe(l)&&(h>4?w.unshift(l):h?x?i=l:_[v]=l:n=l):typeof l!="object"||l===null?Me("Object expected"):(Xe(a=l.get)&&(_.get=a),Xe(a=l.set)&&(_.set=a),Xe(a=l.init)&&w.unshift(a));return h||Gs(e,n),_&&We(n,s,_),x?h^4?i:_:n},Xa=(e,t,s)=>Di(e,typeof t!="symbol"?t+"":t,s),Vs=(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)=>(Vs(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)=>(Vs(e,t,"write to private field"),r?r.call(e,s):t.set(e,s),s),Ps=(e,t,s)=>(Vs(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,zt,ot,ut,je,Fe,Vi,Q,ye,fr,mr,Os,Qi,vr,br,ht,qe,z=m({"util/string.ts"(){"use strict";Ae=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,zt=String.raw`[^[\]<>"\0-\x1F\x7F${Ae}\uFFFD]`,ot=String.raw`(?:\[[\da-f:.]+\]|${zt})`,ut=String.raw`(?:${zt}|\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),fr={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},mr=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)):fr[s.toLowerCase()]),Os=e=>mr(e),Qi=Fe(/&#(\d+|x[\da-f]+);/giu,(e,t)=>String.fromCodePoint(+((/^x/iu.test(t)?"0":"")+t))),vr={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},br=e=>Fe(e,t=>`&${vr[t]};`),ht=br(/[&<>]/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,Bs,fe=m({"util/constants.ts"(){"use strict";Y=11,Bs=Ya()}});function lt(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,It=m({"../common/dist/index.mjs"(){"use strict";Rs=e=>decodeURIComponent(e.replace(/%(?![\da-f]{2})/giu,"%25")),Xi=lt}}),wr,_r,At,Ft,Ji,Nt=m({"util/lint.ts"(){"use strict";Ce(),J(),wr=new Set(["tr","td","th","caption"]),_r=new Set(["Template:!!","Template:!-"]),At=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")&&_r.has(t.name)||t.is("html")&&wr.has(t.name))return!1;if(t.is("arg"))return t.length>1&&At(t.childNodes[1]);if(t.is("magic-word"))try{const s=t.getPossibleValues().map(At);return s.includes(2)?2:s.includes(1)&&1}catch{}return t.is("template")||t.is("magic-word")&&t.name==="invoke"?1:2},Ft=(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"]:[]}}),Ar,Ki,Za=m({"parser/selector.ts"(){"use strict";Ar=(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=>Ar(a.trim(),n,i)))}}}),Lt,Qs=m({"mixin/cached.ts"(){"use strict";Nt(),Lt=(e=!0)=>t=>{const s=new WeakMap;return function(...r){return Ft(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}}}),yr,Sr,gt,ze,He,xt,Tr,$r,De,we,Zi=m({"lib/node.ts"(){"use strict";Nt(),Qs(),el(),Sr=[Yi],yr=[Lt(!1)],we=class{constructor(){R(De,5,this),Xa(this,"childNodes",[]),pe(this,gt),pe(this,ze),pe(this,He),pe(this,xt),pe(this,Tr),pe(this,$r,{})}get parentNode(){return G(this,gt)}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,gt,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 Ft(G(this,xt),()=>{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,xt,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),gt=new WeakMap,ze=new WeakMap,He=new WeakMap,xt=new WeakMap,Tr=new WeakMap,$r=new WeakMap,j(De,1,"getLines",yr,we),we=j(De,0,"AstNode",Sr,we),R(De,1,we)}}),en,tl=m({"mixin/elementLike.ts"(){"use strict";en=e=>{}}}),kr,Ht,Cr,Je,sl=m({"lib/element.ts"(){"use strict";z(),Ce(),Za(),Zi(),tl(),kr=[en],Je=class extends(Cr=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 dr(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()){}},Ht=W(Cr),Je=j(Ht,0,"AstElement",kr,Je),R(Ht,1,Je)}}),js,rl=m({"lib/text.ts"(){"use strict";var e,tn,s;z(),Zi(),js=(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 ht(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);k(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);k(this,e,n)}get type(){return p(this,e)}set type(r){k(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)}}),Ir,Dt,Fr,ce,Et=m({"src/link/base.ts"(){"use strict";var e,t,s,r;fe(),be(),le(),N(),$e(),Ir=[ne,oe("[[")],ce=(r=class extends(Fr=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)}k(this,t,d)}get link(){}get fragment(){}afterBuild(){k(this,s,this.getTitle()),p(this,t).includes("\0")&&k(this,t,this.buildFromStr(p(this,t),0)),this.setAttribute("name",p(this,s).title),super.afterBuild()}setAttribute(i,a){i==="bracket"?k(this,e,a):i==="title"?k(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),Dt=W(Fr),ce=j(Dt,0,"LinkBaseToken",Ir,ce),R(Dt,1,ce)}}),Nr,Gt,Lr,re,ke=m({"src/nowiki/base.ts"(){"use strict";le(),N(),Nr=[ne],re=class extends(Lr=I){get innerText(){return this.firstChild.data}constructor(e="",t,s){super(e,t,s)}},Gt=W(Lr),re=j(Gt,0,"NowikiBaseToken",Nr,re),R(Gt,1,re)}}),Er,Vt,Pr,Z,Ue=m({"src/nowiki/noinclude.ts"(){"use strict";Se(),ke(),Er=[me()],Z=class extends(Pr=re){get type(){return"noinclude"}toString(e){return e?"":super.toString()}},Vt=W(Pr),Z=j(Vt,0,"NoincludeToken",Er,Z),R(Vt,1,Z)}}),sn,il=m({"src/link/redirectTarget.ts"(){"use strict";Et(),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()){}}}}),Or,Qt,Br,Ke,nl=m({"src/redirect.ts"(){"use strict";var e,t,s;Se(),le(),N(),Te(),il(),Or=[me(!1,!1),ne],Ke=(s=class extends(Br=I){constructor(n,i,a,l,u,d,o=[]){super(void 0,d,o);T(this,e);T(this,t);k(this,e,n),k(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),Qt=W(Br),Ke=j(Qt,0,"RedirectToken",Or,Ke),R(Qt,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,Xt,jr,Ye,ll=m({"src/onlyinclude.ts"(){"use strict";be(),le(),N(),Rr=[ne,oe("<onlyinclude>")],Ye=class extends(jr=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>'})}},Xt=W(jr),Ye=j(Xt,0,"OnlyincludeToken",Rr,Ye),R(Xt,1,Ye)}}),pt,Pt=m({"mixin/gapped.ts"(){"use strict";pt=(e=1)=>t=>{class s extends t{getGaps(){return e}}return s}}}),qr,Jt,Wr,_e,Xs=m({"src/tagPair/index.ts"(){"use strict";var e,t;Pt(),le(),N(),qr=[pt(),ne],_e=(t=class extends(Wr=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()),k(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),Jt=W(Wr),_e=j(Jt,0,"TagPairToken",qr,_e),R(Jt,1,_e)}}),Js,an=m({"src/tag/index.ts"(){"use strict";var e,t,s,r;N(),Js=(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),k(this,e,l),k(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)}}),Mr,Kt,Ur,ge,ol=m({"src/tag/tvar.ts"(){"use strict";Se(),an(),Te(),Mr=[me()],ge=class extends(Ur=Js){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)}},Kt=W(Ur),ge=j(Kt,0,"TvarToken",Mr,ge),R(Kt,1,ge)}}),ln,ul=m({"src/tagPair/translate.ts"(){"use strict";var e,on,s;N(),Xs(),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,g)=>(new ge("tvar",h,!1,a,l),new ge("","",!0,a,l),`\0${l.length-2}n${g}\0${l.length}n`)).replace(/<(tvar)(\s+name\s*=(?:\s*(?:(["'])[\s\S]*?\3|[^"'\s>]+))?\s*)>([\s\S]*?)<\/(tvar)(\s*)>/giu,(o,h,g,x,c,v,w)=>(new ge(h,g,!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)}}),zr,Yt,Hr,Ze,hl=m({"src/tagPair/include.ts"(){"use strict";Se(),Xs(),zr=[me(!1)],Ze=class extends(Hr=_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()){}},Yt=W(Hr),Ze=j(Yt,0,"IncludeToken",zr,Ze),R(Yt,1,Ze)}}),Ot,Ks=m({"mixin/attributesParent.ts"(){"use strict";Ot=(e=0)=>t=>{}}}),X,Zt,es,ts,Dr,ss,Ge,Gr,Vr,Qr,ft,rs,te,un,hn,dn,dl=m({"util/sharable.ts"(){"use strict";X=new Set(["align"]),Zt=new Set(["cite"]),es=new Set(["cite","datetime"]),ts=new Set(["width"]),Dr=new Set(["axis","align","bgcolor","height","width","valign"]),ss=new Set([...Dr,"abbr","headers","scope","rowspan","colspan"]),Ge=new Set(["type"]),Gr=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),Vr=new Set(["clear"]),Qr=new Set(["bgcolor","align","valign"]),ft=new Set(["qid","forcemathmode","type","display"]),rs=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:Zt,q:Zt,p:X,br:Vr,pre:ts,ins:es,del:es,ul:Ge,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...Gr,"border"]),caption:X,tr:Qr,td:ss,th:ss,font:new Set(["size","color","face"]),hr:ts,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([...ft,"chem"]),chem:ft,ce:ft,hiero:te,phonos:new Set(["ipa","class","text","lang","wikibase","file"]),section:new Set(["begin","end"]),source:rs,syntaxhighlight:rs,templatedata:te,timeline:new Set(["method","font"]),quiz:new Set(["display","shuffleanswers","points","shuffle","case"]),languages:te}}}),Xr,Jr,Kr,Yr,qs,pl=m({"src/attribute.ts"(){"use strict";var e,t,s,r,n,pn,cn,l;Nt(),z(),fe(),dl(),J(),N(),$e(),Xr=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|src|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,Jr=/(?:^|\s|\*\/)(?:javascript|vbscript)(?:\W|$)/iu,Kr=new Set(["ext","arg","magic-word","template"]),Yr=new Set(["about","property","resource","datatype","typeof","itemid","itemprop","itemref","itemscope","itemtype"]),qs=(l=class extends I{constructor(d,o,h,g="",x,c=[],v=H.getConfig(),w=[]){const $=new V(h,"attr-key",v,w);let _;if(h==="title"||o==="img"&&h==="alt")_=new I(x,v,w,{}),_.type="attr-value",_.setAttribute("stage",Y-1);else if(o==="gallery"&&h==="caption"||o==="ref"&&h==="details"||o==="choose"&&(h==="before"||h==="after")){const C={...v,excludes:[...v.excludes,"heading","html","table","hr","list"]};_=new I(x,C,w,{}),_.type="attr-value",_.setAttribute("stage",1)}else _=new V(x,"attr-value",v,w,{});super(void 0,v,w);T(this,n);T(this,e);T(this,t);T(this,s);T(this,r);k(this,e,d),this.append($,_),k(this,s,g),k(this,r,[...c]),k(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")&&k(this,s,this.buildFromStr(p(this,s),0)),this.parentNode&&k(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:ht(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:g,type:x,name:c,tag:v,parentNode:w}=this,$=!g.childNodes.some(({type:y})=>Kr.has(y)),_=this.getValue(),C=dn[v],b=hn[v],{length:F}=this.toString();let P="illegal-attr",f,A;if(!(C!=null&&C.has(c))&&!(b!=null&&b.has(c))&&(x==="ext-attr"?C||b:!/\{\{[^{]+\}\}/u.test(c))&&(x==="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 _=="string"&&Xr.test(_)){if(d===void 0)return!0}else if(c==="tabindex"&&typeof _=="string"&&_!=="0"){if(d===void 0)return!0}else if(typeof _=="string"&&((/^xmlns:[\w:.-]+$/u.test(c)||Yr.has(c))&&Jr.test(_)||$&&(c==="href"||v==="img"&&c==="src")&&!new RegExp(String.raw`^(?:${this.getAttribute("config").protocol}|//)\S+$`,"iu").test(_))){if(d===void 0)return!0}else if($&&x!=="ext-attr"){const y=Ji(v,c),S=String(_).toLowerCase();if(y.length>0&&y.every(q=>q!==S)&&d===void 0)return!0}return!1},l)}}),is,Zr,Bt,Ys=m({"src/attributes.ts"(){"use strict";var e,t,Ws,r;z(),N(),$e(),pl(),is=n=>n.slice(0,-1),Zr=n=>`${is(n)}-dirty`,Bt=(r=class extends I{constructor(i,a,l,u,d=[]){super(void 0,u,d,{});T(this,t);T(this,e);if(k(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="",g=o.exec(i),x=0;const c=(()=>{h&&(super.insertAt(new V(h,Zr(a),u,d,{})),h="")});for(;g;){const{index:v,0:w,1:$,2:_,3:C,4:b,5:F,6:P}=g;if(h+=i.slice(x,v),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(Q($).trim())){const f=b!=null?b:P,A=[C,F],y=new qs(is(a),l,$,_,f,A,u,d);c(),super.insertAt(y)}else h+=w;({lastIndex:x}=o),g=o.exec(i)}h+=i.slice(x),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 qs&&(!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,Ws).call(this):super.getAttribute(i)}print(){return this.toString()?`<span class="wpb-${this.type}${O(this,t,Ws).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,Ws=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,Zs=m({"src/multiLine/index.ts"(){"use strict";N(),Rt=class extends I{get type(){return"ext-inner"}toString(e){return super.toString(e,`
|
|
2
2
|
`)}text(){return super.text(`
|
|
3
3
|
`).replace(/\n\s*\n/gu,`
|
|
4
4
|
`)}getGaps(){return 1}print(){return super.print({sep:`
|
|
5
|
-
`})}}}}),fn,gl=m({"src/paramLine.ts"(){"use strict";N(),fn=class extends I{get type(){return"param-line"}}}}),mn={};M(mn,{ParamTagToken:()=>
|
|
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:
|
|
8
|
-
`){
|
|
9
|
-
`)||(e=`${e.slice(0,f)}\0${s.length}h${e.slice(b)}`,
|
|
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(([
|
|
11
|
-
`))!=null?u:[]){const o=/^([^|]+)(?:\|(.*))?/u.exec(d);if(!o){super.insertAt(d.trim()?new
|
|
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:
|
|
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()){}},
|
|
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()){}},
|
|
5
|
+
`})}}}}),fn,gl=m({"src/paramLine.ts"(){"use strict";N(),fn=class extends I{get type(){return"param-line"}}}}),mn={};M(mn,{ParamTagToken:()=>er});var er,vn=m({"src/multiLine/paramTag.ts"(){"use strict";qt(),J(),Zs(),gl(),er=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:ct(i,s,r,e)).map(i=>new fn(i,s,r,{}))),r.splice(r.indexOf(this),1),r.push(this)}lint(e=this.getAbsoluteIndex()){}}}}),ei,ns,ti,Ne,bn=m({"src/heading.ts"(){"use strict";var e,t,yt,r;le(),N(),Te(),ei=[ne],Ne=(r=class extends(ti=I){constructor(i,a,l,u=[]){super(void 0,l,u);T(this,t);T(this,e);k(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,yt).call(this);return a+this.firstChild.toString(i)+a+this.lastChild.toString(i)}text(){const i=O(this,t,yt).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,yt).call(this);return super.print({pre:i,sep:i})}json(i,a=this.getAbsoluteIndex()){}},e=new WeakMap,t=new WeakSet,yt=function(){return"=".repeat(this.level)},r),ns=W(ti),Ne=j(ns,0,"HeadingToken",ei,Ne),R(ns,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()){}}}}),si,as,ri,Le,fl=m({"src/transclude.ts"(){"use strict";var e,t,s,r,n,i,Ms,_n,u;z(),Ce(),Pt(),le(),N(),xl(),$e(),Te(),si=[ne,pt()],Le=(u=class extends(ri=I){constructor(o,h,g,x=[]){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`,x[c].toString().replace(/^\n/u,"")));super(void 0,g,x,{});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,$],variable:_,functionHook:C}=g,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($),ee=ue?$.includes(D):Object.prototype.hasOwnProperty.call($,D),he=!ue&&ee?$[D]:Object.prototype.hasOwnProperty.call(w,Ie)&&w[Ie],Wt=ue&&ee||!("functionHook"in g)||C.includes(he),ja=ue&&ee||_.includes(he);if(f?he&&Wt:ja){this.setAttribute("name",he||Ie.replace(/^#|:$/u,"")),k(this,e,"magic-word"),P&&k(this,t,":");const qa=new ve(E,"magic-word-name",g,x);if(super.insertAt(qa),L!==!1&&h.unshift([L]),this.name==="invoke")for(let Mt=0;Mt<2;Mt++){const pr=h.shift();if(!pr)break;const Wa=new V(pr.join("="),`invoke-${Mt?"function":"module"}`,g,x);super.insertAt(Wa)}}}if(this.type==="template"){const E=Q(o).trim();if(!this.normalizeTitle(E,10,{halfParsed:!0,temporary:!0}).valid)throw x.pop(),new SyntaxError("Invalid template name");const L=new V(o,"template-name",g,x,{});super.insertAt(L)}typeof c=="number"&&(x[c]=void 0);const A=this.isTemplate();let y=1;for(let E=0;E<h.length;E++){const L=h[E];A||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,g,x))}this.seal("modifier")}get type(){return p(this,e)}get module(){}get function(){}setModifier(o){const{parserFunction:[,,h,g]}=this.getAttribute("config"),x=Q(o).trim();if(o&&!x.endsWith(":"))return!1;const c=x.slice(0,-1).toLowerCase(),v=h.includes(c),w=g.includes(c);return p(this,s)&&v||!p(this,s)&&(w||!o)||(xe.running||this.length>1)&&(v||w||!o)?(this.setAttribute("modifier",o),k(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"&&(k(this,n,O(this,i,Ms).call(this)),this.setAttribute("name",p(this,n).title))}toString(o){const{childNodes:h,length:g,firstChild:x,modifier:c,type:v}=this;return`{{${c}${v==="magic-word"?x.toString(o)+(g===1?"":p(this,t))+h.slice(1).map(w=>w.toString(o)).join("|"):super.toString(o,"|")}}}`}text(){const{childNodes:o,length:h,firstChild:g,modifier:x,type:c,name:v}=this;return c==="magic-word"&&v==="vardefine"?"":`{{${x}${c==="magic-word"?g.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,Ms).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(hr("parameter"))}getAnonArgs(){return this.getAllArgs().filter(({anon:o})=>o)}getArgs(o,h,g=!0){const x=String(o).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1");let c;return p(this,r).has(x)?c=p(this,r).get(x):(c=new Set(this.getAllArgs().filter(({name:v})=>x===v)),p(this,r).set(x,c)),c}getDuplicatedArgs(){}getPossibleValues(){const{type:o,name:h,childNodes:g}=this;if(o==="template")throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!");let x,c;switch(h){case"if":case"ifexist":case"ifexpr":case"iferror":x=2;break;case"ifeq":x=3;break;case"switch":{const v=g.slice(2),w=v[v.length-1];c=[...v.filter(({anon:$})=>!$),...w!=null&&w.anon?[w]:[]].map(({lastChild:$})=>$);break}default:throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!")}c!=null||(c=g.slice(x,x+2).map(({lastChild:v})=>v));for(let v=0;v<c.length;){const{length:w,0:$}=c[v].childNodes.filter(_=>_.text().trim());if(w===0)c.splice(v,1);else if(w>1||$.type!=="magic-word")v++;else try{const _=$.getPossibleValues();c.splice(v,1,..._),v+=_.length}catch{v++}}return c}print(){const{childNodes:o,length:h,firstChild:g,modifier:x,type:c}=this;return`<span class="wpb-${c}${this.getAttribute("invalid")?" wpb-invalid":""}">{{${c==="magic-word"?ht(x)+g.print()+(h===1?"":p(this,t))+qe(o.slice(1),{sep:"|"}):(x?`<span class="wpb-magic-word">${ht(x)}</span>`:"")+qe(o,{sep:"|"})}}}</span>`}},e=new WeakMap,t=new WeakMap,s=new WeakMap,r=new WeakMap,n=new WeakMap,i=new WeakSet,Ms=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(),g=typeof o!="number";for(let x=g?h.indexOf(o):o-1;x<h.length;x++){const c=h[x],{name:v}=c,w=String(x+1);(v!==w||c===o)&&(c.setAttribute("name",w),this.getArgs(w,!1,!1).add(c))}},u),as=W(ri),Le=j(as,0,"TranscludeToken",si,Le),R(as,1,Le)}}),ii,ls,ni,et,ml=m({"src/hidden.ts"(){"use strict";Se(),N(),ii=[me()],et=class extends(ni=I){get type(){return"hidden"}getAttribute(e){return e==="invalid"||super.getAttribute(e)}},ls=W(ni),et=j(ls,0,"HiddenToken",ii,et),R(ls,1,et)}}),ai,os,li,tt,vl=m({"src/arg.ts"(){"use strict";var e,bl,s;z(),be(),Pt(),le(),N(),$e(),ml(),ai=[ne,oe("{{{"),pt()],tt=(s=class extends(li=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),os=W(li),tt=j(os,0,"ArgToken",ai,tt),R(os,1,tt)}}),An={};M(An,{parseBraces:()=>jt});var oi,us,mt,hs,ds,ps,ui,cs,jt,tr=m({"parser/braces.ts"(){"use strict";It(),z(),bn(),fl(),vl(),oi={"=":String.raw`\n(?!(?:[^\S\n]|\0\d+[cn]\x7F)*\n)`,"{":String.raw`\}{2,}|\|`,"-":String.raw`\}-`,"[":String.raw`\]\]`},us=String.raw`\[(?!\[)`,mt=String.raw`\n(?![=\0])`,hs=String.raw`|\{{2,}`,ds=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"],["server","m"]]),ps=lt(e=>new RegExp(e,"gmu")),ui=new RegExp(String.raw`\{\{((?:[^\n{}[]|${us}|${mt})*)\}\}(?!\})`+"|"+String.raw`\[\[(?:[^\n[\]{]|${mt})*\]\]`+"|"+String.raw`-\{(?:[^\n{}[]|${us}|${mt})*\}-`,"gu"),cs=e=>{const t=je(Q(e));return ds.has(t)?ds.get(t):/^(?:filepath|(?:full|canonical)urle?):./u.test(t)?"m":/^#vardefine:./u.test(t)?"n":"t"},jt=(e,t,s)=>{var c,v,w,$,_;const r=String.raw`${t.excludes.includes("heading")?"":String.raw`^((?:\0\d+[cno]\x7F)*)={1,6}|`}\[\[|-\{(?!\{)`,{parserFunction:[,,,n]}=t,i=[],a=[],l=(C,b,F,P)=>{b[b.length-1].push(K(C.slice(F,P),a))};let u;do u!==void 0&&(e=u),u=e.replace(ui,(C,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(A=>{const y=A.indexOf("=");return(y===-1?[A]:[A.slice(0,y),A.slice(y+1)]).map(S=>K(S,a))}),t,s),`\0${P}${cs(f[0])}`}catch(P){if(!(P instanceof SyntaxError)||P.message!=="Invalid template name")throw P}return a.push(K(C,a)),`\0${a.length-1}`});while(u!==e);e=u;const d=e.lastIndexOf("}}")-e.length;let o=d+e.length!==-1,h=ps(r+(o?hs:"")),g=h.exec(e),x;for(;g||x!==void 0&&x<=e.length&&((v=(c=i[i.length-1])==null?void 0:c[0])!=null&&v.startsWith("="));){if(g!=null&&g[1]){const[,{length:L}]=g;g[0]=g[0].slice(L),g.index+=L}const{0:C,index:b}=g!=null?g:{0:`
|
|
7
|
+
`,index:e.length},F=(w=i.pop())!=null?w:{},{0:P,index:f,parts:A,findEqual:y,pos:S}=F,q=C==="="&&y;if(C==="]]"||C==="}-")x=b+2;else if(C===`
|
|
8
|
+
`){x=b+1;const{pos:L,findEqual:U}=($=i[i.length-1])!=null?$:{};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)}`,x=f+4+String(s.length).length,new Ne(D[1].length,D.slice(2),t,s)))}}else if(C==="|"||q)x=b+1,l(e,A,S,b),C==="|"&&A.push([]),F.pos=x,F.findEqual=C==="|",i.push(F);else if(C.startsWith("}}")){const L=C.slice(0,Math.min(P.length,3)),U=P.length-L.length,{length:D}=s;x=b+L.length,l(e,A,S,b);let Ie=!1,ue="t";if(L.length===3){const ee=A.map(Wt=>Wt.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(A[0][0],A.slice(1),t,s),ue=cs(A[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(x)}`,x=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 x=b+C.length,C.startsWith("{")&&(g.pos=x,g.parts=[[]]),i.push(..."0"in F?[F]:[],g);let E=i[i.length-1];if(o&&d+e.length<x)for(o=!1;(_=E==null?void 0:E[0])!=null&&_.startsWith("{");)i.pop(),E=i[i.length-1];h=ps(r+(o?hs:"")+(E?`|${oi[E[0][0]]}${E.findEqual?"|=":""}`:"")),h.lastIndex=x,g=h.exec(e)}return K(e,a)}}}),yn={};M(yn,{InputboxToken:()=>Sn});var Sn,wl=m({"src/multiLine/inputbox.ts"(){"use strict";qt(),tr(),J(),vn(),Sn=class extends er{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=ct(t,i,r,e)),t&&(t=jt(t,i,r)),r.splice(a,1),super(e,t,i,r,{})}}}}),St={};M(St,{NestedToken:()=>Tn});var Tn,gs=m({"src/nested.ts"(){"use strict";var e,t,s;qt(),tr(),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=ct(n,l,u,i)),n&&(n=jt(n,l,u)),u.splice(o,1)}else n&&(n=n.replace(i,(d,o,h,g,x)=>{const c=`\0${u.length+1}e`;return new Be(o,h,g,x,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);k(this,e,[...a]),k(this,t,i)}get type(){return"ext-inner"}lint(n=this.getAbsoluteIndex(),i){}},e=new WeakMap,t=new WeakMap,s)}});function _l(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,Al=m({"src/imageParameter.ts"(){"use strict";var e,t,yl,n;It(),z(),fe(),J(),N(),$n=lt(i=>new RegExp(String.raw`^(?:${i}|//|\0\d+m\x7F)`,"iu")),kn=lt(i=>new RegExp(String.raw`^(?:(?:${i}|//)${ot}|\0\d+m\x7F)${ut}$`,"iu")),hi=lt(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(([x,c])=>[x,c,hi(x)]),g=h.find(([,x,c])=>(o=c.exec(a),o&&(o.length!==4||_l(x,o[2],u,!0,l)!==!1)));if(g&&o){o.length===3?(i(void 0,u,d),k(this,e,a)):(i(o[2],u,d,{}),k(this,e,o[1]+g[0]+o[3])),this.setAttribute("name",g[1]),g[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(){}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,yl=function(){},n)}}),pi,sr,In=m({"src/link/file.ts"(){"use strict";Et(),Al(),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},sr=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,xs,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=sr){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),xs=W(gi),Ee=j(xs,0,"GalleryImageToken",ci,Ee),R(xs,1,Ee)}}),kt,Ln=m({"src/nowiki/commentLine.ts"(){"use strict";Ue(),kt=class extends Z{}}}),En={};M(En,{GalleryToken:()=>Pn});var Pn,Sl=m({"src/multiLine/gallery.ts"(){"use strict";var e,On,Tl,r;Zs(),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 kt(d,a,l):d);continue}const[,h,g]=o;O(this,e,On).call(this,h)?super.insertAt(new Ee("gallery",h,g,a,l)):super.insertAt(new kt(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},Tl=function(i){},r)}}),rr,Bn=m({"src/link/index.ts"(){"use strict";Et(),rr=class extends ce{get type(){return"link"}get innerText(){}lint(e=this.getAbsoluteIndex(),t){}}}}),xi,fi,dt,ir=m({"src/magicLink.ts"(){"use strict";var e,t,Rn,r;z(),J(),N(),xi=String.raw`(?:[${Ae}\t]| |�*160;|&#[xX]0*[aA]0;)`,fi=new RegExp(`${xi}+`,"gu"),dt=(r=class extends I{constructor(i,a="free-ext-link",l=H.getConfig(),u){super(i,l,u,{});T(this,t);T(this,e);k(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,Rn).call(this):super.getAttribute(i)}},e=new WeakMap,t=new WeakSet,Rn=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,fs,vi,Pe,jn=m({"src/extLink.ts"(){"use strict";var e,t;fe(),be(),N(),ir(),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 dt(r,"ext-link-url",a,l);if(this.insertAt(u),k(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),fs=W(vi),Pe=j(fs,0,"ExtLinkToken",mi,Pe),R(fs,1,Pe)}}),Us,$l=m({"src/imagemapLink.ts"(){"use strict";N(),Ue(),Bn(),jn(),Us=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 rr(...t,r,n):new Pe(...t,r,n),new Z(s,r,n))}}}}),qn={};M(qn,{ImagemapToken:()=>Wn});var Wn,kl=m({"src/multiLine/imagemap.ts"(){"use strict";Ce(),J(),Zs(),Ln(),Fn(),$l(),Wn=class extends Rt{get image(){return this.childNodes.find(hr("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:g}=this.normalizeTitle(o,0,{halfParsed:!0,temporary:!0});if(h&&g===6){const x=new Ee("imagemap",o,d===-1?void 0:l.slice(d+1),t,s);super.insertAt(x),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 Us(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 g=/^\[([^\]\s]+)(?:(\s+(?!\s))([^\]]*))?\][\w\s]*$/u.exec(o);if(g){super.insertAt(new Us(l.slice(0,d),g.slice(1),o.slice(o.indexOf("]")+1),t,s));continue}}}}super.insertAt(new kt(l,t,s))}}lint(e=this.getAbsoluteIndex(),t){}getAttribute(e){return e==="invalid"?!this.image:super.getAttribute(e)}}}}),bi,ms,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?"-->":""})}},ms=W(wi),Oe=j(ms,0,"CommentToken",bi,Oe),R(ms,1,Oe)}}),Un={};M(Un,{CommentedToken:()=>zn});var zn,Cl=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,Il=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,vs,yi,Be,Vn=m({"src/tagPair/ext.ts"(){"use strict";J(),Ks(),N(),Xs(),Ys(),Ai=[Ot()],Be=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 Bt(!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(),B(gn));o=new h(s,d,a);break}case"dynamicpagelist":{const{ParamTagToken:h}=(vn(),B(mn));o=new h(i,s,d,a);break}case"inputbox":{const{InputboxToken:h}=(wl(),B(yn));o=new h(i,s,d,a);break}case"references":{const{NestedToken:h}=(gs(),B(St));d.excludes.push("heading"),o=new h(s,i,["ref"],d,a);break}case"choose":{const{NestedToken:h}=(gs(),B(St));o=new h(s,/<(option|choicetemplate)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(\1)>)/gu,["option","choicetemplate"],d,a);break}case"combobox":{const{NestedToken:h}=(gs(),B(St));o=new h(s,/<(combooption)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(combooption\s*)>)/giu,["combooption"],d,a);break}case"gallery":{const{GalleryToken:h}=(Sl(),B(En));o=new h(s,d,a);break}case"imagemap":{const{ImagemapToken:h}=(kl(),B(qn));o=new h(s,d,a);break}case"hiero":{const{CommentedToken:h}=(Cl(),B(Un));o=new h(s,d,a);break}default:{const{NowikiToken:h}=(Il(),B(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){}},vs=W(yi),Be=j(vs,0,"ExtToken",Ai,Be),R(vs,1,Be)}}),Qn={};M(Qn,{parseCommentAndExt:()=>ct});var bs,Si,vt,Ti,ws,ct,qt=m({"parser/commentAndExt.ts"(){"use strict";It(),z(),ll(),Ue(),ul(),hl(),Vn(),Mn(),bs="<onlyinclude>",Si="</onlyinclude>",{length:vt}=bs,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"))}),ws=e=>{const t=e.indexOf(bs);return{i:t,j:e.indexOf(Si,t+vt)}},ct=(e,t,s,r)=>{if(r){let{i:l,j:u}=ws(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+vt,u),t,s),l>0&&o(e.slice(0,l)),d+=h,e=e.slice(u+vt+1),{i:l,j:u}=ws(e)}return e&&o(e),d}}const{ext:n}=t;let i=n,a=t;if(n.includes("translate")){i=n.filter(u=>u!=="translate"&&u!=="tvar"),a={...t,ext:i};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,g,x,c,v)=>{const w=s.length;let $="n";if(u)$="e",new Be(u,d,o,h,a,g,s);else if(l.startsWith("<!--")){$="c";const _=l.endsWith("-->");new Oe(K(l,s,1).slice(4,_?-3:void 0),_,t,s)}else g?new Ze(g,x&&K(x,s,1),c&&K(c,s,1),v,t,s):new Z(l,t,s,!0);return`\0${w}${$}`})}}}),$i,_s,ki,st,Fl=m({"src/tag/html.ts"(){"use strict";var e,t;Ks(),an(),$i=[Ot()],st=(t=class extends(ki=Js){constructor(r,n,i,a,l,u){super(r,n,i,l,u);T(this,e);this.setAttribute("name",r.toLowerCase()),k(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),_s=W(ki),st=j(_s,0,"HtmlToken",$i,st),R(_s,1,st)}}),Xn={};M(Xn,{parseHtml:()=>Jn});var Ci,Jn,Nl=m({"parser/html.ts"(){"use strict";Ys(),Fl(),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,,g="",x,c]=u,{length:v}=s,w=new Bt(g,"html-attrs",o,t,s),$=w.hasAttr("itemprop");if(o==="meta"&&!($&&w.hasAttr("content"))||o==="link"&&!($&&w.hasAttr("href"))){i+=`<${l}`,s.length=v;continue}i+=`\0${s.length}x${c}`,new st(d,w,h==="/",x==="/>",t,s)}return i}}}),Ii,As,Fi,Re,Kn=m({"src/table/base.ts"(){"use strict";Ks(),N(),Te(),Ys(),Ii=[Ot(1)],Re=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 Bt(r,"table-attrs",s,n,i))}escape(){}},As=W(Fi),Re=j(As,0,"TableBaseToken",Ii,Re),R(As,1,Re)}}),Ni,ys,se,bt,Ve,Qe,zs,Ll=m({"src/table/td.ts"(){"use strict";Qs(),N(),Kn(),zs=class extends(ys=Re,Ni=[Lt(!1)],ys){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),R(bt,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 Ps(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()){}},bt=W(ys),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{...Ps(e=n,Ve,Qe).call(e)}},Qe=j(bt,17,"#getSyntax",Ni,Ve,Qe),Gs(bt,zs)}}),nr,Yn=m({"src/table/trBase.ts"(){"use strict";Kn(),nr=class extends Re{lint(e=this.getAbsoluteIndex(),t){}getRowCount(){}}}}),Li,Ss,wt,Tt,El=m({"src/table/index.ts"(){"use strict";Ce(),Qs(),Yn(),Te(),Tt=class extends(Ss=nr,Li=[Lt(!1)],Ss){constructor(e,t,s,r){super(/^(?:\{\||\{\{\{\s*!\s*\}\}|\{\{\s*\(!\s*\}\})$/u,e,"table",t,s,r,{}),R(wt,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()){}},wt=W(Ss),j(wt,1,"getLayout",Li,Tt),Gs(wt,Tt)}}),Zn,Pl=m({"src/table/tr.ts"(){"use strict";Yn(),Zn=class extends nr{get type(){return"tr"}constructor(e,t,s,r){super(/^\n[^\S\n]*(?:\|-+|\{\{\s*!\s*\}\}-+|\{\{\s*!-\s*\}\}-*)$/u,e,"tr",t,s,r)}}}}),ar,ea=m({"src/nowiki/listBase.ts"(){"use strict";ke(),ar=class extends re{get indent(){}json(e,t=this.getAbsoluteIndex()){}}}}),lr,ta=m({"src/nowiki/dd.ts"(){"use strict";ea(),lr=class extends ar{get type(){return"dd"}}}}),sa={};M(sa,{parseTable:()=>ra});var Ei,Ts,ra,Ol=m({"parser/table.ts"(){"use strict";N(),El(),Pl(),Ll(),ta(),Ei=e=>e.lastChild.constructor!==I,Ts=(e,t)=>e.is("td")?t.pop():e,ra=({firstChild:{data:e},type:t,name:s},r,n)=>{const i=[],a=e.split(`
|
|
15
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:
|
|
17
|
-
${h}${
|
|
18
|
-
${o}`;continue}const c=/^(?:(\|\}|\0\d+!\x7F\}|\0\d+\}\x7F)|(\|-+|\0\d+!\x7F-+|\0\d+-\x7F-*)(?!-)|(!|(?:\||\0\d+!\x7F)\+?))(.*)$/u.exec(
|
|
19
|
-
${o}`,u),i.push(u);continue}const[,v,w
|
|
20
|
-
${h}${v}`,!0),d(
|
|
21
|
-
${h}${w}`,
|
|
22
|
-
${h}${
|
|
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]=
|
|
25
|
-
`))},Fa=function(){if(p(this,s).excludes.includes("extLink"))return;const{parseExternalLinks:f}=(da(),
|
|
16
|
+
${a.shift()}`,u;const d=(o,h)=>{if(!h){l+=o;return}const{lastChild:g}=h;if(Ei(h)){const x=new I(o,r,n);x.type="table-inter",x.setAttribute("stage",3),h.insertAt(x)}else g.setText(g.toString()+o)};for(const o of a){u=i.pop();const[h]=/^(?:\s|\0\d+[cno]\x7F)*/u.exec(o),g=o.slice(h.length),x=/^(:*)((?:\s|\0\d+[cn]\x7F)*)(\{\||\{(?:\0\d+[cn]\x7F)*\0\d+!\x7F|\0\d+\{\x7F)(.*)$/u.exec(g);if(x){for(;u&&!u.is("td");)u=i.pop();const[,C,b,F,P]=x;C&&new lr(C,r,n),d(`
|
|
17
|
+
${h}${C&&`\0${n.length-1}d`}${b}\0${n.length}b`,u),i.push(...u?[u]:[],new Tt(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(g);if(!c){d(`
|
|
19
|
+
${o}`,u),i.push(u);continue}const[,v,w,$,_]=c;if(v){for(;!u.is("table");)u=i.pop();u.close(`
|
|
20
|
+
${h}${v}`,!0),d(_,i[i.length-1])}else if(w){u=Ts(u,i),u.is("tr")&&(u=i.pop());const C=new Zn(`
|
|
21
|
+
${h}${w}`,_,r,n);i.push(u,C),u.insertAt(C)}else{u=Ts(u,i);const C=$==="!"?/!!|(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu:/(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu;let b=C.exec(_),F=0,P=`
|
|
22
|
+
${h}${$}`;const f=A=>{const y=new zs(P,_.slice(F,b==null?void 0:b.index),r,n);return A.insertAt(y),y};for(;b;)f(u),{lastIndex:F}=C,[P]=b,b=C.exec(_);i.push(u,f(u))}}return l.slice(1)}}}),rt,Bl=m({"../cm-util/dist/index.mjs"(){"use strict";rt=e=>!/^_{2}.+_{2}$/u.test(e)}}),ia,Rl=m({"src/nowiki/hr.ts"(){"use strict";ke(),ia=class extends re{get type(){return"hr"}}}}),Pi,$s,Oi,it,jl=m({"src/nowiki/doubleUnderscore.ts"(){"use strict";var e,t;Se(),be(),ke(),Pi=[me(),oe("__")],it=(t=class extends(Oi=re){constructor(r,n,i,a,l){var h,g;super(r,a,l);T(this,e);const u=r.toLowerCase(),{doubleUnderscore:[,,d,o]}=a;this.setAttribute("name",(g=n?(h=o==null?void 0:o[r])==null?void 0:h.toLowerCase():d==null?void 0:d[u])!=null?g:u),k(this,e,i)}get type(){return"double-underscore"}toString(){const r=p(this,e)?"__":"__";return r+this.innerText+r}print(){const r=p(this,e)?"__":"__";return super.print({pre:r,post:r})}},e=new WeakMap,t),$s=W(Oi),it=j($s,0,"DoubleUnderscoreToken",Pi,it),R($s,1,it)}}),na={};M(na,{parseHrAndDoubleUnderscore:()=>aa});var aa,ql=m({"parser/hrAndDoubleUnderscore.ts"(){"use strict";Bl(),Rl(),jl(),bn(),aa=({firstChild:{data:e},type:t,name:s},r,n)=>{var d,o,h;const{doubleUnderscore:[i,a,l]}=r,u=[...i,...a];return(d=r.insensitiveDoubleUnderscore)!=null||(r.insensitiveDoubleUnderscore=new Set(i.filter(rt))),(o=r.sensitiveDoubleUnderscore)!=null||(r.sensitiveDoubleUnderscore=new Set(a.filter(rt))),(h=r.regexHrAndDoubleUnderscore)!=null||(r.regexHrAndDoubleUnderscore=new RegExp(`__(${u.filter(rt).join("|")})__|_{2}(${u.filter(g=>!rt(g)).map(g=>g.slice(2,-2)).join("|")})_{2}`,"giu")),t!=="root"&&(t!=="ext-inner"||s!=="poem")&&(e=`\0${e}`),e=e.replace(/^((?:\0\d+[cno]\x7F)*)(-{4,})/gmu,(g,x,c)=>(new ia(c,r,n),`${x}\0${n.length-1}r`)).replace(r.regexHrAndDoubleUnderscore,(g,x,c)=>{var C;const v=x!=null?x:c,w=r.sensitiveDoubleUnderscore.has(v),$=v.toLowerCase(),_=r.insensitiveDoubleUnderscore.has($);return w||_?(new it(v,w,!!c,r,n),`\0${n.length-1}${_&&((C=l==null?void 0:l[$])!=null?C:$)==="toc"?"u":"n"}`):g}),r.excludes.includes("heading")||(e=e.replace(/^((?:\0\d+[cn]\x7F)*)(={1,6})(.+)\2((?:\s|\0\d+[cn]\x7F)*)$/gmu,(g,x,c,v,w)=>{const $=`${x}\0${n.length}h`;return new Ne(c.length,[v,w],r,n),$})),t==="root"||t==="ext-inner"&&s==="poem"?e:e.slice(1)}}}),la,Wl=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);k(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:()=>or});var or,ua=m({"parser/quotes.ts"(){"use strict";Wl(),or=(e,t,s,r)=>{var x;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=(x=u!=null?u:d)!=null?x:o;c!==void 0&&(n[c]="''",n[c-1]+="'")}let h=!0,g=!0;for(let c=1;c<i;c+=2){const v=n[c].length,w=v!==2,$=v!==3;w&&(h=!h),$&&(g=!g),new la(n[c],{bold:w&&h,italic:$&&g},t,s),n[c]=`\0${s.length-1}q`}return n.join("")}}}),ha={};M(ha,{parseExternalLinks:()=>ur});var ur,da=m({"parser/externalLinks.ts"(){"use strict";z(),jn(),ir(),ur=(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}|//)${ot}|\0\d+m\x7F)${ut}(?=[[\]<>"\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 dt(a,"ext-link-url",t,s),`[\0${d}f${l}${u}]`):(new Pe(a,l,u,t,s),`\0${d}w`)})}}}),pa,Ml=m({"src/link/category.ts"(){"use strict";Et(),pa=class extends ce{get type(){return"category"}get sortkey(){}json(e,t=this.getAbsoluteIndex()){}}}}),ca={};M(ca,{parseLinks:()=>Hs});var Bi,Hs,Ul=m({"parser/links.ts"(){"use strict";z(),J(),ua(),da(),Bn(),In(),Ml(),Bi=/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(\||\0\d+!\x7F)([\s\S]*)$/u,Hs=(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,g,x;const c=i[u],v=n.exec(c);if(v)[,o,h,g,x]=v,x.startsWith("]")&&(g!=null&&g.includes("["))&&(g+="]",x=x.slice(1));else{const F=Bi.exec(c);F&&(d=!0,[,o,h,g]=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 $=w.startsWith(":");if($&&d){a+=`[[${c}`;continue}else!w&&g&&!g.includes(`
|
|
23
|
+
`)&&(w=Q(g).trim());const{ns:_,valid:C}=H.normalizeTitle(w,0,!1,t,{halfParsed:!0,temporary:!0,decode:!0,selfLink:!0});if(C){if(d){if(_!==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,g+=`[[${f[0]}]]${f[1]}`,x=f.slice(2).join("]]");break}else if(f.length===2)g+=`[[${f[0]}]]${f[1]}`;else{g+=`[[${P}`;break}}if(g=Hs(g,t,s,r),!F){a+=`[[${o}${h}${g}`;continue}}}else{a+=`[[${c}`;continue}g&&(g=or(g,t,s,r));let b=rr;$||(_===6?(g&&(g=ur(g,t,s,!0)),b=sr):_===14&&(b=pa)),g===void 0&&h&&(g=""),a+=`\0${s.length}l${x}`,new b(o,g,t,s,h)}return a}}}),ga={};M(ga,{parseMagicLinks:()=>xa});var ks,Cs,Is,Fs,xa,zl=m({"parser/magicLinks.ts"(){"use strict";z(),ir(),ks=String.raw`[${Ae}\t]| |�*160;|�*a0;`,Cs=`(?:${ks})+`,Is=`(?:${ks}|-)`,Fs=String.raw`(?:RFC|PMID)${Cs}\d+\b|ISBN${Cs}(?:97[89]${Is}?)?(?:\d${Is}?){9}[\dx]\b`,xa=(e,t,s)=>{if(!t.regexMagicLinks)try{t.regexMagicLinks=new RegExp(String.raw`(^|[^\p{L}\p{N}_])(?:(?:${t.protocol})(${ot}${ut})|${Fs})`,"giu")}catch{t.regexMagicLinks=new RegExp(String.raw`(^|\W)(?:(?:${t.protocol})(${ot}${ut})|${Fs})`,"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 dt(a,void 0,t,s),`${n}\0${s.length-1}w${l}`)}else if(!/^(?:RFC|PMID|ISBN)/u.test(a))return r;return new dt(a,"magic-link",t,s),`${n}\0${s.length-1}i`})}}}),fa,Hl=m({"util/html.ts"(){"use strict";fa=(e,t)=>e.startsWith(t)?t.length:[...t].findIndex((s,r)=>s!==e[r])}}),ma,Dl=m({"src/nowiki/list.ts"(){"use strict";ea(),ma=class extends ar{get type(){return"list"}}}}),va={};M(va,{parseList:()=>ba});var ba,Gl=m({"parser/list.ts"(){"use strict";Hl(),Dl(),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),g=h[0].startsWith(";");let x=h.length-(g?0:1);if(o>1){const S=l.slice(0,o-1);if(g){const q=S.split(/(?=;)/u);h.unshift(...q),x+=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(!x)return c;const{html:[v,,w]}=s,$=/:+|-\{|\0\d+[xq]\x7F/gu;let _=$,C=_.exec(c),b=0,F=!1,P=!1,f=0;const A=(S,q)=>(new lr(S,s,r),`${c.slice(0,q)}\0${r.length-1}d${c.slice(q+S.length)}`),y=S=>{S?b&&b--:b++};for(;C&&x;){const{0:S,index:q}=C;if(S==="-{"){if(!f){const{lastIndex:E}=_;_=/-\{|\}-/gu,_.lastIndex=E}f++}else if(S==="}-"){if(f--,!f){const{lastIndex:E}=_;_=$,_.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>=x)return A(S.slice(0,x),q);x-=S.length,_.lastIndex=q+4+String(r.length).length,c=A(S,q)}C=_.exec(c)}return c}}}),Ri,ji,Ns,qi,nt,Vl=m({"src/converterFlags.ts"(){"use strict";var e,t;Pt(),N(),$e(),Ri=new Set(["A","T","R","D","-","H","N"]),ji=[pt()],nt=(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(){k(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=>Ri.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),Ns=W(qi),nt=j(Ns,0,"ConverterFlagsToken",ji,nt),R(Ns,1,nt)}}),$t,Ql=m({"src/converterRule.ts"(){"use strict";J(),N(),$e(),$t=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,Ls,Mi,at,Xl=m({"src/converter.ts"(){"use strict";z(),be(),le(),N(),Vl(),Ql(),Wi=[ne,oe("-{")],at=class extends(Mi=I){get type(){return"converter"}constructor(e,t,s,r=[]){super(void 0,s,r),this.insertAt(new nt(e,s,r));const[n]=t,i=n.includes(":"),a=new $t(n,i,s,r);i&&a.length===1||!i&&t.length===2&&!Q(t[1]).trim()?this.insertAt(new $t(t.join(";"),!1,s,r)):this.append(a,...t.slice(1).map(l=>new $t(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>`}},Ls=W(Mi),at=j(Ls,0,"ConverterToken",Wi,at),R(Ls,1,at)}}),wa={};M(wa,{parseConverter:()=>_a});var _a,Jl=m({"parser/converter.ts"(){"use strict";Xl(),_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:g}=s,x=e.slice(h.index+2,o),c=x.indexOf("|"),[v,w]=c===-1?[[],x]:[x.slice(0,c).split(";"),x.slice(c+1)],$=w.replace(/(&[#a-z\d]+);/giu,"$1"),_=$.split(t.regexConverter).map(C=>C.replace(/\x01/gu,";"));new at(v,_,t,s),e=`${e.slice(0,h.index)}\0${g}v${e.slice(o+2)}`,i.length===0&&(a=r),a.lastIndex=h.index+3+String(g).length}else i.push(l),a=n,a.lastIndex=o+2;l=a.exec(e)}return e}}}),Ct={};M(Ct,{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(),Nt(),Ce(),J(),sl(),rl(),I=(b=class extends Je{constructor(f,A=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),k(this,s,A),k(this,r,y),y.push(this)}get type(){return p(this,e)}set type(f){k(this,e,f)}parseOnce(f=p(this,t),A=!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);A&&(A=!S)}k(this,n,A),O(this,l,ya).call(this,A);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,A,y);return gr(this,t)._++,this}buildFromStr(f,A){const y=f.split(/[\0\x7F]/u).map((S,q)=>{if(q%2===0)return new js(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 A===0?y.map(String).join(""):A===1?ye(y):y}build(){k(this,t,Y);const{length:f,firstChild:A}=this,y=A==null?void 0:A.toString();if(f===1&&A.type==="text"&&y.includes("\0")&&(dr(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();k(this,i,!0)}parse(f=Y,A,y){for(f=Math.min(f,Y);p(this,t)<f;)this.parseOnce(p(this,t),A,y);return f&&(this.build(),this.afterBuild()),this}isPlain(){return this.constructor===b}getAttribute(f){var A;switch(f){case"config":return p(this,s);case"include":return(A=p(this,n))!=null?A:!!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"&&At(this)===2;default:return super.getAttribute(f)}}setAttribute(f,A){switch(f){case"stage":p(this,t)===0&&this.type==="root"&&p(this,r).shift(),k(this,t,A);break;default:super.setAttribute(f,A)}}insertAt(f,A=this.length){const y=typeof f=="string"?new js(f):f;super.insertAt(y,A);const{type:S}=y;return S==="root"&&(y.type="plain"),y}normalizeTitle(f,A=0,y){return H.normalizeTitle(f,A,p(this,n),p(this,s),y)}inTableAttrs(){var f,A;return((f=this.closest("table-attrs,ext"))==null?void 0:f.type)==="table-attrs"&&((A=this.closest("table-attrs,arg,magic-word,template"))!=null&&A.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(),A){}toString(f,A){return f?super.toString(!0,A):Ft(p(this,a),()=>super.toString(!1,A),y=>{const S=this.getRootNode();S.type==="root"&&p(S,i)&&k(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(),B(rn)),A=this.firstChild.toString(),y=f(A,p(this,s),p(this,r));return y&&this.setText(y),!!y},ya=function(f){const{parseCommentAndExt:A}=(qt(),B(Qn));this.setText(A(this.firstChild.toString(),p(this,s),p(this,r),f))},Sa=function(){const{parseBraces:f}=(tr(),B(An)),A=this.type==="root"?this.firstChild.toString():`\0${this.firstChild.toString()}`,y=f(A,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}=(Nl(),B(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}=(Ol(),B(sa));this.setText(f(this,p(this,s),p(this,r)))},ka=function(){if(p(this,s).excludes.includes("hr"))return;const{parseHrAndDoubleUnderscore:f}=(ql(),B(na));this.setText(f(this,p(this,s),p(this,r)))},Ca=function(f){const{parseLinks:A}=(Ul(),B(ca));this.setText(A(this.firstChild.toString(),p(this,s),p(this,r),f))},Ia=function(f){if(p(this,s).excludes.includes("quote"))return;const{parseQuotes:A}=(ua(),B(oa)),y=this.firstChild.toString().split(`
|
|
24
|
+
`);for(let S=0;S<y.length;S++)y[S]=A(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(),B(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}=(zl(),B(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}=(Gl(),B(va)),{firstChild:A,type:y,name:S}=this,q=A.toString().split(`
|
|
26
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}=(
|
|
27
|
+
`))},Ea=function(){if(p(this,s).variants.length>0){const{parseConverter:f}=(Jl(),B(wa));this.setText(f(this.firstChild.toString(),p(this,s),p(this,r)))}},b)}}),xe,hr,dr,Ce=m({"util/debug.ts"(){"use strict";xe={running:!1,run(e){const{running:t}=this;this.running=!0;try{const{Token:s}=(N(),B(Ct)),r=e();return r instanceof s&&!r.getAttribute("built")&&r.afterBuild(),this.running=t,r}catch(s){throw this.running=t,s}},rev:0},hr=e=>t=>t.type===e,dr=(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,Kl=m({"lib/title.ts"(){"use strict";var e,t,s,r,n,i;It(),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 g=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=Os(a).replace(/[_ ]+/gu," ").trim(),g)k(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]),$=Object.prototype.hasOwnProperty.call(u.nsid,w)&&u.nsid[w];$&&(c=$,a=v.slice(1).join(":").trim())}k(this,r,c)}const x=a.indexOf("#");if(x!==-1){let c=a.slice(x).trim().slice(1);if(c.includes("%"))try{c=Rs(c)}catch{}k(this,n,c.replace(/ /gu,"_")),a=a.slice(0,x).trim()}this.valid=!!(a||h&&this.ns===0&&p(this,n)!==void 0)&&Os(a)===a&&!/^:|\0\d+[eh!+-]\x7F|[<>[\]{}|\n]|%[\da-f]{2}|(?:^|\/)\.{1,2}(?:$|\/)/iu.test(g?/^(?:\.\.\/)+(.*)/u.exec(a)[1]:a),this.main=a,k(this,t,u.namespaces),k(this,s,u.articlePath||"/wiki/$1"),p(this,s).includes("$1")||k(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(),k(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){k(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)}}),Ba={};M(Ba,{default:()=>H});Ra.exports=B(Ba);var _t,de,Es,Ui,H,J=m({"index.ts"(){Ce(),fe(),z(),_t=!0,de={config:Bs,get rules(){},get i18n(){},set i18n(e){},get lintConfig(){},set lintConfig(e){},get viewOnly(){return _t},set viewOnly(e){_t&&!e&&xe.rev++,_t=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"),{...Bs,...t,excludes:[]}},msg(e,t=""){},normalizeTitle(e,t=0,s,r=de.getConfig(),n){const{Title:i}=(Kl(),B(Pa));let a;if(n!=null&&n.halfParsed)a=new i(e,t,r,n);else{const{Token:l}=(N(),B(Ct));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 g=u.buildFromStr(h,1);o==="main"?d.main=g:d.setFragment(g)}}return d})}return a},parse(e,t,s=Y,r=de.getConfig()){e=Vi(e);let n;const{Token:i}=(N(),B(Ct));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!")}},Es={},Ui=new Set(["lintConfig","normalizeTitle","parse","createLanguageService"]);for(const e in de)Ui.has(e)||(Es[e]={enumerable:!1});Object.defineProperties(de,Es),Object.assign(typeof globalThis=="object"?globalThis:self,{Parser:de}),H=de}});J()});Yl();})();
|
|
28
28
|
//# sourceMappingURL=bundle.min.js.map
|