diff --git a/builds/wtf_wikipedia-client.js b/builds/wtf_wikipedia-client.js index 80f10ad3..4344e24d 100644 --- a/builds/wtf_wikipedia-client.js +++ b/builds/wtf_wikipedia-client.js @@ -1,8 +1,8 @@ -/* wtf_wikipedia 8.4.0 MIT */ +/* wtf_wikipedia 8.5.0 MIT */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : - (global = global || self, global.wtf = factory()); + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.wtf = factory()); }(this, (function () { 'use strict'; var parseUrl = function parseUrl(url) { @@ -8731,13 +8731,21 @@ var makeHeaders = function makeHeaders(options) { var agent = options.userAgent || options['User-Agent'] || options['Api-User-Agent'] || 'User of the wtf_wikipedia library'; + var origin; + + if (options.noOrigin) { + origin = ''; + } else { + origin = options.origin || options.Origin || '*'; + } + var opts = { method: 'GET', headers: { 'Content-Type': 'application/json', 'Api-User-Agent': agent, 'User-Agent': agent, - Origin: '*' + Origin: origin }, redirect: 'follow' }; @@ -8956,7 +8964,7 @@ var category = fetchCategory; - var _version = '8.4.0'; + var _version = '8.5.0'; var wtf = function wtf(wiki, options) { return _01Document(wiki, options); diff --git a/builds/wtf_wikipedia-client.min.js b/builds/wtf_wikipedia-client.min.js index 9ef9a0ba..b2eb64a2 100644 --- a/builds/wtf_wikipedia-client.min.js +++ b/builds/wtf_wikipedia-client.min.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).wtf=t()}(this,(function(){"use strict";var e=function(e){var t=new URL(e),i=t.pathname.replace(/^\/(wiki\/)?/,"");return i=decodeURIComponent(i),{domain:t.host,title:i}};function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var i=[],n=!0,a=!1,r=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(i.push(o.value),!t||i.length!==t);n=!0);}catch(e){a=!0,r=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw r}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return n(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return n(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);iObject.keys(t.data).length?-1:1})),"number"==typeof e?t[e]:t},text:function(e){return e=p(e,j),!0===this.isRedirect()?"":this.sections().map((function(t){return t.text(e)})).join("\n\n")},json:function(e){return e=p(e,j),d(this,e)},debug:function(){return console.log("\n"),this.sections().forEach((function(e){for(var t=" - ",i=0;i500)&&M.test(e)},U=function(e){var t=e.match(M);return t&&t[2]?(P(t[2])||[])[0]:{}},F=["table","code","score","data","categorytree","charinsert","hiero","imagemap","inputbox","nowiki","poem","references","source","syntaxhighlight","timeline"],K="< ?(".concat(F.join("|"),") ?[^>]{0,200}?>"),B="< ?/ ?(".concat(F.join("|"),") ?>"),W=new RegExp("".concat(K,"[").concat("\\s\\S","]+?").concat(B),"ig"),Y=function(e){return(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(W," ")).replace(/ ?< ?(span|div|table|data) [a-zA-Z0-9=%\.#:;'" ]{2,100}\/? ?> ?/g," ")).replace(/ ?< ?(ref) [a-zA-Z0-9=" ]{2,100}\/ ?> ?/g," ")).replace(/(.*?)<\/i>/g,"''$1''")).replace(/(.*?)<\/b>/g,"'''$1'''")).replace(/(.*?)<\/sub>/g,"{{sub|$1}}")).replace(/(.*?)<\/sup>/g,"{{sup|$1}}")).replace(/ ?<[ \/]?(p|sub|sup|span|nowiki|div|table|br|tr|td|th|pre|pre2|hr)[ \/]?> ?/g," ")).replace(/ ?<[ \/]?(abbr|bdi|bdo|blockquote|cite|del|dfn|em|ins|kbd|mark|q|s|small)[ \/]?> ?/g," ")).replace(/ ?<[ \/]?h[0-9][ \/]?> ?/g," ")).replace(/ ?< ?br ?\/> ?/g,"\n")).trim()};var Z=function(e){var t=e.wiki;t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace(//g,"")).replace(/__(NOTOC|NOEDITSECTION|FORCETOC|TOC)__/gi,"")).replace(/~~{1,3}/g,"")).replace(/\r/g,"")).replace(/\u3002/g,". ")).replace(/----/g,"")).replace(/\{\{\}\}/g," – ")).replace(/\{\{\\\}\}/g," / ")).replace(/ /g," "),t=(t=(t=Y(t)).replace(/\([,;: ]+?\)/g,"")).replace(/{{(baseball|basketball) (primary|secondary) (style|color).*?\}\}/i,""),e.wiki=t},G=/[\\\.$]/,H=function(e){return"string"!=typeof e&&(e=""),e=(e=(e=e.replace(/\\/g,"\\\\")).replace(/^\$/,"\\u0024")).replace(/\./g,"\\u002e")},V=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.keys(e),i=0;i0&&(i.paragraphs=n)}if(!0===t.images){var a=e.images().map((function(e){return e.json(t)}));a.length>0&&(i.images=a)}if(!0===t.tables){var r=e.tables().map((function(e){return e.json(t)}));r.length>0&&(i.tables=r)}if(!0===t.templates){var o=e.templates();o.length>0&&(i.templates=o,!0===t.encode&&i.templates.forEach((function(e){return V(e)})))}if(!0===t.infoboxes){var s=e.infoboxes().map((function(e){return e.json(t)}));s.length>0&&(i.infoboxes=s)}if(!0===t.lists){var c=e.lists().map((function(e){return e.json(t)}));c.length>0&&(i.lists=c)}if(!0===t.references||!0===t.citations){var u=e.references().map((function(e){return e.json(t)}));u.length>0&&(i.references=u)}return!0===t.sentences&&(i.sentences=e.sentences().map((function(e){return e.json(t)}))),i},X={tables:!0,references:!0,paragraphs:!0,templates:!0,infoboxes:!0},ee=function(e){this.depth=e.depth,this.doc=null,this._title=e.title||"",Object.defineProperty(this,"doc",{enumerable:!1,value:null}),e.templates=e.templates||[],Object.defineProperty(this,"data",{enumerable:!1,value:e})},te={title:function(){return this._title||""},index:function(){if(!this.doc)return null;var e=this.doc.sections().indexOf(this);return-1===e?null:e},indentation:function(){return this.depth},sentences:function(e){var t=this.paragraphs().reduce((function(e,t){return e.concat(t.sentences())}),[]);return"number"==typeof e?t[e]:t||[]},paragraphs:function(e){var t=this.data.paragraphs||[];return"number"==typeof e?t[e]:t||[]},paragraph:function(e){var t=this.data.paragraphs||[];return"number"==typeof e?t[e]:t[0]},links:function(e){var t=[];if(this.infoboxes().forEach((function(i){i.links(e).forEach((function(e){return t.push(e)}))})),this.sentences().forEach((function(i){i.links(e).forEach((function(e){return t.push(e)}))})),this.tables().forEach((function(i){i.links(e).forEach((function(e){return t.push(e)}))})),this.lists().forEach((function(i){i.links(e).forEach((function(e){return t.push(e)}))})),"number"==typeof e)return t[e];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);var i=t.find((function(t){return t.page()===e}));return void 0===i?[]:[i]}return t},tables:function(e){var t=this.data.tables||[];return"number"==typeof e?t[e]:t},templates:function(e){var t=this.data.templates||[];return t=t.map((function(e){return e.json()})),"number"==typeof e?t[e]:"string"==typeof e?(e=e.toLowerCase(),t.filter((function(t){return t.template===e||t.name===e}))):t},infoboxes:function(e){var t=this.data.infoboxes||[];return"number"==typeof e?t[e]:t},coordinates:function(e){var t=[].concat(this.templates("coord"),this.templates("coor"));return"number"==typeof e?t[e]?t[e]:[]:t},lists:function(e){var t=[];return this.paragraphs().forEach((function(e){t=t.concat(e.lists())})),"number"==typeof e?t[e]:t},interwiki:function(e){var t=[];return this.paragraphs().forEach((function(e){t=t.concat(e.interwiki())})),"number"==typeof e?t[e]:t||[]},images:function(e){var t=[];return this.paragraphs().forEach((function(e){t=t.concat(e.images())})),"number"==typeof e?t[e]:t||[]},references:function(e){var t=this.data.references||[];return"number"==typeof e?t[e]:t},remove:function(){if(!this.doc)return null;var e={};e[this.title()]=!0,this.children().forEach((function(t){return e[t.title()]=!0}));var t=this.doc.data.sections;return t=t.filter((function(t){return!0!==e.hasOwnProperty(t.title())})),this.doc.data.sections=t,this.doc},nextSibling:function(){if(!this.doc)return null;for(var e=this.doc.sections(),t=this.index()+1;tthis.depth)for(var a=i+1;athis.depth;a+=1)n.push(t[a]);return"string"==typeof e?(e=e.toLowerCase(),n.find((function(t){return t.title().toLowerCase()===e}))):"number"==typeof e?n[e]:n},parent:function(){if(!this.doc)return null;for(var e=this.doc.sections(),t=this.index();t>=0;t-=1)if(e[t]&&e[t].depth0&&(e.fmt=e.fmt||{},e.fmt.bold=t),i.length>0&&(e.fmt=e.fmt||{},e.fmt.italic=i),e},le=/^[0-9,.]+$/,pe={text:!0,links:!0,formatting:!0,numbers:!0},me=function(e,t){t=p(t,pe);var i={},n=e.text();if(!0===t.text&&(i.text=n),!0===t.numbers&&le.test(n)){var a=Number(n.replace(/,/g,""));!1===isNaN(a)&&(i.number=a)}return t.links&&e.links().length>0&&(i.links=e.links().map((function(e){return e.json()}))),t.formatting&&e.data.fmt&&(i.formatting=e.data.fmt),i},de=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},fe={links:function(e){var t=this.data.links||[];if("number"==typeof e)return t[e];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);var i=t.find((function(t){return t.page===e}));return void 0===i?[]:[i]}return t},interwiki:function(e){var t=this.links().filter((function(e){return void 0!==e.wiki}));return"number"==typeof e?t[e]:t},bolds:function(e){var t=[];return this.data&&this.data.fmt&&this.data.fmt.bold&&(t=this.data.fmt.bold||[]),"number"==typeof e?t[e]:t},italics:function(e){var t=[];return this.data&&this.data.fmt&&this.data.fmt.italic&&(t=this.data.fmt.italic||[]),"number"==typeof e?t[e]:t},dates:function(e){var t=[];return"number"==typeof e?t[e]:t},text:function(e){return void 0!==e&&"string"==typeof e&&(this.data.text=e),this.data.text||""},json:function(e){return me(this,e)}};Object.keys(fe).forEach((function(e){de.prototype[e]=fe[e]})),de.prototype.italic=de.prototype.italics,de.prototype.bold=de.prototype.bolds,de.prototype.plaintext=de.prototype.text;var ge=de,he=["ad","adj","adm","adv","al","alta","approx","apr","apt","arc","ariz","assn","asst","atty","aug","ave","ba","bc","bl","bldg","blvd","brig","bros","ca","cal","calif","capt","cca","cg","cl","cm","cmdr","co","col","colo","comdr","conn","corp","cpl","cres","ct","cyn","dak","dec","def","dept","det","dg","dist","dl","dm","dr","ea","eg","eng","esp","esq","est","etc","ex","exp","feb","fem","fig","fl oz","fl","fla","fm","fr","ft","fy","ga","gal","gb","gen","gov","hg","hon","hr","hrs","hwy","hz","ia","ida","ie","inc","inf","jan","jd","jr","jul","jun","kan","kans","kb","kg","km","kmph","lat","lb","lit","llb","lm","lng","lt","ltd","lx","ma","maj","mar","masc","mb","md","messrs","mg","mi","min","minn","misc","mister","ml","mlle","mm","mme","mph","mps","mr","mrs","ms","mstr","mt","neb","nebr","nee","no","nov","oct","okla","ont","op","ord","oz","pa","pd","penn","penna","phd","pl","pp","pref","prob","prof","pron","ps","psa","pseud","pt","pvt","qt","que","rb","rd","rep","reps","res","rev","sask","sec","sen","sens","sep","sept","sfc","sgt","sir","situ","sq ft","sq","sr","ss","st","supt","surg","tb","tbl","tbsp","tce","td","tel","temp","tenn","tex","tsp","univ","usafa","ut","va","vb","ver","vet","vitro","vivo","vol","vs","vt","wis","wisc","wr","wy","wyo","yb","µg"].concat("[^]][^]]"),be=new RegExp("(^| |')("+he.join("|")+")[.!?] ?$","i"),ke=new RegExp("[ |.|'|[][A-Z].? *?$","i"),we=new RegExp("\\.\\.\\.* +?$"),ve=/ c\. $/,ye=new RegExp("[a-zа-яぁ-ゟ][a-zа-яぁ-ゟ゠-ヿ]","iu"),xe=function(e){var t=[],i=[];if(!e||"string"!=typeof e||0===e.trim().length)return t;for(var n=function(e){var t=e.split(/(\n+)/);return function(e){var t=[];return e.forEach((function(e){t=t.concat(e)})),t}(t=(t=t.filter((function(e){return e.match(/\S/)}))).map((function(e){return e.split(/(\S.+?[.!?]"?)(?=\s+|$)/g)})))}(e),a=0;ai.length)return!1;var n=e.match(/"/g);return!(n&&n.length%2!=0&&e.length<900)}(o))?i[s+1]=i[s]+(i[s+1]||""):i[s]&&i[s].length>0&&(t.push(i[s]),i[s]="");return 0===t.length?[e]:t};function $e(e){var t,i={text:e};return ce(i),i.text=(t=(t=(t=i.text).replace(/\([,;: ]*\)/g,"")).replace(/\( *(; ?)+/g,"("),t=(t=ne(t)).replace(/ +\.$/,".")),i=ue(i),new ge(i)}var je=$e,ze=function(e){var t=xe(e.wiki);(t=t.map($e))[0]&&t[0].text()&&":"===t[0].text()[0]&&(t=t.slice(1)),e.sentences=t},Ee=function(e){return e=(e=e.replace(/^\{\{/,"")).replace(/\}\}$/,"")},Oe=function(e){return e=(e=(e=(e||"").trim()).toLowerCase()).replace(/_/g," ")},_e=function(e){var t=e.split(/\n?\|/);t.forEach((function(e,i){null!==e&&(/\[\[[^\]]+$/.test(e)||/\{\{[^\}]+$/.test(e)||e.split("{{").length!==e.split("}}").length||e.split("[[").length!==e.split("]]").length)&&(t[i+1]=t[i]+"|"+t[i+1],t[i]=null)}));for(var i=(t=(t=t.filter((function(e){return null!==e}))).map((function(e){return(e||"").trim()}))).length-1;i>=0;i-=1){""===t[i]&&t.pop();break}return t},Se=/^[ '-\)\x2D\.0-9_a-z\xC0-\xFF\u0153\u017F\u1E9E\u212A\u212B]+=/i,Ce={template:!0,list:!0,prototype:!0},qe=function(e,t){var i=0;return e.reduce((function(e,n){if(n=(n||"").trim(),!0===Se.test(n)){var a=function(e){var t=e.split("="),i=t[0]||"";i=i.toLowerCase().trim();var n=t.slice(1).join("=");return Ce.hasOwnProperty(i)&&(i="_"+i),{key:i,val:n.trim()}}(n);if(a.key)return e[a.key]=a.val,e}t&&t[i]?e[t[i]]=n:(e.list=e.list||[],e.list.push(n));return i+=1,e}),{})},Ne={classname:!0,style:!0,align:!0,margin:!0,left:!0,break:!0,boxsize:!0,framestyle:!0,item_style:!0,collapsible:!0,list_style_type:!0,"list-style-type":!0,colwidth:!0},Ae=function(e){return Object.keys(e).forEach((function(t){!0===Ne[t.toLowerCase()]&&delete e[t],null!==e[t]&&""!==e[t]||delete e[t]})),e},Le=je,De=function(e,t){var i=Le(e);return"json"===t?i.json():"raw"===t?i:i.text()},Ie=function(e,t,i){t=t||[],e=Ee(e||"");var n=_e(e),a=n.shift(),r=qe(n,t);return(r=Ae(r))[1]&&t[0]&&!1===r.hasOwnProperty(t[0])&&(r[t[0]]=r[1],delete r[1]),Object.keys(r).forEach((function(e){r[e]="list"!==e?De(r[e],i):r[e].map((function(e){return De(e,i)}))})),a&&(r.template=Oe(a)),r},Te=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},Pe={title:function(){var e=this.data;return e.title||e.encyclopedia||e.author||""},links:function(e){var t=[];if("number"==typeof e)return t[e];if("number"==typeof e)return t[e];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);var i=t.find((function(t){return t.page()===e}));return void 0===i?[]:[i]}return t||[]},text:function(){return""},json:function(){return this.data}};Object.keys(Pe).forEach((function(e){Te.prototype[e]=Pe[e]}));var Me=Te,Re=je,Ue=function(e){return/^ *?\{\{ *?(cite|citation)/i.test(e)&&/\}\} *?$/.test(e)&&!1===/citation needed/i.test(e)},Fe=function(e){var t=Ie(e);return t.type=t.template.replace(/cite /,""),t.template="citation",t},Ke=function(e){return{template:"citation",type:"inline",data:{},inline:Re(e)||{}}},Be=function(e){var t=[],i=e.wiki;i=(i=(i=(i=i.replace(/ ?([\s\S]{0,1800}?)<\/ref> ?/gi,(function(e,n){if(Ue(n)){var a=Fe(n);a&&t.push(a),i=i.replace(n,"")}else t.push(Ke(n));return" "}))).replace(/ ?]{0,200}?\/> ?/gi," ")).replace(/ ?]{0,200}?>([\s\S]{0,1800}?)<\/ref> ?/gi,(function(e,n){if(Ue(n)){var a=Fe(n);a&&t.push(a),i=i.replace(n,"")}else t.push(Ke(n));return" "}))).replace(/ ?<[ \/]?[a-z0-9]{1,8}[a-z0-9=" ]{2,20}[ \/]?> ?/g," "),e.references=t.map((function(e){return new Me(e)})),e.wiki=i},We=je,Ye=/^(={1,5})(.{1,200}?)={1,5}$/,Ze=function(e,t){var i=t.match(Ye);if(!i)return e.title="",e.depth=0,e;var n=i[2]||"",a={wiki:n=(n=We(n).text()).replace(/\{\{.+?\}\}/,"")};Be(a),n=ne(n=a.wiki);var r=0;return i[1]&&(r=i[1].length-2),e.title=n,e.depth=r,e},Ge=function(e){var t=[],i=[];e=function(e){return e=e.filter((function(e){return e&&!0!==/^\|\+/.test(e)})),!0===/^{\|/.test(e[0])&&e.shift(),!0===/^\|}/.test(e[e.length-1])&&e.pop(),!0===/^\|-/.test(e[0])&&e.shift(),e}(e);for(var n=0;n0&&(t.push(i),i=[]):(!(a=a.split(/(?:\|\||!!)/))[0]&&a[1]&&a.shift(),a.forEach((function(e){e=(e=e.replace(/^\| */,"")).trim(),i.push(e)})))}return i.length>0&&t.push(i),t},He=/.*rowspan *?= *?["']?([0-9]+)["']?[ \|]*/,Ve=/.*colspan *?= *?["']?([0-9]+)["']?[ \|]*/,Je=function(e){return e=function(e){return e.forEach((function(t,i){t.forEach((function(n,a){var r=n.match(He);if(null!==r){var o=parseInt(r[1],10);n=n.replace(He,""),t[a]=n;for(var s=i+1;s0}))}(e))},Qe=je,Xe=/^!/,et={name:!0,age:!0,born:!0,date:!0,year:!0,city:!0,country:!0,population:!0,count:!0,number:!0},tt=function(e){return(e=Qe(e).text()).match(/\|/)&&(e=e.replace(/.+\| ?/,"")),e=(e=(e=e.replace(/style=['"].*?["']/,"")).replace(/^!/,"")).trim()},it=function(e){return(e=e||[]).length-e.filter((function(e){return e})).length>3},nt=function(e){if(e.length<=3)return[];var t=e[0].slice(0);t=t.map((function(e){return e=e.replace(/^\! */,""),e=Qe(e).text(),e=(e=tt(e)).toLowerCase()}));for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:[],t=[];it(e[0])&&e.shift();var i=e[0];return i&&i[0]&&i[1]&&(/^!/.test(i[0])||/^!/.test(i[1]))&&(t=i.map((function(e){return e=e.replace(/^\! */,""),e=tt(e)})),e.shift()),(i=e[0])&&i[0]&&i[1]&&/^!/.test(i[0])&&/^!/.test(i[1])&&(i.forEach((function(e,i){e=e.replace(/^\! */,""),e=tt(e),!0===Boolean(e)&&(t[i]=e)})),e.shift()),t}(i=Je(i));if(!n||n.length<=1){n=nt(i);var a=i[i.length-1]||[];n.length<=1&&a.length>2&&(n=nt(i.slice(1))).length>0&&(i=i.slice(2))}return i.map((function(e){return function(e,t){var i={};return e.forEach((function(e,n){var a=t[n]||"col"+(n+1),r=Qe(e);r.text(tt(r.text())),i[a]=r})),i}(e,n)}))},rt=function(e,t){return e.map((function(e){var i={};return Object.keys(e).forEach((function(t){i[t]=e[t].json()})),!0===t.encode&&(i=V(i)),i}))},ot={},st=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},ct={links:function(e){var t=[];if(this.data.forEach((function(e){Object.keys(e).forEach((function(i){t=t.concat(e[i].links())}))})),"number"==typeof e)return t[e];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);var i=t.find((function(t){return t.page()===e}));return void 0===i?[]:[i]}return t},keyValue:function(e){var t=this.json(e);return t.forEach((function(e){Object.keys(e).forEach((function(t){e[t]=e[t].text}))})),t},json:function(e){return e=p(e,ot),rt(this.data,e)},text:function(){return""}};ct.keyvalue=ct.keyValue,ct.keyval=ct.keyValue,Object.keys(ct).forEach((function(e){st.prototype[e]=ct[e]}));var ut=st,lt=/^\s*{\|/,pt=/^\s*\|}/,mt=function(e){for(var t=[],i=e.wiki,n=i.split("\n"),a=[],r=0;r0&&(a[a.length-1]+="\n"+n[r]);else{a[a.length-1]+="\n"+n[r];var o=a.pop();t.push(o)}else a.push(n[r]);var s=[];t.forEach((function(e){if(e){i=(i=i.replace(e+"\n","")).replace(e,"");var t=at(e);t&&t.length>0&&s.push(new ut(t))}})),s.length>0&&(e.tables=s),e.wiki=i},dt={sentences:!0},ft=function(e,t){var i={};return!0===(t=p(t,dt)).sentences&&(i.sentences=e.sentences().map((function(e){return e.json(t)}))),i},gt={sentences:!0,lists:!0,images:!0},ht=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},bt={sentences:function(e){return"number"==typeof e?this.data.sentences[e]:this.data.sentences||[]},references:function(e){return"number"==typeof e?this.data.references[e]:this.data.references},lists:function(e){return"number"==typeof e?this.data.lists[e]:this.data.lists},images:function(e){return"number"==typeof e?this.data.images[e]:this.data.images||[]},links:function(e){var t=[];if(this.sentences().forEach((function(i){t=t.concat(i.links(e))})),"number"==typeof e)return t[e];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);var i=t.find((function(t){return t.page()===e}));return void 0===i?[]:[i]}return t||[]},interwiki:function(e){var t=[];return this.sentences().forEach((function(e){t=t.concat(e.interwiki())})),"number"==typeof e?t[e]:t||[]},text:function(e){e=p(e,gt);var t=this.sentences().map((function(t){return t.text(e)})).join(" ");return this.lists().forEach((function(e){t+="\n"+e.text()})),t},json:function(e){return e=p(e,gt),ft(this,e)}};bt.citations=bt.references,Object.keys(bt).forEach((function(e){ht.prototype[e]=bt[e]}));var kt=ht;var wt=function(e){for(var t=[],i=[],n=e.split(""),a=0,r=0;r0){for(var s=0,c=0,u=0;uc&&i.push("]"),t.push(i.join("")),i=[]}}return t},vt=je,yt=new RegExp("("+_.images.join("|")+"):","i"),xt="(".concat(_.images.join("|"),")"),$t=new RegExp(xt+":(.+?)[\\||\\]]","iu"),jt={thumb:!0,thumbnail:!0,border:!0,right:!0,left:!0,center:!0,top:!0,bottom:!0,none:!0,upright:!0,baseline:!0,middle:!0,sub:!0,super:!0},zt=function(e,t){var i=e.wiki;wt(i).forEach((function(n){if(!0===yt.test(n)){e.images=e.images||[];var a=function(e,t){var i=e.match($t);if(null===i||!i[2])return null;var n="".concat(i[1],":").concat(i[2]||""),a=(n=n.trim()).charAt(0).toUpperCase()+n.substring(1);if(a=a.replace(/ /g,"_")){var r={file:n,lang:t.lang,domain:t.domain};e=(e=e.replace(/^\[\[/,"")).replace(/\]\]$/,"");var o=Ie(e),s=o.list||[];return o.alt&&(r.alt=o.alt),(s=s.filter((function(e){return!1===jt.hasOwnProperty(e)})))[s.length-1]&&(r.caption=vt(s[s.length-1])),new $(r)}return null}(n,t);a&&e.images.push(a),i=i.replace(n,"")}})),e.wiki=i},Et={},Ot=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},_t={lines:function(){return this.data},links:function(e){var t=[];if(this.lines().forEach((function(e){t=t.concat(e.links())})),"number"==typeof e)return t[e];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);var i=t.find((function(t){return t.page()===e}));return void 0===i?[]:[i]}return t},json:function(e){return e=p(e,Et),this.lines().map((function(t){return t.json(e)}))},text:function(){return function(e,t){return e.map((function(e){return" * "+e.text(t)})).join("\n")}(this.data)}};Object.keys(_t).forEach((function(e){Ot.prototype[e]=_t[e]}));var St=Ot,Ct=je,qt=/^[#\*:;\|]+/,Nt=/^\*+[^:,\|]{4}/,At=/^ ?\#[^:,\|]{4}/,Lt=/[a-z_0-9\]\}]/i,Dt=function(e){return qt.test(e)||Nt.test(e)||At.test(e)},It=function(e,t){for(var i=[],n=t;n0&&(i.push(r),a+=r.length-1)}else n.push(t[a]);e.lists=i.map((function(e){return new St(e)})),e.wiki=n.join("\n")}},Rt=function(e,t){var i=e.wiki,n=i.split(Pt);n=(n=n.filter((function(e){return e&&e.trim().length>0}))).map((function(e){var i={wiki:e,lists:[],sentences:[],images:[]};return Mt.list(i),Mt.image(i,t),Tt(i),new kt(i)})),e.wiki=i,e.paragraphs=n},Ut=function(e,t){var i=Object.keys(e.data).reduce((function(t,i){return e.data[i]&&(t[i]=e.data[i].json()),t}),{});return!0===t.encode&&(i=V(i)),i},Ft=function(e){return(e=(e=e.toLowerCase()).replace(/[-_]/g," ")).trim()},Kt=function(e){this._type=e.type,this.domain=e.domain,Object.defineProperty(this,"data",{enumerable:!1,value:e.data})},Bt={type:function(){return this._type},links:function(e){var t=this,i=[];if(Object.keys(this.data).forEach((function(e){t.data[e].links().forEach((function(e){return i.push(e)}))})),"number"==typeof e)return i[e];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);var n=i.find((function(t){return t.page()===e}));return void 0===n?[]:[n]}return i},image:function(){var e=this.get("image")||this.get("image2")||this.get("logo");if(!e)return null;var t=e.json();return t.file=t.text,t.text="",t.domain=this.domain,new $(t)},get:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";e=Ft(e);for(var t=Object.keys(this.data),i=0;i0?a++:a=e.indexOf("{",a+1)){var r=e[a];if("{"===r&&(t+=1),t>0){if("}"===r&&0===(t-=1)){n.push(r);var o=n.join("");n=[],/\{\{/.test(o)&&/\}\}/.test(o)&&i.push(o);continue}if(1===t&&"{"!==r&&"}"!==r){t=0,n=[];continue}n.push(r)}}return i},Zt=function(e){var t=null;return(t=/^\{\{[^\n]+\|/.test(e)?(e.match(/^\{\{(.+?)\|/)||[])[1]:-1!==e.indexOf("\n")?(e.match(/^\{\{(.+?)\n/)||[])[1]:(e.match(/^\{\{(.+?)\}\}$/)||[])[1])&&(t=t.replace(/:.*/,""),t=Oe(t)),t||null},Gt=/\{\{/,Ht=function(e){return{body:e=e.replace(/#invoke:/,""),name:Zt(e),children:[]}},Vt=function e(t){var i=t.body.substr(2);return i=i.replace(/\}\}$/,""),t.children=Yt(i),t.children=t.children.map(Ht),0===t.children.length||t.children.forEach((function(t){var i=t.body.substr(2);return Gt.test(i)?e(t):null})),t},Jt=function(e){var t=Yt(e);return t=(t=t.map(Ht)).map(Vt)},Qt=["anchor","defaultsort","use list-defined references","void","pp","pp-move-indef","pp-semi-indef","pp-vandalism","r","#tag","div col","pope list end","shipwreck list end","starbox end","end box","end","s-end"].reduce((function(e,t){return e[t]=!0,e}),{}),Xt=new RegExp("^(subst.)?("+_.infoboxes.join("|")+")[: \n]","i"),ei=/^infobox /i,ti=/ infobox$/i,ii=/$Year in [A-Z]/i,ni={"gnf protein box":!0,"automatic taxobox":!0,"chembox ":!0,editnotice:!0,geobox:!0,hybridbox:!0,ichnobox:!0,infraspeciesbox:!0,mycomorphbox:!0,oobox:!0,"paraphyletic group":!0,speciesbox:!0,subspeciesbox:!0,"starbox short":!0,taxobox:!0,nhlteamseason:!0,"asian games bid":!0,"canadian federal election results":!0,"dc thomson comic strip":!0,"daytona 24 races":!0,edencharacter:!0,"moldova national football team results":!0,samurai:!0,protein:!0,"sheet authority":!0,"order-of-approx":!0,"bacterial labs":!0,"medical resources":!0,ordination:!0,"hockey team coach":!0,"hockey team gm":!0,"pro hockey team":!0,"hockey team player":!0,"hockey team start":!0,mlbbioret:!0},ai=function(e){return!0===ni.hasOwnProperty(e)||(!!Xt.test(e)||(!(!ei.test(e)&&!ti.test(e))||!!ii.test(e)))},ri=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.template.match(Xt),i=e.template;t&&t[0]&&(i=i.replace(t[0],""));var n={template:"infobox",type:i=i.trim(),data:e};return delete n.data.template,delete n.data.list,n},oi=[void 0,"January","February","March","April","May","June","July","August","September","October","November","December"],si=oi.reduce((function(e,t,i){return 0===i||(e[t.toLowerCase()]=i),e}),{}),ci=function(e){return e<10?"0"+e:String(e)},ui=function(e){var t=String(e.year||"");if(void 0!==e.month&&!0===oi.hasOwnProperty(e.month))if(void 0===e.date)t="".concat(oi[e.month]," ").concat(e.year);else{if(t="".concat(oi[e.month]," ").concat(e.date,", ").concat(e.year),void 0!==e.hour&&void 0!==e.minute){var i="".concat(ci(e.hour),":").concat(ci(e.minute));void 0!==e.second&&(i=i+":"+ci(e.second)),t=i+", "+t}e.tz&&(t+=" (".concat(e.tz,")"))}return t},li=function(e){for(var t={},i=["year","month","date","hour","minute","second"],n=0;n0&&(n.years=a,i-=31536e6*n.years);var r=Math.floor(i/2592e6,10);r>0&&(n.months=r,i-=2592e6*n.months);var o=Math.floor(i/mi,10);return o>0&&(n.days=o),n},gi=li,hi=ui,bi=function(e){return{template:"date",data:e}},ki=function(e){var t=(e=Ee(e)).split("|"),i=gi(t.slice(1,4)),n=t.slice(4,7);if(0===n.length){var a=new Date;n=[a.getFullYear(),a.getMonth(),a.getDate()]}return{from:i,to:n=gi(n)}},wi={date:function(e,t){var i=Ie(e,["year","month","date","hour","minute","second","timezone"]),n=gi([i.year,i.month,i.date||i.day]);return i.text=hi(n),i.timezone&&("Z"===i.timezone&&(i.timezone="UTC"),i.text+=" (".concat(i.timezone,")")),i.hour&&i.minute&&(i.second?i.text="".concat(i.hour,":").concat(i.minute,":").concat(i.second,", ")+i.text:i.text="".concat(i.hour,":").concat(i.minute,", ")+i.text),i.text&&t.push(bi(i)),i.text},natural_date:function(e,t){var i=Ie(e,["text"]).text||"",n={};if(/^[0-9]{4}$/.test(i))n.year=parseInt(i,10);else{var a=i.replace(/[a-z]+\/[a-z]+/i,"");a=a.replace(/[0-9]+:[0-9]+(am|pm)?/i,"");var r=new Date(a);!1===isNaN(r.getTime())&&(n.year=r.getFullYear(),n.month=r.getMonth()+1,n.date=r.getDate())}return t.push(bi(n)),i.trim()},one_year:function(e,t){var i=Ie(e,["year"]),n=Number(i.year);return t.push(bi({year:n})),String(n)},two_dates:function(e,t){var i=Ie(e,["b","birth_year","birth_month","birth_date","death_year","death_month","death_date"]);if(i.b&&"b"===i.b.toLowerCase()){var n=gi([i.birth_year,i.birth_month,i.birth_date]);return t.push(bi(n)),hi(n)}var a=gi([i.death_year,i.death_month,i.death_date]);return t.push(bi(a)),hi(a)},age:function(e){var t=ki(e);return fi(t.from,t.to).years||0},"diff-y":function(e){var t=ki(e),i=fi(t.from,t.to);return 1===i.years?i.years+" year":(i.years||0)+" years"},"diff-ym":function(e){var t=ki(e),i=fi(t.from,t.to),n=[];return 1===i.years?n.push(i.years+" year"):i.years&&0!==i.years&&n.push(i.years+" years"),1===i.months?n.push("1 month"):i.months&&0!==i.months&&n.push(i.months+" months"),n.join(", ")},"diff-ymd":function(e){var t=ki(e),i=fi(t.from,t.to),n=[];return 1===i.years?n.push(i.years+" year"):i.years&&0!==i.years&&n.push(i.years+" years"),1===i.months?n.push("1 month"):i.months&&0!==i.months&&n.push(i.months+" months"),1===i.days?n.push("1 day"):i.days&&0!==i.days&&n.push(i.days+" days"),n.join(", ")},"diff-yd":function(e){var t=ki(e),i=fi(t.from,t.to),n=[];return 1===i.years?n.push(i.years+" year"):i.years&&0!==i.years&&n.push(i.years+" years"),i.days+=30*(i.months||0),1===i.days?n.push("1 day"):i.days&&0!==i.days&&n.push(i.days+" days"),n.join(", ")},"diff-d":function(e){var t=ki(e),i=fi(t.from,t.to),n=[];return i.days+=365*(i.years||0),i.days+=30*(i.months||0),1===i.days?n.push("1 day"):i.days&&0!==i.days&&n.push(i.days+" days"),n.join(", ")}},vi=function(e){var t=new Date(e);if(isNaN(t.getTime()))return"";var i=(new Date).getTime()-t.getTime(),n="ago";i<0&&(n="from now",i=Math.abs(i));var a=i/1e3/60/60/24;return a<365?parseInt(a,10)+" days "+n:parseInt(a/365,10)+" years "+n},yi=wi.date,xi=wi.natural_date,$i=["January","February","March","April","May","June","July","August","September","October","November","December"],ji=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],zi=Object.assign({},pi,{currentday:function(){var e=new Date;return String(e.getDate())},currentdayname:function(){var e=new Date;return ji[e.getDay()]},currentmonth:function(){var e=new Date;return $i[e.getMonth()]},currentyear:function(){var e=new Date;return String(e.getFullYear())},monthyear:function(){var e=new Date;return $i[e.getMonth()]+" "+e.getFullYear()},"monthyear-1":function(){var e=new Date;return e.setMonth(e.getMonth()-1),$i[e.getMonth()]+" "+e.getFullYear()},"monthyear+1":function(){var e=new Date;return e.setMonth(e.getMonth()+1),$i[e.getMonth()]+" "+e.getFullYear()},date:0,"time ago":function(e){var t=Ie(e,["date","fmt"]).date;return vi(t)},"birth date and age":function(e,t){var i=Ie(e,["year","month","day"]);return i.year&&/[a-z]/i.test(i.year)?xi(e,t):(t.push(i),i=li([i.year,i.month,i.day]),ui(i))},"birth year and age":function(e,t){var i=Ie(e,["birth_year","birth_month"]);if(i.death_year&&/[a-z]/i.test(i.death_year))return xi(e,t);t.push(i);var n=(new Date).getFullYear()-parseInt(i.birth_year,10);i=li([i.birth_year,i.birth_month]);var a=ui(i);return n&&(a+=" (age ".concat(n,")")),a},"death year and age":function(e,t){var i=Ie(e,["death_year","birth_year","death_month"]);return i.death_year&&/[a-z]/i.test(i.death_year)?xi(e,t):(t.push(i),i=li([i.death_year,i.death_month]),ui(i))},"birth date and age2":function(e,t){var i=Ie(e,["at_year","at_month","at_day","birth_year","birth_month","birth_day"]);return t.push(i),i=li([i.birth_year,i.birth_month,i.birth_day]),ui(i)},"birth based on age as of date":function(e,t){var i=Ie(e,["age","year","month","day"]);t.push(i);var n=parseInt(i.age,10),a=parseInt(i.year,10)-n;return a&&n?"".concat(a," (age ").concat(i.age,")"):"(age ".concat(i.age,")")},"death date and given age":function(e,t){var i=Ie(e,["year","month","day","age"]);t.push(i),i=li([i.year,i.month,i.day]);var n=ui(i);return i.age&&(n+=" (age ".concat(i.age,")")),n},dts:function(e){e=(e=e.replace(/\|format=[ymd]+/i,"")).replace(/\|abbr=(on|off)/i,"");var t=Ie(e,["year","month","date","bc"]);return t.date&&t.month&&t.year?!0===/[a-z]/.test(t.month)?[t.month,t.date,t.year].join(" "):[t.year,t.month,t.date].join("-"):t.month&&t.year?[t.year,t.month].join("-"):t.year?(t.year<0&&(t.year=Math.abs(t.year)+" BC"),t.year):""},start:yi,end:yi,birth:yi,death:yi,"start date":yi,"end date":yi,"birth date":yi,"death date":yi,"start date and age":yi,"end date and age":yi,"start-date":xi,"end-date":xi,"birth-date":xi,"death-date":xi,"birth-date and age":xi,"birth-date and given age":xi,"death-date and age":xi,"death-date and given age":xi,birthdeathage:wi.two_dates,dob:yi,age:wi.age,"age nts":wi.age,"age in years":wi["diff-y"],"age in years and months":wi["diff-ym"],"age in years, months and days":wi["diff-ymd"],"age in years and days":wi["diff-yd"],"age in days":wi["diff-d"]});zi.localday=zi.currentday,zi.localdayname=zi.currentdayname,zi.localmonth=zi.currentmonth,zi.localyear=zi.currentyear,zi.currentmonthname=zi.currentmonth,zi.currentmonthabbrev=zi.currentmonth,zi["death date and age"]=zi["birth date and age"],zi.bda=zi["birth date and age"],zi["birth date based on age at death"]=zi["birth based on age as of date"];var Ei=zi,Oi={tag:function(e){var t=Ie(e,["tag","open"]);return t.open&&"pair"!==t.open?"":{span:!0,div:!0,p:!0}[t.tag]?t.content||"":"<".concat(t.tag," ").concat(t.attribs||"",">").concat(t.content||"","")},plural:function(e){e=e.replace(/plural:/,"plural|");var t=Ie(e,["num","word"]),i=Number(t.num),n=t.word;return 1!==i&&(/.y$/.test(n)?n=n.replace(/y$/,"ies"):n+="s"),i+" "+n},"first word":function(e){var t=Ie(e,["text"]),i=t.text;return t.sep?i.split(t.sep)[0]:i.split(" ")[0]},trunc:function(e){var t=Ie(e,["str","len"]);return t.str.substr(0,t.len)},"str mid":function(e){var t=Ie(e,["str","start","end"]),i=parseInt(t.start,10)-1,n=parseInt(t.end,10);return t.str.substr(i,n)},p1:0,p2:1,p3:2,braces:function(e){var t=Ie(e,["text"]),i="";return t.list&&(i="|"+t.list.join("|")),"{{"+(t.text||"")+i+"}}"},nobold:0,noitalic:0,nocaps:0,syntaxhighlight:function(e,t){var i=Ie(e);return t.push(i),i.code||""},samp:function(e,t){var i=Ie(e,["1"]);return t.push(i),i[1]||""},vanchor:0,resize:1,ra:function(e){var t=Ie(e,["hours","minutes","seconds"]);return[t.hours||0,t.minutes||0,t.seconds||0].join(":")},deg2hms:function(e){return(Ie(e,["degrees"]).degrees||"")+"°"},hms2deg:function(e){var t=Ie(e,["hours","minutes","seconds"]);return[t.hours||0,t.minutes||0,t.seconds||0].join(":")},decdeg:function(e){var t=Ie(e,["deg","min","sec","hem","rnd"]);return(t.deg||t.degrees)+"°"},rnd:0,dec:function(e){var t=Ie(e,["degrees","minutes","seconds"]),i=(t.degrees||0)+"°";return t.minutes&&(i+=t.minutes+"′"),t.seconds&&(i+=t.seconds+"″"),i},val:function(e){var t=Ie(e,["number","uncertainty"]),i=t.number;i&&Number(i)&&(i=Number(i).toLocaleString());var n=i||"";return t.p&&(n=t.p+n),t.s&&(n=t.s+n),(t.u||t.ul||t.upl)&&(n=n+" "+(t.u||t.ul||t.upl)),n},sub:function(e,t){var i=Ie(e,["text"]);return t.push(i),i.text||""},sup:function(e,t){var i=Ie(e,["text"]);return t.push(i),i.text||""}};Oi.rndfrac=Oi.rnd,Oi.rndnear=Oi.rnd,Oi["unité"]=Oi.val;["nowrap","nobr","big","cquote","pull quote","small","smaller","midsize","larger","big","kbd","bigger","large","mono","strongbad","stronggood","huge","xt","xt2","!xt","xtn","xtd","dc","dcr","mxt","!mxt","mxtn","mxtd","bxt","!bxt","bxtn","bxtd","delink","pre","var","mvar","pre2","code"].forEach((function(e){Oi[e]=function(e){return Ie(e,["text"]).text||""}}));var _i=Oi,Si={plainlist:function(e){var t=(e=Ee(e)).split("|");return e=(t=t.slice(1)).join("|"),(t=(t=e.split(/\n ?\* ?/)).filter((function(e){return e}))).join("\n\n")},"collapsible list":function(e,t){var i=Ie(e);t.push(i);var n="";if(i.title&&(n+="'''".concat(i.title,"'''")+"\n\n"),!i.list){i.list=[];for(var a=1;a<10;a+=1)i[a]&&(i.list.push(i[a]),delete i[a])}return i.list=i.list.filter((function(e){return e})),n+=i.list.join("\n\n")},"ordered list":function(e,t){var i=Ie(e);return t.push(i),i.list=i.list||[],i.list.map((function(e,t){return"".concat(t+1,". ").concat(e)})).join("\n\n")},hlist:function(e){var t=Ie(e);return t.list=t.list||[],t.list.join(" · ")},pagelist:function(e){return(Ie(e).list||[]).join(", ")},catlist:function(e){return(Ie(e).list||[]).join(", ")},"br separated entries":function(e){return(Ie(e).list||[]).join("\n\n")},"comma separated entries":function(e){return(Ie(e).list||[]).join(", ")},"anchored list":function(e){var t=Ie(e).list||[];return(t=t.map((function(e,t){return"".concat(t+1,". ").concat(e)}))).join("\n\n")},"bulleted list":function(e){var t=Ie(e).list||[];return(t=(t=t.filter((function(e){return e}))).map((function(e){return"• "+e}))).join("\n\n")},"columns-list":function(e,t){var i=((Ie(e).list||[])[0]||"").split(/\n/);return i=(i=i.filter((function(e){return e}))).map((function(e){return e.replace(/\*/,"")})),t.push({template:"columns-list",list:i}),(i=i.map((function(e){return"• "+e}))).join("\n\n")}};Si.flatlist=Si.plainlist,Si.ublist=Si.plainlist,Si["unbulleted list"]=Si["collapsible list"],Si.ubl=Si["collapsible list"],Si["bare anchored list"]=Si["anchored list"],Si["plain list"]=Si.plainlist,Si.cmn=Si["columns-list"],Si.collist=Si["columns-list"],Si["col-list"]=Si["columns-list"],Si.columnslist=Si["columns-list"];var Ci=Si,qi={convert:function(e){var t=Ie(e,["num","two","three","four"]);return"-"===t.two||"to"===t.two||"and"===t.two?t.four?"".concat(t.num," ").concat(t.two," ").concat(t.three," ").concat(t.four):"".concat(t.num," ").concat(t.two," ").concat(t.three):"".concat(t.num," ").concat(t.two)},term:function(e){var t=Ie(e,["term"]);return"".concat(t.term,":")},defn:0,lino:0,linum:function(e){var t=Ie(e,["num","text"]);return"".concat(t.num,". ").concat(t.text)},ill:function(e){return Ie(e,["text","lan1","text1","lan2","text2"]).text},frac:function(e){var t=Ie(e,["a","b","c"]);return t.c?"".concat(t.a," ").concat(t.b,"/").concat(t.c):t.b?"".concat(t.a,"/").concat(t.b):"1/".concat(t.b)},height:function(e,t){var i=Ie(e);t.push(i);var n=[];return["m","cm","ft","in"].forEach((function(e){!0===i.hasOwnProperty(e)&&n.push(i[e]+e)})),n.join(" ")},"block indent":function(e){var t=Ie(e);return t[1]?"\n"+t[1]+"\n":""},quote:function(e,t){var i=Ie(e,["text","author"]);if(t.push(i),i.text){var n='"'.concat(i.text,'"');return i.author&&(n+="\n\n",n+=" - ".concat(i.author)),n+"\n"}return""},lbs:function(e){var t=Ie(e,["text"]);return"[[".concat(t.text," Lifeboat Station|").concat(t.text,"]]")},lbc:function(e){var t=Ie(e,["text"]);return"[[".concat(t.text,"-class lifeboat|").concat(t.text,"-class]]")},lbb:function(e){var t=Ie(e,["text"]);return"[[".concat(t.text,"-class lifeboat|").concat(t.text,"]]")},own:function(e){var t=Ie(e,["author"]),i="Own work";return t.author&&(i+=" by "+t.author),i},sic:function(e,t){var i=Ie(e,["one","two","three"]),n=(i.one||"")+(i.two||"");return"?"===i.one&&(n=(i.two||"")+(i.three||"")),t.push({template:"sic",word:n}),"y"===i.nolink?n:"".concat(n," [sic]")},formatnum:function(e){e=e.replace(/:/,"|");var t=Ie(e,["number"]).number||"";return t=t.replace(/,/g,""),Number(t).toLocaleString()||""},"#dateformat":function(e){return e=e.replace(/:/,"|"),Ie(e,["date","format"]).date},lc:function(e){return e=e.replace(/:/,"|"),(Ie(e,["text"]).text||"").toLowerCase()},lcfirst:function(e){e=e.replace(/:/,"|");var t=Ie(e,["text"]).text;return t?t[0].toLowerCase()+t.substr(1):""},uc:function(e){return e=e.replace(/:/,"|"),(Ie(e,["text"]).text||"").toUpperCase()},ucfirst:function(e){e=e.replace(/:/,"|");var t=Ie(e,["text"]).text;return t?t[0].toUpperCase()+t.substr(1):""},padleft:function(e){e=e.replace(/:/,"|");var t=Ie(e,["text","num"]);return(t.text||"").padStart(t.num,t.str||"0")},padright:function(e){e=e.replace(/:/,"|");var t=Ie(e,["text","num"]);return(t.text||"").padEnd(t.num,t.str||"0")},abbr:function(e){return Ie(e,["abbr","meaning","ipa"]).abbr},abbrlink:function(e){var t=Ie(e,["abbr","page"]);return t.page?"[[".concat(t.page,"|").concat(t.abbr,"]]"):"[[".concat(t.abbr,"]]")},h:1,finedetail:0,sort:1};qi["str left"]=qi.trunc,qi["str crop"]=qi.trunc,qi.tooltip=qi.abbr,qi.abbrv=qi.abbr,qi.define=qi.abbr,qi.cvt=qi.convert;var Ni=qi,Ai=Object.assign({},_i,Ci,Ni);var Li=function(e){var t=e.pop(),i=Number(e[0]||0),n=Number(e[1]||0),a=Number(e[2]||0);if("string"!=typeof t||isNaN(i))return null;var r=1;return/[SW]/i.test(t)&&(r=-1),r*(i+n/60+a/3600)},Di=function(e){if("number"!=typeof e)return e;return Math.round(1e5*e)/1e5},Ii={s:!0,w:!0},Ti=function(e){var i=Ie(e);i=function(e){return e.list=e.list||[],e.list=e.list.map((function(t){var i=Number(t);if(!isNaN(i))return i;var n=t.split(/:/);return n.length>1?(e.props=e.props||{},e.props[n[0]]=n.slice(1).join(":"),null):t})),e.list=e.list.filter((function(e){return null!==e})),e}(i);var n,a,r=(n=i.list,a=n.map((function(e){return t(e)})).join("|"),2===n.length&&"number|number"===a?{lat:n[0],lon:n[1]}:4===n.length&&"number|string|number|string"===a?(Ii[n[1].toLowerCase()]&&(n[0]*=-1),"w"===n[3].toLowerCase()&&(n[2]*=-1),{lat:n[0],lon:n[2]}):6===n.length?{lat:Li(n.slice(0,3)),lon:Li(n.slice(3))}:8===n.length?{lat:Li(n.slice(0,4)),lon:Li(n.slice(4))}:{});return i.lat=Di(r.lat),i.lon=Di(r.lon),i.template="coord",delete i.list,i},Pi={coord:function(e,t){var i=Ti(e);return t.push(i),i.display&&-1===i.display.indexOf("inline")?"":"".concat(i.lat||"","°N, ").concat(i.lon||"","°W")},geo:["lat","lon","zoom"]};Pi.coor=Pi.coord,Pi["coor title dms"]=Pi.coord,Pi["coor title dec"]=Pi.coord,Pi["coor dms"]=Pi.coord,Pi["coor dm"]=Pi.coord,Pi["coor dec"]=Pi.coord;var Mi=Pi,Ri={etyl:1,mention:1,link:1,"la-verb-form":0,"la-ipa":0,sortname:function(e){var t=Ie(e,["first","last","target","sort"]),i="".concat(t.first||""," ").concat(t.last||"");return i=i.trim(),t.nolink?t.target||i:(t.dab&&(i+=" (".concat(t.dab,")"),t.target&&(t.target+=" (".concat(t.dab,")"))),t.target?"[[".concat(t.target,"|").concat(i,"]]"):"[[".concat(i,"]]"))}};["lts","t","tfd links","tiw","tltt","tetl","tsetl","ti","tic","tiw","tlt","ttl","twlh","tl2","tlu","demo","hatnote","xpd","para","elc","xtag","mli","mlix","#invoke","url"].forEach((function(e){Ri[e]=function(e){var t=Ie(e,["first","second"]);return t.second||t.first}})),Ri.m=Ri.mention,Ri["m-self"]=Ri.mention,Ri.l=Ri.link,Ri.ll=Ri.link,Ri["l-self"]=Ri.link;var Ui=Ri,Fi={wikt:"wiktionary",commons:"commons",c:"commons",commonscat:"commonscat",n:"wikinews",q:"wikiquote",s:"wikisource",a:"wikiauthor",b:"wikibooks",voy:"wikivoyage",v:"wikiversity",d:"wikidata",species:"wikispecies",m:"meta",mw:"mediawiki"},Ki={about:function(e,t){var i=Ie(e);return t.push(i),""},main:function(e,t){var i=Ie(e);return t.push(i),""},"main list":function(e,t){var i=Ie(e);return t.push(i),""},see:function(e,t){var i=Ie(e);return t.push(i),""},for:function(e,t){var i=Ie(e);return t.push(i),""},further:function(e,t){var i=Ie(e);return t.push(i),""},"further information":function(e,t){var i=Ie(e);return t.push(i),""},listen:function(e,t){var i=Ie(e);return t.push(i),""},"wide image":["file","width","caption"],redirect:function(e,t){for(var i=Ie(e,["redirect"]),n=i.list||[],a=[],r=0;r0&&t.push(a)}return{template:"playoffbracket",rounds:t}}(e);return t.push(i),""}};["2teambracket","4team2elimbracket","8teambracket","16teambracket","32teambracket","4roundbracket-byes","cwsbracket","nhlbracket","nhlbracket-reseed","4teambracket-nhl","4teambracket-ncaa","4teambracket-mma","4teambracket-mlb","16teambracket-two-reseeds","8teambracket-nhl","8teambracket-mlb","8teambracket-ncaa","8teambracket-afc","8teambracket-afl","8teambracket-tennis3","8teambracket-tennis5","16teambracket-nhl","16teambracket-nhl divisional","16teambracket-nhl-reseed","16teambracket-nba","16teambracket-swtc","16teambracket-afc","16teambracket-tennis3","16teambracket-tennis5"].forEach((function(e){Ji[e]=Ji["4teambracket"]}));var Qi=Ji,Xi={"£":"GB£","¥":"¥","৳":"৳","₩":"₩","€":"€","₱":"₱","₹":"₹","₽":"₽","cn¥":"CN¥","gb£":"GB£","india rs":"₹","indian rupee symbol":"₹","indian rupee":"₹","indian rupees":"₹","philippine peso":"₱","russian ruble":"₽","SK won":"₩","turkish lira":"TRY",a$:"A$",au$:"A$",aud:"A$",bdt:"BDT",brl:"BRL",ca$:"CA$",cad:"CA$",chf:"CHF",cny:"CN¥",czk:"czk",dkk:"dkk",dkk2:"dkk",euro:"€",gbp:"GB£",hk$:"HK$",hkd:"HK$",ils:"ILS",inr:"₹",jpy:"¥",myr:"MYR",nis:"ILS",nok:"NOK",nok2:"NOK",nz$:"NZ$",nzd:"NZ$",peso:"peso",pkr:"₨",r$:"BRL",rmb:"CN¥",rub:"₽",ruble:"₽",rupee:"₹",s$:"sgd",sek:"SEK",sek2:"SEK",sfr:"CHF",sgd:"sgd",shekel:"ILS",sheqel:"ILS",ttd:"TTD",us$:"US$",usd:"US$",yen:"¥",zar:"R"},en=function(e,t){var i=Ie(e,["amount","code"]);t.push(i);var n=i.template||"";switch("currency"===n?(n=i.code)||(i.code=n="usd"):""!==n&&"monnaie"!==n&&"unité"!==n&&"nombre"!==n&&"nb"!==n||(n=i.code),n=(n||"").toLowerCase()){case"us":i.code=n="usd";break;case"uk":i.code=n="gbp"}var a="".concat(Xi[n]||"").concat(i.amount||"");return i.code&&!Xi[i.code.toLowerCase()]&&(a+=" "+i.code),a},tn={currency:en,monnaie:en,"unité":en,nombre:en,nb:en,iso4217:en,inrconvert:function(e,t){var i=Ie(e,["rupee_value","currency_formatting"]);t.push(i);var n=i.currency_formatting;if(n){var a=1;switch(n){case"k":a=1e3;break;case"m":a=1e6;break;case"b":a=1e9;break;case"t":a=1e12;break;case"l":a=1e5;break;case"c":a=1e7;break;case"lc":a=1e12}i.rupee_value=i.rupee_value*a}return"inr ".concat(i.rupee_value||"")}};Object.keys(Xi).forEach((function(e){tn[e]=en}));var nn=tn,an={"election box begin":function(e,t){var i=Ie(e);return t.push(i),""},"election box candidate":function(e,t){var i=Ie(e);return t.push(i),""},"election box hold with party link":function(e,t){var i=Ie(e);return t.push(i),""},"election box gain with party link":function(e,t){var i=Ie(e);return t.push(i),""}};an["election box begin no change"]=an["election box begin"],an["election box begin no party"]=an["election box begin"],an["election box begin no party no change"]=an["election box begin"],an["election box inline begin"]=an["election box begin"],an["election box inline begin no change"]=an["election box begin"],an["election box candidate for alliance"]=an["election box candidate"],an["election box candidate minor party"]=an["election box candidate"],an["election box candidate no party link no change"]=an["election box candidate"],an["election box candidate with party link"]=an["election box candidate"],an["election box candidate with party link coalition 1918"]=an["election box candidate"],an["election box candidate with party link no change"]=an["election box candidate"],an["election box inline candidate"]=an["election box candidate"],an["election box inline candidate no change"]=an["election box candidate"],an["election box inline candidate with party link"]=an["election box candidate"],an["election box inline candidate with party link no change"]=an["election box candidate"],an["election box inline incumbent"]=an["election box candidate"];var rn=an,on=[["🇦🇩","and","andorra"],["🇦🇪","are","united arab emirates"],["🇦🇫","afg","afghanistan"],["🇦🇬","atg","antigua and barbuda"],["🇦🇮","aia","anguilla"],["🇦🇱","alb","albania"],["🇦🇲","arm","armenia"],["🇦🇴","ago","angola"],["🇦🇶","ata","antarctica"],["🇦🇷","arg","argentina"],["🇦🇸","asm","american samoa"],["🇦🇹","aut","austria"],["🇦🇺","aus","australia"],["🇦🇼","abw","aruba"],["🇦🇽","ala","åland islands"],["🇦🇿","aze","azerbaijan"],["🇧🇦","bih","bosnia and herzegovina"],["🇧🇧","brb","barbados"],["🇧🇩","bgd","bangladesh"],["🇧🇪","bel","belgium"],["🇧🇫","bfa","burkina faso"],["🇧🇬","bgr","bulgaria"],["🇧🇬","bul","bulgaria"],["🇧🇭","bhr","bahrain"],["🇧🇮","bdi","burundi"],["🇧🇯","ben","benin"],["🇧🇱","blm","saint barthélemy"],["🇧🇲","bmu","bermuda"],["🇧🇳","brn","brunei darussalam"],["🇧🇴","bol","bolivia"],["🇧🇶","bes","bonaire, sint eustatius and saba"],["🇧🇷","bra","brazil"],["🇧🇸","bhs","bahamas"],["🇧🇹","btn","bhutan"],["🇧🇻","bvt","bouvet island"],["🇧🇼","bwa","botswana"],["🇧🇾","blr","belarus"],["🇧🇿","blz","belize"],["🇨🇦","can","canada"],["🇨🇨","cck","cocos (keeling) islands"],["🇨🇩","cod","congo"],["🇨🇫","caf","central african republic"],["🇨🇬","cog","congo"],["🇨🇭","che","switzerland"],["🇨🇮","civ","côte d'ivoire"],["🇨🇰","cok","cook islands"],["🇨🇱","chl","chile"],["🇨🇲","cmr","cameroon"],["🇨🇳","chn","china"],["🇨🇴","col","colombia"],["🇨🇷","cri","costa rica"],["🇨🇺","cub","cuba"],["🇨🇻","cpv","cape verde"],["🇨🇼","cuw","curaçao"],["🇨🇽","cxr","christmas island"],["🇨🇾","cyp","cyprus"],["🇨🇿","cze","czech republic"],["🇩🇪","deu","germany"],["🇩🇪","ger","germany"],["🇩🇯","dji","djibouti"],["🇩🇰","dnk","denmark"],["🇩🇲","dma","dominica"],["🇩🇴","dom","dominican republic"],["🇩🇿","dza","algeria"],["🇪🇨","ecu","ecuador"],["🇪🇪","est","estonia"],["🇪🇬","egy","egypt"],["🇪🇭","esh","western sahara"],["🇪🇷","eri","eritrea"],["🇪🇸","esp","spain"],["🇪🇹","eth","ethiopia"],["🇫🇮","fin","finland"],["🇫🇯","fji","fiji"],["🇫🇰","flk","falkland islands (malvinas)"],["🇫🇲","fsm","micronesia"],["🇫🇴","fro","faroe islands"],["🇫🇷","fra","france"],["🇬🇦","gab","gabon"],["🇬🇧","gbr","united kingdom"],["🇬🇩","grd","grenada"],["🇬🇫","guf","french guiana"],["🇬🇬","ggy","guernsey"],["🇬🇭","gha","ghana"],["🇬🇮","gib","gibraltar"],["🇬🇱","grl","greenland"],["🇬🇲","gmb","gambia"],["🇬🇳","gin","guinea"],["🇬🇵","glp","guadeloupe"],["🇬🇶","gnq","equatorial guinea"],["🇬🇷","grc","greece"],["🇬🇸","sgs","south georgia"],["🇬🇹","gtm","guatemala"],["🇬🇺","gum","guam"],["🇬🇼","gnb","guinea-bissau"],["🇬🇾","guy","guyana"],["🇭🇰","hkg","hong kong"],["🇭🇲","hmd","heard island and mcdonald islands"],["🇭🇳","hnd","honduras"],["🇭🇷","hrv","croatia"],["🇭🇹","hti","haiti"],["🇭🇺","hun","hungary"],["🇮🇩","idn","indonesia"],["🇮🇪","irl","ireland"],["🇮🇱","isr","israel"],["🇮🇲","imn","isle of man"],["🇮🇳","ind","india"],["🇮🇴","iot","british indian ocean territory"],["🇮🇶","irq","iraq"],["🇮🇷","irn","iran"],["🇮🇸","isl","iceland"],["🇮🇹","ita","italy"],["🇯🇪","jey","jersey"],["🇯🇲","jam","jamaica"],["🇯🇴","jor","jordan"],["🇯🇵","jpn","japan"],["🇰🇪","ken","kenya"],["🇰🇬","kgz","kyrgyzstan"],["🇰🇭","khm","cambodia"],["🇰🇮","kir","kiribati"],["🇰🇲","com","comoros"],["🇰🇳","kna","saint kitts and nevis"],["🇰🇵","prk","north korea"],["🇰🇷","kor","south korea"],["🇰🇼","kwt","kuwait"],["🇰🇾","cym","cayman islands"],["🇰🇿","kaz","kazakhstan"],["🇱🇦","lao","lao people's democratic republic"],["🇱🇧","lbn","lebanon"],["🇱🇨","lca","saint lucia"],["🇱🇮","lie","liechtenstein"],["🇱🇰","lka","sri lanka"],["🇱🇷","lbr","liberia"],["🇱🇸","lso","lesotho"],["🇱🇹","ltu","lithuania"],["🇱🇺","lux","luxembourg"],["🇱🇻","lva","latvia"],["🇱🇾","lby","libya"],["🇲🇦","mar","morocco"],["🇲🇨","mco","monaco"],["🇲🇩","mda","moldova"],["🇲🇪","mne","montenegro"],["🇲🇫","maf","saint martin (french part)"],["🇲🇬","mdg","madagascar"],["🇲🇭","mhl","marshall islands"],["🇲🇰","mkd","macedonia"],["🇲🇱","mli","mali"],["🇲🇲","mmr","myanmar"],["🇲🇳","mng","mongolia"],["🇲🇴","mac","macao"],["🇲🇵","mnp","northern mariana islands"],["🇲🇶","mtq","martinique"],["🇲🇷","mrt","mauritania"],["🇲🇸","msr","montserrat"],["🇲🇹","mlt","malta"],["🇲🇺","mus","mauritius"],["🇲🇻","mdv","maldives"],["🇲🇼","mwi","malawi"],["🇲🇽","mex","mexico"],["🇲🇾","mys","malaysia"],["🇲🇿","moz","mozambique"],["🇳🇦","nam","namibia"],["🇳🇨","ncl","new caledonia"],["🇳🇪","ner","niger"],["🇳🇫","nfk","norfolk island"],["🇳🇬","nga","nigeria"],["🇳🇮","nic","nicaragua"],["🇳🇱","nld","netherlands"],["🇳🇴","nor","norway"],["🇳🇵","npl","nepal"],["🇳🇷","nru","nauru"],["🇳🇺","niu","niue"],["🇳🇿","nzl","new zealand"],["🇴🇲","omn","oman"],["🇵🇦","pan","panama"],["🇵🇪","per","peru"],["🇵🇫","pyf","french polynesia"],["🇵🇬","png","papua new guinea"],["🇵🇭","phl","philippines"],["🇵🇰","pak","pakistan"],["🇵🇱","pol","poland"],["🇵🇲","spm","saint pierre and miquelon"],["🇵🇳","pcn","pitcairn"],["🇵🇷","pri","puerto rico"],["🇵🇸","pse","palestinian territory"],["🇵🇹","prt","portugal"],["🇵🇼","plw","palau"],["🇵🇾","pry","paraguay"],["🇶🇦","qat","qatar"],["🇷🇪","reu","réunion"],["🇷🇴","rou","romania"],["🇷🇸","srb","serbia"],["🇷🇺","rus","russia"],["🇷🇼","rwa","rwanda"],["🇸🇦","sau","saudi arabia"],["🇸🇧","slb","solomon islands"],["🇸🇨","syc","seychelles"],["🇸🇩","sdn","sudan"],["🇸🇪","swe","sweden"],["🇸🇬","sgp","singapore"],["🇸🇭","shn","saint helena, ascension and tristan da cunha"],["🇸🇮","svn","slovenia"],["🇸🇯","sjm","svalbard and jan mayen"],["🇸🇰","svk","slovakia"],["🇸🇱","sle","sierra leone"],["🇸🇲","smr","san marino"],["🇸🇳","sen","senegal"],["🇸🇴","som","somalia"],["🇸🇷","sur","suriname"],["🇸🇸","ssd","south sudan"],["🇸🇹","stp","sao tome and principe"],["🇸🇻","slv","el salvador"],["🇸🇽","sxm","sint maarten (dutch part)"],["🇸🇾","syr","syrian arab republic"],["🇸🇿","swz","swaziland"],["🇹🇨","tca","turks and caicos islands"],["🇹🇩","tcd","chad"],["🇹🇫","atf","french southern territories"],["🇹🇬","tgo","togo"],["🇹🇭","tha","thailand"],["🇹🇯","tjk","tajikistan"],["🇹🇰","tkl","tokelau"],["🇹🇱","tls","timor-leste"],["🇹🇲","tkm","turkmenistan"],["🇹🇳","tun","tunisia"],["🇹🇴","ton","tonga"],["🇹🇷","tur","turkey"],["🇹🇹","tto","trinidad and tobago"],["🇹🇻","tuv","tuvalu"],["🇹🇼","twn","taiwan"],["🇹🇿","tza","tanzania"],["🇺🇦","ukr","ukraine"],["🇺🇬","uga","uganda"],["🇺🇲","umi","united states minor outlying islands"],["🇺🇸","usa","united states"],["🇺🇸","us","united states"],["🇺🇾","ury","uruguay"],["🇺🇿","uzb","uzbekistan"],["🇻🇦","vat","vatican city"],["🇻🇨","vct","saint vincent and the grenadines"],["🇻🇪","ven","venezuela"],["🇻🇬","vgb","virgin islands, british"],["🇻🇮","vir","virgin islands, u.s."],["🇻🇳","vnm","viet nam"],["🇻🇺","vut","vanuatu"],["","win","west indies"],["🇼🇫","wlf","wallis and futuna"],["🇼🇸","wsm","samoa"],["🇾🇪","yem","yemen"],["🇾🇹","myt","mayotte"],["🇿🇦","zaf","south africa"],["🇿🇲","zmb","zambia"],["🇿🇼 ","zwe","zimbabwe"],["🇺🇳","un","united nations"],["🏴󠁧󠁢󠁥󠁮󠁧󠁿󠁧󠁢󠁥󠁮󠁧󠁿","eng","england"],["🏴󠁧󠁢󠁳󠁣󠁴󠁿","sct","scotland"],["🏴󠁧󠁢󠁷󠁬󠁳󠁿","wal","wales"],["🇪🇺","eu","european union"]],sn={flag:function(e){var t=Ie(e,["flag","variant"]),i=t.flag||"";t.flag=(t.flag||"").toLowerCase();var n=on.find((function(e){return t.flag===e[1]||t.flag===e[2]}))||[],a=n[0]||"";return"".concat(a," [[").concat(n[2],"|").concat(i,"]]")},flagcountry:function(e){var t=Ie(e,["flag","variant"]);t.flag=(t.flag||"").toLowerCase();var i=on.find((function(e){return t.flag===e[1]||t.flag===e[2]}))||[],n=i[0]||"";return"".concat(n," [[").concat(i[2],"]]")},flagcu:function(e){var t=Ie(e,["flag","variant"]);t.flag=(t.flag||"").toLowerCase();var i=on.find((function(e){return t.flag===e[1]||t.flag===e[2]}))||[],n=i[0]||"";return"".concat(n," ").concat(i[2])},flagicon:function(e){var t=Ie(e,["flag","variant"]);t.flag=(t.flag||"").toLowerCase();var i=on.find((function(e){return t.flag===e[1]||t.flag===e[2]}));return i?"[[".concat(i[2],"|").concat(i[0],"]]"):""},flagdeco:function(e){var t=Ie(e,["flag","variant"]);return t.flag=(t.flag||"").toLowerCase(),(on.find((function(e){return t.flag===e[1]||t.flag===e[2]}))||[])[0]||""},fb:function(e){var t=Ie(e,["flag","variant"]);t.flag=(t.flag||"").toLowerCase();var i=on.find((function(e){return t.flag===e[1]||t.flag===e[2]}));return i?"".concat(i[0]," [[").concat(i[2]," national football team|").concat(i[2],"]]"):""},fbicon:function(e){var t=Ie(e,["flag","variant"]);t.flag=(t.flag||"").toLowerCase();var i=on.find((function(e){return t.flag===e[1]||t.flag===e[2]}));return i?" [[".concat(i[2]," national football team|").concat(i[0],"]]"):""},flagathlete:function(e){var t=Ie(e,["name","flag","variant"]);t.flag=(t.flag||"").toLowerCase();var i=on.find((function(e){return t.flag===e[1]||t.flag===e[2]}));return i?"".concat(i[0]," [[").concat(t.name||"","]] (").concat(i[1].toUpperCase(),")"):"[[".concat(t.name||"","]]")}};on.forEach((function(e){sn[e[1]]=function(){return e[0]}})),sn.cr=sn.flagcountry,sn["cr-rt"]=sn.flagcountry,sn.cricon=sn.flagicon;var cn=sn,un=function(e){var t=e.match(/ipac?-(.+)/);return null!==t?!0===S.hasOwnProperty(t[1])?S[t[1]].english_title:t[1]:null},ln={ipa:function(e,t){var i=Ie(e,["transcription","lang","audio"]);return i.lang=un(i.template),i.template="ipa",t.push(i),""},ipac:function(e,t){var i=Ie(e);return i.transcription=(i.list||[]).join(","),delete i.list,i.lang=un(i.template),i.template="ipac",t.push(i),""},transl:function(e,t){var i=Ie(e,["lang","text","text2"]);return i.text2&&(i.iso=i.text,i.text=i.text2,delete i.text2),t.push(i),i.text||""}};Object.keys(S).forEach((function(e){ln["ipa-"+e]=ln.ipa,ln["ipac-"+e]=ln.ipac}));var pn=ln,mn={lang:1,"lang-de":0,"rtl-lang":1,taste:0,nihongo:function(e,t){var i=Ie(e,["english","kanji","romaji","extra"]);t.push(i);var n=i.english||i.romaji||"";return i.kanji&&(n+=" (".concat(i.kanji,")")),n}};Object.keys(S).forEach((function(e){mn["lang-"+e]=mn["lang-de"]})),mn.nihongo2=mn.nihongo,mn.nihongo3=mn.nihongo,mn["nihongo-s"]=mn.nihongo,mn["nihongo foot"]=mn.nihongo;var dn=mn,fn=function(e){if(!e.numerator&&!e.denominator)return null;var t=Number(e.numerator)/Number(e.denominator);t*=100;var i=Number(e.decimals);return isNaN(i)&&(i=1),t=t.toFixed(i),Number(t)},gn={math:function(e,t){var i=Ie(e,["formula"]);return t.push(i),"\n\n"+(i.formula||"")+"\n\n"},frac:function(e,t){var i=Ie(e,["a","b","c"]),n={template:"sfrac"};return i.c?(n.integer=i.a,n.numerator=i.b,n.denominator=i.c):i.b?(n.numerator=i.a,n.denominator=i.b):(n.numerator=1,n.denominator=i.a),t.push(n),n.integer?"".concat(n.integer," ").concat(n.numerator,"⁄").concat(n.denominator):"".concat(n.numerator,"⁄").concat(n.denominator)},radic:function(e){var t=Ie(e,["after","before"]);return"".concat(t.before||"","√").concat(t.after||"")},percentage:function(e){var t=Ie(e,["numerator","denominator","decimals"]),i=fn(t);return null===i?"":i+"%"},"percent-done":function(e){var t=Ie(e,["done","total","digits"]),i=fn({numerator:t.done,denominator:t.total,decimals:t.digits});return null===i?"":"".concat(t.done," (").concat(i,"%) done")},"winning percentage":function(e,t){var i=Ie(e,["wins","losses","ties"]);t.push(i);var n=Number(i.wins),a=Number(i.losses),r=Number(i.ties)||0,o=n+a+r;"y"===i.ignore_ties&&(r=0),r&&(n+=r/2);var s=fn({numerator:n,denominator:o,decimals:1});return null===s?"":".".concat(10*s)},winlosspct:function(e,t){var i=Ie(e,["wins","losses"]);t.push(i);var n=Number(i.wins),a=Number(i.losses),r=fn({numerator:n,denominator:n+a,decimals:1});return null===r?"":(r=".".concat(10*r),"".concat(n||0," || ").concat(a||0," || ").concat(r||"-"))}};gn.sfrac=gn.frac,gn.sqrt=gn.radic,gn.pct=gn.percentage,gn.percent=gn.percentage,gn.winpct=gn["winning percentage"],gn.winperc=gn["winning percentage"];var hn=gn,bn=function(e,t,i){var n=Ie(e);return i&&(n.name=n.template,n.template=i),t.push(n),""},kn={persondata:bn,taxobox:bn,citation:bn,portal:bn,reflist:bn,"cite book":bn,"cite journal":bn,"cite web":bn,"commons cat":bn,"portuguese name":["first","second","suffix"],uss:["ship","id"],isbn:function(e,t){var i=Ie(e,["id","id2","id3"]);return t.push(i),"ISBN: "+(i.id||"")},marriage:function(e,t){var i=Ie(e,["spouse","from","to","end"]);t.push(i);var n="".concat(i.spouse||"");return i.from&&(i.to?n+=" (m. ".concat(i.from,"-").concat(i.to,")"):n+=" (m. ".concat(i.from,")")),n},"based on":function(e,t){var i=Ie(e,["title","author"]);return t.push(i),"".concat(i.title," by ").concat(i.author||"")},"video game release":function(e,t){for(var i=["region","date","region2","date2","region3","date3","region4","date4"],n=Ie(e,i),a={template:"video game release",releases:[]},r=0;r0&&t.push(c),""},Yn=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},Zn={text:function(){return""},json:function(){return this.data}};Object.keys(Zn).forEach((function(e){Yn.prototype[e]=Zn[e]}));var Gn=Yn,Hn=new RegExp("^(cite |citation)","i"),Vn={citation:!0,refn:!0,harvnb:!0},Jn=function(e){return"infobox"===e.template&&e.data&&function(e){return e&&"[object Object]"===Object.prototype.toString.call(e)}(e.data)},Qn=function(e,t){var i=e.wiki,n=Jt(i),a=[];n.forEach((function(e){return function e(t,n){t.parent=n,t.children&&t.children.length>0&&t.children.forEach((function(i){return e(i,t)})),t.out=Wn(t,a);!function e(t,i,n){t.parent&&(t.parent.body=t.parent.body.replace(i,n),e(t.parent,i,n))}(t,t.body,t.out),i=i.replace(t.body,t.out)}(e,null)})),e.infoboxes=e.infoboxes||[],e.references=e.references||[],e.templates=e.templates||[],e.templates=e.templates.concat(a),e.templates=e.templates.filter((function(i){return!0===function(e){return!0===Vn[e.template]||!0===Hn.test(e.template)}(i)?(e.references.push(new Me(i)),!1):!0!==Jn(i)||(i.domain=t.domain,e.infoboxes.push(new Wt(i)),!1)})),e.templates=e.templates.map((function(e){return new Gn(e)})),n.forEach((function(e){i=i.replace(e.body,e.out)})),e.wiki=i},Xn=je,ea=function(e,t){var i=e.wiki;i=i.replace(/]*?)>([\s\S]+?)<\/gallery>/g,(function(i,n,a){var r=a.split(/\n/g);return(r=(r=r.filter((function(e){return e&&""!==e.trim()}))).map((function(e){var i=e.split(/\|/),n={file:i[0].trim(),lang:t.language,domain:t.domain},a=new $(n).json(),r=i.slice(1).join("|");return""!==r&&(a.caption=Xn(r)),a}))).length>0&&e.templates.push({template:"gallery",images:r,pos:e.title}),""})),e.wiki=i},ta=function(e){var t=e.wiki;t=t.replace(/\{\{election box begin([\s\S]+?)\{\{election box end\}\}/gi,(function(t){var i={wiki:t,templates:[]};Qn(i);var n=i.templates.map((function(e){return e.json()})),a=n.find((function(e){return"election box"===e.template}))||{},r=n.filter((function(e){return"election box candidate"===e.template})),o=n.find((function(e){return"election box gain"===e.template||"election box hold"===e.template}))||{};return(r.length>0||o)&&e.templates.push({template:"election box",title:a.title,candidates:r,summary:o.data}),""})),e.wiki=t},ia={coach:["team","year","g","w","l","w-l%","finish","pg","pw","pl","pw-l%"],player:["year","team","gp","gs","mpg","fg%","3p%","ft%","rpg","apg","spg","bpg","ppg"],roster:["player","gp","gs","mpg","fg%","3fg%","ft%","rpg","apg","spg","bpg","ppg"]},na=function(e){var t=e.wiki;t=t.replace(/\{\{nba (coach|player|roster) statistics start([\s\S]+?)\{\{s-end\}\}/gi,(function(t,i){t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{s-end\}\}/,""),i=i.toLowerCase().trim();var n="! "+ia[i].join(" !! "),a=at("{|\n"+n+"\n"+t+"\n|}");return a=a.map((function(e){return Object.keys(e).forEach((function(t){e[t]=e[t].text()})),e})),e.templates.push({template:"NBA "+i+" statistics",data:a}),""})),e.wiki=t},aa=function(e){var t=e.wiki;t=t.replace(/\{\{mlb game log (section|month)[\s\S]+?\{\{mlb game log (section|month) end\}\}/gi,(function(t){var i=function(e){var t=["#","date","opponent","score","win","loss","save","attendance","record"];return!0===/\|stadium=y/i.test(e)&&t.splice(7,0,"stadium"),!0===/\|time=y/i.test(e)&&t.splice(7,0,"time"),!0===/\|box=y/i.test(e)&&t.push("box"),t}(t);t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{mlb game log (section|month) end\}\}/i,"");var n="! "+i.join(" !! "),a=at("{|\n"+n+"\n"+t+"\n|}");return a=a.map((function(e){return Object.keys(e).forEach((function(t){e[t]=e[t].text()})),e})),e.templates.push({template:"mlb game log section",data:a}),""})),e.wiki=t},ra=["res","record","opponent","method","event","date","round","time","location","notes"],oa=function(e){var t=e.wiki;t=t.replace(/\{\{mma record start[\s\S]+?\{\{end\}\}/gi,(function(t){t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{end\}\}/i,"");var i="! "+ra.join(" !! "),n=at("{|\n"+i+"\n"+t+"\n|}");return n=n.map((function(e){return Object.keys(e).forEach((function(t){e[t]=e[t].text()})),e})),e.templates.push({template:"mma record start",data:n}),""})),e.wiki=t},sa=je,ca=function(e){var t=e.wiki;t=(t=t.replace(/]*?)>([\s\S]+?)<\/math>/g,(function(t,i,n){var a=sa(n).text();return e.templates.push({template:"math",formula:a,raw:n}),a&&a.length<12?a:""}))).replace(/]*?)>([\s\S]+?)<\/chem>/g,(function(t,i,n){return e.templates.push({template:"chem",data:n}),""})),e.wiki=t},ua=function(e,t){ta(e),ea(e,t),ca(e),aa(e),oa(e),na(e)},la=new RegExp("^("+_.references.join("|")+"):?","i"),pa=/(?:\n|^)(={2,5}.{1,200}?={2,5})/g,ma={heading:Ze,table:mt,paragraphs:Rt,templates:Qn,references:Be,startEndTemplates:ua},da=function(e,t){return ma.startEndTemplates(e,t),ma.references(e),ma.templates(e,t),ma.table(e),ma.paragraphs(e,t),e=new ie(e)},fa=function(e){for(var t=[],i=e.wiki.split(pa),n=0;n0||(t.templates().length>0||(e[i+1]&&e[i+1].depth>t.depth&&(e[i+1].depth-=1),!1)))}))}(t)},ga=new RegExp("\\[\\[:?("+_.categories.join("|")+"):(.{2,178}?)]](w{0,10})","ig"),ha=new RegExp("^\\[\\[:?("+_.categories.join("|")+"):","ig"),ba={section:fa,categories:function(e){var t=e.wiki,i=t.match(ga);i&&i.forEach((function(t){(t=(t=(t=t.replace(ha,"")).replace(/\|?[ \*]?\]\]$/i,"")).replace(/\|.*/,""))&&!t.match(/[\[\]]/)&&e.categories.push(t.trim())})),t=t.replace(ga,""),e.wiki=t}},ka=function(e,t){t=t||{};var i=Object.assign(t,{title:t.title||null,pageID:t.pageID||t.id||null,namespace:t.namespace||t.ns||null,type:"page",wiki:e||"",categories:[],sections:[],coordinates:[]});return!0===R(e)?(i.type="redirect",i.redirectTo=U(e),ba.categories(i),new O(i)):(Z(i),ba.categories(i),ba.section(i),new O(i))},wa=function(e){var t=(e=e.filter((function(e){return e}))).map((function(e){return ka(e.wiki,e.meta)}));return 0===t.length?null:1===t.length?t[0]:t},va=function(e,t){return fetch(e,t).then((function(e){return e.json()}))},ya=function(e){var t=e.userAgent||e["User-Agent"]||e["Api-User-Agent"]||"User of the wtf_wikipedia library";return{method:"GET",headers:{"Content-Type":"application/json","Api-User-Agent":t,"User-Agent":t,Origin:"*"},redirect:"follow"}},xa=/^https?:\/\//,$a={lang:"en",wiki:"wikipedia",domain:null,follow_redirects:!0,path:"api.php"},ja=function(t,i,n){var a=null;"function"==typeof i&&(a=i,i={}),"function"==typeof n&&(a=n,n={}),"string"==typeof i&&(n=n||{},i=Object.assign({},{lang:i},n)),i=i||{},(i=Object.assign({},$a,i)).title=t,xa.test(t)&&(i=Object.assign(i,e(t)));var r=c(i),o=ya(i);return va(r,o).then((function(e){try{var t=u(e,i);return t=wa(t),a&&a(null,t),t}catch(e){throw e}})).catch((function(e){return console.error(e),a&&a(e,null),null}))},za={lang:"en",wiki:"wikipedia",domain:null,path:"w/api.php"},Ea=function(e,t){var i;t=t||{},t=Object.assign({},za,t),"string"==typeof e?t.lang=e:(i=e)&&"[object Object]"===Object.prototype.toString.call(i)&&(t=Object.assign(t,e));var n="https://".concat(t.lang,".wikipedia.org/").concat(t.path,"?");t.domain&&(n="https://".concat(t.domain,"/").concat(t.path,"?")),n+="format=json&action=query&generator=random&grnnamespace=0&prop=revisions|pageprops&rvprop=content&grnlimit=1&rvslots=main&origin=*";var a=ya(t);return va(n,a).then((function(e){try{var t=u(e);return wa(t)}catch(e){throw e}})).catch((function(e){return console.error(e),null}))},Oa={lang:"en",wiki:"wikipedia",domain:null,path:"w/api.php"},_a=function(e,t,i){var n;i=i||{},i=Object.assign({},Oa,i),"string"==typeof t?i.lang=t:(n=t)&&"[object Object]"===Object.prototype.toString.call(n)&&(i=Object.assign(i,t));var a={pages:[],categories:[]};return new Promise((function(t,n){!function r(o){var s=function(e,t,i){e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return!1===/^Category/i.test(e)&&(e="Category:"+e),e=e.replace(/ /g,"_")}(e),e=encodeURIComponent(e);var n="https://".concat(t.lang,".wikipedia.org/").concat(t.path,"?");return t.domain&&(n="https://".concat(t.domain,"/").concat(t.path,"?")),n+="action=query&list=categorymembers&cmtitle=".concat(e,"&cmlimit=500&format=json&origin=*&redirects=true&cmtype=page|subcat"),i&&(n+="&cmcontinue="+i),n}(e,i,o),c=ya(i);return va(s,c).then((function(e){a=function(e){var t=e.query.categorymembers||[],i={pages:[],categories:[]};return t.forEach((function(e){14===e.ns?(delete e.ns,i.categories.push(e)):(delete e.ns,i.pages.push(e))})),i}(e),e.continue&&e.continue.cmcontinue?r(e.continue.cmcontinue):t(a)})).catch((function(e){console.error(e),n(e)}))}(null)}))},Sa=function(e,t){return ka(e,t)},Ca={Doc:O,Section:ie,Paragraph:kt,Sentence:ge,Image:$,Infobox:Wt,Link:se,List:St,Reference:Me,Table:ut,Template:Gn,http:va,wtf:Sa};return Sa.fetch=function(e,t,i,n){return ja(e,t,i)},Sa.random=function(e,t,i){return Ea(e,t)},Sa.category=function(e,t,i,n){return _a(e,t,i)},Sa.extend=function(e){return e(Ca,Fn,this),this},Sa.version="8.4.0",Sa})); +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).wtf=t()}(this,(function(){"use strict";var e=function(e){var t=new URL(e),i=t.pathname.replace(/^\/(wiki\/)?/,"");return i=decodeURIComponent(i),{domain:t.host,title:i}};function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var i=[],n=!0,a=!1,r=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(i.push(o.value),!t||i.length!==t);n=!0);}catch(e){a=!0,r=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw r}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return n(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return n(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);iObject.keys(t.data).length?-1:1})),"number"==typeof e?t[e]:t},text:function(e){return e=p(e,j),!0===this.isRedirect()?"":this.sections().map((function(t){return t.text(e)})).join("\n\n")},json:function(e){return e=p(e,j),d(this,e)},debug:function(){return console.log("\n"),this.sections().forEach((function(e){for(var t=" - ",i=0;i500)&&M.test(e)},U=function(e){var t=e.match(M);return t&&t[2]?(P(t[2])||[])[0]:{}},F=["table","code","score","data","categorytree","charinsert","hiero","imagemap","inputbox","nowiki","poem","references","source","syntaxhighlight","timeline"],K="< ?(".concat(F.join("|"),") ?[^>]{0,200}?>"),B="< ?/ ?(".concat(F.join("|"),") ?>"),W=new RegExp("".concat(K,"[").concat("\\s\\S","]+?").concat(B),"ig"),Y=function(e){return(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(W," ")).replace(/ ?< ?(span|div|table|data) [a-zA-Z0-9=%\.#:;'" ]{2,100}\/? ?> ?/g," ")).replace(/ ?< ?(ref) [a-zA-Z0-9=" ]{2,100}\/ ?> ?/g," ")).replace(/(.*?)<\/i>/g,"''$1''")).replace(/(.*?)<\/b>/g,"'''$1'''")).replace(/(.*?)<\/sub>/g,"{{sub|$1}}")).replace(/(.*?)<\/sup>/g,"{{sup|$1}}")).replace(/ ?<[ \/]?(p|sub|sup|span|nowiki|div|table|br|tr|td|th|pre|pre2|hr)[ \/]?> ?/g," ")).replace(/ ?<[ \/]?(abbr|bdi|bdo|blockquote|cite|del|dfn|em|ins|kbd|mark|q|s|small)[ \/]?> ?/g," ")).replace(/ ?<[ \/]?h[0-9][ \/]?> ?/g," ")).replace(/ ?< ?br ?\/> ?/g,"\n")).trim()};var Z=function(e){var t=e.wiki;t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace(//g,"")).replace(/__(NOTOC|NOEDITSECTION|FORCETOC|TOC)__/gi,"")).replace(/~~{1,3}/g,"")).replace(/\r/g,"")).replace(/\u3002/g,". ")).replace(/----/g,"")).replace(/\{\{\}\}/g," – ")).replace(/\{\{\\\}\}/g," / ")).replace(/ /g," "),t=(t=(t=Y(t)).replace(/\([,;: ]+?\)/g,"")).replace(/{{(baseball|basketball) (primary|secondary) (style|color).*?\}\}/i,""),e.wiki=t},G=/[\\\.$]/,H=function(e){return"string"!=typeof e&&(e=""),e=(e=(e=e.replace(/\\/g,"\\\\")).replace(/^\$/,"\\u0024")).replace(/\./g,"\\u002e")},V=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.keys(e),i=0;i0&&(i.paragraphs=n)}if(!0===t.images){var a=e.images().map((function(e){return e.json(t)}));a.length>0&&(i.images=a)}if(!0===t.tables){var r=e.tables().map((function(e){return e.json(t)}));r.length>0&&(i.tables=r)}if(!0===t.templates){var o=e.templates();o.length>0&&(i.templates=o,!0===t.encode&&i.templates.forEach((function(e){return V(e)})))}if(!0===t.infoboxes){var s=e.infoboxes().map((function(e){return e.json(t)}));s.length>0&&(i.infoboxes=s)}if(!0===t.lists){var c=e.lists().map((function(e){return e.json(t)}));c.length>0&&(i.lists=c)}if(!0===t.references||!0===t.citations){var u=e.references().map((function(e){return e.json(t)}));u.length>0&&(i.references=u)}return!0===t.sentences&&(i.sentences=e.sentences().map((function(e){return e.json(t)}))),i},X={tables:!0,references:!0,paragraphs:!0,templates:!0,infoboxes:!0},ee=function(e){this.depth=e.depth,this.doc=null,this._title=e.title||"",Object.defineProperty(this,"doc",{enumerable:!1,value:null}),e.templates=e.templates||[],Object.defineProperty(this,"data",{enumerable:!1,value:e})},te={title:function(){return this._title||""},index:function(){if(!this.doc)return null;var e=this.doc.sections().indexOf(this);return-1===e?null:e},indentation:function(){return this.depth},sentences:function(e){var t=this.paragraphs().reduce((function(e,t){return e.concat(t.sentences())}),[]);return"number"==typeof e?t[e]:t||[]},paragraphs:function(e){var t=this.data.paragraphs||[];return"number"==typeof e?t[e]:t||[]},paragraph:function(e){var t=this.data.paragraphs||[];return"number"==typeof e?t[e]:t[0]},links:function(e){var t=[];if(this.infoboxes().forEach((function(i){i.links(e).forEach((function(e){return t.push(e)}))})),this.sentences().forEach((function(i){i.links(e).forEach((function(e){return t.push(e)}))})),this.tables().forEach((function(i){i.links(e).forEach((function(e){return t.push(e)}))})),this.lists().forEach((function(i){i.links(e).forEach((function(e){return t.push(e)}))})),"number"==typeof e)return t[e];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);var i=t.find((function(t){return t.page()===e}));return void 0===i?[]:[i]}return t},tables:function(e){var t=this.data.tables||[];return"number"==typeof e?t[e]:t},templates:function(e){var t=this.data.templates||[];return t=t.map((function(e){return e.json()})),"number"==typeof e?t[e]:"string"==typeof e?(e=e.toLowerCase(),t.filter((function(t){return t.template===e||t.name===e}))):t},infoboxes:function(e){var t=this.data.infoboxes||[];return"number"==typeof e?t[e]:t},coordinates:function(e){var t=[].concat(this.templates("coord"),this.templates("coor"));return"number"==typeof e?t[e]?t[e]:[]:t},lists:function(e){var t=[];return this.paragraphs().forEach((function(e){t=t.concat(e.lists())})),"number"==typeof e?t[e]:t},interwiki:function(e){var t=[];return this.paragraphs().forEach((function(e){t=t.concat(e.interwiki())})),"number"==typeof e?t[e]:t||[]},images:function(e){var t=[];return this.paragraphs().forEach((function(e){t=t.concat(e.images())})),"number"==typeof e?t[e]:t||[]},references:function(e){var t=this.data.references||[];return"number"==typeof e?t[e]:t},remove:function(){if(!this.doc)return null;var e={};e[this.title()]=!0,this.children().forEach((function(t){return e[t.title()]=!0}));var t=this.doc.data.sections;return t=t.filter((function(t){return!0!==e.hasOwnProperty(t.title())})),this.doc.data.sections=t,this.doc},nextSibling:function(){if(!this.doc)return null;for(var e=this.doc.sections(),t=this.index()+1;tthis.depth)for(var a=i+1;athis.depth;a+=1)n.push(t[a]);return"string"==typeof e?(e=e.toLowerCase(),n.find((function(t){return t.title().toLowerCase()===e}))):"number"==typeof e?n[e]:n},parent:function(){if(!this.doc)return null;for(var e=this.doc.sections(),t=this.index();t>=0;t-=1)if(e[t]&&e[t].depth0&&(e.fmt=e.fmt||{},e.fmt.bold=t),i.length>0&&(e.fmt=e.fmt||{},e.fmt.italic=i),e},le=/^[0-9,.]+$/,pe={text:!0,links:!0,formatting:!0,numbers:!0},me=function(e,t){t=p(t,pe);var i={},n=e.text();if(!0===t.text&&(i.text=n),!0===t.numbers&&le.test(n)){var a=Number(n.replace(/,/g,""));!1===isNaN(a)&&(i.number=a)}return t.links&&e.links().length>0&&(i.links=e.links().map((function(e){return e.json()}))),t.formatting&&e.data.fmt&&(i.formatting=e.data.fmt),i},de=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},fe={links:function(e){var t=this.data.links||[];if("number"==typeof e)return t[e];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);var i=t.find((function(t){return t.page===e}));return void 0===i?[]:[i]}return t},interwiki:function(e){var t=this.links().filter((function(e){return void 0!==e.wiki}));return"number"==typeof e?t[e]:t},bolds:function(e){var t=[];return this.data&&this.data.fmt&&this.data.fmt.bold&&(t=this.data.fmt.bold||[]),"number"==typeof e?t[e]:t},italics:function(e){var t=[];return this.data&&this.data.fmt&&this.data.fmt.italic&&(t=this.data.fmt.italic||[]),"number"==typeof e?t[e]:t},dates:function(e){var t=[];return"number"==typeof e?t[e]:t},text:function(e){return void 0!==e&&"string"==typeof e&&(this.data.text=e),this.data.text||""},json:function(e){return me(this,e)}};Object.keys(fe).forEach((function(e){de.prototype[e]=fe[e]})),de.prototype.italic=de.prototype.italics,de.prototype.bold=de.prototype.bolds,de.prototype.plaintext=de.prototype.text;var ge=de,he=["ad","adj","adm","adv","al","alta","approx","apr","apt","arc","ariz","assn","asst","atty","aug","ave","ba","bc","bl","bldg","blvd","brig","bros","ca","cal","calif","capt","cca","cg","cl","cm","cmdr","co","col","colo","comdr","conn","corp","cpl","cres","ct","cyn","dak","dec","def","dept","det","dg","dist","dl","dm","dr","ea","eg","eng","esp","esq","est","etc","ex","exp","feb","fem","fig","fl oz","fl","fla","fm","fr","ft","fy","ga","gal","gb","gen","gov","hg","hon","hr","hrs","hwy","hz","ia","ida","ie","inc","inf","jan","jd","jr","jul","jun","kan","kans","kb","kg","km","kmph","lat","lb","lit","llb","lm","lng","lt","ltd","lx","ma","maj","mar","masc","mb","md","messrs","mg","mi","min","minn","misc","mister","ml","mlle","mm","mme","mph","mps","mr","mrs","ms","mstr","mt","neb","nebr","nee","no","nov","oct","okla","ont","op","ord","oz","pa","pd","penn","penna","phd","pl","pp","pref","prob","prof","pron","ps","psa","pseud","pt","pvt","qt","que","rb","rd","rep","reps","res","rev","sask","sec","sen","sens","sep","sept","sfc","sgt","sir","situ","sq ft","sq","sr","ss","st","supt","surg","tb","tbl","tbsp","tce","td","tel","temp","tenn","tex","tsp","univ","usafa","ut","va","vb","ver","vet","vitro","vivo","vol","vs","vt","wis","wisc","wr","wy","wyo","yb","µg"].concat("[^]][^]]"),be=new RegExp("(^| |')("+he.join("|")+")[.!?] ?$","i"),ke=new RegExp("[ |.|'|[][A-Z].? *?$","i"),we=new RegExp("\\.\\.\\.* +?$"),ve=/ c\. $/,ye=new RegExp("[a-zа-яぁ-ゟ][a-zа-яぁ-ゟ゠-ヿ]","iu"),xe=function(e){var t=[],i=[];if(!e||"string"!=typeof e||0===e.trim().length)return t;for(var n=function(e){var t=e.split(/(\n+)/);return function(e){var t=[];return e.forEach((function(e){t=t.concat(e)})),t}(t=(t=t.filter((function(e){return e.match(/\S/)}))).map((function(e){return e.split(/(\S.+?[.!?]"?)(?=\s+|$)/g)})))}(e),a=0;ai.length)return!1;var n=e.match(/"/g);return!(n&&n.length%2!=0&&e.length<900)}(o))?i[s+1]=i[s]+(i[s+1]||""):i[s]&&i[s].length>0&&(t.push(i[s]),i[s]="");return 0===t.length?[e]:t};function $e(e){var t,i={text:e};return ce(i),i.text=(t=(t=(t=i.text).replace(/\([,;: ]*\)/g,"")).replace(/\( *(; ?)+/g,"("),(t=ne(t)).replace(/ +\.$/,".")),i=ue(i),new ge(i)}var je=$e,ze=function(e){var t=xe(e.wiki);(t=t.map($e))[0]&&t[0].text()&&":"===t[0].text()[0]&&(t=t.slice(1)),e.sentences=t},Oe=function(e){return e=(e=e.replace(/^\{\{/,"")).replace(/\}\}$/,"")},Ee=function(e){return e=(e=(e=(e||"").trim()).toLowerCase()).replace(/_/g," ")},_e=function(e){var t=e.split(/\n?\|/);t.forEach((function(e,i){null!==e&&(/\[\[[^\]]+$/.test(e)||/\{\{[^\}]+$/.test(e)||e.split("{{").length!==e.split("}}").length||e.split("[[").length!==e.split("]]").length)&&(t[i+1]=t[i]+"|"+t[i+1],t[i]=null)}));for(var i=(t=(t=t.filter((function(e){return null!==e}))).map((function(e){return(e||"").trim()}))).length-1;i>=0;i-=1){""===t[i]&&t.pop();break}return t},Se=/^[ '-\)\x2D\.0-9_a-z\xC0-\xFF\u0153\u017F\u1E9E\u212A\u212B]+=/i,Ce={template:!0,list:!0,prototype:!0},qe=function(e,t){var i=0;return e.reduce((function(e,n){if(n=(n||"").trim(),!0===Se.test(n)){var a=function(e){var t=e.split("="),i=t[0]||"";i=i.toLowerCase().trim();var n=t.slice(1).join("=");return Ce.hasOwnProperty(i)&&(i="_"+i),{key:i,val:n.trim()}}(n);if(a.key)return e[a.key]=a.val,e}t&&t[i]?e[t[i]]=n:(e.list=e.list||[],e.list.push(n));return i+=1,e}),{})},Ne={classname:!0,style:!0,align:!0,margin:!0,left:!0,break:!0,boxsize:!0,framestyle:!0,item_style:!0,collapsible:!0,list_style_type:!0,"list-style-type":!0,colwidth:!0},Ae=function(e){return Object.keys(e).forEach((function(t){!0===Ne[t.toLowerCase()]&&delete e[t],null!==e[t]&&""!==e[t]||delete e[t]})),e},Le=je,De=function(e,t){var i=Le(e);return"json"===t?i.json():"raw"===t?i:i.text()},Te=function(e,t,i){t=t||[],e=Oe(e||"");var n=_e(e),a=n.shift(),r=qe(n,t);return(r=Ae(r))[1]&&t[0]&&!1===r.hasOwnProperty(t[0])&&(r[t[0]]=r[1],delete r[1]),Object.keys(r).forEach((function(e){r[e]="list"!==e?De(r[e],i):r[e].map((function(e){return De(e,i)}))})),a&&(r.template=Ee(a)),r},Ie=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},Pe={title:function(){var e=this.data;return e.title||e.encyclopedia||e.author||""},links:function(e){var t=[];if("number"==typeof e)return t[e];if("number"==typeof e)return t[e];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);var i=t.find((function(t){return t.page()===e}));return void 0===i?[]:[i]}return t||[]},text:function(){return""},json:function(){return this.data}};Object.keys(Pe).forEach((function(e){Ie.prototype[e]=Pe[e]}));var Me=Ie,Re=je,Ue=function(e){return/^ *?\{\{ *?(cite|citation)/i.test(e)&&/\}\} *?$/.test(e)&&!1===/citation needed/i.test(e)},Fe=function(e){var t=Te(e);return t.type=t.template.replace(/cite /,""),t.template="citation",t},Ke=function(e){return{template:"citation",type:"inline",data:{},inline:Re(e)||{}}},Be=function(e){var t=[],i=e.wiki;i=(i=(i=(i=i.replace(/ ?([\s\S]{0,1800}?)<\/ref> ?/gi,(function(e,n){if(Ue(n)){var a=Fe(n);a&&t.push(a),i=i.replace(n,"")}else t.push(Ke(n));return" "}))).replace(/ ?]{0,200}?\/> ?/gi," ")).replace(/ ?]{0,200}?>([\s\S]{0,1800}?)<\/ref> ?/gi,(function(e,n){if(Ue(n)){var a=Fe(n);a&&t.push(a),i=i.replace(n,"")}else t.push(Ke(n));return" "}))).replace(/ ?<[ \/]?[a-z0-9]{1,8}[a-z0-9=" ]{2,20}[ \/]?> ?/g," "),e.references=t.map((function(e){return new Me(e)})),e.wiki=i},We=je,Ye=/^(={1,5})(.{1,200}?)={1,5}$/,Ze=function(e,t){var i=t.match(Ye);if(!i)return e.title="",e.depth=0,e;var n=i[2]||"",a={wiki:n=(n=We(n).text()).replace(/\{\{.+?\}\}/,"")};Be(a),n=ne(n=a.wiki);var r=0;return i[1]&&(r=i[1].length-2),e.title=n,e.depth=r,e},Ge=function(e){var t=[],i=[];e=function(e){return e=e.filter((function(e){return e&&!0!==/^\|\+/.test(e)})),!0===/^{\|/.test(e[0])&&e.shift(),!0===/^\|}/.test(e[e.length-1])&&e.pop(),!0===/^\|-/.test(e[0])&&e.shift(),e}(e);for(var n=0;n0&&(t.push(i),i=[]):(!(a=a.split(/(?:\|\||!!)/))[0]&&a[1]&&a.shift(),a.forEach((function(e){e=(e=e.replace(/^\| */,"")).trim(),i.push(e)})))}return i.length>0&&t.push(i),t},He=/.*rowspan *?= *?["']?([0-9]+)["']?[ \|]*/,Ve=/.*colspan *?= *?["']?([0-9]+)["']?[ \|]*/,Je=function(e){return e=function(e){return e.forEach((function(t,i){t.forEach((function(n,a){var r=n.match(He);if(null!==r){var o=parseInt(r[1],10);n=n.replace(He,""),t[a]=n;for(var s=i+1;s0}))}(e))},Qe=je,Xe=/^!/,et={name:!0,age:!0,born:!0,date:!0,year:!0,city:!0,country:!0,population:!0,count:!0,number:!0},tt=function(e){return(e=Qe(e).text()).match(/\|/)&&(e=e.replace(/.+\| ?/,"")),e=(e=(e=e.replace(/style=['"].*?["']/,"")).replace(/^!/,"")).trim()},it=function(e){return(e=e||[]).length-e.filter((function(e){return e})).length>3},nt=function(e){if(e.length<=3)return[];var t=e[0].slice(0);t=t.map((function(e){return e=e.replace(/^\! */,""),e=Qe(e).text(),e=(e=tt(e)).toLowerCase()}));for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:[],t=[];it(e[0])&&e.shift();var i=e[0];return i&&i[0]&&i[1]&&(/^!/.test(i[0])||/^!/.test(i[1]))&&(t=i.map((function(e){return e=e.replace(/^\! */,""),tt(e)})),e.shift()),(i=e[0])&&i[0]&&i[1]&&/^!/.test(i[0])&&/^!/.test(i[1])&&(i.forEach((function(e,i){e=e.replace(/^\! */,""),e=tt(e),!0===Boolean(e)&&(t[i]=e)})),e.shift()),t}(i=Je(i));if(!n||n.length<=1){n=nt(i);var a=i[i.length-1]||[];n.length<=1&&a.length>2&&(n=nt(i.slice(1))).length>0&&(i=i.slice(2))}return i.map((function(e){return function(e,t){var i={};return e.forEach((function(e,n){var a=t[n]||"col"+(n+1),r=Qe(e);r.text(tt(r.text())),i[a]=r})),i}(e,n)}))},rt=function(e,t){return e.map((function(e){var i={};return Object.keys(e).forEach((function(t){i[t]=e[t].json()})),!0===t.encode&&(i=V(i)),i}))},ot={},st=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},ct={links:function(e){var t=[];if(this.data.forEach((function(e){Object.keys(e).forEach((function(i){t=t.concat(e[i].links())}))})),"number"==typeof e)return t[e];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);var i=t.find((function(t){return t.page()===e}));return void 0===i?[]:[i]}return t},keyValue:function(e){var t=this.json(e);return t.forEach((function(e){Object.keys(e).forEach((function(t){e[t]=e[t].text}))})),t},json:function(e){return e=p(e,ot),rt(this.data,e)},text:function(){return""}};ct.keyvalue=ct.keyValue,ct.keyval=ct.keyValue,Object.keys(ct).forEach((function(e){st.prototype[e]=ct[e]}));var ut=st,lt=/^\s*{\|/,pt=/^\s*\|}/,mt=function(e){for(var t=[],i=e.wiki,n=i.split("\n"),a=[],r=0;r0&&(a[a.length-1]+="\n"+n[r]);else{a[a.length-1]+="\n"+n[r];var o=a.pop();t.push(o)}else a.push(n[r]);var s=[];t.forEach((function(e){if(e){i=(i=i.replace(e+"\n","")).replace(e,"");var t=at(e);t&&t.length>0&&s.push(new ut(t))}})),s.length>0&&(e.tables=s),e.wiki=i},dt={sentences:!0},ft=function(e,t){var i={};return!0===(t=p(t,dt)).sentences&&(i.sentences=e.sentences().map((function(e){return e.json(t)}))),i},gt={sentences:!0,lists:!0,images:!0},ht=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},bt={sentences:function(e){return"number"==typeof e?this.data.sentences[e]:this.data.sentences||[]},references:function(e){return"number"==typeof e?this.data.references[e]:this.data.references},lists:function(e){return"number"==typeof e?this.data.lists[e]:this.data.lists},images:function(e){return"number"==typeof e?this.data.images[e]:this.data.images||[]},links:function(e){var t=[];if(this.sentences().forEach((function(i){t=t.concat(i.links(e))})),"number"==typeof e)return t[e];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);var i=t.find((function(t){return t.page()===e}));return void 0===i?[]:[i]}return t||[]},interwiki:function(e){var t=[];return this.sentences().forEach((function(e){t=t.concat(e.interwiki())})),"number"==typeof e?t[e]:t||[]},text:function(e){e=p(e,gt);var t=this.sentences().map((function(t){return t.text(e)})).join(" ");return this.lists().forEach((function(e){t+="\n"+e.text()})),t},json:function(e){return e=p(e,gt),ft(this,e)}};bt.citations=bt.references,Object.keys(bt).forEach((function(e){ht.prototype[e]=bt[e]}));var kt=ht;var wt=function(e){for(var t=[],i=[],n=e.split(""),a=0,r=0;r0){for(var s=0,c=0,u=0;uc&&i.push("]"),t.push(i.join("")),i=[]}}return t},vt=je,yt=new RegExp("("+_.images.join("|")+"):","i"),xt="(".concat(_.images.join("|"),")"),$t=new RegExp(xt+":(.+?)[\\||\\]]","iu"),jt={thumb:!0,thumbnail:!0,border:!0,right:!0,left:!0,center:!0,top:!0,bottom:!0,none:!0,upright:!0,baseline:!0,middle:!0,sub:!0,super:!0},zt=function(e,t){var i=e.wiki;wt(i).forEach((function(n){if(!0===yt.test(n)){e.images=e.images||[];var a=function(e,t){var i=e.match($t);if(null===i||!i[2])return null;var n="".concat(i[1],":").concat(i[2]||""),a=(n=n.trim()).charAt(0).toUpperCase()+n.substring(1);if(a=a.replace(/ /g,"_")){var r={file:n,lang:t.lang,domain:t.domain};e=(e=e.replace(/^\[\[/,"")).replace(/\]\]$/,"");var o=Te(e),s=o.list||[];return o.alt&&(r.alt=o.alt),(s=s.filter((function(e){return!1===jt.hasOwnProperty(e)})))[s.length-1]&&(r.caption=vt(s[s.length-1])),new $(r)}return null}(n,t);a&&e.images.push(a),i=i.replace(n,"")}})),e.wiki=i},Ot={},Et=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},_t={lines:function(){return this.data},links:function(e){var t=[];if(this.lines().forEach((function(e){t=t.concat(e.links())})),"number"==typeof e)return t[e];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);var i=t.find((function(t){return t.page()===e}));return void 0===i?[]:[i]}return t},json:function(e){return e=p(e,Ot),this.lines().map((function(t){return t.json(e)}))},text:function(){return function(e,t){return e.map((function(e){return" * "+e.text(t)})).join("\n")}(this.data)}};Object.keys(_t).forEach((function(e){Et.prototype[e]=_t[e]}));var St=Et,Ct=je,qt=/^[#\*:;\|]+/,Nt=/^\*+[^:,\|]{4}/,At=/^ ?\#[^:,\|]{4}/,Lt=/[a-z_0-9\]\}]/i,Dt=function(e){return qt.test(e)||Nt.test(e)||At.test(e)},Tt=function(e,t){for(var i=[],n=t;n0&&(i.push(r),a+=r.length-1)}else n.push(t[a]);e.lists=i.map((function(e){return new St(e)})),e.wiki=n.join("\n")}},Rt=function(e,t){var i=e.wiki,n=i.split(Pt);n=(n=n.filter((function(e){return e&&e.trim().length>0}))).map((function(e){var i={wiki:e,lists:[],sentences:[],images:[]};return Mt.list(i),Mt.image(i,t),It(i),new kt(i)})),e.wiki=i,e.paragraphs=n},Ut=function(e,t){var i=Object.keys(e.data).reduce((function(t,i){return e.data[i]&&(t[i]=e.data[i].json()),t}),{});return!0===t.encode&&(i=V(i)),i},Ft=function(e){return(e=(e=e.toLowerCase()).replace(/[-_]/g," ")).trim()},Kt=function(e){this._type=e.type,this.domain=e.domain,Object.defineProperty(this,"data",{enumerable:!1,value:e.data})},Bt={type:function(){return this._type},links:function(e){var t=this,i=[];if(Object.keys(this.data).forEach((function(e){t.data[e].links().forEach((function(e){return i.push(e)}))})),"number"==typeof e)return i[e];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);var n=i.find((function(t){return t.page()===e}));return void 0===n?[]:[n]}return i},image:function(){var e=this.get("image")||this.get("image2")||this.get("logo");if(!e)return null;var t=e.json();return t.file=t.text,t.text="",t.domain=this.domain,new $(t)},get:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";e=Ft(e);for(var t=Object.keys(this.data),i=0;i0?a++:a=e.indexOf(Yt,a+1)){var r=e[a];if(r===Yt&&(t+=1),t>0){if("}"===r&&0===(t-=1)){n.push(r);var o=n.join("");n=[],/\{\{/.test(o)&&/\}\}/.test(o)&&i.push(o);continue}if(1===t&&r!==Yt&&"}"!==r){t=0,n=[];continue}n.push(r)}}return i},Gt=function(e){var t=null;return(t=/^\{\{[^\n]+\|/.test(e)?(e.match(/^\{\{(.+?)\|/)||[])[1]:-1!==e.indexOf("\n")?(e.match(/^\{\{(.+?)\n/)||[])[1]:(e.match(/^\{\{(.+?)\}\}$/)||[])[1])&&(t=t.replace(/:.*/,""),t=Ee(t)),t||null},Ht=/\{\{/,Vt=function(e){return{body:e=e.replace(/#invoke:/,""),name:Gt(e),children:[]}},Jt=function e(t){var i=t.body.substr(2);return i=i.replace(/\}\}$/,""),t.children=Zt(i),t.children=t.children.map(Vt),0===t.children.length||t.children.forEach((function(t){var i=t.body.substr(2);return Ht.test(i)?e(t):null})),t},Qt=function(e){var t=Zt(e);return t=(t=t.map(Vt)).map(Jt)},Xt=["anchor","defaultsort","use list-defined references","void","pp","pp-move-indef","pp-semi-indef","pp-vandalism","r","#tag","div col","pope list end","shipwreck list end","starbox end","end box","end","s-end"].reduce((function(e,t){return e[t]=!0,e}),{}),ei=new RegExp("^(subst.)?("+_.infoboxes.join("|")+")[: \n]","i"),ti=/^infobox /i,ii=/ infobox$/i,ni=/$Year in [A-Z]/i,ai={"gnf protein box":!0,"automatic taxobox":!0,"chembox ":!0,editnotice:!0,geobox:!0,hybridbox:!0,ichnobox:!0,infraspeciesbox:!0,mycomorphbox:!0,oobox:!0,"paraphyletic group":!0,speciesbox:!0,subspeciesbox:!0,"starbox short":!0,taxobox:!0,nhlteamseason:!0,"asian games bid":!0,"canadian federal election results":!0,"dc thomson comic strip":!0,"daytona 24 races":!0,edencharacter:!0,"moldova national football team results":!0,samurai:!0,protein:!0,"sheet authority":!0,"order-of-approx":!0,"bacterial labs":!0,"medical resources":!0,ordination:!0,"hockey team coach":!0,"hockey team gm":!0,"pro hockey team":!0,"hockey team player":!0,"hockey team start":!0,mlbbioret:!0},ri=function(e){return!0===ai.hasOwnProperty(e)||(!!ei.test(e)||(!(!ti.test(e)&&!ii.test(e))||!!ni.test(e)))},oi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.template.match(ei),i=e.template;t&&t[0]&&(i=i.replace(t[0],""));var n={template:"infobox",type:i=i.trim(),data:e};return delete n.data.template,delete n.data.list,n},si=[void 0,"January","February","March","April","May","June","July","August","September","October","November","December"],ci=si.reduce((function(e,t,i){return 0===i||(e[t.toLowerCase()]=i),e}),{}),ui=function(e){return e<10?"0"+e:String(e)},li=function(e){var t=String(e.year||"");if(void 0!==e.month&&!0===si.hasOwnProperty(e.month))if(void 0===e.date)t="".concat(si[e.month]," ").concat(e.year);else{if(t="".concat(si[e.month]," ").concat(e.date,", ").concat(e.year),void 0!==e.hour&&void 0!==e.minute){var i="".concat(ui(e.hour),":").concat(ui(e.minute));void 0!==e.second&&(i=i+":"+ui(e.second)),t=i+", "+t}e.tz&&(t+=" (".concat(e.tz,")"))}return t},pi=function(e){for(var t={},i=["year","month","date","hour","minute","second"],n=0;n0&&(n.years=a,i-=n.years*gi);var r=Math.floor(i/fi,10);r>0&&(n.months=r,i-=n.months*fi);var o=Math.floor(i/di,10);return o>0&&(n.days=o),n},ki=pi,wi=li,vi=function(e){return{template:"date",data:e}},yi=function(e){var t=(e=Oe(e)).split("|"),i=ki(t.slice(1,4)),n=t.slice(4,7);if(0===n.length){var a=new Date;n=[a.getFullYear(),a.getMonth(),a.getDate()]}return{from:i,to:n=ki(n)}},xi={date:function(e,t){var i=Te(e,["year","month","date","hour","minute","second","timezone"]),n=ki([i.year,i.month,i.date||i.day]);return i.text=wi(n),i.timezone&&("Z"===i.timezone&&(i.timezone="UTC"),i.text+=" (".concat(i.timezone,")")),i.hour&&i.minute&&(i.second?i.text="".concat(i.hour,":").concat(i.minute,":").concat(i.second,", ")+i.text:i.text="".concat(i.hour,":").concat(i.minute,", ")+i.text),i.text&&t.push(vi(i)),i.text},natural_date:function(e,t){var i=Te(e,["text"]).text||"",n={};if(/^[0-9]{4}$/.test(i))n.year=parseInt(i,10);else{var a=i.replace(/[a-z]+\/[a-z]+/i,"");a=a.replace(/[0-9]+:[0-9]+(am|pm)?/i,"");var r=new Date(a);!1===isNaN(r.getTime())&&(n.year=r.getFullYear(),n.month=r.getMonth()+1,n.date=r.getDate())}return t.push(vi(n)),i.trim()},one_year:function(e,t){var i=Te(e,["year"]),n=Number(i.year);return t.push(vi({year:n})),String(n)},two_dates:function(e,t){var i=Te(e,["b","birth_year","birth_month","birth_date","death_year","death_month","death_date"]);if(i.b&&"b"===i.b.toLowerCase()){var n=ki([i.birth_year,i.birth_month,i.birth_date]);return t.push(vi(n)),wi(n)}var a=ki([i.death_year,i.death_month,i.death_date]);return t.push(vi(a)),wi(a)},age:function(e){var t=yi(e);return bi(t.from,t.to).years||0},"diff-y":function(e){var t=yi(e),i=bi(t.from,t.to);return 1===i.years?i.years+" year":(i.years||0)+" years"},"diff-ym":function(e){var t=yi(e),i=bi(t.from,t.to),n=[];return 1===i.years?n.push(i.years+" year"):i.years&&0!==i.years&&n.push(i.years+" years"),1===i.months?n.push("1 month"):i.months&&0!==i.months&&n.push(i.months+" months"),n.join(", ")},"diff-ymd":function(e){var t=yi(e),i=bi(t.from,t.to),n=[];return 1===i.years?n.push(i.years+" year"):i.years&&0!==i.years&&n.push(i.years+" years"),1===i.months?n.push("1 month"):i.months&&0!==i.months&&n.push(i.months+" months"),1===i.days?n.push("1 day"):i.days&&0!==i.days&&n.push(i.days+" days"),n.join(", ")},"diff-yd":function(e){var t=yi(e),i=bi(t.from,t.to),n=[];return 1===i.years?n.push(i.years+" year"):i.years&&0!==i.years&&n.push(i.years+" years"),i.days+=30*(i.months||0),1===i.days?n.push("1 day"):i.days&&0!==i.days&&n.push(i.days+" days"),n.join(", ")},"diff-d":function(e){var t=yi(e),i=bi(t.from,t.to),n=[];return i.days+=365*(i.years||0),i.days+=30*(i.months||0),1===i.days?n.push("1 day"):i.days&&0!==i.days&&n.push(i.days+" days"),n.join(", ")}},$i=function(e){var t=new Date(e);if(isNaN(t.getTime()))return"";var i=(new Date).getTime()-t.getTime(),n="ago";i<0&&(n="from now",i=Math.abs(i));var a=i/1e3/60/60/24;return a<365?parseInt(a,10)+" days "+n:parseInt(a/365,10)+" years "+n},ji=xi.date,zi=xi.natural_date,Oi=["January","February","March","April","May","June","July","August","September","October","November","December"],Ei=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],_i=Object.assign({},mi,{currentday:function(){var e=new Date;return String(e.getDate())},currentdayname:function(){var e=new Date;return Ei[e.getDay()]},currentmonth:function(){var e=new Date;return Oi[e.getMonth()]},currentyear:function(){var e=new Date;return String(e.getFullYear())},monthyear:function(){var e=new Date;return Oi[e.getMonth()]+" "+e.getFullYear()},"monthyear-1":function(){var e=new Date;return e.setMonth(e.getMonth()-1),Oi[e.getMonth()]+" "+e.getFullYear()},"monthyear+1":function(){var e=new Date;return e.setMonth(e.getMonth()+1),Oi[e.getMonth()]+" "+e.getFullYear()},date:0,"time ago":function(e){var t=Te(e,["date","fmt"]).date;return $i(t)},"birth date and age":function(e,t){var i=Te(e,["year","month","day"]);return i.year&&/[a-z]/i.test(i.year)?zi(e,t):(t.push(i),i=pi([i.year,i.month,i.day]),li(i))},"birth year and age":function(e,t){var i=Te(e,["birth_year","birth_month"]);if(i.death_year&&/[a-z]/i.test(i.death_year))return zi(e,t);t.push(i);var n=(new Date).getFullYear()-parseInt(i.birth_year,10);i=pi([i.birth_year,i.birth_month]);var a=li(i);return n&&(a+=" (age ".concat(n,")")),a},"death year and age":function(e,t){var i=Te(e,["death_year","birth_year","death_month"]);return i.death_year&&/[a-z]/i.test(i.death_year)?zi(e,t):(t.push(i),i=pi([i.death_year,i.death_month]),li(i))},"birth date and age2":function(e,t){var i=Te(e,["at_year","at_month","at_day","birth_year","birth_month","birth_day"]);return t.push(i),i=pi([i.birth_year,i.birth_month,i.birth_day]),li(i)},"birth based on age as of date":function(e,t){var i=Te(e,["age","year","month","day"]);t.push(i);var n=parseInt(i.age,10),a=parseInt(i.year,10)-n;return a&&n?"".concat(a," (age ").concat(i.age,")"):"(age ".concat(i.age,")")},"death date and given age":function(e,t){var i=Te(e,["year","month","day","age"]);t.push(i),i=pi([i.year,i.month,i.day]);var n=li(i);return i.age&&(n+=" (age ".concat(i.age,")")),n},dts:function(e){e=(e=e.replace(/\|format=[ymd]+/i,"")).replace(/\|abbr=(on|off)/i,"");var t=Te(e,["year","month","date","bc"]);return t.date&&t.month&&t.year?!0===/[a-z]/.test(t.month)?[t.month,t.date,t.year].join(" "):[t.year,t.month,t.date].join("-"):t.month&&t.year?[t.year,t.month].join("-"):t.year?(t.year<0&&(t.year=Math.abs(t.year)+" BC"),t.year):""},start:ji,end:ji,birth:ji,death:ji,"start date":ji,"end date":ji,"birth date":ji,"death date":ji,"start date and age":ji,"end date and age":ji,"start-date":zi,"end-date":zi,"birth-date":zi,"death-date":zi,"birth-date and age":zi,"birth-date and given age":zi,"death-date and age":zi,"death-date and given age":zi,birthdeathage:xi.two_dates,dob:ji,age:xi.age,"age nts":xi.age,"age in years":xi["diff-y"],"age in years and months":xi["diff-ym"],"age in years, months and days":xi["diff-ymd"],"age in years and days":xi["diff-yd"],"age in days":xi["diff-d"]});_i.localday=_i.currentday,_i.localdayname=_i.currentdayname,_i.localmonth=_i.currentmonth,_i.localyear=_i.currentyear,_i.currentmonthname=_i.currentmonth,_i.currentmonthabbrev=_i.currentmonth,_i["death date and age"]=_i["birth date and age"],_i.bda=_i["birth date and age"],_i["birth date based on age at death"]=_i["birth based on age as of date"];var Si=_i,Ci={tag:function(e){var t=Te(e,["tag","open"]);return t.open&&"pair"!==t.open?"":{span:!0,div:!0,p:!0}[t.tag]?t.content||"":"<".concat(t.tag," ").concat(t.attribs||"",">").concat(t.content||"","")},plural:function(e){e=e.replace(/plural:/,"plural|");var t=Te(e,["num","word"]),i=Number(t.num),n=t.word;return 1!==i&&(/.y$/.test(n)?n=n.replace(/y$/,"ies"):n+="s"),i+" "+n},"first word":function(e){var t=Te(e,["text"]),i=t.text;return t.sep?i.split(t.sep)[0]:i.split(" ")[0]},trunc:function(e){var t=Te(e,["str","len"]);return t.str.substr(0,t.len)},"str mid":function(e){var t=Te(e,["str","start","end"]),i=parseInt(t.start,10)-1,n=parseInt(t.end,10);return t.str.substr(i,n)},p1:0,p2:1,p3:2,braces:function(e){var t=Te(e,["text"]),i="";return t.list&&(i="|"+t.list.join("|")),"{{"+(t.text||"")+i+"}}"},nobold:0,noitalic:0,nocaps:0,syntaxhighlight:function(e,t){var i=Te(e);return t.push(i),i.code||""},samp:function(e,t){var i=Te(e,["1"]);return t.push(i),i[1]||""},vanchor:0,resize:1,ra:function(e){var t=Te(e,["hours","minutes","seconds"]);return[t.hours||0,t.minutes||0,t.seconds||0].join(":")},deg2hms:function(e){return(Te(e,["degrees"]).degrees||"")+"°"},hms2deg:function(e){var t=Te(e,["hours","minutes","seconds"]);return[t.hours||0,t.minutes||0,t.seconds||0].join(":")},decdeg:function(e){var t=Te(e,["deg","min","sec","hem","rnd"]);return(t.deg||t.degrees)+"°"},rnd:0,dec:function(e){var t=Te(e,["degrees","minutes","seconds"]),i=(t.degrees||0)+"°";return t.minutes&&(i+=t.minutes+"′"),t.seconds&&(i+=t.seconds+"″"),i},val:function(e){var t=Te(e,["number","uncertainty"]),i=t.number;i&&Number(i)&&(i=Number(i).toLocaleString());var n=i||"";return t.p&&(n=t.p+n),t.s&&(n=t.s+n),(t.u||t.ul||t.upl)&&(n=n+" "+(t.u||t.ul||t.upl)),n},sub:function(e,t){var i=Te(e,["text"]);return t.push(i),i.text||""},sup:function(e,t){var i=Te(e,["text"]);return t.push(i),i.text||""}};Ci.rndfrac=Ci.rnd,Ci.rndnear=Ci.rnd,Ci["unité"]=Ci.val;["nowrap","nobr","big","cquote","pull quote","small","smaller","midsize","larger","big","kbd","bigger","large","mono","strongbad","stronggood","huge","xt","xt2","!xt","xtn","xtd","dc","dcr","mxt","!mxt","mxtn","mxtd","bxt","!bxt","bxtn","bxtd","delink","pre","var","mvar","pre2","code"].forEach((function(e){Ci[e]=function(e){return Te(e,["text"]).text||""}}));var qi=Ci,Ni={plainlist:function(e){var t=(e=Oe(e)).split("|");return e=(t=t.slice(1)).join("|"),(t=(t=e.split(/\n ?\* ?/)).filter((function(e){return e}))).join("\n\n")},"collapsible list":function(e,t){var i=Te(e);t.push(i);var n="";if(i.title&&(n+="'''".concat(i.title,"'''")+"\n\n"),!i.list){i.list=[];for(var a=1;a<10;a+=1)i[a]&&(i.list.push(i[a]),delete i[a])}return i.list=i.list.filter((function(e){return e})),n+=i.list.join("\n\n")},"ordered list":function(e,t){var i=Te(e);return t.push(i),i.list=i.list||[],i.list.map((function(e,t){return"".concat(t+1,". ").concat(e)})).join("\n\n")},hlist:function(e){var t=Te(e);return t.list=t.list||[],t.list.join(" · ")},pagelist:function(e){return(Te(e).list||[]).join(", ")},catlist:function(e){return(Te(e).list||[]).join(", ")},"br separated entries":function(e){return(Te(e).list||[]).join("\n\n")},"comma separated entries":function(e){return(Te(e).list||[]).join(", ")},"anchored list":function(e){var t=Te(e).list||[];return(t=t.map((function(e,t){return"".concat(t+1,". ").concat(e)}))).join("\n\n")},"bulleted list":function(e){var t=Te(e).list||[];return(t=(t=t.filter((function(e){return e}))).map((function(e){return"• "+e}))).join("\n\n")},"columns-list":function(e,t){var i=((Te(e).list||[])[0]||"").split(/\n/);return i=(i=i.filter((function(e){return e}))).map((function(e){return e.replace(/\*/,"")})),t.push({template:"columns-list",list:i}),(i=i.map((function(e){return"• "+e}))).join("\n\n")}};Ni.flatlist=Ni.plainlist,Ni.ublist=Ni.plainlist,Ni["unbulleted list"]=Ni["collapsible list"],Ni.ubl=Ni["collapsible list"],Ni["bare anchored list"]=Ni["anchored list"],Ni["plain list"]=Ni.plainlist,Ni.cmn=Ni["columns-list"],Ni.collist=Ni["columns-list"],Ni["col-list"]=Ni["columns-list"],Ni.columnslist=Ni["columns-list"];var Ai=Ni,Li={convert:function(e){var t=Te(e,["num","two","three","four"]);return"-"===t.two||"to"===t.two||"and"===t.two?t.four?"".concat(t.num," ").concat(t.two," ").concat(t.three," ").concat(t.four):"".concat(t.num," ").concat(t.two," ").concat(t.three):"".concat(t.num," ").concat(t.two)},term:function(e){var t=Te(e,["term"]);return"".concat(t.term,":")},defn:0,lino:0,linum:function(e){var t=Te(e,["num","text"]);return"".concat(t.num,". ").concat(t.text)},ill:function(e){return Te(e,["text","lan1","text1","lan2","text2"]).text},frac:function(e){var t=Te(e,["a","b","c"]);return t.c?"".concat(t.a," ").concat(t.b,"/").concat(t.c):t.b?"".concat(t.a,"/").concat(t.b):"1/".concat(t.b)},height:function(e,t){var i=Te(e);t.push(i);var n=[];return["m","cm","ft","in"].forEach((function(e){!0===i.hasOwnProperty(e)&&n.push(i[e]+e)})),n.join(" ")},"block indent":function(e){var t=Te(e);return t[1]?"\n"+t[1]+"\n":""},quote:function(e,t){var i=Te(e,["text","author"]);if(t.push(i),i.text){var n='"'.concat(i.text,'"');return i.author&&(n+="\n\n",n+=" - ".concat(i.author)),n+"\n"}return""},lbs:function(e){var t=Te(e,["text"]);return"[[".concat(t.text," Lifeboat Station|").concat(t.text,"]]")},lbc:function(e){var t=Te(e,["text"]);return"[[".concat(t.text,"-class lifeboat|").concat(t.text,"-class]]")},lbb:function(e){var t=Te(e,["text"]);return"[[".concat(t.text,"-class lifeboat|").concat(t.text,"]]")},own:function(e){var t=Te(e,["author"]),i="Own work";return t.author&&(i+=" by "+t.author),i},sic:function(e,t){var i=Te(e,["one","two","three"]),n=(i.one||"")+(i.two||"");return"?"===i.one&&(n=(i.two||"")+(i.three||"")),t.push({template:"sic",word:n}),"y"===i.nolink?n:"".concat(n," [sic]")},formatnum:function(e){e=e.replace(/:/,"|");var t=Te(e,["number"]).number||"";return t=t.replace(/,/g,""),Number(t).toLocaleString()||""},"#dateformat":function(e){return e=e.replace(/:/,"|"),Te(e,["date","format"]).date},lc:function(e){return e=e.replace(/:/,"|"),(Te(e,["text"]).text||"").toLowerCase()},lcfirst:function(e){e=e.replace(/:/,"|");var t=Te(e,["text"]).text;return t?t[0].toLowerCase()+t.substr(1):""},uc:function(e){return e=e.replace(/:/,"|"),(Te(e,["text"]).text||"").toUpperCase()},ucfirst:function(e){e=e.replace(/:/,"|");var t=Te(e,["text"]).text;return t?t[0].toUpperCase()+t.substr(1):""},padleft:function(e){e=e.replace(/:/,"|");var t=Te(e,["text","num"]);return(t.text||"").padStart(t.num,t.str||"0")},padright:function(e){e=e.replace(/:/,"|");var t=Te(e,["text","num"]);return(t.text||"").padEnd(t.num,t.str||"0")},abbr:function(e){return Te(e,["abbr","meaning","ipa"]).abbr},abbrlink:function(e){var t=Te(e,["abbr","page"]);return t.page?"[[".concat(t.page,"|").concat(t.abbr,"]]"):"[[".concat(t.abbr,"]]")},h:1,finedetail:0,sort:1};Li["str left"]=Li.trunc,Li["str crop"]=Li.trunc,Li.tooltip=Li.abbr,Li.abbrv=Li.abbr,Li.define=Li.abbr,Li.cvt=Li.convert;var Di=Li,Ti=Object.assign({},qi,Ai,Di);var Ii=function(e){var t=e.pop(),i=Number(e[0]||0),n=Number(e[1]||0),a=Number(e[2]||0);if("string"!=typeof t||isNaN(i))return null;var r=1;return/[SW]/i.test(t)&&(r=-1),r*(i+n/60+a/3600)},Pi=function(e){if("number"!=typeof e)return e;var t=1e5;return Math.round(e*t)/t},Mi={s:!0,w:!0},Ri=function(e){var i=Te(e);i=function(e){return e.list=e.list||[],e.list=e.list.map((function(t){var i=Number(t);if(!isNaN(i))return i;var n=t.split(/:/);return n.length>1?(e.props=e.props||{},e.props[n[0]]=n.slice(1).join(":"),null):t})),e.list=e.list.filter((function(e){return null!==e})),e}(i);var n,a,r=(n=i.list,a=n.map((function(e){return t(e)})).join("|"),2===n.length&&"number|number"===a?{lat:n[0],lon:n[1]}:4===n.length&&"number|string|number|string"===a?(Mi[n[1].toLowerCase()]&&(n[0]*=-1),"w"===n[3].toLowerCase()&&(n[2]*=-1),{lat:n[0],lon:n[2]}):6===n.length?{lat:Ii(n.slice(0,3)),lon:Ii(n.slice(3))}:8===n.length?{lat:Ii(n.slice(0,4)),lon:Ii(n.slice(4))}:{});return i.lat=Pi(r.lat),i.lon=Pi(r.lon),i.template="coord",delete i.list,i},Ui={coord:function(e,t){var i=Ri(e);return t.push(i),i.display&&-1===i.display.indexOf("inline")?"":"".concat(i.lat||"","°N, ").concat(i.lon||"","°W")},geo:["lat","lon","zoom"]};Ui.coor=Ui.coord,Ui["coor title dms"]=Ui.coord,Ui["coor title dec"]=Ui.coord,Ui["coor dms"]=Ui.coord,Ui["coor dm"]=Ui.coord,Ui["coor dec"]=Ui.coord;var Fi=Ui,Ki={etyl:1,mention:1,link:1,"la-verb-form":0,"la-ipa":0,sortname:function(e){var t=Te(e,["first","last","target","sort"]),i="".concat(t.first||""," ").concat(t.last||"");return i=i.trim(),t.nolink?t.target||i:(t.dab&&(i+=" (".concat(t.dab,")"),t.target&&(t.target+=" (".concat(t.dab,")"))),t.target?"[[".concat(t.target,"|").concat(i,"]]"):"[[".concat(i,"]]"))}};["lts","t","tfd links","tiw","tltt","tetl","tsetl","ti","tic","tiw","tlt","ttl","twlh","tl2","tlu","demo","hatnote","xpd","para","elc","xtag","mli","mlix","#invoke","url"].forEach((function(e){Ki[e]=function(e){var t=Te(e,["first","second"]);return t.second||t.first}})),Ki.m=Ki.mention,Ki["m-self"]=Ki.mention,Ki.l=Ki.link,Ki.ll=Ki.link,Ki["l-self"]=Ki.link;var Bi=Ki,Wi={wikt:"wiktionary",commons:"commons",c:"commons",commonscat:"commonscat",n:"wikinews",q:"wikiquote",s:"wikisource",a:"wikiauthor",b:"wikibooks",voy:"wikivoyage",v:"wikiversity",d:"wikidata",species:"wikispecies",m:"meta",mw:"mediawiki"},Yi={about:function(e,t){var i=Te(e);return t.push(i),""},main:function(e,t){var i=Te(e);return t.push(i),""},"main list":function(e,t){var i=Te(e);return t.push(i),""},see:function(e,t){var i=Te(e);return t.push(i),""},for:function(e,t){var i=Te(e);return t.push(i),""},further:function(e,t){var i=Te(e);return t.push(i),""},"further information":function(e,t){var i=Te(e);return t.push(i),""},listen:function(e,t){var i=Te(e);return t.push(i),""},"wide image":["file","width","caption"],redirect:function(e,t){for(var i=Te(e,["redirect"]),n=i.list||[],a=[],r=0;r0&&t.push(a)}return{template:"playoffbracket",rounds:t}}(e);return t.push(i),""}};["2teambracket","4team2elimbracket","8teambracket","16teambracket","32teambracket","4roundbracket-byes","cwsbracket","nhlbracket","nhlbracket-reseed","4teambracket-nhl","4teambracket-ncaa","4teambracket-mma","4teambracket-mlb","16teambracket-two-reseeds","8teambracket-nhl","8teambracket-mlb","8teambracket-ncaa","8teambracket-afc","8teambracket-afl","8teambracket-tennis3","8teambracket-tennis5","16teambracket-nhl","16teambracket-nhl divisional","16teambracket-nhl-reseed","16teambracket-nba","16teambracket-swtc","16teambracket-afc","16teambracket-tennis3","16teambracket-tennis5"].forEach((function(e){en[e]=en["4teambracket"]}));var tn=en,nn={"£":"GB£","¥":"¥","৳":"৳","₩":"₩","€":"€","₱":"₱","₹":"₹","₽":"₽","cn¥":"CN¥","gb£":"GB£","india rs":"₹","indian rupee symbol":"₹","indian rupee":"₹","indian rupees":"₹","philippine peso":"₱","russian ruble":"₽","SK won":"₩","turkish lira":"TRY",a$:"A$",au$:"A$",aud:"A$",bdt:"BDT",brl:"BRL",ca$:"CA$",cad:"CA$",chf:"CHF",cny:"CN¥",czk:"czk",dkk:"dkk",dkk2:"dkk",euro:"€",gbp:"GB£",hk$:"HK$",hkd:"HK$",ils:"ILS",inr:"₹",jpy:"¥",myr:"MYR",nis:"ILS",nok:"NOK",nok2:"NOK",nz$:"NZ$",nzd:"NZ$",peso:"peso",pkr:"₨",r$:"BRL",rmb:"CN¥",rub:"₽",ruble:"₽",rupee:"₹",s$:"sgd",sek:"SEK",sek2:"SEK",sfr:"CHF",sgd:"sgd",shekel:"ILS",sheqel:"ILS",ttd:"TTD",us$:"US$",usd:"US$",yen:"¥",zar:"R"},an=function(e,t){var i=Te(e,["amount","code"]);t.push(i);var n=i.template||"";switch("currency"===n?(n=i.code)||(i.code=n="usd"):""!==n&&"monnaie"!==n&&"unité"!==n&&"nombre"!==n&&"nb"!==n||(n=i.code),n=(n||"").toLowerCase()){case"us":i.code=n="usd";break;case"uk":i.code=n="gbp"}var a="".concat(nn[n]||"").concat(i.amount||"");return i.code&&!nn[i.code.toLowerCase()]&&(a+=" "+i.code),a},rn={currency:an,monnaie:an,"unité":an,nombre:an,nb:an,iso4217:an,inrconvert:function(e,t){var i=Te(e,["rupee_value","currency_formatting"]);t.push(i);var n=i.currency_formatting;if(n){var a=1;switch(n){case"k":a=1e3;break;case"m":a=1e6;break;case"b":a=1e9;break;case"t":a=1e12;break;case"l":a=1e5;break;case"c":a=1e7;break;case"lc":a=1e12}i.rupee_value=i.rupee_value*a}return"inr ".concat(i.rupee_value||"")}};Object.keys(nn).forEach((function(e){rn[e]=an}));var on=rn,sn={"election box begin":function(e,t){var i=Te(e);return t.push(i),""},"election box candidate":function(e,t){var i=Te(e);return t.push(i),""},"election box hold with party link":function(e,t){var i=Te(e);return t.push(i),""},"election box gain with party link":function(e,t){var i=Te(e);return t.push(i),""}};sn["election box begin no change"]=sn["election box begin"],sn["election box begin no party"]=sn["election box begin"],sn["election box begin no party no change"]=sn["election box begin"],sn["election box inline begin"]=sn["election box begin"],sn["election box inline begin no change"]=sn["election box begin"],sn["election box candidate for alliance"]=sn["election box candidate"],sn["election box candidate minor party"]=sn["election box candidate"],sn["election box candidate no party link no change"]=sn["election box candidate"],sn["election box candidate with party link"]=sn["election box candidate"],sn["election box candidate with party link coalition 1918"]=sn["election box candidate"],sn["election box candidate with party link no change"]=sn["election box candidate"],sn["election box inline candidate"]=sn["election box candidate"],sn["election box inline candidate no change"]=sn["election box candidate"],sn["election box inline candidate with party link"]=sn["election box candidate"],sn["election box inline candidate with party link no change"]=sn["election box candidate"],sn["election box inline incumbent"]=sn["election box candidate"];var cn=sn,un=[["🇦🇩","and","andorra"],["🇦🇪","are","united arab emirates"],["🇦🇫","afg","afghanistan"],["🇦🇬","atg","antigua and barbuda"],["🇦🇮","aia","anguilla"],["🇦🇱","alb","albania"],["🇦🇲","arm","armenia"],["🇦🇴","ago","angola"],["🇦🇶","ata","antarctica"],["🇦🇷","arg","argentina"],["🇦🇸","asm","american samoa"],["🇦🇹","aut","austria"],["🇦🇺","aus","australia"],["🇦🇼","abw","aruba"],["🇦🇽","ala","åland islands"],["🇦🇿","aze","azerbaijan"],["🇧🇦","bih","bosnia and herzegovina"],["🇧🇧","brb","barbados"],["🇧🇩","bgd","bangladesh"],["🇧🇪","bel","belgium"],["🇧🇫","bfa","burkina faso"],["🇧🇬","bgr","bulgaria"],["🇧🇬","bul","bulgaria"],["🇧🇭","bhr","bahrain"],["🇧🇮","bdi","burundi"],["🇧🇯","ben","benin"],["🇧🇱","blm","saint barthélemy"],["🇧🇲","bmu","bermuda"],["🇧🇳","brn","brunei darussalam"],["🇧🇴","bol","bolivia"],["🇧🇶","bes","bonaire, sint eustatius and saba"],["🇧🇷","bra","brazil"],["🇧🇸","bhs","bahamas"],["🇧🇹","btn","bhutan"],["🇧🇻","bvt","bouvet island"],["🇧🇼","bwa","botswana"],["🇧🇾","blr","belarus"],["🇧🇿","blz","belize"],["🇨🇦","can","canada"],["🇨🇨","cck","cocos (keeling) islands"],["🇨🇩","cod","congo"],["🇨🇫","caf","central african republic"],["🇨🇬","cog","congo"],["🇨🇭","che","switzerland"],["🇨🇮","civ","côte d'ivoire"],["🇨🇰","cok","cook islands"],["🇨🇱","chl","chile"],["🇨🇲","cmr","cameroon"],["🇨🇳","chn","china"],["🇨🇴","col","colombia"],["🇨🇷","cri","costa rica"],["🇨🇺","cub","cuba"],["🇨🇻","cpv","cape verde"],["🇨🇼","cuw","curaçao"],["🇨🇽","cxr","christmas island"],["🇨🇾","cyp","cyprus"],["🇨🇿","cze","czech republic"],["🇩🇪","deu","germany"],["🇩🇪","ger","germany"],["🇩🇯","dji","djibouti"],["🇩🇰","dnk","denmark"],["🇩🇲","dma","dominica"],["🇩🇴","dom","dominican republic"],["🇩🇿","dza","algeria"],["🇪🇨","ecu","ecuador"],["🇪🇪","est","estonia"],["🇪🇬","egy","egypt"],["🇪🇭","esh","western sahara"],["🇪🇷","eri","eritrea"],["🇪🇸","esp","spain"],["🇪🇹","eth","ethiopia"],["🇫🇮","fin","finland"],["🇫🇯","fji","fiji"],["🇫🇰","flk","falkland islands (malvinas)"],["🇫🇲","fsm","micronesia"],["🇫🇴","fro","faroe islands"],["🇫🇷","fra","france"],["🇬🇦","gab","gabon"],["🇬🇧","gbr","united kingdom"],["🇬🇩","grd","grenada"],["🇬🇫","guf","french guiana"],["🇬🇬","ggy","guernsey"],["🇬🇭","gha","ghana"],["🇬🇮","gib","gibraltar"],["🇬🇱","grl","greenland"],["🇬🇲","gmb","gambia"],["🇬🇳","gin","guinea"],["🇬🇵","glp","guadeloupe"],["🇬🇶","gnq","equatorial guinea"],["🇬🇷","grc","greece"],["🇬🇸","sgs","south georgia"],["🇬🇹","gtm","guatemala"],["🇬🇺","gum","guam"],["🇬🇼","gnb","guinea-bissau"],["🇬🇾","guy","guyana"],["🇭🇰","hkg","hong kong"],["🇭🇲","hmd","heard island and mcdonald islands"],["🇭🇳","hnd","honduras"],["🇭🇷","hrv","croatia"],["🇭🇹","hti","haiti"],["🇭🇺","hun","hungary"],["🇮🇩","idn","indonesia"],["🇮🇪","irl","ireland"],["🇮🇱","isr","israel"],["🇮🇲","imn","isle of man"],["🇮🇳","ind","india"],["🇮🇴","iot","british indian ocean territory"],["🇮🇶","irq","iraq"],["🇮🇷","irn","iran"],["🇮🇸","isl","iceland"],["🇮🇹","ita","italy"],["🇯🇪","jey","jersey"],["🇯🇲","jam","jamaica"],["🇯🇴","jor","jordan"],["🇯🇵","jpn","japan"],["🇰🇪","ken","kenya"],["🇰🇬","kgz","kyrgyzstan"],["🇰🇭","khm","cambodia"],["🇰🇮","kir","kiribati"],["🇰🇲","com","comoros"],["🇰🇳","kna","saint kitts and nevis"],["🇰🇵","prk","north korea"],["🇰🇷","kor","south korea"],["🇰🇼","kwt","kuwait"],["🇰🇾","cym","cayman islands"],["🇰🇿","kaz","kazakhstan"],["🇱🇦","lao","lao people's democratic republic"],["🇱🇧","lbn","lebanon"],["🇱🇨","lca","saint lucia"],["🇱🇮","lie","liechtenstein"],["🇱🇰","lka","sri lanka"],["🇱🇷","lbr","liberia"],["🇱🇸","lso","lesotho"],["🇱🇹","ltu","lithuania"],["🇱🇺","lux","luxembourg"],["🇱🇻","lva","latvia"],["🇱🇾","lby","libya"],["🇲🇦","mar","morocco"],["🇲🇨","mco","monaco"],["🇲🇩","mda","moldova"],["🇲🇪","mne","montenegro"],["🇲🇫","maf","saint martin (french part)"],["🇲🇬","mdg","madagascar"],["🇲🇭","mhl","marshall islands"],["🇲🇰","mkd","macedonia"],["🇲🇱","mli","mali"],["🇲🇲","mmr","myanmar"],["🇲🇳","mng","mongolia"],["🇲🇴","mac","macao"],["🇲🇵","mnp","northern mariana islands"],["🇲🇶","mtq","martinique"],["🇲🇷","mrt","mauritania"],["🇲🇸","msr","montserrat"],["🇲🇹","mlt","malta"],["🇲🇺","mus","mauritius"],["🇲🇻","mdv","maldives"],["🇲🇼","mwi","malawi"],["🇲🇽","mex","mexico"],["🇲🇾","mys","malaysia"],["🇲🇿","moz","mozambique"],["🇳🇦","nam","namibia"],["🇳🇨","ncl","new caledonia"],["🇳🇪","ner","niger"],["🇳🇫","nfk","norfolk island"],["🇳🇬","nga","nigeria"],["🇳🇮","nic","nicaragua"],["🇳🇱","nld","netherlands"],["🇳🇴","nor","norway"],["🇳🇵","npl","nepal"],["🇳🇷","nru","nauru"],["🇳🇺","niu","niue"],["🇳🇿","nzl","new zealand"],["🇴🇲","omn","oman"],["🇵🇦","pan","panama"],["🇵🇪","per","peru"],["🇵🇫","pyf","french polynesia"],["🇵🇬","png","papua new guinea"],["🇵🇭","phl","philippines"],["🇵🇰","pak","pakistan"],["🇵🇱","pol","poland"],["🇵🇲","spm","saint pierre and miquelon"],["🇵🇳","pcn","pitcairn"],["🇵🇷","pri","puerto rico"],["🇵🇸","pse","palestinian territory"],["🇵🇹","prt","portugal"],["🇵🇼","plw","palau"],["🇵🇾","pry","paraguay"],["🇶🇦","qat","qatar"],["🇷🇪","reu","réunion"],["🇷🇴","rou","romania"],["🇷🇸","srb","serbia"],["🇷🇺","rus","russia"],["🇷🇼","rwa","rwanda"],["🇸🇦","sau","saudi arabia"],["🇸🇧","slb","solomon islands"],["🇸🇨","syc","seychelles"],["🇸🇩","sdn","sudan"],["🇸🇪","swe","sweden"],["🇸🇬","sgp","singapore"],["🇸🇭","shn","saint helena, ascension and tristan da cunha"],["🇸🇮","svn","slovenia"],["🇸🇯","sjm","svalbard and jan mayen"],["🇸🇰","svk","slovakia"],["🇸🇱","sle","sierra leone"],["🇸🇲","smr","san marino"],["🇸🇳","sen","senegal"],["🇸🇴","som","somalia"],["🇸🇷","sur","suriname"],["🇸🇸","ssd","south sudan"],["🇸🇹","stp","sao tome and principe"],["🇸🇻","slv","el salvador"],["🇸🇽","sxm","sint maarten (dutch part)"],["🇸🇾","syr","syrian arab republic"],["🇸🇿","swz","swaziland"],["🇹🇨","tca","turks and caicos islands"],["🇹🇩","tcd","chad"],["🇹🇫","atf","french southern territories"],["🇹🇬","tgo","togo"],["🇹🇭","tha","thailand"],["🇹🇯","tjk","tajikistan"],["🇹🇰","tkl","tokelau"],["🇹🇱","tls","timor-leste"],["🇹🇲","tkm","turkmenistan"],["🇹🇳","tun","tunisia"],["🇹🇴","ton","tonga"],["🇹🇷","tur","turkey"],["🇹🇹","tto","trinidad and tobago"],["🇹🇻","tuv","tuvalu"],["🇹🇼","twn","taiwan"],["🇹🇿","tza","tanzania"],["🇺🇦","ukr","ukraine"],["🇺🇬","uga","uganda"],["🇺🇲","umi","united states minor outlying islands"],["🇺🇸","usa","united states"],["🇺🇸","us","united states"],["🇺🇾","ury","uruguay"],["🇺🇿","uzb","uzbekistan"],["🇻🇦","vat","vatican city"],["🇻🇨","vct","saint vincent and the grenadines"],["🇻🇪","ven","venezuela"],["🇻🇬","vgb","virgin islands, british"],["🇻🇮","vir","virgin islands, u.s."],["🇻🇳","vnm","viet nam"],["🇻🇺","vut","vanuatu"],["","win","west indies"],["🇼🇫","wlf","wallis and futuna"],["🇼🇸","wsm","samoa"],["🇾🇪","yem","yemen"],["🇾🇹","myt","mayotte"],["🇿🇦","zaf","south africa"],["🇿🇲","zmb","zambia"],["🇿🇼 ","zwe","zimbabwe"],["🇺🇳","un","united nations"],["🏴󠁧󠁢󠁥󠁮󠁧󠁿󠁧󠁢󠁥󠁮󠁧󠁿","eng","england"],["🏴󠁧󠁢󠁳󠁣󠁴󠁿","sct","scotland"],["🏴󠁧󠁢󠁷󠁬󠁳󠁿","wal","wales"],["🇪🇺","eu","european union"]],ln={flag:function(e){var t=Te(e,["flag","variant"]),i=t.flag||"";t.flag=(t.flag||"").toLowerCase();var n=un.find((function(e){return t.flag===e[1]||t.flag===e[2]}))||[],a=n[0]||"";return"".concat(a," [[").concat(n[2],"|").concat(i,"]]")},flagcountry:function(e){var t=Te(e,["flag","variant"]);t.flag=(t.flag||"").toLowerCase();var i=un.find((function(e){return t.flag===e[1]||t.flag===e[2]}))||[],n=i[0]||"";return"".concat(n," [[").concat(i[2],"]]")},flagcu:function(e){var t=Te(e,["flag","variant"]);t.flag=(t.flag||"").toLowerCase();var i=un.find((function(e){return t.flag===e[1]||t.flag===e[2]}))||[],n=i[0]||"";return"".concat(n," ").concat(i[2])},flagicon:function(e){var t=Te(e,["flag","variant"]);t.flag=(t.flag||"").toLowerCase();var i=un.find((function(e){return t.flag===e[1]||t.flag===e[2]}));return i?"[[".concat(i[2],"|").concat(i[0],"]]"):""},flagdeco:function(e){var t=Te(e,["flag","variant"]);return t.flag=(t.flag||"").toLowerCase(),(un.find((function(e){return t.flag===e[1]||t.flag===e[2]}))||[])[0]||""},fb:function(e){var t=Te(e,["flag","variant"]);t.flag=(t.flag||"").toLowerCase();var i=un.find((function(e){return t.flag===e[1]||t.flag===e[2]}));return i?"".concat(i[0]," [[").concat(i[2]," national football team|").concat(i[2],"]]"):""},fbicon:function(e){var t=Te(e,["flag","variant"]);t.flag=(t.flag||"").toLowerCase();var i=un.find((function(e){return t.flag===e[1]||t.flag===e[2]}));return i?" [[".concat(i[2]," national football team|").concat(i[0],"]]"):""},flagathlete:function(e){var t=Te(e,["name","flag","variant"]);t.flag=(t.flag||"").toLowerCase();var i=un.find((function(e){return t.flag===e[1]||t.flag===e[2]}));return i?"".concat(i[0]," [[").concat(t.name||"","]] (").concat(i[1].toUpperCase(),")"):"[[".concat(t.name||"","]]")}};un.forEach((function(e){ln[e[1]]=function(){return e[0]}})),ln.cr=ln.flagcountry,ln["cr-rt"]=ln.flagcountry,ln.cricon=ln.flagicon;var pn=ln,mn=function(e){var t=e.match(/ipac?-(.+)/);return null!==t?!0===S.hasOwnProperty(t[1])?S[t[1]].english_title:t[1]:null},dn={ipa:function(e,t){var i=Te(e,["transcription","lang","audio"]);return i.lang=mn(i.template),i.template="ipa",t.push(i),""},ipac:function(e,t){var i=Te(e);return i.transcription=(i.list||[]).join(","),delete i.list,i.lang=mn(i.template),i.template="ipac",t.push(i),""},transl:function(e,t){var i=Te(e,["lang","text","text2"]);return i.text2&&(i.iso=i.text,i.text=i.text2,delete i.text2),t.push(i),i.text||""}};Object.keys(S).forEach((function(e){dn["ipa-"+e]=dn.ipa,dn["ipac-"+e]=dn.ipac}));var fn=dn,gn={lang:1,"lang-de":0,"rtl-lang":1,taste:0,nihongo:function(e,t){var i=Te(e,["english","kanji","romaji","extra"]);t.push(i);var n=i.english||i.romaji||"";return i.kanji&&(n+=" (".concat(i.kanji,")")),n}};Object.keys(S).forEach((function(e){gn["lang-"+e]=gn["lang-de"]})),gn.nihongo2=gn.nihongo,gn.nihongo3=gn.nihongo,gn["nihongo-s"]=gn.nihongo,gn["nihongo foot"]=gn.nihongo;var hn=gn,bn=function(e){if(!e.numerator&&!e.denominator)return null;var t=Number(e.numerator)/Number(e.denominator);t*=100;var i=Number(e.decimals);return isNaN(i)&&(i=1),t=t.toFixed(i),Number(t)},kn={math:function(e,t){var i=Te(e,["formula"]);return t.push(i),"\n\n"+(i.formula||"")+"\n\n"},frac:function(e,t){var i=Te(e,["a","b","c"]),n={template:"sfrac"};return i.c?(n.integer=i.a,n.numerator=i.b,n.denominator=i.c):i.b?(n.numerator=i.a,n.denominator=i.b):(n.numerator=1,n.denominator=i.a),t.push(n),n.integer?"".concat(n.integer," ").concat(n.numerator,"⁄").concat(n.denominator):"".concat(n.numerator,"⁄").concat(n.denominator)},radic:function(e){var t=Te(e,["after","before"]);return"".concat(t.before||"","√").concat(t.after||"")},percentage:function(e){var t=Te(e,["numerator","denominator","decimals"]),i=bn(t);return null===i?"":i+"%"},"percent-done":function(e){var t=Te(e,["done","total","digits"]),i=bn({numerator:t.done,denominator:t.total,decimals:t.digits});return null===i?"":"".concat(t.done," (").concat(i,"%) done")},"winning percentage":function(e,t){var i=Te(e,["wins","losses","ties"]);t.push(i);var n=Number(i.wins),a=Number(i.losses),r=Number(i.ties)||0,o=n+a+r;"y"===i.ignore_ties&&(r=0),r&&(n+=r/2);var s=bn({numerator:n,denominator:o,decimals:1});return null===s?"":".".concat(10*s)},winlosspct:function(e,t){var i=Te(e,["wins","losses"]);t.push(i);var n=Number(i.wins),a=Number(i.losses),r=bn({numerator:n,denominator:n+a,decimals:1});return null===r?"":(r=".".concat(10*r),"".concat(n||0," || ").concat(a||0," || ").concat(r||"-"))}};kn.sfrac=kn.frac,kn.sqrt=kn.radic,kn.pct=kn.percentage,kn.percent=kn.percentage,kn.winpct=kn["winning percentage"],kn.winperc=kn["winning percentage"];var wn=kn,vn=function(e,t,i){var n=Te(e);return i&&(n.name=n.template,n.template=i),t.push(n),""},yn={persondata:vn,taxobox:vn,citation:vn,portal:vn,reflist:vn,"cite book":vn,"cite journal":vn,"cite web":vn,"commons cat":vn,"portuguese name":["first","second","suffix"],uss:["ship","id"],isbn:function(e,t){var i=Te(e,["id","id2","id3"]);return t.push(i),"ISBN: "+(i.id||"")},marriage:function(e,t){var i=Te(e,["spouse","from","to","end"]);t.push(i);var n="".concat(i.spouse||"");return i.from&&(i.to?n+=" (m. ".concat(i.from,"-").concat(i.to,")"):n+=" (m. ".concat(i.from,")")),n},"based on":function(e,t){var i=Te(e,["title","author"]);return t.push(i),"".concat(i.title," by ").concat(i.author||"")},"video game release":function(e,t){for(var i=["region","date","region2","date2","region3","date3","region4","date4"],n=Te(e,i),a={template:"video game release",releases:[]},r=0;r0&&t.push(c),""},Hn=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},Vn={text:function(){return""},json:function(){return this.data}};Object.keys(Vn).forEach((function(e){Hn.prototype[e]=Vn[e]}));var Jn=Hn,Qn=new RegExp("^(cite |citation)","i"),Xn={citation:!0,refn:!0,harvnb:!0},ea=function(e){return"infobox"===e.template&&e.data&&function(e){return e&&"[object Object]"===Object.prototype.toString.call(e)}(e.data)},ta=function(e,t){var i=e.wiki,n=Qt(i),a=[],r=function e(t,n){t.parent=n,t.children&&t.children.length>0&&t.children.forEach((function(i){return e(i,t)})),t.out=Gn(t,a);!function e(t,i,n){t.parent&&(t.parent.body=t.parent.body.replace(i,n),e(t.parent,i,n))}(t,t.body,t.out),i=i.replace(t.body,t.out)};n.forEach((function(e){return r(e,null)})),e.infoboxes=e.infoboxes||[],e.references=e.references||[],e.templates=e.templates||[],e.templates=e.templates.concat(a),e.templates=e.templates.filter((function(i){return!0===function(e){return!0===Xn[e.template]||!0===Qn.test(e.template)}(i)?(e.references.push(new Me(i)),!1):!0!==ea(i)||(i.domain=t.domain,e.infoboxes.push(new Wt(i)),!1)})),e.templates=e.templates.map((function(e){return new Jn(e)})),n.forEach((function(e){i=i.replace(e.body,e.out)})),e.wiki=i},ia=je,na=function(e,t){var i=e.wiki;i=i.replace(/]*?)>([\s\S]+?)<\/gallery>/g,(function(i,n,a){var r=a.split(/\n/g);return(r=(r=r.filter((function(e){return e&&""!==e.trim()}))).map((function(e){var i=e.split(/\|/),n={file:i[0].trim(),lang:t.language,domain:t.domain},a=new $(n).json(),r=i.slice(1).join("|");return""!==r&&(a.caption=ia(r)),a}))).length>0&&e.templates.push({template:"gallery",images:r,pos:e.title}),""})),e.wiki=i},aa=function(e){var t=e.wiki;t=t.replace(/\{\{election box begin([\s\S]+?)\{\{election box end\}\}/gi,(function(t){var i={wiki:t,templates:[]};ta(i);var n=i.templates.map((function(e){return e.json()})),a=n.find((function(e){return"election box"===e.template}))||{},r=n.filter((function(e){return"election box candidate"===e.template})),o=n.find((function(e){return"election box gain"===e.template||"election box hold"===e.template}))||{};return(r.length>0||o)&&e.templates.push({template:"election box",title:a.title,candidates:r,summary:o.data}),""})),e.wiki=t},ra={coach:["team","year","g","w","l","w-l%","finish","pg","pw","pl","pw-l%"],player:["year","team","gp","gs","mpg","fg%","3p%","ft%","rpg","apg","spg","bpg","ppg"],roster:["player","gp","gs","mpg","fg%","3fg%","ft%","rpg","apg","spg","bpg","ppg"]},oa=function(e){var t=e.wiki;t=t.replace(/\{\{nba (coach|player|roster) statistics start([\s\S]+?)\{\{s-end\}\}/gi,(function(t,i){t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{s-end\}\}/,""),i=i.toLowerCase().trim();var n="! "+ra[i].join(" !! "),a=at("{|\n"+n+"\n"+t+"\n|}");return a=a.map((function(e){return Object.keys(e).forEach((function(t){e[t]=e[t].text()})),e})),e.templates.push({template:"NBA "+i+" statistics",data:a}),""})),e.wiki=t},sa=function(e){var t=e.wiki;t=t.replace(/\{\{mlb game log (section|month)[\s\S]+?\{\{mlb game log (section|month) end\}\}/gi,(function(t){var i=function(e){var t=["#","date","opponent","score","win","loss","save","attendance","record"];return!0===/\|stadium=y/i.test(e)&&t.splice(7,0,"stadium"),!0===/\|time=y/i.test(e)&&t.splice(7,0,"time"),!0===/\|box=y/i.test(e)&&t.push("box"),t}(t);t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{mlb game log (section|month) end\}\}/i,"");var n="! "+i.join(" !! "),a=at("{|\n"+n+"\n"+t+"\n|}");return a=a.map((function(e){return Object.keys(e).forEach((function(t){e[t]=e[t].text()})),e})),e.templates.push({template:"mlb game log section",data:a}),""})),e.wiki=t},ca=["res","record","opponent","method","event","date","round","time","location","notes"],ua=function(e){var t=e.wiki;t=t.replace(/\{\{mma record start[\s\S]+?\{\{end\}\}/gi,(function(t){t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{end\}\}/i,"");var i="! "+ca.join(" !! "),n=at("{|\n"+i+"\n"+t+"\n|}");return n=n.map((function(e){return Object.keys(e).forEach((function(t){e[t]=e[t].text()})),e})),e.templates.push({template:"mma record start",data:n}),""})),e.wiki=t},la=je,pa=function(e){var t=e.wiki;t=(t=t.replace(/]*?)>([\s\S]+?)<\/math>/g,(function(t,i,n){var a=la(n).text();return e.templates.push({template:"math",formula:a,raw:n}),a&&a.length<12?a:""}))).replace(/]*?)>([\s\S]+?)<\/chem>/g,(function(t,i,n){return e.templates.push({template:"chem",data:n}),""})),e.wiki=t},ma=function(e,t){aa(e),na(e,t),pa(e),sa(e),ua(e),oa(e)},da=new RegExp("^("+_.references.join("|")+"):?","i"),fa=/(?:\n|^)(={2,5}.{1,200}?={2,5})/g,ga={heading:Ze,table:mt,paragraphs:Rt,templates:ta,references:Be,startEndTemplates:ma},ha=function(e,t){return ga.startEndTemplates(e,t),ga.references(e),ga.templates(e,t),ga.table(e),ga.paragraphs(e,t),e=new ie(e)},ba=function(e){for(var t=[],i=e.wiki.split(fa),n=0;n0||t.templates().length>0||(e[i+1]&&e[i+1].depth>t.depth&&(e[i+1].depth-=1),!1)}))}(t)},ka=new RegExp("\\[\\[:?("+_.categories.join("|")+"):(.{2,178}?)]](w{0,10})","ig"),wa=new RegExp("^\\[\\[:?("+_.categories.join("|")+"):","ig"),va={section:ba,categories:function(e){var t=e.wiki,i=t.match(ka);i&&i.forEach((function(t){(t=(t=(t=t.replace(wa,"")).replace(/\|?[ \*]?\]\]$/i,"")).replace(/\|.*/,""))&&!t.match(/[\[\]]/)&&e.categories.push(t.trim())})),t=t.replace(ka,""),e.wiki=t}},ya=function(e,t){t=t||{};var i=Object.assign(t,{title:t.title||null,pageID:t.pageID||t.id||null,namespace:t.namespace||t.ns||null,type:"page",wiki:e||"",categories:[],sections:[],coordinates:[]});return!0===R(e)?(i.type="redirect",i.redirectTo=U(e),va.categories(i),new E(i)):(Z(i),va.categories(i),va.section(i),new E(i))},xa=function(e){var t=(e=e.filter((function(e){return e}))).map((function(e){return ya(e.wiki,e.meta)}));return 0===t.length?null:1===t.length?t[0]:t},$a=function(e,t){return fetch(e,t).then((function(e){return e.json()}))},ja=function(e){var t=e.userAgent||e["User-Agent"]||e["Api-User-Agent"]||"User of the wtf_wikipedia library";return{method:"GET",headers:{"Content-Type":"application/json","Api-User-Agent":t,"User-Agent":t,Origin:e.noOrigin?"":e.origin||e.Origin||"*"},redirect:"follow"}},za=/^https?:\/\//,Oa={lang:"en",wiki:"wikipedia",domain:null,follow_redirects:!0,path:"api.php"},Ea=function(t,i,n){var a=null;"function"==typeof i&&(a=i,i={}),"function"==typeof n&&(a=n,n={}),"string"==typeof i&&(n=n||{},i=Object.assign({},{lang:i},n)),i=i||{},(i=Object.assign({},Oa,i)).title=t,za.test(t)&&(i=Object.assign(i,e(t)));var r=c(i),o=ja(i);return $a(r,o).then((function(e){try{var t=u(e,i);return t=xa(t),a&&a(null,t),t}catch(e){throw e}})).catch((function(e){return console.error(e),a&&a(e,null),null}))},_a={lang:"en",wiki:"wikipedia",domain:null,path:"w/api.php"},Sa=function(e,t){var i;t=t||{},t=Object.assign({},_a,t),"string"==typeof e?t.lang=e:(i=e)&&"[object Object]"===Object.prototype.toString.call(i)&&(t=Object.assign(t,e));var n="https://".concat(t.lang,".wikipedia.org/").concat(t.path,"?");t.domain&&(n="https://".concat(t.domain,"/").concat(t.path,"?")),n+="format=json&action=query&generator=random&grnnamespace=0&prop=revisions|pageprops&rvprop=content&grnlimit=1&rvslots=main&origin=*";var a=ja(t);return $a(n,a).then((function(e){try{var t=u(e);return xa(t)}catch(e){throw e}})).catch((function(e){return console.error(e),null}))},Ca={lang:"en",wiki:"wikipedia",domain:null,path:"w/api.php"},qa=function(e,t,i){var n;i=i||{},i=Object.assign({},Ca,i),"string"==typeof t?i.lang=t:(n=t)&&"[object Object]"===Object.prototype.toString.call(n)&&(i=Object.assign(i,t));var a={pages:[],categories:[]};return new Promise((function(t,n){!function r(o){var s=function(e,t,i){e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return!1===/^Category/i.test(e)&&(e="Category:"+e),e.replace(/ /g,"_")}(e),e=encodeURIComponent(e);var n="https://".concat(t.lang,".wikipedia.org/").concat(t.path,"?");return t.domain&&(n="https://".concat(t.domain,"/").concat(t.path,"?")),n+="action=query&list=categorymembers&cmtitle=".concat(e,"&cmlimit=500&format=json&origin=*&redirects=true&cmtype=page|subcat"),i&&(n+="&cmcontinue="+i),n}(e,i,o),c=ja(i);return $a(s,c).then((function(e){a=function(e){var t=e.query.categorymembers||[],i={pages:[],categories:[]};return t.forEach((function(e){14===e.ns?(delete e.ns,i.categories.push(e)):(delete e.ns,i.pages.push(e))})),i}(e),e.continue&&e.continue.cmcontinue?r(e.continue.cmcontinue):t(a)})).catch((function(e){console.error(e),n(e)}))}(null)}))},Na=function(e,t){return ya(e,t)},Aa={Doc:E,Section:ie,Paragraph:kt,Sentence:ge,Image:$,Infobox:Wt,Link:se,List:St,Reference:Me,Table:ut,Template:Jn,http:$a,wtf:Na};return Na.fetch=function(e,t,i,n){return Ea(e,t,i)},Na.random=function(e,t,i){return Sa(e,t)},Na.category=function(e,t,i,n){return qa(e,t,i)},Na.extend=function(e){return e(Aa,Wn,this),this},Na.version="8.5.0",Na})); diff --git a/builds/wtf_wikipedia-client.mjs b/builds/wtf_wikipedia-client.mjs index ca8577f0..6e71e8bf 100644 --- a/builds/wtf_wikipedia-client.mjs +++ b/builds/wtf_wikipedia-client.mjs @@ -1 +1 @@ -var e=function(e){var t=new URL(e),i=t.pathname.replace(/^\/(wiki\/)?/,"");return i=decodeURIComponent(i),{domain:t.host,title:i}};function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var i=[],n=!0,a=!1,r=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(i.push(o.value),!t||i.length!==t);n=!0);}catch(e){a=!0,r=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw r}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return n(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return n(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);iObject.keys(t.data).length?-1:1})),"number"==typeof e?t[e]:t},text:function(e){return e=p(e,j),!0===this.isRedirect()?"":this.sections().map((function(t){return t.text(e)})).join("\n\n")},json:function(e){return e=p(e,j),d(this,e)},debug:function(){return console.log("\n"),this.sections().forEach((function(e){for(var t=" - ",i=0;i500)&&M.test(e)},U=function(e){var t=e.match(M);return t&&t[2]?(P(t[2])||[])[0]:{}},F=["table","code","score","data","categorytree","charinsert","hiero","imagemap","inputbox","nowiki","poem","references","source","syntaxhighlight","timeline"],K="< ?(".concat(F.join("|"),") ?[^>]{0,200}?>"),B="< ?/ ?(".concat(F.join("|"),") ?>"),W=new RegExp("".concat(K,"[").concat("\\s\\S","]+?").concat(B),"ig"),Y=function(e){return(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(W," ")).replace(/ ?< ?(span|div|table|data) [a-zA-Z0-9=%\.#:;'" ]{2,100}\/? ?> ?/g," ")).replace(/ ?< ?(ref) [a-zA-Z0-9=" ]{2,100}\/ ?> ?/g," ")).replace(/(.*?)<\/i>/g,"''$1''")).replace(/(.*?)<\/b>/g,"'''$1'''")).replace(/(.*?)<\/sub>/g,"{{sub|$1}}")).replace(/(.*?)<\/sup>/g,"{{sup|$1}}")).replace(/ ?<[ \/]?(p|sub|sup|span|nowiki|div|table|br|tr|td|th|pre|pre2|hr)[ \/]?> ?/g," ")).replace(/ ?<[ \/]?(abbr|bdi|bdo|blockquote|cite|del|dfn|em|ins|kbd|mark|q|s|small)[ \/]?> ?/g," ")).replace(/ ?<[ \/]?h[0-9][ \/]?> ?/g," ")).replace(/ ?< ?br ?\/> ?/g,"\n")).trim()};var Z=function(e){var t=e.wiki;t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace(//g,"")).replace(/__(NOTOC|NOEDITSECTION|FORCETOC|TOC)__/gi,"")).replace(/~~{1,3}/g,"")).replace(/\r/g,"")).replace(/\u3002/g,". ")).replace(/----/g,"")).replace(/\{\{\}\}/g," – ")).replace(/\{\{\\\}\}/g," / ")).replace(/ /g," "),t=(t=(t=Y(t)).replace(/\([,;: ]+?\)/g,"")).replace(/{{(baseball|basketball) (primary|secondary) (style|color).*?\}\}/i,""),e.wiki=t},G=/[\\\.$]/,H=function(e){return"string"!=typeof e&&(e=""),e=(e=(e=e.replace(/\\/g,"\\\\")).replace(/^\$/,"\\u0024")).replace(/\./g,"\\u002e")},V=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.keys(e),i=0;i0&&(i.paragraphs=n)}if(!0===t.images){var a=e.images().map((function(e){return e.json(t)}));a.length>0&&(i.images=a)}if(!0===t.tables){var r=e.tables().map((function(e){return e.json(t)}));r.length>0&&(i.tables=r)}if(!0===t.templates){var o=e.templates();o.length>0&&(i.templates=o,!0===t.encode&&i.templates.forEach((function(e){return V(e)})))}if(!0===t.infoboxes){var s=e.infoboxes().map((function(e){return e.json(t)}));s.length>0&&(i.infoboxes=s)}if(!0===t.lists){var c=e.lists().map((function(e){return e.json(t)}));c.length>0&&(i.lists=c)}if(!0===t.references||!0===t.citations){var u=e.references().map((function(e){return e.json(t)}));u.length>0&&(i.references=u)}return!0===t.sentences&&(i.sentences=e.sentences().map((function(e){return e.json(t)}))),i},X={tables:!0,references:!0,paragraphs:!0,templates:!0,infoboxes:!0},ee=function(e){this.depth=e.depth,this.doc=null,this._title=e.title||"",Object.defineProperty(this,"doc",{enumerable:!1,value:null}),e.templates=e.templates||[],Object.defineProperty(this,"data",{enumerable:!1,value:e})},te={title:function(){return this._title||""},index:function(){if(!this.doc)return null;var e=this.doc.sections().indexOf(this);return-1===e?null:e},indentation:function(){return this.depth},sentences:function(e){var t=this.paragraphs().reduce((function(e,t){return e.concat(t.sentences())}),[]);return"number"==typeof e?t[e]:t||[]},paragraphs:function(e){var t=this.data.paragraphs||[];return"number"==typeof e?t[e]:t||[]},paragraph:function(e){var t=this.data.paragraphs||[];return"number"==typeof e?t[e]:t[0]},links:function(e){var t=[];if(this.infoboxes().forEach((function(i){i.links(e).forEach((function(e){return t.push(e)}))})),this.sentences().forEach((function(i){i.links(e).forEach((function(e){return t.push(e)}))})),this.tables().forEach((function(i){i.links(e).forEach((function(e){return t.push(e)}))})),this.lists().forEach((function(i){i.links(e).forEach((function(e){return t.push(e)}))})),"number"==typeof e)return t[e];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);var i=t.find((function(t){return t.page()===e}));return void 0===i?[]:[i]}return t},tables:function(e){var t=this.data.tables||[];return"number"==typeof e?t[e]:t},templates:function(e){var t=this.data.templates||[];return t=t.map((function(e){return e.json()})),"number"==typeof e?t[e]:"string"==typeof e?(e=e.toLowerCase(),t.filter((function(t){return t.template===e||t.name===e}))):t},infoboxes:function(e){var t=this.data.infoboxes||[];return"number"==typeof e?t[e]:t},coordinates:function(e){var t=[].concat(this.templates("coord"),this.templates("coor"));return"number"==typeof e?t[e]?t[e]:[]:t},lists:function(e){var t=[];return this.paragraphs().forEach((function(e){t=t.concat(e.lists())})),"number"==typeof e?t[e]:t},interwiki:function(e){var t=[];return this.paragraphs().forEach((function(e){t=t.concat(e.interwiki())})),"number"==typeof e?t[e]:t||[]},images:function(e){var t=[];return this.paragraphs().forEach((function(e){t=t.concat(e.images())})),"number"==typeof e?t[e]:t||[]},references:function(e){var t=this.data.references||[];return"number"==typeof e?t[e]:t},remove:function(){if(!this.doc)return null;var e={};e[this.title()]=!0,this.children().forEach((function(t){return e[t.title()]=!0}));var t=this.doc.data.sections;return t=t.filter((function(t){return!0!==e.hasOwnProperty(t.title())})),this.doc.data.sections=t,this.doc},nextSibling:function(){if(!this.doc)return null;for(var e=this.doc.sections(),t=this.index()+1;tthis.depth)for(var a=i+1;athis.depth;a+=1)n.push(t[a]);return"string"==typeof e?(e=e.toLowerCase(),n.find((function(t){return t.title().toLowerCase()===e}))):"number"==typeof e?n[e]:n},parent:function(){if(!this.doc)return null;for(var e=this.doc.sections(),t=this.index();t>=0;t-=1)if(e[t]&&e[t].depth0&&(e.fmt=e.fmt||{},e.fmt.bold=t),i.length>0&&(e.fmt=e.fmt||{},e.fmt.italic=i),e},le=/^[0-9,.]+$/,pe={text:!0,links:!0,formatting:!0,numbers:!0},me=function(e,t){t=p(t,pe);var i={},n=e.text();if(!0===t.text&&(i.text=n),!0===t.numbers&&le.test(n)){var a=Number(n.replace(/,/g,""));!1===isNaN(a)&&(i.number=a)}return t.links&&e.links().length>0&&(i.links=e.links().map((function(e){return e.json()}))),t.formatting&&e.data.fmt&&(i.formatting=e.data.fmt),i},de=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},fe={links:function(e){var t=this.data.links||[];if("number"==typeof e)return t[e];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);var i=t.find((function(t){return t.page===e}));return void 0===i?[]:[i]}return t},interwiki:function(e){var t=this.links().filter((function(e){return void 0!==e.wiki}));return"number"==typeof e?t[e]:t},bolds:function(e){var t=[];return this.data&&this.data.fmt&&this.data.fmt.bold&&(t=this.data.fmt.bold||[]),"number"==typeof e?t[e]:t},italics:function(e){var t=[];return this.data&&this.data.fmt&&this.data.fmt.italic&&(t=this.data.fmt.italic||[]),"number"==typeof e?t[e]:t},dates:function(e){var t=[];return"number"==typeof e?t[e]:t},text:function(e){return void 0!==e&&"string"==typeof e&&(this.data.text=e),this.data.text||""},json:function(e){return me(this,e)}};Object.keys(fe).forEach((function(e){de.prototype[e]=fe[e]})),de.prototype.italic=de.prototype.italics,de.prototype.bold=de.prototype.bolds,de.prototype.plaintext=de.prototype.text;var ge=de,he=["ad","adj","adm","adv","al","alta","approx","apr","apt","arc","ariz","assn","asst","atty","aug","ave","ba","bc","bl","bldg","blvd","brig","bros","ca","cal","calif","capt","cca","cg","cl","cm","cmdr","co","col","colo","comdr","conn","corp","cpl","cres","ct","cyn","dak","dec","def","dept","det","dg","dist","dl","dm","dr","ea","eg","eng","esp","esq","est","etc","ex","exp","feb","fem","fig","fl oz","fl","fla","fm","fr","ft","fy","ga","gal","gb","gen","gov","hg","hon","hr","hrs","hwy","hz","ia","ida","ie","inc","inf","jan","jd","jr","jul","jun","kan","kans","kb","kg","km","kmph","lat","lb","lit","llb","lm","lng","lt","ltd","lx","ma","maj","mar","masc","mb","md","messrs","mg","mi","min","minn","misc","mister","ml","mlle","mm","mme","mph","mps","mr","mrs","ms","mstr","mt","neb","nebr","nee","no","nov","oct","okla","ont","op","ord","oz","pa","pd","penn","penna","phd","pl","pp","pref","prob","prof","pron","ps","psa","pseud","pt","pvt","qt","que","rb","rd","rep","reps","res","rev","sask","sec","sen","sens","sep","sept","sfc","sgt","sir","situ","sq ft","sq","sr","ss","st","supt","surg","tb","tbl","tbsp","tce","td","tel","temp","tenn","tex","tsp","univ","usafa","ut","va","vb","ver","vet","vitro","vivo","vol","vs","vt","wis","wisc","wr","wy","wyo","yb","µg"].concat("[^]][^]]"),be=new RegExp("(^| |')("+he.join("|")+")[.!?] ?$","i"),ke=new RegExp("[ |.|'|[][A-Z].? *?$","i"),we=new RegExp("\\.\\.\\.* +?$"),ve=/ c\. $/,ye=new RegExp("[a-zа-яぁ-ゟ][a-zа-яぁ-ゟ゠-ヿ]","iu"),xe=function(e){var t=[],i=[];if(!e||"string"!=typeof e||0===e.trim().length)return t;for(var n=function(e){var t=e.split(/(\n+)/);return function(e){var t=[];return e.forEach((function(e){t=t.concat(e)})),t}(t=(t=t.filter((function(e){return e.match(/\S/)}))).map((function(e){return e.split(/(\S.+?[.!?]"?)(?=\s+|$)/g)})))}(e),a=0;ai.length)return!1;var n=e.match(/"/g);return!(n&&n.length%2!=0&&e.length<900)}(o))?i[s+1]=i[s]+(i[s+1]||""):i[s]&&i[s].length>0&&(t.push(i[s]),i[s]="");return 0===t.length?[e]:t};function $e(e){var t,i={text:e};return ce(i),i.text=(t=(t=(t=i.text).replace(/\([,;: ]*\)/g,"")).replace(/\( *(; ?)+/g,"("),t=(t=ne(t)).replace(/ +\.$/,".")),i=ue(i),new ge(i)}var je=$e,ze=function(e){var t=xe(e.wiki);(t=t.map($e))[0]&&t[0].text()&&":"===t[0].text()[0]&&(t=t.slice(1)),e.sentences=t},Ee=function(e){return e=(e=e.replace(/^\{\{/,"")).replace(/\}\}$/,"")},Oe=function(e){return e=(e=(e=(e||"").trim()).toLowerCase()).replace(/_/g," ")},_e=function(e){var t=e.split(/\n?\|/);t.forEach((function(e,i){null!==e&&(/\[\[[^\]]+$/.test(e)||/\{\{[^\}]+$/.test(e)||e.split("{{").length!==e.split("}}").length||e.split("[[").length!==e.split("]]").length)&&(t[i+1]=t[i]+"|"+t[i+1],t[i]=null)}));for(var i=(t=(t=t.filter((function(e){return null!==e}))).map((function(e){return(e||"").trim()}))).length-1;i>=0;i-=1){""===t[i]&&t.pop();break}return t},Se=/^[ '-\)\x2D\.0-9_a-z\xC0-\xFF\u0153\u017F\u1E9E\u212A\u212B]+=/i,Ce={template:!0,list:!0,prototype:!0},qe=function(e,t){var i=0;return e.reduce((function(e,n){if(n=(n||"").trim(),!0===Se.test(n)){var a=function(e){var t=e.split("="),i=t[0]||"";i=i.toLowerCase().trim();var n=t.slice(1).join("=");return Ce.hasOwnProperty(i)&&(i="_"+i),{key:i,val:n.trim()}}(n);if(a.key)return e[a.key]=a.val,e}t&&t[i]?e[t[i]]=n:(e.list=e.list||[],e.list.push(n));return i+=1,e}),{})},Ne={classname:!0,style:!0,align:!0,margin:!0,left:!0,break:!0,boxsize:!0,framestyle:!0,item_style:!0,collapsible:!0,list_style_type:!0,"list-style-type":!0,colwidth:!0},Ae=function(e){return Object.keys(e).forEach((function(t){!0===Ne[t.toLowerCase()]&&delete e[t],null!==e[t]&&""!==e[t]||delete e[t]})),e},Le=je,De=function(e,t){var i=Le(e);return"json"===t?i.json():"raw"===t?i:i.text()},Ie=function(e,t,i){t=t||[],e=Ee(e||"");var n=_e(e),a=n.shift(),r=qe(n,t);return(r=Ae(r))[1]&&t[0]&&!1===r.hasOwnProperty(t[0])&&(r[t[0]]=r[1],delete r[1]),Object.keys(r).forEach((function(e){r[e]="list"!==e?De(r[e],i):r[e].map((function(e){return De(e,i)}))})),a&&(r.template=Oe(a)),r},Te=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},Pe={title:function(){var e=this.data;return e.title||e.encyclopedia||e.author||""},links:function(e){var t=[];if("number"==typeof e)return t[e];if("number"==typeof e)return t[e];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);var i=t.find((function(t){return t.page()===e}));return void 0===i?[]:[i]}return t||[]},text:function(){return""},json:function(){return this.data}};Object.keys(Pe).forEach((function(e){Te.prototype[e]=Pe[e]}));var Me=Te,Re=je,Ue=function(e){return/^ *?\{\{ *?(cite|citation)/i.test(e)&&/\}\} *?$/.test(e)&&!1===/citation needed/i.test(e)},Fe=function(e){var t=Ie(e);return t.type=t.template.replace(/cite /,""),t.template="citation",t},Ke=function(e){return{template:"citation",type:"inline",data:{},inline:Re(e)||{}}},Be=function(e){var t=[],i=e.wiki;i=(i=(i=(i=i.replace(/ ?([\s\S]{0,1800}?)<\/ref> ?/gi,(function(e,n){if(Ue(n)){var a=Fe(n);a&&t.push(a),i=i.replace(n,"")}else t.push(Ke(n));return" "}))).replace(/ ?]{0,200}?\/> ?/gi," ")).replace(/ ?]{0,200}?>([\s\S]{0,1800}?)<\/ref> ?/gi,(function(e,n){if(Ue(n)){var a=Fe(n);a&&t.push(a),i=i.replace(n,"")}else t.push(Ke(n));return" "}))).replace(/ ?<[ \/]?[a-z0-9]{1,8}[a-z0-9=" ]{2,20}[ \/]?> ?/g," "),e.references=t.map((function(e){return new Me(e)})),e.wiki=i},We=je,Ye=/^(={1,5})(.{1,200}?)={1,5}$/,Ze=function(e,t){var i=t.match(Ye);if(!i)return e.title="",e.depth=0,e;var n=i[2]||"",a={wiki:n=(n=We(n).text()).replace(/\{\{.+?\}\}/,"")};Be(a),n=ne(n=a.wiki);var r=0;return i[1]&&(r=i[1].length-2),e.title=n,e.depth=r,e},Ge=function(e){var t=[],i=[];e=function(e){return e=e.filter((function(e){return e&&!0!==/^\|\+/.test(e)})),!0===/^{\|/.test(e[0])&&e.shift(),!0===/^\|}/.test(e[e.length-1])&&e.pop(),!0===/^\|-/.test(e[0])&&e.shift(),e}(e);for(var n=0;n0&&(t.push(i),i=[]):(!(a=a.split(/(?:\|\||!!)/))[0]&&a[1]&&a.shift(),a.forEach((function(e){e=(e=e.replace(/^\| */,"")).trim(),i.push(e)})))}return i.length>0&&t.push(i),t},He=/.*rowspan *?= *?["']?([0-9]+)["']?[ \|]*/,Ve=/.*colspan *?= *?["']?([0-9]+)["']?[ \|]*/,Je=function(e){return e=function(e){return e.forEach((function(t,i){t.forEach((function(n,a){var r=n.match(He);if(null!==r){var o=parseInt(r[1],10);n=n.replace(He,""),t[a]=n;for(var s=i+1;s0}))}(e))},Qe=je,Xe=/^!/,et={name:!0,age:!0,born:!0,date:!0,year:!0,city:!0,country:!0,population:!0,count:!0,number:!0},tt=function(e){return(e=Qe(e).text()).match(/\|/)&&(e=e.replace(/.+\| ?/,"")),e=(e=(e=e.replace(/style=['"].*?["']/,"")).replace(/^!/,"")).trim()},it=function(e){return(e=e||[]).length-e.filter((function(e){return e})).length>3},nt=function(e){if(e.length<=3)return[];var t=e[0].slice(0);t=t.map((function(e){return e=e.replace(/^\! */,""),e=Qe(e).text(),e=(e=tt(e)).toLowerCase()}));for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:[],t=[];it(e[0])&&e.shift();var i=e[0];return i&&i[0]&&i[1]&&(/^!/.test(i[0])||/^!/.test(i[1]))&&(t=i.map((function(e){return e=e.replace(/^\! */,""),e=tt(e)})),e.shift()),(i=e[0])&&i[0]&&i[1]&&/^!/.test(i[0])&&/^!/.test(i[1])&&(i.forEach((function(e,i){e=e.replace(/^\! */,""),e=tt(e),!0===Boolean(e)&&(t[i]=e)})),e.shift()),t}(i=Je(i));if(!n||n.length<=1){n=nt(i);var a=i[i.length-1]||[];n.length<=1&&a.length>2&&(n=nt(i.slice(1))).length>0&&(i=i.slice(2))}return i.map((function(e){return function(e,t){var i={};return e.forEach((function(e,n){var a=t[n]||"col"+(n+1),r=Qe(e);r.text(tt(r.text())),i[a]=r})),i}(e,n)}))},rt=function(e,t){return e.map((function(e){var i={};return Object.keys(e).forEach((function(t){i[t]=e[t].json()})),!0===t.encode&&(i=V(i)),i}))},ot={},st=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},ct={links:function(e){var t=[];if(this.data.forEach((function(e){Object.keys(e).forEach((function(i){t=t.concat(e[i].links())}))})),"number"==typeof e)return t[e];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);var i=t.find((function(t){return t.page()===e}));return void 0===i?[]:[i]}return t},keyValue:function(e){var t=this.json(e);return t.forEach((function(e){Object.keys(e).forEach((function(t){e[t]=e[t].text}))})),t},json:function(e){return e=p(e,ot),rt(this.data,e)},text:function(){return""}};ct.keyvalue=ct.keyValue,ct.keyval=ct.keyValue,Object.keys(ct).forEach((function(e){st.prototype[e]=ct[e]}));var ut=st,lt=/^\s*{\|/,pt=/^\s*\|}/,mt=function(e){for(var t=[],i=e.wiki,n=i.split("\n"),a=[],r=0;r0&&(a[a.length-1]+="\n"+n[r]);else{a[a.length-1]+="\n"+n[r];var o=a.pop();t.push(o)}else a.push(n[r]);var s=[];t.forEach((function(e){if(e){i=(i=i.replace(e+"\n","")).replace(e,"");var t=at(e);t&&t.length>0&&s.push(new ut(t))}})),s.length>0&&(e.tables=s),e.wiki=i},dt={sentences:!0},ft=function(e,t){var i={};return!0===(t=p(t,dt)).sentences&&(i.sentences=e.sentences().map((function(e){return e.json(t)}))),i},gt={sentences:!0,lists:!0,images:!0},ht=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},bt={sentences:function(e){return"number"==typeof e?this.data.sentences[e]:this.data.sentences||[]},references:function(e){return"number"==typeof e?this.data.references[e]:this.data.references},lists:function(e){return"number"==typeof e?this.data.lists[e]:this.data.lists},images:function(e){return"number"==typeof e?this.data.images[e]:this.data.images||[]},links:function(e){var t=[];if(this.sentences().forEach((function(i){t=t.concat(i.links(e))})),"number"==typeof e)return t[e];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);var i=t.find((function(t){return t.page()===e}));return void 0===i?[]:[i]}return t||[]},interwiki:function(e){var t=[];return this.sentences().forEach((function(e){t=t.concat(e.interwiki())})),"number"==typeof e?t[e]:t||[]},text:function(e){e=p(e,gt);var t=this.sentences().map((function(t){return t.text(e)})).join(" ");return this.lists().forEach((function(e){t+="\n"+e.text()})),t},json:function(e){return e=p(e,gt),ft(this,e)}};bt.citations=bt.references,Object.keys(bt).forEach((function(e){ht.prototype[e]=bt[e]}));var kt=ht;var wt=function(e){for(var t=[],i=[],n=e.split(""),a=0,r=0;r0){for(var s=0,c=0,u=0;uc&&i.push("]"),t.push(i.join("")),i=[]}}return t},vt=je,yt=new RegExp("("+_.images.join("|")+"):","i"),xt="(".concat(_.images.join("|"),")"),$t=new RegExp(xt+":(.+?)[\\||\\]]","iu"),jt={thumb:!0,thumbnail:!0,border:!0,right:!0,left:!0,center:!0,top:!0,bottom:!0,none:!0,upright:!0,baseline:!0,middle:!0,sub:!0,super:!0},zt=function(e,t){var i=e.wiki;wt(i).forEach((function(n){if(!0===yt.test(n)){e.images=e.images||[];var a=function(e,t){var i=e.match($t);if(null===i||!i[2])return null;var n="".concat(i[1],":").concat(i[2]||""),a=(n=n.trim()).charAt(0).toUpperCase()+n.substring(1);if(a=a.replace(/ /g,"_")){var r={file:n,lang:t.lang,domain:t.domain};e=(e=e.replace(/^\[\[/,"")).replace(/\]\]$/,"");var o=Ie(e),s=o.list||[];return o.alt&&(r.alt=o.alt),(s=s.filter((function(e){return!1===jt.hasOwnProperty(e)})))[s.length-1]&&(r.caption=vt(s[s.length-1])),new $(r)}return null}(n,t);a&&e.images.push(a),i=i.replace(n,"")}})),e.wiki=i},Et={},Ot=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},_t={lines:function(){return this.data},links:function(e){var t=[];if(this.lines().forEach((function(e){t=t.concat(e.links())})),"number"==typeof e)return t[e];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);var i=t.find((function(t){return t.page()===e}));return void 0===i?[]:[i]}return t},json:function(e){return e=p(e,Et),this.lines().map((function(t){return t.json(e)}))},text:function(){return function(e,t){return e.map((function(e){return" * "+e.text(t)})).join("\n")}(this.data)}};Object.keys(_t).forEach((function(e){Ot.prototype[e]=_t[e]}));var St=Ot,Ct=je,qt=/^[#\*:;\|]+/,Nt=/^\*+[^:,\|]{4}/,At=/^ ?\#[^:,\|]{4}/,Lt=/[a-z_0-9\]\}]/i,Dt=function(e){return qt.test(e)||Nt.test(e)||At.test(e)},It=function(e,t){for(var i=[],n=t;n0&&(i.push(r),a+=r.length-1)}else n.push(t[a]);e.lists=i.map((function(e){return new St(e)})),e.wiki=n.join("\n")}},Rt=function(e,t){var i=e.wiki,n=i.split(Pt);n=(n=n.filter((function(e){return e&&e.trim().length>0}))).map((function(e){var i={wiki:e,lists:[],sentences:[],images:[]};return Mt.list(i),Mt.image(i,t),Tt(i),new kt(i)})),e.wiki=i,e.paragraphs=n},Ut=function(e,t){var i=Object.keys(e.data).reduce((function(t,i){return e.data[i]&&(t[i]=e.data[i].json()),t}),{});return!0===t.encode&&(i=V(i)),i},Ft=function(e){return(e=(e=e.toLowerCase()).replace(/[-_]/g," ")).trim()},Kt=function(e){this._type=e.type,this.domain=e.domain,Object.defineProperty(this,"data",{enumerable:!1,value:e.data})},Bt={type:function(){return this._type},links:function(e){var t=this,i=[];if(Object.keys(this.data).forEach((function(e){t.data[e].links().forEach((function(e){return i.push(e)}))})),"number"==typeof e)return i[e];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);var n=i.find((function(t){return t.page()===e}));return void 0===n?[]:[n]}return i},image:function(){var e=this.get("image")||this.get("image2")||this.get("logo");if(!e)return null;var t=e.json();return t.file=t.text,t.text="",t.domain=this.domain,new $(t)},get:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";e=Ft(e);for(var t=Object.keys(this.data),i=0;i0?a++:a=e.indexOf("{",a+1)){var r=e[a];if("{"===r&&(t+=1),t>0){if("}"===r&&0===(t-=1)){n.push(r);var o=n.join("");n=[],/\{\{/.test(o)&&/\}\}/.test(o)&&i.push(o);continue}if(1===t&&"{"!==r&&"}"!==r){t=0,n=[];continue}n.push(r)}}return i},Zt=function(e){var t=null;return(t=/^\{\{[^\n]+\|/.test(e)?(e.match(/^\{\{(.+?)\|/)||[])[1]:-1!==e.indexOf("\n")?(e.match(/^\{\{(.+?)\n/)||[])[1]:(e.match(/^\{\{(.+?)\}\}$/)||[])[1])&&(t=t.replace(/:.*/,""),t=Oe(t)),t||null},Gt=/\{\{/,Ht=function(e){return{body:e=e.replace(/#invoke:/,""),name:Zt(e),children:[]}},Vt=function e(t){var i=t.body.substr(2);return i=i.replace(/\}\}$/,""),t.children=Yt(i),t.children=t.children.map(Ht),0===t.children.length||t.children.forEach((function(t){var i=t.body.substr(2);return Gt.test(i)?e(t):null})),t},Jt=function(e){var t=Yt(e);return t=(t=t.map(Ht)).map(Vt)},Qt=["anchor","defaultsort","use list-defined references","void","pp","pp-move-indef","pp-semi-indef","pp-vandalism","r","#tag","div col","pope list end","shipwreck list end","starbox end","end box","end","s-end"].reduce((function(e,t){return e[t]=!0,e}),{}),Xt=new RegExp("^(subst.)?("+_.infoboxes.join("|")+")[: \n]","i"),ei=/^infobox /i,ti=/ infobox$/i,ii=/$Year in [A-Z]/i,ni={"gnf protein box":!0,"automatic taxobox":!0,"chembox ":!0,editnotice:!0,geobox:!0,hybridbox:!0,ichnobox:!0,infraspeciesbox:!0,mycomorphbox:!0,oobox:!0,"paraphyletic group":!0,speciesbox:!0,subspeciesbox:!0,"starbox short":!0,taxobox:!0,nhlteamseason:!0,"asian games bid":!0,"canadian federal election results":!0,"dc thomson comic strip":!0,"daytona 24 races":!0,edencharacter:!0,"moldova national football team results":!0,samurai:!0,protein:!0,"sheet authority":!0,"order-of-approx":!0,"bacterial labs":!0,"medical resources":!0,ordination:!0,"hockey team coach":!0,"hockey team gm":!0,"pro hockey team":!0,"hockey team player":!0,"hockey team start":!0,mlbbioret:!0},ai=function(e){return!0===ni.hasOwnProperty(e)||(!!Xt.test(e)||(!(!ei.test(e)&&!ti.test(e))||!!ii.test(e)))},ri=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.template.match(Xt),i=e.template;t&&t[0]&&(i=i.replace(t[0],""));var n={template:"infobox",type:i=i.trim(),data:e};return delete n.data.template,delete n.data.list,n},oi=[void 0,"January","February","March","April","May","June","July","August","September","October","November","December"],si=oi.reduce((function(e,t,i){return 0===i||(e[t.toLowerCase()]=i),e}),{}),ci=function(e){return e<10?"0"+e:String(e)},ui=function(e){var t=String(e.year||"");if(void 0!==e.month&&!0===oi.hasOwnProperty(e.month))if(void 0===e.date)t="".concat(oi[e.month]," ").concat(e.year);else{if(t="".concat(oi[e.month]," ").concat(e.date,", ").concat(e.year),void 0!==e.hour&&void 0!==e.minute){var i="".concat(ci(e.hour),":").concat(ci(e.minute));void 0!==e.second&&(i=i+":"+ci(e.second)),t=i+", "+t}e.tz&&(t+=" (".concat(e.tz,")"))}return t},li=function(e){for(var t={},i=["year","month","date","hour","minute","second"],n=0;n0&&(n.years=a,i-=31536e6*n.years);var r=Math.floor(i/2592e6,10);r>0&&(n.months=r,i-=2592e6*n.months);var o=Math.floor(i/mi,10);return o>0&&(n.days=o),n},gi=li,hi=ui,bi=function(e){return{template:"date",data:e}},ki=function(e){var t=(e=Ee(e)).split("|"),i=gi(t.slice(1,4)),n=t.slice(4,7);if(0===n.length){var a=new Date;n=[a.getFullYear(),a.getMonth(),a.getDate()]}return{from:i,to:n=gi(n)}},wi={date:function(e,t){var i=Ie(e,["year","month","date","hour","minute","second","timezone"]),n=gi([i.year,i.month,i.date||i.day]);return i.text=hi(n),i.timezone&&("Z"===i.timezone&&(i.timezone="UTC"),i.text+=" (".concat(i.timezone,")")),i.hour&&i.minute&&(i.second?i.text="".concat(i.hour,":").concat(i.minute,":").concat(i.second,", ")+i.text:i.text="".concat(i.hour,":").concat(i.minute,", ")+i.text),i.text&&t.push(bi(i)),i.text},natural_date:function(e,t){var i=Ie(e,["text"]).text||"",n={};if(/^[0-9]{4}$/.test(i))n.year=parseInt(i,10);else{var a=i.replace(/[a-z]+\/[a-z]+/i,"");a=a.replace(/[0-9]+:[0-9]+(am|pm)?/i,"");var r=new Date(a);!1===isNaN(r.getTime())&&(n.year=r.getFullYear(),n.month=r.getMonth()+1,n.date=r.getDate())}return t.push(bi(n)),i.trim()},one_year:function(e,t){var i=Ie(e,["year"]),n=Number(i.year);return t.push(bi({year:n})),String(n)},two_dates:function(e,t){var i=Ie(e,["b","birth_year","birth_month","birth_date","death_year","death_month","death_date"]);if(i.b&&"b"===i.b.toLowerCase()){var n=gi([i.birth_year,i.birth_month,i.birth_date]);return t.push(bi(n)),hi(n)}var a=gi([i.death_year,i.death_month,i.death_date]);return t.push(bi(a)),hi(a)},age:function(e){var t=ki(e);return fi(t.from,t.to).years||0},"diff-y":function(e){var t=ki(e),i=fi(t.from,t.to);return 1===i.years?i.years+" year":(i.years||0)+" years"},"diff-ym":function(e){var t=ki(e),i=fi(t.from,t.to),n=[];return 1===i.years?n.push(i.years+" year"):i.years&&0!==i.years&&n.push(i.years+" years"),1===i.months?n.push("1 month"):i.months&&0!==i.months&&n.push(i.months+" months"),n.join(", ")},"diff-ymd":function(e){var t=ki(e),i=fi(t.from,t.to),n=[];return 1===i.years?n.push(i.years+" year"):i.years&&0!==i.years&&n.push(i.years+" years"),1===i.months?n.push("1 month"):i.months&&0!==i.months&&n.push(i.months+" months"),1===i.days?n.push("1 day"):i.days&&0!==i.days&&n.push(i.days+" days"),n.join(", ")},"diff-yd":function(e){var t=ki(e),i=fi(t.from,t.to),n=[];return 1===i.years?n.push(i.years+" year"):i.years&&0!==i.years&&n.push(i.years+" years"),i.days+=30*(i.months||0),1===i.days?n.push("1 day"):i.days&&0!==i.days&&n.push(i.days+" days"),n.join(", ")},"diff-d":function(e){var t=ki(e),i=fi(t.from,t.to),n=[];return i.days+=365*(i.years||0),i.days+=30*(i.months||0),1===i.days?n.push("1 day"):i.days&&0!==i.days&&n.push(i.days+" days"),n.join(", ")}},vi=function(e){var t=new Date(e);if(isNaN(t.getTime()))return"";var i=(new Date).getTime()-t.getTime(),n="ago";i<0&&(n="from now",i=Math.abs(i));var a=i/1e3/60/60/24;return a<365?parseInt(a,10)+" days "+n:parseInt(a/365,10)+" years "+n},yi=wi.date,xi=wi.natural_date,$i=["January","February","March","April","May","June","July","August","September","October","November","December"],ji=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],zi=Object.assign({},pi,{currentday:function(){var e=new Date;return String(e.getDate())},currentdayname:function(){var e=new Date;return ji[e.getDay()]},currentmonth:function(){var e=new Date;return $i[e.getMonth()]},currentyear:function(){var e=new Date;return String(e.getFullYear())},monthyear:function(){var e=new Date;return $i[e.getMonth()]+" "+e.getFullYear()},"monthyear-1":function(){var e=new Date;return e.setMonth(e.getMonth()-1),$i[e.getMonth()]+" "+e.getFullYear()},"monthyear+1":function(){var e=new Date;return e.setMonth(e.getMonth()+1),$i[e.getMonth()]+" "+e.getFullYear()},date:0,"time ago":function(e){var t=Ie(e,["date","fmt"]).date;return vi(t)},"birth date and age":function(e,t){var i=Ie(e,["year","month","day"]);return i.year&&/[a-z]/i.test(i.year)?xi(e,t):(t.push(i),i=li([i.year,i.month,i.day]),ui(i))},"birth year and age":function(e,t){var i=Ie(e,["birth_year","birth_month"]);if(i.death_year&&/[a-z]/i.test(i.death_year))return xi(e,t);t.push(i);var n=(new Date).getFullYear()-parseInt(i.birth_year,10);i=li([i.birth_year,i.birth_month]);var a=ui(i);return n&&(a+=" (age ".concat(n,")")),a},"death year and age":function(e,t){var i=Ie(e,["death_year","birth_year","death_month"]);return i.death_year&&/[a-z]/i.test(i.death_year)?xi(e,t):(t.push(i),i=li([i.death_year,i.death_month]),ui(i))},"birth date and age2":function(e,t){var i=Ie(e,["at_year","at_month","at_day","birth_year","birth_month","birth_day"]);return t.push(i),i=li([i.birth_year,i.birth_month,i.birth_day]),ui(i)},"birth based on age as of date":function(e,t){var i=Ie(e,["age","year","month","day"]);t.push(i);var n=parseInt(i.age,10),a=parseInt(i.year,10)-n;return a&&n?"".concat(a," (age ").concat(i.age,")"):"(age ".concat(i.age,")")},"death date and given age":function(e,t){var i=Ie(e,["year","month","day","age"]);t.push(i),i=li([i.year,i.month,i.day]);var n=ui(i);return i.age&&(n+=" (age ".concat(i.age,")")),n},dts:function(e){e=(e=e.replace(/\|format=[ymd]+/i,"")).replace(/\|abbr=(on|off)/i,"");var t=Ie(e,["year","month","date","bc"]);return t.date&&t.month&&t.year?!0===/[a-z]/.test(t.month)?[t.month,t.date,t.year].join(" "):[t.year,t.month,t.date].join("-"):t.month&&t.year?[t.year,t.month].join("-"):t.year?(t.year<0&&(t.year=Math.abs(t.year)+" BC"),t.year):""},start:yi,end:yi,birth:yi,death:yi,"start date":yi,"end date":yi,"birth date":yi,"death date":yi,"start date and age":yi,"end date and age":yi,"start-date":xi,"end-date":xi,"birth-date":xi,"death-date":xi,"birth-date and age":xi,"birth-date and given age":xi,"death-date and age":xi,"death-date and given age":xi,birthdeathage:wi.two_dates,dob:yi,age:wi.age,"age nts":wi.age,"age in years":wi["diff-y"],"age in years and months":wi["diff-ym"],"age in years, months and days":wi["diff-ymd"],"age in years and days":wi["diff-yd"],"age in days":wi["diff-d"]});zi.localday=zi.currentday,zi.localdayname=zi.currentdayname,zi.localmonth=zi.currentmonth,zi.localyear=zi.currentyear,zi.currentmonthname=zi.currentmonth,zi.currentmonthabbrev=zi.currentmonth,zi["death date and age"]=zi["birth date and age"],zi.bda=zi["birth date and age"],zi["birth date based on age at death"]=zi["birth based on age as of date"];var Ei=zi,Oi={tag:function(e){var t=Ie(e,["tag","open"]);return t.open&&"pair"!==t.open?"":{span:!0,div:!0,p:!0}[t.tag]?t.content||"":"<".concat(t.tag," ").concat(t.attribs||"",">").concat(t.content||"","")},plural:function(e){e=e.replace(/plural:/,"plural|");var t=Ie(e,["num","word"]),i=Number(t.num),n=t.word;return 1!==i&&(/.y$/.test(n)?n=n.replace(/y$/,"ies"):n+="s"),i+" "+n},"first word":function(e){var t=Ie(e,["text"]),i=t.text;return t.sep?i.split(t.sep)[0]:i.split(" ")[0]},trunc:function(e){var t=Ie(e,["str","len"]);return t.str.substr(0,t.len)},"str mid":function(e){var t=Ie(e,["str","start","end"]),i=parseInt(t.start,10)-1,n=parseInt(t.end,10);return t.str.substr(i,n)},p1:0,p2:1,p3:2,braces:function(e){var t=Ie(e,["text"]),i="";return t.list&&(i="|"+t.list.join("|")),"{{"+(t.text||"")+i+"}}"},nobold:0,noitalic:0,nocaps:0,syntaxhighlight:function(e,t){var i=Ie(e);return t.push(i),i.code||""},samp:function(e,t){var i=Ie(e,["1"]);return t.push(i),i[1]||""},vanchor:0,resize:1,ra:function(e){var t=Ie(e,["hours","minutes","seconds"]);return[t.hours||0,t.minutes||0,t.seconds||0].join(":")},deg2hms:function(e){return(Ie(e,["degrees"]).degrees||"")+"°"},hms2deg:function(e){var t=Ie(e,["hours","minutes","seconds"]);return[t.hours||0,t.minutes||0,t.seconds||0].join(":")},decdeg:function(e){var t=Ie(e,["deg","min","sec","hem","rnd"]);return(t.deg||t.degrees)+"°"},rnd:0,dec:function(e){var t=Ie(e,["degrees","minutes","seconds"]),i=(t.degrees||0)+"°";return t.minutes&&(i+=t.minutes+"′"),t.seconds&&(i+=t.seconds+"″"),i},val:function(e){var t=Ie(e,["number","uncertainty"]),i=t.number;i&&Number(i)&&(i=Number(i).toLocaleString());var n=i||"";return t.p&&(n=t.p+n),t.s&&(n=t.s+n),(t.u||t.ul||t.upl)&&(n=n+" "+(t.u||t.ul||t.upl)),n},sub:function(e,t){var i=Ie(e,["text"]);return t.push(i),i.text||""},sup:function(e,t){var i=Ie(e,["text"]);return t.push(i),i.text||""}};Oi.rndfrac=Oi.rnd,Oi.rndnear=Oi.rnd,Oi["unité"]=Oi.val;["nowrap","nobr","big","cquote","pull quote","small","smaller","midsize","larger","big","kbd","bigger","large","mono","strongbad","stronggood","huge","xt","xt2","!xt","xtn","xtd","dc","dcr","mxt","!mxt","mxtn","mxtd","bxt","!bxt","bxtn","bxtd","delink","pre","var","mvar","pre2","code"].forEach((function(e){Oi[e]=function(e){return Ie(e,["text"]).text||""}}));var _i=Oi,Si={plainlist:function(e){var t=(e=Ee(e)).split("|");return e=(t=t.slice(1)).join("|"),(t=(t=e.split(/\n ?\* ?/)).filter((function(e){return e}))).join("\n\n")},"collapsible list":function(e,t){var i=Ie(e);t.push(i);var n="";if(i.title&&(n+="'''".concat(i.title,"'''")+"\n\n"),!i.list){i.list=[];for(var a=1;a<10;a+=1)i[a]&&(i.list.push(i[a]),delete i[a])}return i.list=i.list.filter((function(e){return e})),n+=i.list.join("\n\n")},"ordered list":function(e,t){var i=Ie(e);return t.push(i),i.list=i.list||[],i.list.map((function(e,t){return"".concat(t+1,". ").concat(e)})).join("\n\n")},hlist:function(e){var t=Ie(e);return t.list=t.list||[],t.list.join(" · ")},pagelist:function(e){return(Ie(e).list||[]).join(", ")},catlist:function(e){return(Ie(e).list||[]).join(", ")},"br separated entries":function(e){return(Ie(e).list||[]).join("\n\n")},"comma separated entries":function(e){return(Ie(e).list||[]).join(", ")},"anchored list":function(e){var t=Ie(e).list||[];return(t=t.map((function(e,t){return"".concat(t+1,". ").concat(e)}))).join("\n\n")},"bulleted list":function(e){var t=Ie(e).list||[];return(t=(t=t.filter((function(e){return e}))).map((function(e){return"• "+e}))).join("\n\n")},"columns-list":function(e,t){var i=((Ie(e).list||[])[0]||"").split(/\n/);return i=(i=i.filter((function(e){return e}))).map((function(e){return e.replace(/\*/,"")})),t.push({template:"columns-list",list:i}),(i=i.map((function(e){return"• "+e}))).join("\n\n")}};Si.flatlist=Si.plainlist,Si.ublist=Si.plainlist,Si["unbulleted list"]=Si["collapsible list"],Si.ubl=Si["collapsible list"],Si["bare anchored list"]=Si["anchored list"],Si["plain list"]=Si.plainlist,Si.cmn=Si["columns-list"],Si.collist=Si["columns-list"],Si["col-list"]=Si["columns-list"],Si.columnslist=Si["columns-list"];var Ci=Si,qi={convert:function(e){var t=Ie(e,["num","two","three","four"]);return"-"===t.two||"to"===t.two||"and"===t.two?t.four?"".concat(t.num," ").concat(t.two," ").concat(t.three," ").concat(t.four):"".concat(t.num," ").concat(t.two," ").concat(t.three):"".concat(t.num," ").concat(t.two)},term:function(e){var t=Ie(e,["term"]);return"".concat(t.term,":")},defn:0,lino:0,linum:function(e){var t=Ie(e,["num","text"]);return"".concat(t.num,". ").concat(t.text)},ill:function(e){return Ie(e,["text","lan1","text1","lan2","text2"]).text},frac:function(e){var t=Ie(e,["a","b","c"]);return t.c?"".concat(t.a," ").concat(t.b,"/").concat(t.c):t.b?"".concat(t.a,"/").concat(t.b):"1/".concat(t.b)},height:function(e,t){var i=Ie(e);t.push(i);var n=[];return["m","cm","ft","in"].forEach((function(e){!0===i.hasOwnProperty(e)&&n.push(i[e]+e)})),n.join(" ")},"block indent":function(e){var t=Ie(e);return t[1]?"\n"+t[1]+"\n":""},quote:function(e,t){var i=Ie(e,["text","author"]);if(t.push(i),i.text){var n='"'.concat(i.text,'"');return i.author&&(n+="\n\n",n+=" - ".concat(i.author)),n+"\n"}return""},lbs:function(e){var t=Ie(e,["text"]);return"[[".concat(t.text," Lifeboat Station|").concat(t.text,"]]")},lbc:function(e){var t=Ie(e,["text"]);return"[[".concat(t.text,"-class lifeboat|").concat(t.text,"-class]]")},lbb:function(e){var t=Ie(e,["text"]);return"[[".concat(t.text,"-class lifeboat|").concat(t.text,"]]")},own:function(e){var t=Ie(e,["author"]),i="Own work";return t.author&&(i+=" by "+t.author),i},sic:function(e,t){var i=Ie(e,["one","two","three"]),n=(i.one||"")+(i.two||"");return"?"===i.one&&(n=(i.two||"")+(i.three||"")),t.push({template:"sic",word:n}),"y"===i.nolink?n:"".concat(n," [sic]")},formatnum:function(e){e=e.replace(/:/,"|");var t=Ie(e,["number"]).number||"";return t=t.replace(/,/g,""),Number(t).toLocaleString()||""},"#dateformat":function(e){return e=e.replace(/:/,"|"),Ie(e,["date","format"]).date},lc:function(e){return e=e.replace(/:/,"|"),(Ie(e,["text"]).text||"").toLowerCase()},lcfirst:function(e){e=e.replace(/:/,"|");var t=Ie(e,["text"]).text;return t?t[0].toLowerCase()+t.substr(1):""},uc:function(e){return e=e.replace(/:/,"|"),(Ie(e,["text"]).text||"").toUpperCase()},ucfirst:function(e){e=e.replace(/:/,"|");var t=Ie(e,["text"]).text;return t?t[0].toUpperCase()+t.substr(1):""},padleft:function(e){e=e.replace(/:/,"|");var t=Ie(e,["text","num"]);return(t.text||"").padStart(t.num,t.str||"0")},padright:function(e){e=e.replace(/:/,"|");var t=Ie(e,["text","num"]);return(t.text||"").padEnd(t.num,t.str||"0")},abbr:function(e){return Ie(e,["abbr","meaning","ipa"]).abbr},abbrlink:function(e){var t=Ie(e,["abbr","page"]);return t.page?"[[".concat(t.page,"|").concat(t.abbr,"]]"):"[[".concat(t.abbr,"]]")},h:1,finedetail:0,sort:1};qi["str left"]=qi.trunc,qi["str crop"]=qi.trunc,qi.tooltip=qi.abbr,qi.abbrv=qi.abbr,qi.define=qi.abbr,qi.cvt=qi.convert;var Ni=qi,Ai=Object.assign({},_i,Ci,Ni);var Li=function(e){var t=e.pop(),i=Number(e[0]||0),n=Number(e[1]||0),a=Number(e[2]||0);if("string"!=typeof t||isNaN(i))return null;var r=1;return/[SW]/i.test(t)&&(r=-1),r*(i+n/60+a/3600)},Di=function(e){if("number"!=typeof e)return e;return Math.round(1e5*e)/1e5},Ii={s:!0,w:!0},Ti=function(e){var i=Ie(e);i=function(e){return e.list=e.list||[],e.list=e.list.map((function(t){var i=Number(t);if(!isNaN(i))return i;var n=t.split(/:/);return n.length>1?(e.props=e.props||{},e.props[n[0]]=n.slice(1).join(":"),null):t})),e.list=e.list.filter((function(e){return null!==e})),e}(i);var n,a,r=(n=i.list,a=n.map((function(e){return t(e)})).join("|"),2===n.length&&"number|number"===a?{lat:n[0],lon:n[1]}:4===n.length&&"number|string|number|string"===a?(Ii[n[1].toLowerCase()]&&(n[0]*=-1),"w"===n[3].toLowerCase()&&(n[2]*=-1),{lat:n[0],lon:n[2]}):6===n.length?{lat:Li(n.slice(0,3)),lon:Li(n.slice(3))}:8===n.length?{lat:Li(n.slice(0,4)),lon:Li(n.slice(4))}:{});return i.lat=Di(r.lat),i.lon=Di(r.lon),i.template="coord",delete i.list,i},Pi={coord:function(e,t){var i=Ti(e);return t.push(i),i.display&&-1===i.display.indexOf("inline")?"":"".concat(i.lat||"","°N, ").concat(i.lon||"","°W")},geo:["lat","lon","zoom"]};Pi.coor=Pi.coord,Pi["coor title dms"]=Pi.coord,Pi["coor title dec"]=Pi.coord,Pi["coor dms"]=Pi.coord,Pi["coor dm"]=Pi.coord,Pi["coor dec"]=Pi.coord;var Mi=Pi,Ri={etyl:1,mention:1,link:1,"la-verb-form":0,"la-ipa":0,sortname:function(e){var t=Ie(e,["first","last","target","sort"]),i="".concat(t.first||""," ").concat(t.last||"");return i=i.trim(),t.nolink?t.target||i:(t.dab&&(i+=" (".concat(t.dab,")"),t.target&&(t.target+=" (".concat(t.dab,")"))),t.target?"[[".concat(t.target,"|").concat(i,"]]"):"[[".concat(i,"]]"))}};["lts","t","tfd links","tiw","tltt","tetl","tsetl","ti","tic","tiw","tlt","ttl","twlh","tl2","tlu","demo","hatnote","xpd","para","elc","xtag","mli","mlix","#invoke","url"].forEach((function(e){Ri[e]=function(e){var t=Ie(e,["first","second"]);return t.second||t.first}})),Ri.m=Ri.mention,Ri["m-self"]=Ri.mention,Ri.l=Ri.link,Ri.ll=Ri.link,Ri["l-self"]=Ri.link;var Ui=Ri,Fi={wikt:"wiktionary",commons:"commons",c:"commons",commonscat:"commonscat",n:"wikinews",q:"wikiquote",s:"wikisource",a:"wikiauthor",b:"wikibooks",voy:"wikivoyage",v:"wikiversity",d:"wikidata",species:"wikispecies",m:"meta",mw:"mediawiki"},Ki={about:function(e,t){var i=Ie(e);return t.push(i),""},main:function(e,t){var i=Ie(e);return t.push(i),""},"main list":function(e,t){var i=Ie(e);return t.push(i),""},see:function(e,t){var i=Ie(e);return t.push(i),""},for:function(e,t){var i=Ie(e);return t.push(i),""},further:function(e,t){var i=Ie(e);return t.push(i),""},"further information":function(e,t){var i=Ie(e);return t.push(i),""},listen:function(e,t){var i=Ie(e);return t.push(i),""},"wide image":["file","width","caption"],redirect:function(e,t){for(var i=Ie(e,["redirect"]),n=i.list||[],a=[],r=0;r0&&t.push(a)}return{template:"playoffbracket",rounds:t}}(e);return t.push(i),""}};["2teambracket","4team2elimbracket","8teambracket","16teambracket","32teambracket","4roundbracket-byes","cwsbracket","nhlbracket","nhlbracket-reseed","4teambracket-nhl","4teambracket-ncaa","4teambracket-mma","4teambracket-mlb","16teambracket-two-reseeds","8teambracket-nhl","8teambracket-mlb","8teambracket-ncaa","8teambracket-afc","8teambracket-afl","8teambracket-tennis3","8teambracket-tennis5","16teambracket-nhl","16teambracket-nhl divisional","16teambracket-nhl-reseed","16teambracket-nba","16teambracket-swtc","16teambracket-afc","16teambracket-tennis3","16teambracket-tennis5"].forEach((function(e){Ji[e]=Ji["4teambracket"]}));var Qi=Ji,Xi={"£":"GB£","¥":"¥","৳":"৳","₩":"₩","€":"€","₱":"₱","₹":"₹","₽":"₽","cn¥":"CN¥","gb£":"GB£","india rs":"₹","indian rupee symbol":"₹","indian rupee":"₹","indian rupees":"₹","philippine peso":"₱","russian ruble":"₽","SK won":"₩","turkish lira":"TRY",a$:"A$",au$:"A$",aud:"A$",bdt:"BDT",brl:"BRL",ca$:"CA$",cad:"CA$",chf:"CHF",cny:"CN¥",czk:"czk",dkk:"dkk",dkk2:"dkk",euro:"€",gbp:"GB£",hk$:"HK$",hkd:"HK$",ils:"ILS",inr:"₹",jpy:"¥",myr:"MYR",nis:"ILS",nok:"NOK",nok2:"NOK",nz$:"NZ$",nzd:"NZ$",peso:"peso",pkr:"₨",r$:"BRL",rmb:"CN¥",rub:"₽",ruble:"₽",rupee:"₹",s$:"sgd",sek:"SEK",sek2:"SEK",sfr:"CHF",sgd:"sgd",shekel:"ILS",sheqel:"ILS",ttd:"TTD",us$:"US$",usd:"US$",yen:"¥",zar:"R"},en=function(e,t){var i=Ie(e,["amount","code"]);t.push(i);var n=i.template||"";switch("currency"===n?(n=i.code)||(i.code=n="usd"):""!==n&&"monnaie"!==n&&"unité"!==n&&"nombre"!==n&&"nb"!==n||(n=i.code),n=(n||"").toLowerCase()){case"us":i.code=n="usd";break;case"uk":i.code=n="gbp"}var a="".concat(Xi[n]||"").concat(i.amount||"");return i.code&&!Xi[i.code.toLowerCase()]&&(a+=" "+i.code),a},tn={currency:en,monnaie:en,"unité":en,nombre:en,nb:en,iso4217:en,inrconvert:function(e,t){var i=Ie(e,["rupee_value","currency_formatting"]);t.push(i);var n=i.currency_formatting;if(n){var a=1;switch(n){case"k":a=1e3;break;case"m":a=1e6;break;case"b":a=1e9;break;case"t":a=1e12;break;case"l":a=1e5;break;case"c":a=1e7;break;case"lc":a=1e12}i.rupee_value=i.rupee_value*a}return"inr ".concat(i.rupee_value||"")}};Object.keys(Xi).forEach((function(e){tn[e]=en}));var nn=tn,an={"election box begin":function(e,t){var i=Ie(e);return t.push(i),""},"election box candidate":function(e,t){var i=Ie(e);return t.push(i),""},"election box hold with party link":function(e,t){var i=Ie(e);return t.push(i),""},"election box gain with party link":function(e,t){var i=Ie(e);return t.push(i),""}};an["election box begin no change"]=an["election box begin"],an["election box begin no party"]=an["election box begin"],an["election box begin no party no change"]=an["election box begin"],an["election box inline begin"]=an["election box begin"],an["election box inline begin no change"]=an["election box begin"],an["election box candidate for alliance"]=an["election box candidate"],an["election box candidate minor party"]=an["election box candidate"],an["election box candidate no party link no change"]=an["election box candidate"],an["election box candidate with party link"]=an["election box candidate"],an["election box candidate with party link coalition 1918"]=an["election box candidate"],an["election box candidate with party link no change"]=an["election box candidate"],an["election box inline candidate"]=an["election box candidate"],an["election box inline candidate no change"]=an["election box candidate"],an["election box inline candidate with party link"]=an["election box candidate"],an["election box inline candidate with party link no change"]=an["election box candidate"],an["election box inline incumbent"]=an["election box candidate"];var rn=an,on=[["🇦🇩","and","andorra"],["🇦🇪","are","united arab emirates"],["🇦🇫","afg","afghanistan"],["🇦🇬","atg","antigua and barbuda"],["🇦🇮","aia","anguilla"],["🇦🇱","alb","albania"],["🇦🇲","arm","armenia"],["🇦🇴","ago","angola"],["🇦🇶","ata","antarctica"],["🇦🇷","arg","argentina"],["🇦🇸","asm","american samoa"],["🇦🇹","aut","austria"],["🇦🇺","aus","australia"],["🇦🇼","abw","aruba"],["🇦🇽","ala","åland islands"],["🇦🇿","aze","azerbaijan"],["🇧🇦","bih","bosnia and herzegovina"],["🇧🇧","brb","barbados"],["🇧🇩","bgd","bangladesh"],["🇧🇪","bel","belgium"],["🇧🇫","bfa","burkina faso"],["🇧🇬","bgr","bulgaria"],["🇧🇬","bul","bulgaria"],["🇧🇭","bhr","bahrain"],["🇧🇮","bdi","burundi"],["🇧🇯","ben","benin"],["🇧🇱","blm","saint barthélemy"],["🇧🇲","bmu","bermuda"],["🇧🇳","brn","brunei darussalam"],["🇧🇴","bol","bolivia"],["🇧🇶","bes","bonaire, sint eustatius and saba"],["🇧🇷","bra","brazil"],["🇧🇸","bhs","bahamas"],["🇧🇹","btn","bhutan"],["🇧🇻","bvt","bouvet island"],["🇧🇼","bwa","botswana"],["🇧🇾","blr","belarus"],["🇧🇿","blz","belize"],["🇨🇦","can","canada"],["🇨🇨","cck","cocos (keeling) islands"],["🇨🇩","cod","congo"],["🇨🇫","caf","central african republic"],["🇨🇬","cog","congo"],["🇨🇭","che","switzerland"],["🇨🇮","civ","côte d'ivoire"],["🇨🇰","cok","cook islands"],["🇨🇱","chl","chile"],["🇨🇲","cmr","cameroon"],["🇨🇳","chn","china"],["🇨🇴","col","colombia"],["🇨🇷","cri","costa rica"],["🇨🇺","cub","cuba"],["🇨🇻","cpv","cape verde"],["🇨🇼","cuw","curaçao"],["🇨🇽","cxr","christmas island"],["🇨🇾","cyp","cyprus"],["🇨🇿","cze","czech republic"],["🇩🇪","deu","germany"],["🇩🇪","ger","germany"],["🇩🇯","dji","djibouti"],["🇩🇰","dnk","denmark"],["🇩🇲","dma","dominica"],["🇩🇴","dom","dominican republic"],["🇩🇿","dza","algeria"],["🇪🇨","ecu","ecuador"],["🇪🇪","est","estonia"],["🇪🇬","egy","egypt"],["🇪🇭","esh","western sahara"],["🇪🇷","eri","eritrea"],["🇪🇸","esp","spain"],["🇪🇹","eth","ethiopia"],["🇫🇮","fin","finland"],["🇫🇯","fji","fiji"],["🇫🇰","flk","falkland islands (malvinas)"],["🇫🇲","fsm","micronesia"],["🇫🇴","fro","faroe islands"],["🇫🇷","fra","france"],["🇬🇦","gab","gabon"],["🇬🇧","gbr","united kingdom"],["🇬🇩","grd","grenada"],["🇬🇫","guf","french guiana"],["🇬🇬","ggy","guernsey"],["🇬🇭","gha","ghana"],["🇬🇮","gib","gibraltar"],["🇬🇱","grl","greenland"],["🇬🇲","gmb","gambia"],["🇬🇳","gin","guinea"],["🇬🇵","glp","guadeloupe"],["🇬🇶","gnq","equatorial guinea"],["🇬🇷","grc","greece"],["🇬🇸","sgs","south georgia"],["🇬🇹","gtm","guatemala"],["🇬🇺","gum","guam"],["🇬🇼","gnb","guinea-bissau"],["🇬🇾","guy","guyana"],["🇭🇰","hkg","hong kong"],["🇭🇲","hmd","heard island and mcdonald islands"],["🇭🇳","hnd","honduras"],["🇭🇷","hrv","croatia"],["🇭🇹","hti","haiti"],["🇭🇺","hun","hungary"],["🇮🇩","idn","indonesia"],["🇮🇪","irl","ireland"],["🇮🇱","isr","israel"],["🇮🇲","imn","isle of man"],["🇮🇳","ind","india"],["🇮🇴","iot","british indian ocean territory"],["🇮🇶","irq","iraq"],["🇮🇷","irn","iran"],["🇮🇸","isl","iceland"],["🇮🇹","ita","italy"],["🇯🇪","jey","jersey"],["🇯🇲","jam","jamaica"],["🇯🇴","jor","jordan"],["🇯🇵","jpn","japan"],["🇰🇪","ken","kenya"],["🇰🇬","kgz","kyrgyzstan"],["🇰🇭","khm","cambodia"],["🇰🇮","kir","kiribati"],["🇰🇲","com","comoros"],["🇰🇳","kna","saint kitts and nevis"],["🇰🇵","prk","north korea"],["🇰🇷","kor","south korea"],["🇰🇼","kwt","kuwait"],["🇰🇾","cym","cayman islands"],["🇰🇿","kaz","kazakhstan"],["🇱🇦","lao","lao people's democratic republic"],["🇱🇧","lbn","lebanon"],["🇱🇨","lca","saint lucia"],["🇱🇮","lie","liechtenstein"],["🇱🇰","lka","sri lanka"],["🇱🇷","lbr","liberia"],["🇱🇸","lso","lesotho"],["🇱🇹","ltu","lithuania"],["🇱🇺","lux","luxembourg"],["🇱🇻","lva","latvia"],["🇱🇾","lby","libya"],["🇲🇦","mar","morocco"],["🇲🇨","mco","monaco"],["🇲🇩","mda","moldova"],["🇲🇪","mne","montenegro"],["🇲🇫","maf","saint martin (french part)"],["🇲🇬","mdg","madagascar"],["🇲🇭","mhl","marshall islands"],["🇲🇰","mkd","macedonia"],["🇲🇱","mli","mali"],["🇲🇲","mmr","myanmar"],["🇲🇳","mng","mongolia"],["🇲🇴","mac","macao"],["🇲🇵","mnp","northern mariana islands"],["🇲🇶","mtq","martinique"],["🇲🇷","mrt","mauritania"],["🇲🇸","msr","montserrat"],["🇲🇹","mlt","malta"],["🇲🇺","mus","mauritius"],["🇲🇻","mdv","maldives"],["🇲🇼","mwi","malawi"],["🇲🇽","mex","mexico"],["🇲🇾","mys","malaysia"],["🇲🇿","moz","mozambique"],["🇳🇦","nam","namibia"],["🇳🇨","ncl","new caledonia"],["🇳🇪","ner","niger"],["🇳🇫","nfk","norfolk island"],["🇳🇬","nga","nigeria"],["🇳🇮","nic","nicaragua"],["🇳🇱","nld","netherlands"],["🇳🇴","nor","norway"],["🇳🇵","npl","nepal"],["🇳🇷","nru","nauru"],["🇳🇺","niu","niue"],["🇳🇿","nzl","new zealand"],["🇴🇲","omn","oman"],["🇵🇦","pan","panama"],["🇵🇪","per","peru"],["🇵🇫","pyf","french polynesia"],["🇵🇬","png","papua new guinea"],["🇵🇭","phl","philippines"],["🇵🇰","pak","pakistan"],["🇵🇱","pol","poland"],["🇵🇲","spm","saint pierre and miquelon"],["🇵🇳","pcn","pitcairn"],["🇵🇷","pri","puerto rico"],["🇵🇸","pse","palestinian territory"],["🇵🇹","prt","portugal"],["🇵🇼","plw","palau"],["🇵🇾","pry","paraguay"],["🇶🇦","qat","qatar"],["🇷🇪","reu","réunion"],["🇷🇴","rou","romania"],["🇷🇸","srb","serbia"],["🇷🇺","rus","russia"],["🇷🇼","rwa","rwanda"],["🇸🇦","sau","saudi arabia"],["🇸🇧","slb","solomon islands"],["🇸🇨","syc","seychelles"],["🇸🇩","sdn","sudan"],["🇸🇪","swe","sweden"],["🇸🇬","sgp","singapore"],["🇸🇭","shn","saint helena, ascension and tristan da cunha"],["🇸🇮","svn","slovenia"],["🇸🇯","sjm","svalbard and jan mayen"],["🇸🇰","svk","slovakia"],["🇸🇱","sle","sierra leone"],["🇸🇲","smr","san marino"],["🇸🇳","sen","senegal"],["🇸🇴","som","somalia"],["🇸🇷","sur","suriname"],["🇸🇸","ssd","south sudan"],["🇸🇹","stp","sao tome and principe"],["🇸🇻","slv","el salvador"],["🇸🇽","sxm","sint maarten (dutch part)"],["🇸🇾","syr","syrian arab republic"],["🇸🇿","swz","swaziland"],["🇹🇨","tca","turks and caicos islands"],["🇹🇩","tcd","chad"],["🇹🇫","atf","french southern territories"],["🇹🇬","tgo","togo"],["🇹🇭","tha","thailand"],["🇹🇯","tjk","tajikistan"],["🇹🇰","tkl","tokelau"],["🇹🇱","tls","timor-leste"],["🇹🇲","tkm","turkmenistan"],["🇹🇳","tun","tunisia"],["🇹🇴","ton","tonga"],["🇹🇷","tur","turkey"],["🇹🇹","tto","trinidad and tobago"],["🇹🇻","tuv","tuvalu"],["🇹🇼","twn","taiwan"],["🇹🇿","tza","tanzania"],["🇺🇦","ukr","ukraine"],["🇺🇬","uga","uganda"],["🇺🇲","umi","united states minor outlying islands"],["🇺🇸","usa","united states"],["🇺🇸","us","united states"],["🇺🇾","ury","uruguay"],["🇺🇿","uzb","uzbekistan"],["🇻🇦","vat","vatican city"],["🇻🇨","vct","saint vincent and the grenadines"],["🇻🇪","ven","venezuela"],["🇻🇬","vgb","virgin islands, british"],["🇻🇮","vir","virgin islands, u.s."],["🇻🇳","vnm","viet nam"],["🇻🇺","vut","vanuatu"],["","win","west indies"],["🇼🇫","wlf","wallis and futuna"],["🇼🇸","wsm","samoa"],["🇾🇪","yem","yemen"],["🇾🇹","myt","mayotte"],["🇿🇦","zaf","south africa"],["🇿🇲","zmb","zambia"],["🇿🇼 ","zwe","zimbabwe"],["🇺🇳","un","united nations"],["🏴󠁧󠁢󠁥󠁮󠁧󠁿󠁧󠁢󠁥󠁮󠁧󠁿","eng","england"],["🏴󠁧󠁢󠁳󠁣󠁴󠁿","sct","scotland"],["🏴󠁧󠁢󠁷󠁬󠁳󠁿","wal","wales"],["🇪🇺","eu","european union"]],sn={flag:function(e){var t=Ie(e,["flag","variant"]),i=t.flag||"";t.flag=(t.flag||"").toLowerCase();var n=on.find((function(e){return t.flag===e[1]||t.flag===e[2]}))||[],a=n[0]||"";return"".concat(a," [[").concat(n[2],"|").concat(i,"]]")},flagcountry:function(e){var t=Ie(e,["flag","variant"]);t.flag=(t.flag||"").toLowerCase();var i=on.find((function(e){return t.flag===e[1]||t.flag===e[2]}))||[],n=i[0]||"";return"".concat(n," [[").concat(i[2],"]]")},flagcu:function(e){var t=Ie(e,["flag","variant"]);t.flag=(t.flag||"").toLowerCase();var i=on.find((function(e){return t.flag===e[1]||t.flag===e[2]}))||[],n=i[0]||"";return"".concat(n," ").concat(i[2])},flagicon:function(e){var t=Ie(e,["flag","variant"]);t.flag=(t.flag||"").toLowerCase();var i=on.find((function(e){return t.flag===e[1]||t.flag===e[2]}));return i?"[[".concat(i[2],"|").concat(i[0],"]]"):""},flagdeco:function(e){var t=Ie(e,["flag","variant"]);return t.flag=(t.flag||"").toLowerCase(),(on.find((function(e){return t.flag===e[1]||t.flag===e[2]}))||[])[0]||""},fb:function(e){var t=Ie(e,["flag","variant"]);t.flag=(t.flag||"").toLowerCase();var i=on.find((function(e){return t.flag===e[1]||t.flag===e[2]}));return i?"".concat(i[0]," [[").concat(i[2]," national football team|").concat(i[2],"]]"):""},fbicon:function(e){var t=Ie(e,["flag","variant"]);t.flag=(t.flag||"").toLowerCase();var i=on.find((function(e){return t.flag===e[1]||t.flag===e[2]}));return i?" [[".concat(i[2]," national football team|").concat(i[0],"]]"):""},flagathlete:function(e){var t=Ie(e,["name","flag","variant"]);t.flag=(t.flag||"").toLowerCase();var i=on.find((function(e){return t.flag===e[1]||t.flag===e[2]}));return i?"".concat(i[0]," [[").concat(t.name||"","]] (").concat(i[1].toUpperCase(),")"):"[[".concat(t.name||"","]]")}};on.forEach((function(e){sn[e[1]]=function(){return e[0]}})),sn.cr=sn.flagcountry,sn["cr-rt"]=sn.flagcountry,sn.cricon=sn.flagicon;var cn=sn,un=function(e){var t=e.match(/ipac?-(.+)/);return null!==t?!0===S.hasOwnProperty(t[1])?S[t[1]].english_title:t[1]:null},ln={ipa:function(e,t){var i=Ie(e,["transcription","lang","audio"]);return i.lang=un(i.template),i.template="ipa",t.push(i),""},ipac:function(e,t){var i=Ie(e);return i.transcription=(i.list||[]).join(","),delete i.list,i.lang=un(i.template),i.template="ipac",t.push(i),""},transl:function(e,t){var i=Ie(e,["lang","text","text2"]);return i.text2&&(i.iso=i.text,i.text=i.text2,delete i.text2),t.push(i),i.text||""}};Object.keys(S).forEach((function(e){ln["ipa-"+e]=ln.ipa,ln["ipac-"+e]=ln.ipac}));var pn=ln,mn={lang:1,"lang-de":0,"rtl-lang":1,taste:0,nihongo:function(e,t){var i=Ie(e,["english","kanji","romaji","extra"]);t.push(i);var n=i.english||i.romaji||"";return i.kanji&&(n+=" (".concat(i.kanji,")")),n}};Object.keys(S).forEach((function(e){mn["lang-"+e]=mn["lang-de"]})),mn.nihongo2=mn.nihongo,mn.nihongo3=mn.nihongo,mn["nihongo-s"]=mn.nihongo,mn["nihongo foot"]=mn.nihongo;var dn=mn,fn=function(e){if(!e.numerator&&!e.denominator)return null;var t=Number(e.numerator)/Number(e.denominator);t*=100;var i=Number(e.decimals);return isNaN(i)&&(i=1),t=t.toFixed(i),Number(t)},gn={math:function(e,t){var i=Ie(e,["formula"]);return t.push(i),"\n\n"+(i.formula||"")+"\n\n"},frac:function(e,t){var i=Ie(e,["a","b","c"]),n={template:"sfrac"};return i.c?(n.integer=i.a,n.numerator=i.b,n.denominator=i.c):i.b?(n.numerator=i.a,n.denominator=i.b):(n.numerator=1,n.denominator=i.a),t.push(n),n.integer?"".concat(n.integer," ").concat(n.numerator,"⁄").concat(n.denominator):"".concat(n.numerator,"⁄").concat(n.denominator)},radic:function(e){var t=Ie(e,["after","before"]);return"".concat(t.before||"","√").concat(t.after||"")},percentage:function(e){var t=Ie(e,["numerator","denominator","decimals"]),i=fn(t);return null===i?"":i+"%"},"percent-done":function(e){var t=Ie(e,["done","total","digits"]),i=fn({numerator:t.done,denominator:t.total,decimals:t.digits});return null===i?"":"".concat(t.done," (").concat(i,"%) done")},"winning percentage":function(e,t){var i=Ie(e,["wins","losses","ties"]);t.push(i);var n=Number(i.wins),a=Number(i.losses),r=Number(i.ties)||0,o=n+a+r;"y"===i.ignore_ties&&(r=0),r&&(n+=r/2);var s=fn({numerator:n,denominator:o,decimals:1});return null===s?"":".".concat(10*s)},winlosspct:function(e,t){var i=Ie(e,["wins","losses"]);t.push(i);var n=Number(i.wins),a=Number(i.losses),r=fn({numerator:n,denominator:n+a,decimals:1});return null===r?"":(r=".".concat(10*r),"".concat(n||0," || ").concat(a||0," || ").concat(r||"-"))}};gn.sfrac=gn.frac,gn.sqrt=gn.radic,gn.pct=gn.percentage,gn.percent=gn.percentage,gn.winpct=gn["winning percentage"],gn.winperc=gn["winning percentage"];var hn=gn,bn=function(e,t,i){var n=Ie(e);return i&&(n.name=n.template,n.template=i),t.push(n),""},kn={persondata:bn,taxobox:bn,citation:bn,portal:bn,reflist:bn,"cite book":bn,"cite journal":bn,"cite web":bn,"commons cat":bn,"portuguese name":["first","second","suffix"],uss:["ship","id"],isbn:function(e,t){var i=Ie(e,["id","id2","id3"]);return t.push(i),"ISBN: "+(i.id||"")},marriage:function(e,t){var i=Ie(e,["spouse","from","to","end"]);t.push(i);var n="".concat(i.spouse||"");return i.from&&(i.to?n+=" (m. ".concat(i.from,"-").concat(i.to,")"):n+=" (m. ".concat(i.from,")")),n},"based on":function(e,t){var i=Ie(e,["title","author"]);return t.push(i),"".concat(i.title," by ").concat(i.author||"")},"video game release":function(e,t){for(var i=["region","date","region2","date2","region3","date3","region4","date4"],n=Ie(e,i),a={template:"video game release",releases:[]},r=0;r0&&t.push(c),""},Yn=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},Zn={text:function(){return""},json:function(){return this.data}};Object.keys(Zn).forEach((function(e){Yn.prototype[e]=Zn[e]}));var Gn=Yn,Hn=new RegExp("^(cite |citation)","i"),Vn={citation:!0,refn:!0,harvnb:!0},Jn=function(e){return"infobox"===e.template&&e.data&&function(e){return e&&"[object Object]"===Object.prototype.toString.call(e)}(e.data)},Qn=function(e,t){var i=e.wiki,n=Jt(i),a=[];n.forEach((function(e){return function e(t,n){t.parent=n,t.children&&t.children.length>0&&t.children.forEach((function(i){return e(i,t)})),t.out=Wn(t,a);!function e(t,i,n){t.parent&&(t.parent.body=t.parent.body.replace(i,n),e(t.parent,i,n))}(t,t.body,t.out),i=i.replace(t.body,t.out)}(e,null)})),e.infoboxes=e.infoboxes||[],e.references=e.references||[],e.templates=e.templates||[],e.templates=e.templates.concat(a),e.templates=e.templates.filter((function(i){return!0===function(e){return!0===Vn[e.template]||!0===Hn.test(e.template)}(i)?(e.references.push(new Me(i)),!1):!0!==Jn(i)||(i.domain=t.domain,e.infoboxes.push(new Wt(i)),!1)})),e.templates=e.templates.map((function(e){return new Gn(e)})),n.forEach((function(e){i=i.replace(e.body,e.out)})),e.wiki=i},Xn=je,ea=function(e,t){var i=e.wiki;i=i.replace(/]*?)>([\s\S]+?)<\/gallery>/g,(function(i,n,a){var r=a.split(/\n/g);return(r=(r=r.filter((function(e){return e&&""!==e.trim()}))).map((function(e){var i=e.split(/\|/),n={file:i[0].trim(),lang:t.language,domain:t.domain},a=new $(n).json(),r=i.slice(1).join("|");return""!==r&&(a.caption=Xn(r)),a}))).length>0&&e.templates.push({template:"gallery",images:r,pos:e.title}),""})),e.wiki=i},ta=function(e){var t=e.wiki;t=t.replace(/\{\{election box begin([\s\S]+?)\{\{election box end\}\}/gi,(function(t){var i={wiki:t,templates:[]};Qn(i);var n=i.templates.map((function(e){return e.json()})),a=n.find((function(e){return"election box"===e.template}))||{},r=n.filter((function(e){return"election box candidate"===e.template})),o=n.find((function(e){return"election box gain"===e.template||"election box hold"===e.template}))||{};return(r.length>0||o)&&e.templates.push({template:"election box",title:a.title,candidates:r,summary:o.data}),""})),e.wiki=t},ia={coach:["team","year","g","w","l","w-l%","finish","pg","pw","pl","pw-l%"],player:["year","team","gp","gs","mpg","fg%","3p%","ft%","rpg","apg","spg","bpg","ppg"],roster:["player","gp","gs","mpg","fg%","3fg%","ft%","rpg","apg","spg","bpg","ppg"]},na=function(e){var t=e.wiki;t=t.replace(/\{\{nba (coach|player|roster) statistics start([\s\S]+?)\{\{s-end\}\}/gi,(function(t,i){t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{s-end\}\}/,""),i=i.toLowerCase().trim();var n="! "+ia[i].join(" !! "),a=at("{|\n"+n+"\n"+t+"\n|}");return a=a.map((function(e){return Object.keys(e).forEach((function(t){e[t]=e[t].text()})),e})),e.templates.push({template:"NBA "+i+" statistics",data:a}),""})),e.wiki=t},aa=function(e){var t=e.wiki;t=t.replace(/\{\{mlb game log (section|month)[\s\S]+?\{\{mlb game log (section|month) end\}\}/gi,(function(t){var i=function(e){var t=["#","date","opponent","score","win","loss","save","attendance","record"];return!0===/\|stadium=y/i.test(e)&&t.splice(7,0,"stadium"),!0===/\|time=y/i.test(e)&&t.splice(7,0,"time"),!0===/\|box=y/i.test(e)&&t.push("box"),t}(t);t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{mlb game log (section|month) end\}\}/i,"");var n="! "+i.join(" !! "),a=at("{|\n"+n+"\n"+t+"\n|}");return a=a.map((function(e){return Object.keys(e).forEach((function(t){e[t]=e[t].text()})),e})),e.templates.push({template:"mlb game log section",data:a}),""})),e.wiki=t},ra=["res","record","opponent","method","event","date","round","time","location","notes"],oa=function(e){var t=e.wiki;t=t.replace(/\{\{mma record start[\s\S]+?\{\{end\}\}/gi,(function(t){t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{end\}\}/i,"");var i="! "+ra.join(" !! "),n=at("{|\n"+i+"\n"+t+"\n|}");return n=n.map((function(e){return Object.keys(e).forEach((function(t){e[t]=e[t].text()})),e})),e.templates.push({template:"mma record start",data:n}),""})),e.wiki=t},sa=je,ca=function(e){var t=e.wiki;t=(t=t.replace(/]*?)>([\s\S]+?)<\/math>/g,(function(t,i,n){var a=sa(n).text();return e.templates.push({template:"math",formula:a,raw:n}),a&&a.length<12?a:""}))).replace(/]*?)>([\s\S]+?)<\/chem>/g,(function(t,i,n){return e.templates.push({template:"chem",data:n}),""})),e.wiki=t},ua=function(e,t){ta(e),ea(e,t),ca(e),aa(e),oa(e),na(e)},la=new RegExp("^("+_.references.join("|")+"):?","i"),pa=/(?:\n|^)(={2,5}.{1,200}?={2,5})/g,ma={heading:Ze,table:mt,paragraphs:Rt,templates:Qn,references:Be,startEndTemplates:ua},da=function(e,t){return ma.startEndTemplates(e,t),ma.references(e),ma.templates(e,t),ma.table(e),ma.paragraphs(e,t),e=new ie(e)},fa=function(e){for(var t=[],i=e.wiki.split(pa),n=0;n0||(t.templates().length>0||(e[i+1]&&e[i+1].depth>t.depth&&(e[i+1].depth-=1),!1)))}))}(t)},ga=new RegExp("\\[\\[:?("+_.categories.join("|")+"):(.{2,178}?)]](w{0,10})","ig"),ha=new RegExp("^\\[\\[:?("+_.categories.join("|")+"):","ig"),ba={section:fa,categories:function(e){var t=e.wiki,i=t.match(ga);i&&i.forEach((function(t){(t=(t=(t=t.replace(ha,"")).replace(/\|?[ \*]?\]\]$/i,"")).replace(/\|.*/,""))&&!t.match(/[\[\]]/)&&e.categories.push(t.trim())})),t=t.replace(ga,""),e.wiki=t}},ka=function(e,t){t=t||{};var i=Object.assign(t,{title:t.title||null,pageID:t.pageID||t.id||null,namespace:t.namespace||t.ns||null,type:"page",wiki:e||"",categories:[],sections:[],coordinates:[]});return!0===R(e)?(i.type="redirect",i.redirectTo=U(e),ba.categories(i),new O(i)):(Z(i),ba.categories(i),ba.section(i),new O(i))},wa=function(e){var t=(e=e.filter((function(e){return e}))).map((function(e){return ka(e.wiki,e.meta)}));return 0===t.length?null:1===t.length?t[0]:t},va=function(e,t){return fetch(e,t).then((function(e){return e.json()}))},ya=function(e){var t=e.userAgent||e["User-Agent"]||e["Api-User-Agent"]||"User of the wtf_wikipedia library";return{method:"GET",headers:{"Content-Type":"application/json","Api-User-Agent":t,"User-Agent":t,Origin:"*"},redirect:"follow"}},xa=/^https?:\/\//,$a={lang:"en",wiki:"wikipedia",domain:null,follow_redirects:!0,path:"api.php"},ja=function(t,i,n){var a=null;"function"==typeof i&&(a=i,i={}),"function"==typeof n&&(a=n,n={}),"string"==typeof i&&(n=n||{},i=Object.assign({},{lang:i},n)),i=i||{},(i=Object.assign({},$a,i)).title=t,xa.test(t)&&(i=Object.assign(i,e(t)));var r=c(i),o=ya(i);return va(r,o).then((function(e){try{var t=u(e,i);return t=wa(t),a&&a(null,t),t}catch(e){throw e}})).catch((function(e){return console.error(e),a&&a(e,null),null}))},za={lang:"en",wiki:"wikipedia",domain:null,path:"w/api.php"},Ea=function(e,t){var i;t=t||{},t=Object.assign({},za,t),"string"==typeof e?t.lang=e:(i=e)&&"[object Object]"===Object.prototype.toString.call(i)&&(t=Object.assign(t,e));var n="https://".concat(t.lang,".wikipedia.org/").concat(t.path,"?");t.domain&&(n="https://".concat(t.domain,"/").concat(t.path,"?")),n+="format=json&action=query&generator=random&grnnamespace=0&prop=revisions|pageprops&rvprop=content&grnlimit=1&rvslots=main&origin=*";var a=ya(t);return va(n,a).then((function(e){try{var t=u(e);return wa(t)}catch(e){throw e}})).catch((function(e){return console.error(e),null}))},Oa={lang:"en",wiki:"wikipedia",domain:null,path:"w/api.php"},_a=function(e,t,i){var n;i=i||{},i=Object.assign({},Oa,i),"string"==typeof t?i.lang=t:(n=t)&&"[object Object]"===Object.prototype.toString.call(n)&&(i=Object.assign(i,t));var a={pages:[],categories:[]};return new Promise((function(t,n){!function r(o){var s=function(e,t,i){e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return!1===/^Category/i.test(e)&&(e="Category:"+e),e=e.replace(/ /g,"_")}(e),e=encodeURIComponent(e);var n="https://".concat(t.lang,".wikipedia.org/").concat(t.path,"?");return t.domain&&(n="https://".concat(t.domain,"/").concat(t.path,"?")),n+="action=query&list=categorymembers&cmtitle=".concat(e,"&cmlimit=500&format=json&origin=*&redirects=true&cmtype=page|subcat"),i&&(n+="&cmcontinue="+i),n}(e,i,o),c=ya(i);return va(s,c).then((function(e){a=function(e){var t=e.query.categorymembers||[],i={pages:[],categories:[]};return t.forEach((function(e){14===e.ns?(delete e.ns,i.categories.push(e)):(delete e.ns,i.pages.push(e))})),i}(e),e.continue&&e.continue.cmcontinue?r(e.continue.cmcontinue):t(a)})).catch((function(e){console.error(e),n(e)}))}(null)}))},Sa=function(e,t){return ka(e,t)},Ca={Doc:O,Section:ie,Paragraph:kt,Sentence:ge,Image:$,Infobox:Wt,Link:se,List:St,Reference:Me,Table:ut,Template:Gn,http:va,wtf:Sa};Sa.fetch=function(e,t,i,n){return ja(e,t,i)},Sa.random=function(e,t,i){return Ea(e,t)},Sa.category=function(e,t,i,n){return _a(e,t,i)},Sa.extend=function(e){return e(Ca,Fn,this),this},Sa.version="8.4.0";var qa=Sa;export default qa; +var e=function(e){var t=new URL(e),i=t.pathname.replace(/^\/(wiki\/)?/,"");return i=decodeURIComponent(i),{domain:t.host,title:i}};function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var i=[],n=!0,a=!1,r=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(i.push(o.value),!t||i.length!==t);n=!0);}catch(e){a=!0,r=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw r}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return n(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return n(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);iObject.keys(t.data).length?-1:1})),"number"==typeof e?t[e]:t},text:function(e){return e=p(e,j),!0===this.isRedirect()?"":this.sections().map((function(t){return t.text(e)})).join("\n\n")},json:function(e){return e=p(e,j),d(this,e)},debug:function(){return console.log("\n"),this.sections().forEach((function(e){for(var t=" - ",i=0;i500)&&M.test(e)},U=function(e){var t=e.match(M);return t&&t[2]?(P(t[2])||[])[0]:{}},F=["table","code","score","data","categorytree","charinsert","hiero","imagemap","inputbox","nowiki","poem","references","source","syntaxhighlight","timeline"],K="< ?(".concat(F.join("|"),") ?[^>]{0,200}?>"),B="< ?/ ?(".concat(F.join("|"),") ?>"),W=new RegExp("".concat(K,"[").concat("\\s\\S","]+?").concat(B),"ig"),Y=function(e){return(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(W," ")).replace(/ ?< ?(span|div|table|data) [a-zA-Z0-9=%\.#:;'" ]{2,100}\/? ?> ?/g," ")).replace(/ ?< ?(ref) [a-zA-Z0-9=" ]{2,100}\/ ?> ?/g," ")).replace(/(.*?)<\/i>/g,"''$1''")).replace(/(.*?)<\/b>/g,"'''$1'''")).replace(/(.*?)<\/sub>/g,"{{sub|$1}}")).replace(/(.*?)<\/sup>/g,"{{sup|$1}}")).replace(/ ?<[ \/]?(p|sub|sup|span|nowiki|div|table|br|tr|td|th|pre|pre2|hr)[ \/]?> ?/g," ")).replace(/ ?<[ \/]?(abbr|bdi|bdo|blockquote|cite|del|dfn|em|ins|kbd|mark|q|s|small)[ \/]?> ?/g," ")).replace(/ ?<[ \/]?h[0-9][ \/]?> ?/g," ")).replace(/ ?< ?br ?\/> ?/g,"\n")).trim()};var Z=function(e){var t=e.wiki;t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace(//g,"")).replace(/__(NOTOC|NOEDITSECTION|FORCETOC|TOC)__/gi,"")).replace(/~~{1,3}/g,"")).replace(/\r/g,"")).replace(/\u3002/g,". ")).replace(/----/g,"")).replace(/\{\{\}\}/g," – ")).replace(/\{\{\\\}\}/g," / ")).replace(/ /g," "),t=(t=(t=Y(t)).replace(/\([,;: ]+?\)/g,"")).replace(/{{(baseball|basketball) (primary|secondary) (style|color).*?\}\}/i,""),e.wiki=t},G=/[\\\.$]/,H=function(e){return"string"!=typeof e&&(e=""),e=(e=(e=e.replace(/\\/g,"\\\\")).replace(/^\$/,"\\u0024")).replace(/\./g,"\\u002e")},V=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.keys(e),i=0;i0&&(i.paragraphs=n)}if(!0===t.images){var a=e.images().map((function(e){return e.json(t)}));a.length>0&&(i.images=a)}if(!0===t.tables){var r=e.tables().map((function(e){return e.json(t)}));r.length>0&&(i.tables=r)}if(!0===t.templates){var o=e.templates();o.length>0&&(i.templates=o,!0===t.encode&&i.templates.forEach((function(e){return V(e)})))}if(!0===t.infoboxes){var s=e.infoboxes().map((function(e){return e.json(t)}));s.length>0&&(i.infoboxes=s)}if(!0===t.lists){var c=e.lists().map((function(e){return e.json(t)}));c.length>0&&(i.lists=c)}if(!0===t.references||!0===t.citations){var u=e.references().map((function(e){return e.json(t)}));u.length>0&&(i.references=u)}return!0===t.sentences&&(i.sentences=e.sentences().map((function(e){return e.json(t)}))),i},X={tables:!0,references:!0,paragraphs:!0,templates:!0,infoboxes:!0},ee=function(e){this.depth=e.depth,this.doc=null,this._title=e.title||"",Object.defineProperty(this,"doc",{enumerable:!1,value:null}),e.templates=e.templates||[],Object.defineProperty(this,"data",{enumerable:!1,value:e})},te={title:function(){return this._title||""},index:function(){if(!this.doc)return null;var e=this.doc.sections().indexOf(this);return-1===e?null:e},indentation:function(){return this.depth},sentences:function(e){var t=this.paragraphs().reduce((function(e,t){return e.concat(t.sentences())}),[]);return"number"==typeof e?t[e]:t||[]},paragraphs:function(e){var t=this.data.paragraphs||[];return"number"==typeof e?t[e]:t||[]},paragraph:function(e){var t=this.data.paragraphs||[];return"number"==typeof e?t[e]:t[0]},links:function(e){var t=[];if(this.infoboxes().forEach((function(i){i.links(e).forEach((function(e){return t.push(e)}))})),this.sentences().forEach((function(i){i.links(e).forEach((function(e){return t.push(e)}))})),this.tables().forEach((function(i){i.links(e).forEach((function(e){return t.push(e)}))})),this.lists().forEach((function(i){i.links(e).forEach((function(e){return t.push(e)}))})),"number"==typeof e)return t[e];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);var i=t.find((function(t){return t.page()===e}));return void 0===i?[]:[i]}return t},tables:function(e){var t=this.data.tables||[];return"number"==typeof e?t[e]:t},templates:function(e){var t=this.data.templates||[];return t=t.map((function(e){return e.json()})),"number"==typeof e?t[e]:"string"==typeof e?(e=e.toLowerCase(),t.filter((function(t){return t.template===e||t.name===e}))):t},infoboxes:function(e){var t=this.data.infoboxes||[];return"number"==typeof e?t[e]:t},coordinates:function(e){var t=[].concat(this.templates("coord"),this.templates("coor"));return"number"==typeof e?t[e]?t[e]:[]:t},lists:function(e){var t=[];return this.paragraphs().forEach((function(e){t=t.concat(e.lists())})),"number"==typeof e?t[e]:t},interwiki:function(e){var t=[];return this.paragraphs().forEach((function(e){t=t.concat(e.interwiki())})),"number"==typeof e?t[e]:t||[]},images:function(e){var t=[];return this.paragraphs().forEach((function(e){t=t.concat(e.images())})),"number"==typeof e?t[e]:t||[]},references:function(e){var t=this.data.references||[];return"number"==typeof e?t[e]:t},remove:function(){if(!this.doc)return null;var e={};e[this.title()]=!0,this.children().forEach((function(t){return e[t.title()]=!0}));var t=this.doc.data.sections;return t=t.filter((function(t){return!0!==e.hasOwnProperty(t.title())})),this.doc.data.sections=t,this.doc},nextSibling:function(){if(!this.doc)return null;for(var e=this.doc.sections(),t=this.index()+1;tthis.depth)for(var a=i+1;athis.depth;a+=1)n.push(t[a]);return"string"==typeof e?(e=e.toLowerCase(),n.find((function(t){return t.title().toLowerCase()===e}))):"number"==typeof e?n[e]:n},parent:function(){if(!this.doc)return null;for(var e=this.doc.sections(),t=this.index();t>=0;t-=1)if(e[t]&&e[t].depth0&&(e.fmt=e.fmt||{},e.fmt.bold=t),i.length>0&&(e.fmt=e.fmt||{},e.fmt.italic=i),e},le=/^[0-9,.]+$/,pe={text:!0,links:!0,formatting:!0,numbers:!0},me=function(e,t){t=p(t,pe);var i={},n=e.text();if(!0===t.text&&(i.text=n),!0===t.numbers&&le.test(n)){var a=Number(n.replace(/,/g,""));!1===isNaN(a)&&(i.number=a)}return t.links&&e.links().length>0&&(i.links=e.links().map((function(e){return e.json()}))),t.formatting&&e.data.fmt&&(i.formatting=e.data.fmt),i},de=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},fe={links:function(e){var t=this.data.links||[];if("number"==typeof e)return t[e];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);var i=t.find((function(t){return t.page===e}));return void 0===i?[]:[i]}return t},interwiki:function(e){var t=this.links().filter((function(e){return void 0!==e.wiki}));return"number"==typeof e?t[e]:t},bolds:function(e){var t=[];return this.data&&this.data.fmt&&this.data.fmt.bold&&(t=this.data.fmt.bold||[]),"number"==typeof e?t[e]:t},italics:function(e){var t=[];return this.data&&this.data.fmt&&this.data.fmt.italic&&(t=this.data.fmt.italic||[]),"number"==typeof e?t[e]:t},dates:function(e){var t=[];return"number"==typeof e?t[e]:t},text:function(e){return void 0!==e&&"string"==typeof e&&(this.data.text=e),this.data.text||""},json:function(e){return me(this,e)}};Object.keys(fe).forEach((function(e){de.prototype[e]=fe[e]})),de.prototype.italic=de.prototype.italics,de.prototype.bold=de.prototype.bolds,de.prototype.plaintext=de.prototype.text;var ge=de,he=["ad","adj","adm","adv","al","alta","approx","apr","apt","arc","ariz","assn","asst","atty","aug","ave","ba","bc","bl","bldg","blvd","brig","bros","ca","cal","calif","capt","cca","cg","cl","cm","cmdr","co","col","colo","comdr","conn","corp","cpl","cres","ct","cyn","dak","dec","def","dept","det","dg","dist","dl","dm","dr","ea","eg","eng","esp","esq","est","etc","ex","exp","feb","fem","fig","fl oz","fl","fla","fm","fr","ft","fy","ga","gal","gb","gen","gov","hg","hon","hr","hrs","hwy","hz","ia","ida","ie","inc","inf","jan","jd","jr","jul","jun","kan","kans","kb","kg","km","kmph","lat","lb","lit","llb","lm","lng","lt","ltd","lx","ma","maj","mar","masc","mb","md","messrs","mg","mi","min","minn","misc","mister","ml","mlle","mm","mme","mph","mps","mr","mrs","ms","mstr","mt","neb","nebr","nee","no","nov","oct","okla","ont","op","ord","oz","pa","pd","penn","penna","phd","pl","pp","pref","prob","prof","pron","ps","psa","pseud","pt","pvt","qt","que","rb","rd","rep","reps","res","rev","sask","sec","sen","sens","sep","sept","sfc","sgt","sir","situ","sq ft","sq","sr","ss","st","supt","surg","tb","tbl","tbsp","tce","td","tel","temp","tenn","tex","tsp","univ","usafa","ut","va","vb","ver","vet","vitro","vivo","vol","vs","vt","wis","wisc","wr","wy","wyo","yb","µg"].concat("[^]][^]]"),be=new RegExp("(^| |')("+he.join("|")+")[.!?] ?$","i"),ke=new RegExp("[ |.|'|[][A-Z].? *?$","i"),we=new RegExp("\\.\\.\\.* +?$"),ve=/ c\. $/,ye=new RegExp("[a-zа-яぁ-ゟ][a-zа-яぁ-ゟ゠-ヿ]","iu"),xe=function(e){var t=[],i=[];if(!e||"string"!=typeof e||0===e.trim().length)return t;for(var n=function(e){var t=e.split(/(\n+)/);return function(e){var t=[];return e.forEach((function(e){t=t.concat(e)})),t}(t=(t=t.filter((function(e){return e.match(/\S/)}))).map((function(e){return e.split(/(\S.+?[.!?]"?)(?=\s+|$)/g)})))}(e),a=0;ai.length)return!1;var n=e.match(/"/g);return!(n&&n.length%2!=0&&e.length<900)}(o))?i[s+1]=i[s]+(i[s+1]||""):i[s]&&i[s].length>0&&(t.push(i[s]),i[s]="");return 0===t.length?[e]:t};function $e(e){var t,i={text:e};return ce(i),i.text=(t=(t=(t=i.text).replace(/\([,;: ]*\)/g,"")).replace(/\( *(; ?)+/g,"("),(t=ne(t)).replace(/ +\.$/,".")),i=ue(i),new ge(i)}var je=$e,ze=function(e){var t=xe(e.wiki);(t=t.map($e))[0]&&t[0].text()&&":"===t[0].text()[0]&&(t=t.slice(1)),e.sentences=t},Oe=function(e){return e=(e=e.replace(/^\{\{/,"")).replace(/\}\}$/,"")},Ee=function(e){return e=(e=(e=(e||"").trim()).toLowerCase()).replace(/_/g," ")},_e=function(e){var t=e.split(/\n?\|/);t.forEach((function(e,i){null!==e&&(/\[\[[^\]]+$/.test(e)||/\{\{[^\}]+$/.test(e)||e.split("{{").length!==e.split("}}").length||e.split("[[").length!==e.split("]]").length)&&(t[i+1]=t[i]+"|"+t[i+1],t[i]=null)}));for(var i=(t=(t=t.filter((function(e){return null!==e}))).map((function(e){return(e||"").trim()}))).length-1;i>=0;i-=1){""===t[i]&&t.pop();break}return t},Se=/^[ '-\)\x2D\.0-9_a-z\xC0-\xFF\u0153\u017F\u1E9E\u212A\u212B]+=/i,Ce={template:!0,list:!0,prototype:!0},qe=function(e,t){var i=0;return e.reduce((function(e,n){if(n=(n||"").trim(),!0===Se.test(n)){var a=function(e){var t=e.split("="),i=t[0]||"";i=i.toLowerCase().trim();var n=t.slice(1).join("=");return Ce.hasOwnProperty(i)&&(i="_"+i),{key:i,val:n.trim()}}(n);if(a.key)return e[a.key]=a.val,e}t&&t[i]?e[t[i]]=n:(e.list=e.list||[],e.list.push(n));return i+=1,e}),{})},Ne={classname:!0,style:!0,align:!0,margin:!0,left:!0,break:!0,boxsize:!0,framestyle:!0,item_style:!0,collapsible:!0,list_style_type:!0,"list-style-type":!0,colwidth:!0},Ae=function(e){return Object.keys(e).forEach((function(t){!0===Ne[t.toLowerCase()]&&delete e[t],null!==e[t]&&""!==e[t]||delete e[t]})),e},Le=je,De=function(e,t){var i=Le(e);return"json"===t?i.json():"raw"===t?i:i.text()},Ie=function(e,t,i){t=t||[],e=Oe(e||"");var n=_e(e),a=n.shift(),r=qe(n,t);return(r=Ae(r))[1]&&t[0]&&!1===r.hasOwnProperty(t[0])&&(r[t[0]]=r[1],delete r[1]),Object.keys(r).forEach((function(e){r[e]="list"!==e?De(r[e],i):r[e].map((function(e){return De(e,i)}))})),a&&(r.template=Ee(a)),r},Te=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},Pe={title:function(){var e=this.data;return e.title||e.encyclopedia||e.author||""},links:function(e){var t=[];if("number"==typeof e)return t[e];if("number"==typeof e)return t[e];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);var i=t.find((function(t){return t.page()===e}));return void 0===i?[]:[i]}return t||[]},text:function(){return""},json:function(){return this.data}};Object.keys(Pe).forEach((function(e){Te.prototype[e]=Pe[e]}));var Me=Te,Re=je,Ue=function(e){return/^ *?\{\{ *?(cite|citation)/i.test(e)&&/\}\} *?$/.test(e)&&!1===/citation needed/i.test(e)},Fe=function(e){var t=Ie(e);return t.type=t.template.replace(/cite /,""),t.template="citation",t},Ke=function(e){return{template:"citation",type:"inline",data:{},inline:Re(e)||{}}},Be=function(e){var t=[],i=e.wiki;i=(i=(i=(i=i.replace(/ ?([\s\S]{0,1800}?)<\/ref> ?/gi,(function(e,n){if(Ue(n)){var a=Fe(n);a&&t.push(a),i=i.replace(n,"")}else t.push(Ke(n));return" "}))).replace(/ ?]{0,200}?\/> ?/gi," ")).replace(/ ?]{0,200}?>([\s\S]{0,1800}?)<\/ref> ?/gi,(function(e,n){if(Ue(n)){var a=Fe(n);a&&t.push(a),i=i.replace(n,"")}else t.push(Ke(n));return" "}))).replace(/ ?<[ \/]?[a-z0-9]{1,8}[a-z0-9=" ]{2,20}[ \/]?> ?/g," "),e.references=t.map((function(e){return new Me(e)})),e.wiki=i},We=je,Ye=/^(={1,5})(.{1,200}?)={1,5}$/,Ze=function(e,t){var i=t.match(Ye);if(!i)return e.title="",e.depth=0,e;var n=i[2]||"",a={wiki:n=(n=We(n).text()).replace(/\{\{.+?\}\}/,"")};Be(a),n=ne(n=a.wiki);var r=0;return i[1]&&(r=i[1].length-2),e.title=n,e.depth=r,e},Ge=function(e){var t=[],i=[];e=function(e){return e=e.filter((function(e){return e&&!0!==/^\|\+/.test(e)})),!0===/^{\|/.test(e[0])&&e.shift(),!0===/^\|}/.test(e[e.length-1])&&e.pop(),!0===/^\|-/.test(e[0])&&e.shift(),e}(e);for(var n=0;n0&&(t.push(i),i=[]):(!(a=a.split(/(?:\|\||!!)/))[0]&&a[1]&&a.shift(),a.forEach((function(e){e=(e=e.replace(/^\| */,"")).trim(),i.push(e)})))}return i.length>0&&t.push(i),t},He=/.*rowspan *?= *?["']?([0-9]+)["']?[ \|]*/,Ve=/.*colspan *?= *?["']?([0-9]+)["']?[ \|]*/,Je=function(e){return e=function(e){return e.forEach((function(t,i){t.forEach((function(n,a){var r=n.match(He);if(null!==r){var o=parseInt(r[1],10);n=n.replace(He,""),t[a]=n;for(var s=i+1;s0}))}(e))},Qe=je,Xe=/^!/,et={name:!0,age:!0,born:!0,date:!0,year:!0,city:!0,country:!0,population:!0,count:!0,number:!0},tt=function(e){return(e=Qe(e).text()).match(/\|/)&&(e=e.replace(/.+\| ?/,"")),e=(e=(e=e.replace(/style=['"].*?["']/,"")).replace(/^!/,"")).trim()},it=function(e){return(e=e||[]).length-e.filter((function(e){return e})).length>3},nt=function(e){if(e.length<=3)return[];var t=e[0].slice(0);t=t.map((function(e){return e=e.replace(/^\! */,""),e=Qe(e).text(),e=(e=tt(e)).toLowerCase()}));for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:[],t=[];it(e[0])&&e.shift();var i=e[0];return i&&i[0]&&i[1]&&(/^!/.test(i[0])||/^!/.test(i[1]))&&(t=i.map((function(e){return e=e.replace(/^\! */,""),tt(e)})),e.shift()),(i=e[0])&&i[0]&&i[1]&&/^!/.test(i[0])&&/^!/.test(i[1])&&(i.forEach((function(e,i){e=e.replace(/^\! */,""),e=tt(e),!0===Boolean(e)&&(t[i]=e)})),e.shift()),t}(i=Je(i));if(!n||n.length<=1){n=nt(i);var a=i[i.length-1]||[];n.length<=1&&a.length>2&&(n=nt(i.slice(1))).length>0&&(i=i.slice(2))}return i.map((function(e){return function(e,t){var i={};return e.forEach((function(e,n){var a=t[n]||"col"+(n+1),r=Qe(e);r.text(tt(r.text())),i[a]=r})),i}(e,n)}))},rt=function(e,t){return e.map((function(e){var i={};return Object.keys(e).forEach((function(t){i[t]=e[t].json()})),!0===t.encode&&(i=V(i)),i}))},ot={},st=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},ct={links:function(e){var t=[];if(this.data.forEach((function(e){Object.keys(e).forEach((function(i){t=t.concat(e[i].links())}))})),"number"==typeof e)return t[e];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);var i=t.find((function(t){return t.page()===e}));return void 0===i?[]:[i]}return t},keyValue:function(e){var t=this.json(e);return t.forEach((function(e){Object.keys(e).forEach((function(t){e[t]=e[t].text}))})),t},json:function(e){return e=p(e,ot),rt(this.data,e)},text:function(){return""}};ct.keyvalue=ct.keyValue,ct.keyval=ct.keyValue,Object.keys(ct).forEach((function(e){st.prototype[e]=ct[e]}));var ut=st,lt=/^\s*{\|/,pt=/^\s*\|}/,mt=function(e){for(var t=[],i=e.wiki,n=i.split("\n"),a=[],r=0;r0&&(a[a.length-1]+="\n"+n[r]);else{a[a.length-1]+="\n"+n[r];var o=a.pop();t.push(o)}else a.push(n[r]);var s=[];t.forEach((function(e){if(e){i=(i=i.replace(e+"\n","")).replace(e,"");var t=at(e);t&&t.length>0&&s.push(new ut(t))}})),s.length>0&&(e.tables=s),e.wiki=i},dt={sentences:!0},ft=function(e,t){var i={};return!0===(t=p(t,dt)).sentences&&(i.sentences=e.sentences().map((function(e){return e.json(t)}))),i},gt={sentences:!0,lists:!0,images:!0},ht=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},bt={sentences:function(e){return"number"==typeof e?this.data.sentences[e]:this.data.sentences||[]},references:function(e){return"number"==typeof e?this.data.references[e]:this.data.references},lists:function(e){return"number"==typeof e?this.data.lists[e]:this.data.lists},images:function(e){return"number"==typeof e?this.data.images[e]:this.data.images||[]},links:function(e){var t=[];if(this.sentences().forEach((function(i){t=t.concat(i.links(e))})),"number"==typeof e)return t[e];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);var i=t.find((function(t){return t.page()===e}));return void 0===i?[]:[i]}return t||[]},interwiki:function(e){var t=[];return this.sentences().forEach((function(e){t=t.concat(e.interwiki())})),"number"==typeof e?t[e]:t||[]},text:function(e){e=p(e,gt);var t=this.sentences().map((function(t){return t.text(e)})).join(" ");return this.lists().forEach((function(e){t+="\n"+e.text()})),t},json:function(e){return e=p(e,gt),ft(this,e)}};bt.citations=bt.references,Object.keys(bt).forEach((function(e){ht.prototype[e]=bt[e]}));var kt=ht;var wt=function(e){for(var t=[],i=[],n=e.split(""),a=0,r=0;r0){for(var s=0,c=0,u=0;uc&&i.push("]"),t.push(i.join("")),i=[]}}return t},vt=je,yt=new RegExp("("+_.images.join("|")+"):","i"),xt="(".concat(_.images.join("|"),")"),$t=new RegExp(xt+":(.+?)[\\||\\]]","iu"),jt={thumb:!0,thumbnail:!0,border:!0,right:!0,left:!0,center:!0,top:!0,bottom:!0,none:!0,upright:!0,baseline:!0,middle:!0,sub:!0,super:!0},zt=function(e,t){var i=e.wiki;wt(i).forEach((function(n){if(!0===yt.test(n)){e.images=e.images||[];var a=function(e,t){var i=e.match($t);if(null===i||!i[2])return null;var n="".concat(i[1],":").concat(i[2]||""),a=(n=n.trim()).charAt(0).toUpperCase()+n.substring(1);if(a=a.replace(/ /g,"_")){var r={file:n,lang:t.lang,domain:t.domain};e=(e=e.replace(/^\[\[/,"")).replace(/\]\]$/,"");var o=Ie(e),s=o.list||[];return o.alt&&(r.alt=o.alt),(s=s.filter((function(e){return!1===jt.hasOwnProperty(e)})))[s.length-1]&&(r.caption=vt(s[s.length-1])),new $(r)}return null}(n,t);a&&e.images.push(a),i=i.replace(n,"")}})),e.wiki=i},Ot={},Et=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},_t={lines:function(){return this.data},links:function(e){var t=[];if(this.lines().forEach((function(e){t=t.concat(e.links())})),"number"==typeof e)return t[e];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);var i=t.find((function(t){return t.page()===e}));return void 0===i?[]:[i]}return t},json:function(e){return e=p(e,Ot),this.lines().map((function(t){return t.json(e)}))},text:function(){return function(e,t){return e.map((function(e){return" * "+e.text(t)})).join("\n")}(this.data)}};Object.keys(_t).forEach((function(e){Et.prototype[e]=_t[e]}));var St=Et,Ct=je,qt=/^[#\*:;\|]+/,Nt=/^\*+[^:,\|]{4}/,At=/^ ?\#[^:,\|]{4}/,Lt=/[a-z_0-9\]\}]/i,Dt=function(e){return qt.test(e)||Nt.test(e)||At.test(e)},It=function(e,t){for(var i=[],n=t;n0&&(i.push(r),a+=r.length-1)}else n.push(t[a]);e.lists=i.map((function(e){return new St(e)})),e.wiki=n.join("\n")}},Rt=function(e,t){var i=e.wiki,n=i.split(Pt);n=(n=n.filter((function(e){return e&&e.trim().length>0}))).map((function(e){var i={wiki:e,lists:[],sentences:[],images:[]};return Mt.list(i),Mt.image(i,t),Tt(i),new kt(i)})),e.wiki=i,e.paragraphs=n},Ut=function(e,t){var i=Object.keys(e.data).reduce((function(t,i){return e.data[i]&&(t[i]=e.data[i].json()),t}),{});return!0===t.encode&&(i=V(i)),i},Ft=function(e){return(e=(e=e.toLowerCase()).replace(/[-_]/g," ")).trim()},Kt=function(e){this._type=e.type,this.domain=e.domain,Object.defineProperty(this,"data",{enumerable:!1,value:e.data})},Bt={type:function(){return this._type},links:function(e){var t=this,i=[];if(Object.keys(this.data).forEach((function(e){t.data[e].links().forEach((function(e){return i.push(e)}))})),"number"==typeof e)return i[e];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);var n=i.find((function(t){return t.page()===e}));return void 0===n?[]:[n]}return i},image:function(){var e=this.get("image")||this.get("image2")||this.get("logo");if(!e)return null;var t=e.json();return t.file=t.text,t.text="",t.domain=this.domain,new $(t)},get:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";e=Ft(e);for(var t=Object.keys(this.data),i=0;i0?a++:a=e.indexOf("{",a+1)){var r=e[a];if("{"===r&&(t+=1),t>0){if("}"===r&&0===(t-=1)){n.push(r);var o=n.join("");n=[],/\{\{/.test(o)&&/\}\}/.test(o)&&i.push(o);continue}if(1===t&&"{"!==r&&"}"!==r){t=0,n=[];continue}n.push(r)}}return i},Zt=function(e){var t=null;return(t=/^\{\{[^\n]+\|/.test(e)?(e.match(/^\{\{(.+?)\|/)||[])[1]:-1!==e.indexOf("\n")?(e.match(/^\{\{(.+?)\n/)||[])[1]:(e.match(/^\{\{(.+?)\}\}$/)||[])[1])&&(t=t.replace(/:.*/,""),t=Ee(t)),t||null},Gt=/\{\{/,Ht=function(e){return{body:e=e.replace(/#invoke:/,""),name:Zt(e),children:[]}},Vt=function e(t){var i=t.body.substr(2);return i=i.replace(/\}\}$/,""),t.children=Yt(i),t.children=t.children.map(Ht),0===t.children.length||t.children.forEach((function(t){var i=t.body.substr(2);return Gt.test(i)?e(t):null})),t},Jt=function(e){var t=Yt(e);return t=(t=t.map(Ht)).map(Vt)},Qt=["anchor","defaultsort","use list-defined references","void","pp","pp-move-indef","pp-semi-indef","pp-vandalism","r","#tag","div col","pope list end","shipwreck list end","starbox end","end box","end","s-end"].reduce((function(e,t){return e[t]=!0,e}),{}),Xt=new RegExp("^(subst.)?("+_.infoboxes.join("|")+")[: \n]","i"),ei=/^infobox /i,ti=/ infobox$/i,ii=/$Year in [A-Z]/i,ni={"gnf protein box":!0,"automatic taxobox":!0,"chembox ":!0,editnotice:!0,geobox:!0,hybridbox:!0,ichnobox:!0,infraspeciesbox:!0,mycomorphbox:!0,oobox:!0,"paraphyletic group":!0,speciesbox:!0,subspeciesbox:!0,"starbox short":!0,taxobox:!0,nhlteamseason:!0,"asian games bid":!0,"canadian federal election results":!0,"dc thomson comic strip":!0,"daytona 24 races":!0,edencharacter:!0,"moldova national football team results":!0,samurai:!0,protein:!0,"sheet authority":!0,"order-of-approx":!0,"bacterial labs":!0,"medical resources":!0,ordination:!0,"hockey team coach":!0,"hockey team gm":!0,"pro hockey team":!0,"hockey team player":!0,"hockey team start":!0,mlbbioret:!0},ai=function(e){return!0===ni.hasOwnProperty(e)||(!!Xt.test(e)||(!(!ei.test(e)&&!ti.test(e))||!!ii.test(e)))},ri=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.template.match(Xt),i=e.template;t&&t[0]&&(i=i.replace(t[0],""));var n={template:"infobox",type:i=i.trim(),data:e};return delete n.data.template,delete n.data.list,n},oi=[void 0,"January","February","March","April","May","June","July","August","September","October","November","December"],si=oi.reduce((function(e,t,i){return 0===i||(e[t.toLowerCase()]=i),e}),{}),ci=function(e){return e<10?"0"+e:String(e)},ui=function(e){var t=String(e.year||"");if(void 0!==e.month&&!0===oi.hasOwnProperty(e.month))if(void 0===e.date)t="".concat(oi[e.month]," ").concat(e.year);else{if(t="".concat(oi[e.month]," ").concat(e.date,", ").concat(e.year),void 0!==e.hour&&void 0!==e.minute){var i="".concat(ci(e.hour),":").concat(ci(e.minute));void 0!==e.second&&(i=i+":"+ci(e.second)),t=i+", "+t}e.tz&&(t+=" (".concat(e.tz,")"))}return t},li=function(e){for(var t={},i=["year","month","date","hour","minute","second"],n=0;n0&&(n.years=a,i-=31536e6*n.years);var r=Math.floor(i/2592e6,10);r>0&&(n.months=r,i-=2592e6*n.months);var o=Math.floor(i/mi,10);return o>0&&(n.days=o),n},gi=li,hi=ui,bi=function(e){return{template:"date",data:e}},ki=function(e){var t=(e=Oe(e)).split("|"),i=gi(t.slice(1,4)),n=t.slice(4,7);if(0===n.length){var a=new Date;n=[a.getFullYear(),a.getMonth(),a.getDate()]}return{from:i,to:n=gi(n)}},wi={date:function(e,t){var i=Ie(e,["year","month","date","hour","minute","second","timezone"]),n=gi([i.year,i.month,i.date||i.day]);return i.text=hi(n),i.timezone&&("Z"===i.timezone&&(i.timezone="UTC"),i.text+=" (".concat(i.timezone,")")),i.hour&&i.minute&&(i.second?i.text="".concat(i.hour,":").concat(i.minute,":").concat(i.second,", ")+i.text:i.text="".concat(i.hour,":").concat(i.minute,", ")+i.text),i.text&&t.push(bi(i)),i.text},natural_date:function(e,t){var i=Ie(e,["text"]).text||"",n={};if(/^[0-9]{4}$/.test(i))n.year=parseInt(i,10);else{var a=i.replace(/[a-z]+\/[a-z]+/i,"");a=a.replace(/[0-9]+:[0-9]+(am|pm)?/i,"");var r=new Date(a);!1===isNaN(r.getTime())&&(n.year=r.getFullYear(),n.month=r.getMonth()+1,n.date=r.getDate())}return t.push(bi(n)),i.trim()},one_year:function(e,t){var i=Ie(e,["year"]),n=Number(i.year);return t.push(bi({year:n})),String(n)},two_dates:function(e,t){var i=Ie(e,["b","birth_year","birth_month","birth_date","death_year","death_month","death_date"]);if(i.b&&"b"===i.b.toLowerCase()){var n=gi([i.birth_year,i.birth_month,i.birth_date]);return t.push(bi(n)),hi(n)}var a=gi([i.death_year,i.death_month,i.death_date]);return t.push(bi(a)),hi(a)},age:function(e){var t=ki(e);return fi(t.from,t.to).years||0},"diff-y":function(e){var t=ki(e),i=fi(t.from,t.to);return 1===i.years?i.years+" year":(i.years||0)+" years"},"diff-ym":function(e){var t=ki(e),i=fi(t.from,t.to),n=[];return 1===i.years?n.push(i.years+" year"):i.years&&0!==i.years&&n.push(i.years+" years"),1===i.months?n.push("1 month"):i.months&&0!==i.months&&n.push(i.months+" months"),n.join(", ")},"diff-ymd":function(e){var t=ki(e),i=fi(t.from,t.to),n=[];return 1===i.years?n.push(i.years+" year"):i.years&&0!==i.years&&n.push(i.years+" years"),1===i.months?n.push("1 month"):i.months&&0!==i.months&&n.push(i.months+" months"),1===i.days?n.push("1 day"):i.days&&0!==i.days&&n.push(i.days+" days"),n.join(", ")},"diff-yd":function(e){var t=ki(e),i=fi(t.from,t.to),n=[];return 1===i.years?n.push(i.years+" year"):i.years&&0!==i.years&&n.push(i.years+" years"),i.days+=30*(i.months||0),1===i.days?n.push("1 day"):i.days&&0!==i.days&&n.push(i.days+" days"),n.join(", ")},"diff-d":function(e){var t=ki(e),i=fi(t.from,t.to),n=[];return i.days+=365*(i.years||0),i.days+=30*(i.months||0),1===i.days?n.push("1 day"):i.days&&0!==i.days&&n.push(i.days+" days"),n.join(", ")}},vi=function(e){var t=new Date(e);if(isNaN(t.getTime()))return"";var i=(new Date).getTime()-t.getTime(),n="ago";i<0&&(n="from now",i=Math.abs(i));var a=i/1e3/60/60/24;return a<365?parseInt(a,10)+" days "+n:parseInt(a/365,10)+" years "+n},yi=wi.date,xi=wi.natural_date,$i=["January","February","March","April","May","June","July","August","September","October","November","December"],ji=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],zi=Object.assign({},pi,{currentday:function(){var e=new Date;return String(e.getDate())},currentdayname:function(){var e=new Date;return ji[e.getDay()]},currentmonth:function(){var e=new Date;return $i[e.getMonth()]},currentyear:function(){var e=new Date;return String(e.getFullYear())},monthyear:function(){var e=new Date;return $i[e.getMonth()]+" "+e.getFullYear()},"monthyear-1":function(){var e=new Date;return e.setMonth(e.getMonth()-1),$i[e.getMonth()]+" "+e.getFullYear()},"monthyear+1":function(){var e=new Date;return e.setMonth(e.getMonth()+1),$i[e.getMonth()]+" "+e.getFullYear()},date:0,"time ago":function(e){var t=Ie(e,["date","fmt"]).date;return vi(t)},"birth date and age":function(e,t){var i=Ie(e,["year","month","day"]);return i.year&&/[a-z]/i.test(i.year)?xi(e,t):(t.push(i),i=li([i.year,i.month,i.day]),ui(i))},"birth year and age":function(e,t){var i=Ie(e,["birth_year","birth_month"]);if(i.death_year&&/[a-z]/i.test(i.death_year))return xi(e,t);t.push(i);var n=(new Date).getFullYear()-parseInt(i.birth_year,10);i=li([i.birth_year,i.birth_month]);var a=ui(i);return n&&(a+=" (age ".concat(n,")")),a},"death year and age":function(e,t){var i=Ie(e,["death_year","birth_year","death_month"]);return i.death_year&&/[a-z]/i.test(i.death_year)?xi(e,t):(t.push(i),i=li([i.death_year,i.death_month]),ui(i))},"birth date and age2":function(e,t){var i=Ie(e,["at_year","at_month","at_day","birth_year","birth_month","birth_day"]);return t.push(i),i=li([i.birth_year,i.birth_month,i.birth_day]),ui(i)},"birth based on age as of date":function(e,t){var i=Ie(e,["age","year","month","day"]);t.push(i);var n=parseInt(i.age,10),a=parseInt(i.year,10)-n;return a&&n?"".concat(a," (age ").concat(i.age,")"):"(age ".concat(i.age,")")},"death date and given age":function(e,t){var i=Ie(e,["year","month","day","age"]);t.push(i),i=li([i.year,i.month,i.day]);var n=ui(i);return i.age&&(n+=" (age ".concat(i.age,")")),n},dts:function(e){e=(e=e.replace(/\|format=[ymd]+/i,"")).replace(/\|abbr=(on|off)/i,"");var t=Ie(e,["year","month","date","bc"]);return t.date&&t.month&&t.year?!0===/[a-z]/.test(t.month)?[t.month,t.date,t.year].join(" "):[t.year,t.month,t.date].join("-"):t.month&&t.year?[t.year,t.month].join("-"):t.year?(t.year<0&&(t.year=Math.abs(t.year)+" BC"),t.year):""},start:yi,end:yi,birth:yi,death:yi,"start date":yi,"end date":yi,"birth date":yi,"death date":yi,"start date and age":yi,"end date and age":yi,"start-date":xi,"end-date":xi,"birth-date":xi,"death-date":xi,"birth-date and age":xi,"birth-date and given age":xi,"death-date and age":xi,"death-date and given age":xi,birthdeathage:wi.two_dates,dob:yi,age:wi.age,"age nts":wi.age,"age in years":wi["diff-y"],"age in years and months":wi["diff-ym"],"age in years, months and days":wi["diff-ymd"],"age in years and days":wi["diff-yd"],"age in days":wi["diff-d"]});zi.localday=zi.currentday,zi.localdayname=zi.currentdayname,zi.localmonth=zi.currentmonth,zi.localyear=zi.currentyear,zi.currentmonthname=zi.currentmonth,zi.currentmonthabbrev=zi.currentmonth,zi["death date and age"]=zi["birth date and age"],zi.bda=zi["birth date and age"],zi["birth date based on age at death"]=zi["birth based on age as of date"];var Oi=zi,Ei={tag:function(e){var t=Ie(e,["tag","open"]);return t.open&&"pair"!==t.open?"":{span:!0,div:!0,p:!0}[t.tag]?t.content||"":"<".concat(t.tag," ").concat(t.attribs||"",">").concat(t.content||"","")},plural:function(e){e=e.replace(/plural:/,"plural|");var t=Ie(e,["num","word"]),i=Number(t.num),n=t.word;return 1!==i&&(/.y$/.test(n)?n=n.replace(/y$/,"ies"):n+="s"),i+" "+n},"first word":function(e){var t=Ie(e,["text"]),i=t.text;return t.sep?i.split(t.sep)[0]:i.split(" ")[0]},trunc:function(e){var t=Ie(e,["str","len"]);return t.str.substr(0,t.len)},"str mid":function(e){var t=Ie(e,["str","start","end"]),i=parseInt(t.start,10)-1,n=parseInt(t.end,10);return t.str.substr(i,n)},p1:0,p2:1,p3:2,braces:function(e){var t=Ie(e,["text"]),i="";return t.list&&(i="|"+t.list.join("|")),"{{"+(t.text||"")+i+"}}"},nobold:0,noitalic:0,nocaps:0,syntaxhighlight:function(e,t){var i=Ie(e);return t.push(i),i.code||""},samp:function(e,t){var i=Ie(e,["1"]);return t.push(i),i[1]||""},vanchor:0,resize:1,ra:function(e){var t=Ie(e,["hours","minutes","seconds"]);return[t.hours||0,t.minutes||0,t.seconds||0].join(":")},deg2hms:function(e){return(Ie(e,["degrees"]).degrees||"")+"°"},hms2deg:function(e){var t=Ie(e,["hours","minutes","seconds"]);return[t.hours||0,t.minutes||0,t.seconds||0].join(":")},decdeg:function(e){var t=Ie(e,["deg","min","sec","hem","rnd"]);return(t.deg||t.degrees)+"°"},rnd:0,dec:function(e){var t=Ie(e,["degrees","minutes","seconds"]),i=(t.degrees||0)+"°";return t.minutes&&(i+=t.minutes+"′"),t.seconds&&(i+=t.seconds+"″"),i},val:function(e){var t=Ie(e,["number","uncertainty"]),i=t.number;i&&Number(i)&&(i=Number(i).toLocaleString());var n=i||"";return t.p&&(n=t.p+n),t.s&&(n=t.s+n),(t.u||t.ul||t.upl)&&(n=n+" "+(t.u||t.ul||t.upl)),n},sub:function(e,t){var i=Ie(e,["text"]);return t.push(i),i.text||""},sup:function(e,t){var i=Ie(e,["text"]);return t.push(i),i.text||""}};Ei.rndfrac=Ei.rnd,Ei.rndnear=Ei.rnd,Ei["unité"]=Ei.val;["nowrap","nobr","big","cquote","pull quote","small","smaller","midsize","larger","big","kbd","bigger","large","mono","strongbad","stronggood","huge","xt","xt2","!xt","xtn","xtd","dc","dcr","mxt","!mxt","mxtn","mxtd","bxt","!bxt","bxtn","bxtd","delink","pre","var","mvar","pre2","code"].forEach((function(e){Ei[e]=function(e){return Ie(e,["text"]).text||""}}));var _i=Ei,Si={plainlist:function(e){var t=(e=Oe(e)).split("|");return e=(t=t.slice(1)).join("|"),(t=(t=e.split(/\n ?\* ?/)).filter((function(e){return e}))).join("\n\n")},"collapsible list":function(e,t){var i=Ie(e);t.push(i);var n="";if(i.title&&(n+="'''".concat(i.title,"'''")+"\n\n"),!i.list){i.list=[];for(var a=1;a<10;a+=1)i[a]&&(i.list.push(i[a]),delete i[a])}return i.list=i.list.filter((function(e){return e})),n+=i.list.join("\n\n")},"ordered list":function(e,t){var i=Ie(e);return t.push(i),i.list=i.list||[],i.list.map((function(e,t){return"".concat(t+1,". ").concat(e)})).join("\n\n")},hlist:function(e){var t=Ie(e);return t.list=t.list||[],t.list.join(" · ")},pagelist:function(e){return(Ie(e).list||[]).join(", ")},catlist:function(e){return(Ie(e).list||[]).join(", ")},"br separated entries":function(e){return(Ie(e).list||[]).join("\n\n")},"comma separated entries":function(e){return(Ie(e).list||[]).join(", ")},"anchored list":function(e){var t=Ie(e).list||[];return(t=t.map((function(e,t){return"".concat(t+1,". ").concat(e)}))).join("\n\n")},"bulleted list":function(e){var t=Ie(e).list||[];return(t=(t=t.filter((function(e){return e}))).map((function(e){return"• "+e}))).join("\n\n")},"columns-list":function(e,t){var i=((Ie(e).list||[])[0]||"").split(/\n/);return i=(i=i.filter((function(e){return e}))).map((function(e){return e.replace(/\*/,"")})),t.push({template:"columns-list",list:i}),(i=i.map((function(e){return"• "+e}))).join("\n\n")}};Si.flatlist=Si.plainlist,Si.ublist=Si.plainlist,Si["unbulleted list"]=Si["collapsible list"],Si.ubl=Si["collapsible list"],Si["bare anchored list"]=Si["anchored list"],Si["plain list"]=Si.plainlist,Si.cmn=Si["columns-list"],Si.collist=Si["columns-list"],Si["col-list"]=Si["columns-list"],Si.columnslist=Si["columns-list"];var Ci=Si,qi={convert:function(e){var t=Ie(e,["num","two","three","four"]);return"-"===t.two||"to"===t.two||"and"===t.two?t.four?"".concat(t.num," ").concat(t.two," ").concat(t.three," ").concat(t.four):"".concat(t.num," ").concat(t.two," ").concat(t.three):"".concat(t.num," ").concat(t.two)},term:function(e){var t=Ie(e,["term"]);return"".concat(t.term,":")},defn:0,lino:0,linum:function(e){var t=Ie(e,["num","text"]);return"".concat(t.num,". ").concat(t.text)},ill:function(e){return Ie(e,["text","lan1","text1","lan2","text2"]).text},frac:function(e){var t=Ie(e,["a","b","c"]);return t.c?"".concat(t.a," ").concat(t.b,"/").concat(t.c):t.b?"".concat(t.a,"/").concat(t.b):"1/".concat(t.b)},height:function(e,t){var i=Ie(e);t.push(i);var n=[];return["m","cm","ft","in"].forEach((function(e){!0===i.hasOwnProperty(e)&&n.push(i[e]+e)})),n.join(" ")},"block indent":function(e){var t=Ie(e);return t[1]?"\n"+t[1]+"\n":""},quote:function(e,t){var i=Ie(e,["text","author"]);if(t.push(i),i.text){var n='"'.concat(i.text,'"');return i.author&&(n+="\n\n",n+=" - ".concat(i.author)),n+"\n"}return""},lbs:function(e){var t=Ie(e,["text"]);return"[[".concat(t.text," Lifeboat Station|").concat(t.text,"]]")},lbc:function(e){var t=Ie(e,["text"]);return"[[".concat(t.text,"-class lifeboat|").concat(t.text,"-class]]")},lbb:function(e){var t=Ie(e,["text"]);return"[[".concat(t.text,"-class lifeboat|").concat(t.text,"]]")},own:function(e){var t=Ie(e,["author"]),i="Own work";return t.author&&(i+=" by "+t.author),i},sic:function(e,t){var i=Ie(e,["one","two","three"]),n=(i.one||"")+(i.two||"");return"?"===i.one&&(n=(i.two||"")+(i.three||"")),t.push({template:"sic",word:n}),"y"===i.nolink?n:"".concat(n," [sic]")},formatnum:function(e){e=e.replace(/:/,"|");var t=Ie(e,["number"]).number||"";return t=t.replace(/,/g,""),Number(t).toLocaleString()||""},"#dateformat":function(e){return e=e.replace(/:/,"|"),Ie(e,["date","format"]).date},lc:function(e){return e=e.replace(/:/,"|"),(Ie(e,["text"]).text||"").toLowerCase()},lcfirst:function(e){e=e.replace(/:/,"|");var t=Ie(e,["text"]).text;return t?t[0].toLowerCase()+t.substr(1):""},uc:function(e){return e=e.replace(/:/,"|"),(Ie(e,["text"]).text||"").toUpperCase()},ucfirst:function(e){e=e.replace(/:/,"|");var t=Ie(e,["text"]).text;return t?t[0].toUpperCase()+t.substr(1):""},padleft:function(e){e=e.replace(/:/,"|");var t=Ie(e,["text","num"]);return(t.text||"").padStart(t.num,t.str||"0")},padright:function(e){e=e.replace(/:/,"|");var t=Ie(e,["text","num"]);return(t.text||"").padEnd(t.num,t.str||"0")},abbr:function(e){return Ie(e,["abbr","meaning","ipa"]).abbr},abbrlink:function(e){var t=Ie(e,["abbr","page"]);return t.page?"[[".concat(t.page,"|").concat(t.abbr,"]]"):"[[".concat(t.abbr,"]]")},h:1,finedetail:0,sort:1};qi["str left"]=qi.trunc,qi["str crop"]=qi.trunc,qi.tooltip=qi.abbr,qi.abbrv=qi.abbr,qi.define=qi.abbr,qi.cvt=qi.convert;var Ni=qi,Ai=Object.assign({},_i,Ci,Ni);var Li=function(e){var t=e.pop(),i=Number(e[0]||0),n=Number(e[1]||0),a=Number(e[2]||0);if("string"!=typeof t||isNaN(i))return null;var r=1;return/[SW]/i.test(t)&&(r=-1),r*(i+n/60+a/3600)},Di=function(e){if("number"!=typeof e)return e;var t=1e5;return Math.round(e*t)/t},Ii={s:!0,w:!0},Ti=function(e){var i=Ie(e);i=function(e){return e.list=e.list||[],e.list=e.list.map((function(t){var i=Number(t);if(!isNaN(i))return i;var n=t.split(/:/);return n.length>1?(e.props=e.props||{},e.props[n[0]]=n.slice(1).join(":"),null):t})),e.list=e.list.filter((function(e){return null!==e})),e}(i);var n,a,r=(n=i.list,a=n.map((function(e){return t(e)})).join("|"),2===n.length&&"number|number"===a?{lat:n[0],lon:n[1]}:4===n.length&&"number|string|number|string"===a?(Ii[n[1].toLowerCase()]&&(n[0]*=-1),"w"===n[3].toLowerCase()&&(n[2]*=-1),{lat:n[0],lon:n[2]}):6===n.length?{lat:Li(n.slice(0,3)),lon:Li(n.slice(3))}:8===n.length?{lat:Li(n.slice(0,4)),lon:Li(n.slice(4))}:{});return i.lat=Di(r.lat),i.lon=Di(r.lon),i.template="coord",delete i.list,i},Pi={coord:function(e,t){var i=Ti(e);return t.push(i),i.display&&-1===i.display.indexOf("inline")?"":"".concat(i.lat||"","°N, ").concat(i.lon||"","°W")},geo:["lat","lon","zoom"]};Pi.coor=Pi.coord,Pi["coor title dms"]=Pi.coord,Pi["coor title dec"]=Pi.coord,Pi["coor dms"]=Pi.coord,Pi["coor dm"]=Pi.coord,Pi["coor dec"]=Pi.coord;var Mi=Pi,Ri={etyl:1,mention:1,link:1,"la-verb-form":0,"la-ipa":0,sortname:function(e){var t=Ie(e,["first","last","target","sort"]),i="".concat(t.first||""," ").concat(t.last||"");return i=i.trim(),t.nolink?t.target||i:(t.dab&&(i+=" (".concat(t.dab,")"),t.target&&(t.target+=" (".concat(t.dab,")"))),t.target?"[[".concat(t.target,"|").concat(i,"]]"):"[[".concat(i,"]]"))}};["lts","t","tfd links","tiw","tltt","tetl","tsetl","ti","tic","tiw","tlt","ttl","twlh","tl2","tlu","demo","hatnote","xpd","para","elc","xtag","mli","mlix","#invoke","url"].forEach((function(e){Ri[e]=function(e){var t=Ie(e,["first","second"]);return t.second||t.first}})),Ri.m=Ri.mention,Ri["m-self"]=Ri.mention,Ri.l=Ri.link,Ri.ll=Ri.link,Ri["l-self"]=Ri.link;var Ui=Ri,Fi={wikt:"wiktionary",commons:"commons",c:"commons",commonscat:"commonscat",n:"wikinews",q:"wikiquote",s:"wikisource",a:"wikiauthor",b:"wikibooks",voy:"wikivoyage",v:"wikiversity",d:"wikidata",species:"wikispecies",m:"meta",mw:"mediawiki"},Ki={about:function(e,t){var i=Ie(e);return t.push(i),""},main:function(e,t){var i=Ie(e);return t.push(i),""},"main list":function(e,t){var i=Ie(e);return t.push(i),""},see:function(e,t){var i=Ie(e);return t.push(i),""},for:function(e,t){var i=Ie(e);return t.push(i),""},further:function(e,t){var i=Ie(e);return t.push(i),""},"further information":function(e,t){var i=Ie(e);return t.push(i),""},listen:function(e,t){var i=Ie(e);return t.push(i),""},"wide image":["file","width","caption"],redirect:function(e,t){for(var i=Ie(e,["redirect"]),n=i.list||[],a=[],r=0;r0&&t.push(a)}return{template:"playoffbracket",rounds:t}}(e);return t.push(i),""}};["2teambracket","4team2elimbracket","8teambracket","16teambracket","32teambracket","4roundbracket-byes","cwsbracket","nhlbracket","nhlbracket-reseed","4teambracket-nhl","4teambracket-ncaa","4teambracket-mma","4teambracket-mlb","16teambracket-two-reseeds","8teambracket-nhl","8teambracket-mlb","8teambracket-ncaa","8teambracket-afc","8teambracket-afl","8teambracket-tennis3","8teambracket-tennis5","16teambracket-nhl","16teambracket-nhl divisional","16teambracket-nhl-reseed","16teambracket-nba","16teambracket-swtc","16teambracket-afc","16teambracket-tennis3","16teambracket-tennis5"].forEach((function(e){Ji[e]=Ji["4teambracket"]}));var Qi=Ji,Xi={"£":"GB£","¥":"¥","৳":"৳","₩":"₩","€":"€","₱":"₱","₹":"₹","₽":"₽","cn¥":"CN¥","gb£":"GB£","india rs":"₹","indian rupee symbol":"₹","indian rupee":"₹","indian rupees":"₹","philippine peso":"₱","russian ruble":"₽","SK won":"₩","turkish lira":"TRY",a$:"A$",au$:"A$",aud:"A$",bdt:"BDT",brl:"BRL",ca$:"CA$",cad:"CA$",chf:"CHF",cny:"CN¥",czk:"czk",dkk:"dkk",dkk2:"dkk",euro:"€",gbp:"GB£",hk$:"HK$",hkd:"HK$",ils:"ILS",inr:"₹",jpy:"¥",myr:"MYR",nis:"ILS",nok:"NOK",nok2:"NOK",nz$:"NZ$",nzd:"NZ$",peso:"peso",pkr:"₨",r$:"BRL",rmb:"CN¥",rub:"₽",ruble:"₽",rupee:"₹",s$:"sgd",sek:"SEK",sek2:"SEK",sfr:"CHF",sgd:"sgd",shekel:"ILS",sheqel:"ILS",ttd:"TTD",us$:"US$",usd:"US$",yen:"¥",zar:"R"},en=function(e,t){var i=Ie(e,["amount","code"]);t.push(i);var n=i.template||"";switch("currency"===n?(n=i.code)||(i.code=n="usd"):""!==n&&"monnaie"!==n&&"unité"!==n&&"nombre"!==n&&"nb"!==n||(n=i.code),n=(n||"").toLowerCase()){case"us":i.code=n="usd";break;case"uk":i.code=n="gbp"}var a="".concat(Xi[n]||"").concat(i.amount||"");return i.code&&!Xi[i.code.toLowerCase()]&&(a+=" "+i.code),a},tn={currency:en,monnaie:en,"unité":en,nombre:en,nb:en,iso4217:en,inrconvert:function(e,t){var i=Ie(e,["rupee_value","currency_formatting"]);t.push(i);var n=i.currency_formatting;if(n){var a=1;switch(n){case"k":a=1e3;break;case"m":a=1e6;break;case"b":a=1e9;break;case"t":a=1e12;break;case"l":a=1e5;break;case"c":a=1e7;break;case"lc":a=1e12}i.rupee_value=i.rupee_value*a}return"inr ".concat(i.rupee_value||"")}};Object.keys(Xi).forEach((function(e){tn[e]=en}));var nn=tn,an={"election box begin":function(e,t){var i=Ie(e);return t.push(i),""},"election box candidate":function(e,t){var i=Ie(e);return t.push(i),""},"election box hold with party link":function(e,t){var i=Ie(e);return t.push(i),""},"election box gain with party link":function(e,t){var i=Ie(e);return t.push(i),""}};an["election box begin no change"]=an["election box begin"],an["election box begin no party"]=an["election box begin"],an["election box begin no party no change"]=an["election box begin"],an["election box inline begin"]=an["election box begin"],an["election box inline begin no change"]=an["election box begin"],an["election box candidate for alliance"]=an["election box candidate"],an["election box candidate minor party"]=an["election box candidate"],an["election box candidate no party link no change"]=an["election box candidate"],an["election box candidate with party link"]=an["election box candidate"],an["election box candidate with party link coalition 1918"]=an["election box candidate"],an["election box candidate with party link no change"]=an["election box candidate"],an["election box inline candidate"]=an["election box candidate"],an["election box inline candidate no change"]=an["election box candidate"],an["election box inline candidate with party link"]=an["election box candidate"],an["election box inline candidate with party link no change"]=an["election box candidate"],an["election box inline incumbent"]=an["election box candidate"];var rn=an,on=[["🇦🇩","and","andorra"],["🇦🇪","are","united arab emirates"],["🇦🇫","afg","afghanistan"],["🇦🇬","atg","antigua and barbuda"],["🇦🇮","aia","anguilla"],["🇦🇱","alb","albania"],["🇦🇲","arm","armenia"],["🇦🇴","ago","angola"],["🇦🇶","ata","antarctica"],["🇦🇷","arg","argentina"],["🇦🇸","asm","american samoa"],["🇦🇹","aut","austria"],["🇦🇺","aus","australia"],["🇦🇼","abw","aruba"],["🇦🇽","ala","åland islands"],["🇦🇿","aze","azerbaijan"],["🇧🇦","bih","bosnia and herzegovina"],["🇧🇧","brb","barbados"],["🇧🇩","bgd","bangladesh"],["🇧🇪","bel","belgium"],["🇧🇫","bfa","burkina faso"],["🇧🇬","bgr","bulgaria"],["🇧🇬","bul","bulgaria"],["🇧🇭","bhr","bahrain"],["🇧🇮","bdi","burundi"],["🇧🇯","ben","benin"],["🇧🇱","blm","saint barthélemy"],["🇧🇲","bmu","bermuda"],["🇧🇳","brn","brunei darussalam"],["🇧🇴","bol","bolivia"],["🇧🇶","bes","bonaire, sint eustatius and saba"],["🇧🇷","bra","brazil"],["🇧🇸","bhs","bahamas"],["🇧🇹","btn","bhutan"],["🇧🇻","bvt","bouvet island"],["🇧🇼","bwa","botswana"],["🇧🇾","blr","belarus"],["🇧🇿","blz","belize"],["🇨🇦","can","canada"],["🇨🇨","cck","cocos (keeling) islands"],["🇨🇩","cod","congo"],["🇨🇫","caf","central african republic"],["🇨🇬","cog","congo"],["🇨🇭","che","switzerland"],["🇨🇮","civ","côte d'ivoire"],["🇨🇰","cok","cook islands"],["🇨🇱","chl","chile"],["🇨🇲","cmr","cameroon"],["🇨🇳","chn","china"],["🇨🇴","col","colombia"],["🇨🇷","cri","costa rica"],["🇨🇺","cub","cuba"],["🇨🇻","cpv","cape verde"],["🇨🇼","cuw","curaçao"],["🇨🇽","cxr","christmas island"],["🇨🇾","cyp","cyprus"],["🇨🇿","cze","czech republic"],["🇩🇪","deu","germany"],["🇩🇪","ger","germany"],["🇩🇯","dji","djibouti"],["🇩🇰","dnk","denmark"],["🇩🇲","dma","dominica"],["🇩🇴","dom","dominican republic"],["🇩🇿","dza","algeria"],["🇪🇨","ecu","ecuador"],["🇪🇪","est","estonia"],["🇪🇬","egy","egypt"],["🇪🇭","esh","western sahara"],["🇪🇷","eri","eritrea"],["🇪🇸","esp","spain"],["🇪🇹","eth","ethiopia"],["🇫🇮","fin","finland"],["🇫🇯","fji","fiji"],["🇫🇰","flk","falkland islands (malvinas)"],["🇫🇲","fsm","micronesia"],["🇫🇴","fro","faroe islands"],["🇫🇷","fra","france"],["🇬🇦","gab","gabon"],["🇬🇧","gbr","united kingdom"],["🇬🇩","grd","grenada"],["🇬🇫","guf","french guiana"],["🇬🇬","ggy","guernsey"],["🇬🇭","gha","ghana"],["🇬🇮","gib","gibraltar"],["🇬🇱","grl","greenland"],["🇬🇲","gmb","gambia"],["🇬🇳","gin","guinea"],["🇬🇵","glp","guadeloupe"],["🇬🇶","gnq","equatorial guinea"],["🇬🇷","grc","greece"],["🇬🇸","sgs","south georgia"],["🇬🇹","gtm","guatemala"],["🇬🇺","gum","guam"],["🇬🇼","gnb","guinea-bissau"],["🇬🇾","guy","guyana"],["🇭🇰","hkg","hong kong"],["🇭🇲","hmd","heard island and mcdonald islands"],["🇭🇳","hnd","honduras"],["🇭🇷","hrv","croatia"],["🇭🇹","hti","haiti"],["🇭🇺","hun","hungary"],["🇮🇩","idn","indonesia"],["🇮🇪","irl","ireland"],["🇮🇱","isr","israel"],["🇮🇲","imn","isle of man"],["🇮🇳","ind","india"],["🇮🇴","iot","british indian ocean territory"],["🇮🇶","irq","iraq"],["🇮🇷","irn","iran"],["🇮🇸","isl","iceland"],["🇮🇹","ita","italy"],["🇯🇪","jey","jersey"],["🇯🇲","jam","jamaica"],["🇯🇴","jor","jordan"],["🇯🇵","jpn","japan"],["🇰🇪","ken","kenya"],["🇰🇬","kgz","kyrgyzstan"],["🇰🇭","khm","cambodia"],["🇰🇮","kir","kiribati"],["🇰🇲","com","comoros"],["🇰🇳","kna","saint kitts and nevis"],["🇰🇵","prk","north korea"],["🇰🇷","kor","south korea"],["🇰🇼","kwt","kuwait"],["🇰🇾","cym","cayman islands"],["🇰🇿","kaz","kazakhstan"],["🇱🇦","lao","lao people's democratic republic"],["🇱🇧","lbn","lebanon"],["🇱🇨","lca","saint lucia"],["🇱🇮","lie","liechtenstein"],["🇱🇰","lka","sri lanka"],["🇱🇷","lbr","liberia"],["🇱🇸","lso","lesotho"],["🇱🇹","ltu","lithuania"],["🇱🇺","lux","luxembourg"],["🇱🇻","lva","latvia"],["🇱🇾","lby","libya"],["🇲🇦","mar","morocco"],["🇲🇨","mco","monaco"],["🇲🇩","mda","moldova"],["🇲🇪","mne","montenegro"],["🇲🇫","maf","saint martin (french part)"],["🇲🇬","mdg","madagascar"],["🇲🇭","mhl","marshall islands"],["🇲🇰","mkd","macedonia"],["🇲🇱","mli","mali"],["🇲🇲","mmr","myanmar"],["🇲🇳","mng","mongolia"],["🇲🇴","mac","macao"],["🇲🇵","mnp","northern mariana islands"],["🇲🇶","mtq","martinique"],["🇲🇷","mrt","mauritania"],["🇲🇸","msr","montserrat"],["🇲🇹","mlt","malta"],["🇲🇺","mus","mauritius"],["🇲🇻","mdv","maldives"],["🇲🇼","mwi","malawi"],["🇲🇽","mex","mexico"],["🇲🇾","mys","malaysia"],["🇲🇿","moz","mozambique"],["🇳🇦","nam","namibia"],["🇳🇨","ncl","new caledonia"],["🇳🇪","ner","niger"],["🇳🇫","nfk","norfolk island"],["🇳🇬","nga","nigeria"],["🇳🇮","nic","nicaragua"],["🇳🇱","nld","netherlands"],["🇳🇴","nor","norway"],["🇳🇵","npl","nepal"],["🇳🇷","nru","nauru"],["🇳🇺","niu","niue"],["🇳🇿","nzl","new zealand"],["🇴🇲","omn","oman"],["🇵🇦","pan","panama"],["🇵🇪","per","peru"],["🇵🇫","pyf","french polynesia"],["🇵🇬","png","papua new guinea"],["🇵🇭","phl","philippines"],["🇵🇰","pak","pakistan"],["🇵🇱","pol","poland"],["🇵🇲","spm","saint pierre and miquelon"],["🇵🇳","pcn","pitcairn"],["🇵🇷","pri","puerto rico"],["🇵🇸","pse","palestinian territory"],["🇵🇹","prt","portugal"],["🇵🇼","plw","palau"],["🇵🇾","pry","paraguay"],["🇶🇦","qat","qatar"],["🇷🇪","reu","réunion"],["🇷🇴","rou","romania"],["🇷🇸","srb","serbia"],["🇷🇺","rus","russia"],["🇷🇼","rwa","rwanda"],["🇸🇦","sau","saudi arabia"],["🇸🇧","slb","solomon islands"],["🇸🇨","syc","seychelles"],["🇸🇩","sdn","sudan"],["🇸🇪","swe","sweden"],["🇸🇬","sgp","singapore"],["🇸🇭","shn","saint helena, ascension and tristan da cunha"],["🇸🇮","svn","slovenia"],["🇸🇯","sjm","svalbard and jan mayen"],["🇸🇰","svk","slovakia"],["🇸🇱","sle","sierra leone"],["🇸🇲","smr","san marino"],["🇸🇳","sen","senegal"],["🇸🇴","som","somalia"],["🇸🇷","sur","suriname"],["🇸🇸","ssd","south sudan"],["🇸🇹","stp","sao tome and principe"],["🇸🇻","slv","el salvador"],["🇸🇽","sxm","sint maarten (dutch part)"],["🇸🇾","syr","syrian arab republic"],["🇸🇿","swz","swaziland"],["🇹🇨","tca","turks and caicos islands"],["🇹🇩","tcd","chad"],["🇹🇫","atf","french southern territories"],["🇹🇬","tgo","togo"],["🇹🇭","tha","thailand"],["🇹🇯","tjk","tajikistan"],["🇹🇰","tkl","tokelau"],["🇹🇱","tls","timor-leste"],["🇹🇲","tkm","turkmenistan"],["🇹🇳","tun","tunisia"],["🇹🇴","ton","tonga"],["🇹🇷","tur","turkey"],["🇹🇹","tto","trinidad and tobago"],["🇹🇻","tuv","tuvalu"],["🇹🇼","twn","taiwan"],["🇹🇿","tza","tanzania"],["🇺🇦","ukr","ukraine"],["🇺🇬","uga","uganda"],["🇺🇲","umi","united states minor outlying islands"],["🇺🇸","usa","united states"],["🇺🇸","us","united states"],["🇺🇾","ury","uruguay"],["🇺🇿","uzb","uzbekistan"],["🇻🇦","vat","vatican city"],["🇻🇨","vct","saint vincent and the grenadines"],["🇻🇪","ven","venezuela"],["🇻🇬","vgb","virgin islands, british"],["🇻🇮","vir","virgin islands, u.s."],["🇻🇳","vnm","viet nam"],["🇻🇺","vut","vanuatu"],["","win","west indies"],["🇼🇫","wlf","wallis and futuna"],["🇼🇸","wsm","samoa"],["🇾🇪","yem","yemen"],["🇾🇹","myt","mayotte"],["🇿🇦","zaf","south africa"],["🇿🇲","zmb","zambia"],["🇿🇼 ","zwe","zimbabwe"],["🇺🇳","un","united nations"],["🏴󠁧󠁢󠁥󠁮󠁧󠁿󠁧󠁢󠁥󠁮󠁧󠁿","eng","england"],["🏴󠁧󠁢󠁳󠁣󠁴󠁿","sct","scotland"],["🏴󠁧󠁢󠁷󠁬󠁳󠁿","wal","wales"],["🇪🇺","eu","european union"]],sn={flag:function(e){var t=Ie(e,["flag","variant"]),i=t.flag||"";t.flag=(t.flag||"").toLowerCase();var n=on.find((function(e){return t.flag===e[1]||t.flag===e[2]}))||[],a=n[0]||"";return"".concat(a," [[").concat(n[2],"|").concat(i,"]]")},flagcountry:function(e){var t=Ie(e,["flag","variant"]);t.flag=(t.flag||"").toLowerCase();var i=on.find((function(e){return t.flag===e[1]||t.flag===e[2]}))||[],n=i[0]||"";return"".concat(n," [[").concat(i[2],"]]")},flagcu:function(e){var t=Ie(e,["flag","variant"]);t.flag=(t.flag||"").toLowerCase();var i=on.find((function(e){return t.flag===e[1]||t.flag===e[2]}))||[],n=i[0]||"";return"".concat(n," ").concat(i[2])},flagicon:function(e){var t=Ie(e,["flag","variant"]);t.flag=(t.flag||"").toLowerCase();var i=on.find((function(e){return t.flag===e[1]||t.flag===e[2]}));return i?"[[".concat(i[2],"|").concat(i[0],"]]"):""},flagdeco:function(e){var t=Ie(e,["flag","variant"]);return t.flag=(t.flag||"").toLowerCase(),(on.find((function(e){return t.flag===e[1]||t.flag===e[2]}))||[])[0]||""},fb:function(e){var t=Ie(e,["flag","variant"]);t.flag=(t.flag||"").toLowerCase();var i=on.find((function(e){return t.flag===e[1]||t.flag===e[2]}));return i?"".concat(i[0]," [[").concat(i[2]," national football team|").concat(i[2],"]]"):""},fbicon:function(e){var t=Ie(e,["flag","variant"]);t.flag=(t.flag||"").toLowerCase();var i=on.find((function(e){return t.flag===e[1]||t.flag===e[2]}));return i?" [[".concat(i[2]," national football team|").concat(i[0],"]]"):""},flagathlete:function(e){var t=Ie(e,["name","flag","variant"]);t.flag=(t.flag||"").toLowerCase();var i=on.find((function(e){return t.flag===e[1]||t.flag===e[2]}));return i?"".concat(i[0]," [[").concat(t.name||"","]] (").concat(i[1].toUpperCase(),")"):"[[".concat(t.name||"","]]")}};on.forEach((function(e){sn[e[1]]=function(){return e[0]}})),sn.cr=sn.flagcountry,sn["cr-rt"]=sn.flagcountry,sn.cricon=sn.flagicon;var cn=sn,un=function(e){var t=e.match(/ipac?-(.+)/);return null!==t?!0===S.hasOwnProperty(t[1])?S[t[1]].english_title:t[1]:null},ln={ipa:function(e,t){var i=Ie(e,["transcription","lang","audio"]);return i.lang=un(i.template),i.template="ipa",t.push(i),""},ipac:function(e,t){var i=Ie(e);return i.transcription=(i.list||[]).join(","),delete i.list,i.lang=un(i.template),i.template="ipac",t.push(i),""},transl:function(e,t){var i=Ie(e,["lang","text","text2"]);return i.text2&&(i.iso=i.text,i.text=i.text2,delete i.text2),t.push(i),i.text||""}};Object.keys(S).forEach((function(e){ln["ipa-"+e]=ln.ipa,ln["ipac-"+e]=ln.ipac}));var pn=ln,mn={lang:1,"lang-de":0,"rtl-lang":1,taste:0,nihongo:function(e,t){var i=Ie(e,["english","kanji","romaji","extra"]);t.push(i);var n=i.english||i.romaji||"";return i.kanji&&(n+=" (".concat(i.kanji,")")),n}};Object.keys(S).forEach((function(e){mn["lang-"+e]=mn["lang-de"]})),mn.nihongo2=mn.nihongo,mn.nihongo3=mn.nihongo,mn["nihongo-s"]=mn.nihongo,mn["nihongo foot"]=mn.nihongo;var dn=mn,fn=function(e){if(!e.numerator&&!e.denominator)return null;var t=Number(e.numerator)/Number(e.denominator);t*=100;var i=Number(e.decimals);return isNaN(i)&&(i=1),t=t.toFixed(i),Number(t)},gn={math:function(e,t){var i=Ie(e,["formula"]);return t.push(i),"\n\n"+(i.formula||"")+"\n\n"},frac:function(e,t){var i=Ie(e,["a","b","c"]),n={template:"sfrac"};return i.c?(n.integer=i.a,n.numerator=i.b,n.denominator=i.c):i.b?(n.numerator=i.a,n.denominator=i.b):(n.numerator=1,n.denominator=i.a),t.push(n),n.integer?"".concat(n.integer," ").concat(n.numerator,"⁄").concat(n.denominator):"".concat(n.numerator,"⁄").concat(n.denominator)},radic:function(e){var t=Ie(e,["after","before"]);return"".concat(t.before||"","√").concat(t.after||"")},percentage:function(e){var t=Ie(e,["numerator","denominator","decimals"]),i=fn(t);return null===i?"":i+"%"},"percent-done":function(e){var t=Ie(e,["done","total","digits"]),i=fn({numerator:t.done,denominator:t.total,decimals:t.digits});return null===i?"":"".concat(t.done," (").concat(i,"%) done")},"winning percentage":function(e,t){var i=Ie(e,["wins","losses","ties"]);t.push(i);var n=Number(i.wins),a=Number(i.losses),r=Number(i.ties)||0,o=n+a+r;"y"===i.ignore_ties&&(r=0),r&&(n+=r/2);var s=fn({numerator:n,denominator:o,decimals:1});return null===s?"":".".concat(10*s)},winlosspct:function(e,t){var i=Ie(e,["wins","losses"]);t.push(i);var n=Number(i.wins),a=Number(i.losses),r=fn({numerator:n,denominator:n+a,decimals:1});return null===r?"":(r=".".concat(10*r),"".concat(n||0," || ").concat(a||0," || ").concat(r||"-"))}};gn.sfrac=gn.frac,gn.sqrt=gn.radic,gn.pct=gn.percentage,gn.percent=gn.percentage,gn.winpct=gn["winning percentage"],gn.winperc=gn["winning percentage"];var hn=gn,bn=function(e,t,i){var n=Ie(e);return i&&(n.name=n.template,n.template=i),t.push(n),""},kn={persondata:bn,taxobox:bn,citation:bn,portal:bn,reflist:bn,"cite book":bn,"cite journal":bn,"cite web":bn,"commons cat":bn,"portuguese name":["first","second","suffix"],uss:["ship","id"],isbn:function(e,t){var i=Ie(e,["id","id2","id3"]);return t.push(i),"ISBN: "+(i.id||"")},marriage:function(e,t){var i=Ie(e,["spouse","from","to","end"]);t.push(i);var n="".concat(i.spouse||"");return i.from&&(i.to?n+=" (m. ".concat(i.from,"-").concat(i.to,")"):n+=" (m. ".concat(i.from,")")),n},"based on":function(e,t){var i=Ie(e,["title","author"]);return t.push(i),"".concat(i.title," by ").concat(i.author||"")},"video game release":function(e,t){for(var i=["region","date","region2","date2","region3","date3","region4","date4"],n=Ie(e,i),a={template:"video game release",releases:[]},r=0;r0&&t.push(c),""},Yn=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},Zn={text:function(){return""},json:function(){return this.data}};Object.keys(Zn).forEach((function(e){Yn.prototype[e]=Zn[e]}));var Gn=Yn,Hn=new RegExp("^(cite |citation)","i"),Vn={citation:!0,refn:!0,harvnb:!0},Jn=function(e){return"infobox"===e.template&&e.data&&function(e){return e&&"[object Object]"===Object.prototype.toString.call(e)}(e.data)},Qn=function(e,t){var i=e.wiki,n=Jt(i),a=[],r=function e(t,n){t.parent=n,t.children&&t.children.length>0&&t.children.forEach((function(i){return e(i,t)})),t.out=Wn(t,a);!function e(t,i,n){t.parent&&(t.parent.body=t.parent.body.replace(i,n),e(t.parent,i,n))}(t,t.body,t.out),i=i.replace(t.body,t.out)};n.forEach((function(e){return r(e,null)})),e.infoboxes=e.infoboxes||[],e.references=e.references||[],e.templates=e.templates||[],e.templates=e.templates.concat(a),e.templates=e.templates.filter((function(i){return!0===function(e){return!0===Vn[e.template]||!0===Hn.test(e.template)}(i)?(e.references.push(new Me(i)),!1):!0!==Jn(i)||(i.domain=t.domain,e.infoboxes.push(new Wt(i)),!1)})),e.templates=e.templates.map((function(e){return new Gn(e)})),n.forEach((function(e){i=i.replace(e.body,e.out)})),e.wiki=i},Xn=je,ea=function(e,t){var i=e.wiki;i=i.replace(/]*?)>([\s\S]+?)<\/gallery>/g,(function(i,n,a){var r=a.split(/\n/g);return(r=(r=r.filter((function(e){return e&&""!==e.trim()}))).map((function(e){var i=e.split(/\|/),n={file:i[0].trim(),lang:t.language,domain:t.domain},a=new $(n).json(),r=i.slice(1).join("|");return""!==r&&(a.caption=Xn(r)),a}))).length>0&&e.templates.push({template:"gallery",images:r,pos:e.title}),""})),e.wiki=i},ta=function(e){var t=e.wiki;t=t.replace(/\{\{election box begin([\s\S]+?)\{\{election box end\}\}/gi,(function(t){var i={wiki:t,templates:[]};Qn(i);var n=i.templates.map((function(e){return e.json()})),a=n.find((function(e){return"election box"===e.template}))||{},r=n.filter((function(e){return"election box candidate"===e.template})),o=n.find((function(e){return"election box gain"===e.template||"election box hold"===e.template}))||{};return(r.length>0||o)&&e.templates.push({template:"election box",title:a.title,candidates:r,summary:o.data}),""})),e.wiki=t},ia={coach:["team","year","g","w","l","w-l%","finish","pg","pw","pl","pw-l%"],player:["year","team","gp","gs","mpg","fg%","3p%","ft%","rpg","apg","spg","bpg","ppg"],roster:["player","gp","gs","mpg","fg%","3fg%","ft%","rpg","apg","spg","bpg","ppg"]},na=function(e){var t=e.wiki;t=t.replace(/\{\{nba (coach|player|roster) statistics start([\s\S]+?)\{\{s-end\}\}/gi,(function(t,i){t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{s-end\}\}/,""),i=i.toLowerCase().trim();var n="! "+ia[i].join(" !! "),a=at("{|\n"+n+"\n"+t+"\n|}");return a=a.map((function(e){return Object.keys(e).forEach((function(t){e[t]=e[t].text()})),e})),e.templates.push({template:"NBA "+i+" statistics",data:a}),""})),e.wiki=t},aa=function(e){var t=e.wiki;t=t.replace(/\{\{mlb game log (section|month)[\s\S]+?\{\{mlb game log (section|month) end\}\}/gi,(function(t){var i=function(e){var t=["#","date","opponent","score","win","loss","save","attendance","record"];return!0===/\|stadium=y/i.test(e)&&t.splice(7,0,"stadium"),!0===/\|time=y/i.test(e)&&t.splice(7,0,"time"),!0===/\|box=y/i.test(e)&&t.push("box"),t}(t);t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{mlb game log (section|month) end\}\}/i,"");var n="! "+i.join(" !! "),a=at("{|\n"+n+"\n"+t+"\n|}");return a=a.map((function(e){return Object.keys(e).forEach((function(t){e[t]=e[t].text()})),e})),e.templates.push({template:"mlb game log section",data:a}),""})),e.wiki=t},ra=["res","record","opponent","method","event","date","round","time","location","notes"],oa=function(e){var t=e.wiki;t=t.replace(/\{\{mma record start[\s\S]+?\{\{end\}\}/gi,(function(t){t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{end\}\}/i,"");var i="! "+ra.join(" !! "),n=at("{|\n"+i+"\n"+t+"\n|}");return n=n.map((function(e){return Object.keys(e).forEach((function(t){e[t]=e[t].text()})),e})),e.templates.push({template:"mma record start",data:n}),""})),e.wiki=t},sa=je,ca=function(e){var t=e.wiki;t=(t=t.replace(/]*?)>([\s\S]+?)<\/math>/g,(function(t,i,n){var a=sa(n).text();return e.templates.push({template:"math",formula:a,raw:n}),a&&a.length<12?a:""}))).replace(/]*?)>([\s\S]+?)<\/chem>/g,(function(t,i,n){return e.templates.push({template:"chem",data:n}),""})),e.wiki=t},ua=function(e,t){ta(e),ea(e,t),ca(e),aa(e),oa(e),na(e)},la=new RegExp("^("+_.references.join("|")+"):?","i"),pa=/(?:\n|^)(={2,5}.{1,200}?={2,5})/g,ma={heading:Ze,table:mt,paragraphs:Rt,templates:Qn,references:Be,startEndTemplates:ua},da=function(e,t){return ma.startEndTemplates(e,t),ma.references(e),ma.templates(e,t),ma.table(e),ma.paragraphs(e,t),e=new ie(e)},fa=function(e){for(var t=[],i=e.wiki.split(pa),n=0;n0||t.templates().length>0||(e[i+1]&&e[i+1].depth>t.depth&&(e[i+1].depth-=1),!1)}))}(t)},ga=new RegExp("\\[\\[:?("+_.categories.join("|")+"):(.{2,178}?)]](w{0,10})","ig"),ha=new RegExp("^\\[\\[:?("+_.categories.join("|")+"):","ig"),ba={section:fa,categories:function(e){var t=e.wiki,i=t.match(ga);i&&i.forEach((function(t){(t=(t=(t=t.replace(ha,"")).replace(/\|?[ \*]?\]\]$/i,"")).replace(/\|.*/,""))&&!t.match(/[\[\]]/)&&e.categories.push(t.trim())})),t=t.replace(ga,""),e.wiki=t}},ka=function(e,t){t=t||{};var i=Object.assign(t,{title:t.title||null,pageID:t.pageID||t.id||null,namespace:t.namespace||t.ns||null,type:"page",wiki:e||"",categories:[],sections:[],coordinates:[]});return!0===R(e)?(i.type="redirect",i.redirectTo=U(e),ba.categories(i),new E(i)):(Z(i),ba.categories(i),ba.section(i),new E(i))},wa=function(e){var t=(e=e.filter((function(e){return e}))).map((function(e){return ka(e.wiki,e.meta)}));return 0===t.length?null:1===t.length?t[0]:t},va=function(e,t){return fetch(e,t).then((function(e){return e.json()}))},ya=function(e){var t=e.userAgent||e["User-Agent"]||e["Api-User-Agent"]||"User of the wtf_wikipedia library";return{method:"GET",headers:{"Content-Type":"application/json","Api-User-Agent":t,"User-Agent":t,Origin:e.noOrigin?"":e.origin||e.Origin||"*"},redirect:"follow"}},xa=/^https?:\/\//,$a={lang:"en",wiki:"wikipedia",domain:null,follow_redirects:!0,path:"api.php"},ja=function(t,i,n){var a=null;"function"==typeof i&&(a=i,i={}),"function"==typeof n&&(a=n,n={}),"string"==typeof i&&(n=n||{},i=Object.assign({},{lang:i},n)),i=i||{},(i=Object.assign({},$a,i)).title=t,xa.test(t)&&(i=Object.assign(i,e(t)));var r=c(i),o=ya(i);return va(r,o).then((function(e){try{var t=u(e,i);return t=wa(t),a&&a(null,t),t}catch(e){throw e}})).catch((function(e){return console.error(e),a&&a(e,null),null}))},za={lang:"en",wiki:"wikipedia",domain:null,path:"w/api.php"},Oa=function(e,t){var i;t=t||{},t=Object.assign({},za,t),"string"==typeof e?t.lang=e:(i=e)&&"[object Object]"===Object.prototype.toString.call(i)&&(t=Object.assign(t,e));var n="https://".concat(t.lang,".wikipedia.org/").concat(t.path,"?");t.domain&&(n="https://".concat(t.domain,"/").concat(t.path,"?")),n+="format=json&action=query&generator=random&grnnamespace=0&prop=revisions|pageprops&rvprop=content&grnlimit=1&rvslots=main&origin=*";var a=ya(t);return va(n,a).then((function(e){try{var t=u(e);return wa(t)}catch(e){throw e}})).catch((function(e){return console.error(e),null}))},Ea={lang:"en",wiki:"wikipedia",domain:null,path:"w/api.php"},_a=function(e,t,i){var n;i=i||{},i=Object.assign({},Ea,i),"string"==typeof t?i.lang=t:(n=t)&&"[object Object]"===Object.prototype.toString.call(n)&&(i=Object.assign(i,t));var a={pages:[],categories:[]};return new Promise((function(t,n){!function r(o){var s=function(e,t,i){e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return!1===/^Category/i.test(e)&&(e="Category:"+e),e.replace(/ /g,"_")}(e),e=encodeURIComponent(e);var n="https://".concat(t.lang,".wikipedia.org/").concat(t.path,"?");return t.domain&&(n="https://".concat(t.domain,"/").concat(t.path,"?")),n+="action=query&list=categorymembers&cmtitle=".concat(e,"&cmlimit=500&format=json&origin=*&redirects=true&cmtype=page|subcat"),i&&(n+="&cmcontinue="+i),n}(e,i,o),c=ya(i);return va(s,c).then((function(e){a=function(e){var t=e.query.categorymembers||[],i={pages:[],categories:[]};return t.forEach((function(e){14===e.ns?(delete e.ns,i.categories.push(e)):(delete e.ns,i.pages.push(e))})),i}(e),e.continue&&e.continue.cmcontinue?r(e.continue.cmcontinue):t(a)})).catch((function(e){console.error(e),n(e)}))}(null)}))},Sa=function(e,t){return ka(e,t)},Ca={Doc:E,Section:ie,Paragraph:kt,Sentence:ge,Image:$,Infobox:Wt,Link:se,List:St,Reference:Me,Table:ut,Template:Gn,http:va,wtf:Sa};Sa.fetch=function(e,t,i,n){return ja(e,t,i)},Sa.random=function(e,t,i){return Oa(e,t)},Sa.category=function(e,t,i,n){return _a(e,t,i)},Sa.extend=function(e){return e(Ca,Fn,this),this},Sa.version="8.5.0";var qa=Sa;export default qa; diff --git a/builds/wtf_wikipedia.js b/builds/wtf_wikipedia.js index fadea54a..feb2ea73 100644 --- a/builds/wtf_wikipedia.js +++ b/builds/wtf_wikipedia.js @@ -1,11 +1,13 @@ -/* wtf_wikipedia 8.4.0 MIT */ +/* wtf_wikipedia 8.5.0 MIT */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('https')) : typeof define === 'function' && define.amd ? define(['https'], factory) : - (global = global || self, global.wtf = factory(global.https)); + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.wtf = factory(global.https)); }(this, (function (https) { 'use strict'; - https = https && Object.prototype.hasOwnProperty.call(https, 'default') ? https['default'] : https; + function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + + var https__default = /*#__PURE__*/_interopDefaultLegacy(https); var parseUrl = function parseUrl(url) { var parsed = new URL(url); //eslint-disable-line @@ -8724,7 +8726,7 @@ var request = function request(url) { var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; return new Promise(function (resolve, reject) { - https.get(url, opts, function (resp) { + https__default['default'].get(url, opts, function (resp) { var data = ''; // A chunk of data has been recieved. resp.on('data', function (chunk) { @@ -8749,13 +8751,21 @@ var makeHeaders = function makeHeaders(options) { var agent = options.userAgent || options['User-Agent'] || options['Api-User-Agent'] || 'User of the wtf_wikipedia library'; + var origin; + + if (options.noOrigin) { + origin = ''; + } else { + origin = options.origin || options.Origin || '*'; + } + var opts = { method: 'GET', headers: { 'Content-Type': 'application/json', 'Api-User-Agent': agent, 'User-Agent': agent, - Origin: '*' + Origin: origin }, redirect: 'follow' }; @@ -8974,7 +8984,7 @@ var category = fetchCategory; - var _version = '8.4.0'; + var _version = '8.5.0'; var wtf = function wtf(wiki, options) { return _01Document(wiki, options); diff --git a/builds/wtf_wikipedia.mjs b/builds/wtf_wikipedia.mjs index f59658d5..1ff2260b 100644 --- a/builds/wtf_wikipedia.mjs +++ b/builds/wtf_wikipedia.mjs @@ -1,4 +1,4 @@ -/* wtf_wikipedia 8.4.0 MIT */ +/* wtf_wikipedia 8.5.0 MIT */ import https from 'https'; var parseUrl = function parseUrl(url) { @@ -8743,13 +8743,21 @@ var server$1 = request; var makeHeaders = function makeHeaders(options) { var agent = options.userAgent || options['User-Agent'] || options['Api-User-Agent'] || 'User of the wtf_wikipedia library'; + var origin; + + if (options.noOrigin) { + origin = ''; + } else { + origin = options.origin || options.Origin || '*'; + } + var opts = { method: 'GET', headers: { 'Content-Type': 'application/json', 'Api-User-Agent': agent, 'User-Agent': agent, - Origin: '*' + Origin: origin }, redirect: 'follow' }; @@ -8968,7 +8976,7 @@ var fetchCategory = function fetchCategory(category, lang, options) { var category = fetchCategory; -var _version = '8.4.0'; +var _version = '8.5.0'; var wtf = function wtf(wiki, options) { return _01Document(wiki, options); diff --git a/changelog.md b/changelog.md index de55e150..a2f6c35f 100644 --- a/changelog.md +++ b/changelog.md @@ -2,6 +2,11 @@ #### [unreleased] +#### 8.5.0 + +- fix for cross-domain 3rd-party wikis +- improved support for fetching non-wikipedia domains + #### 8.4.0 - new `wikidata()` method diff --git a/package-lock.json b/package-lock.json index 0cf013a7..ce9bda4f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,9 +14,9 @@ } }, "@babel/compat-data": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.10.4.tgz", - "integrity": "sha512-t+rjExOrSVvjQQXNp5zAIYDp00KjdvGl/TpDX5REPr0S9IAIPQMTilcfG6q8c0QFmj9lSTVySV2VTsyggvtNIw==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.11.0.tgz", + "integrity": "sha512-TPSvJfv73ng0pfnEOh17bYMPQbI95+nGWc71Ss4vZdRBHTDqmM9Z8ZV4rYz8Ks7sfzc95n30k6ODIq5UGnXcYQ==", "dev": true, "requires": { "browserslist": "^4.12.0", @@ -25,64 +25,75 @@ } }, "@babel/core": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.10.4.tgz", - "integrity": "sha512-3A0tS0HWpy4XujGc7QtOIHTeNwUgWaZc/WuS5YQrfhU67jnVmsD6OGPc1AKHH0LJHQICGncy3+YUjIhVlfDdcA==", + "version": "7.11.6", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.11.6.tgz", + "integrity": "sha512-Wpcv03AGnmkgm6uS6k8iwhIwTrcP0m17TL1n1sy7qD0qelDu4XNeW0dN0mHfa+Gei211yDaLoEe/VlbXQzM4Bg==", "dev": true, "requires": { "@babel/code-frame": "^7.10.4", - "@babel/generator": "^7.10.4", - "@babel/helper-module-transforms": "^7.10.4", + "@babel/generator": "^7.11.6", + "@babel/helper-module-transforms": "^7.11.0", "@babel/helpers": "^7.10.4", - "@babel/parser": "^7.10.4", + "@babel/parser": "^7.11.5", "@babel/template": "^7.10.4", - "@babel/traverse": "^7.10.4", - "@babel/types": "^7.10.4", + "@babel/traverse": "^7.11.5", + "@babel/types": "^7.11.5", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.1", "json5": "^2.1.2", - "lodash": "^4.17.13", + "lodash": "^4.17.19", "resolve": "^1.3.2", "semver": "^5.4.1", "source-map": "^0.5.0" }, "dependencies": { "@babel/types": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.4.tgz", - "integrity": "sha512-UTCFOxC3FsFHb7lkRMVvgLzaRVamXuAs2Tz4wajva4WxtVY82eZeaUBtC2Zt95FU9TiznuC0Zk35tsim8jeVpg==", + "version": "7.11.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", + "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", - "lodash": "^4.17.13", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true } } }, "@babel/generator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.10.4.tgz", - "integrity": "sha512-toLIHUIAgcQygFZRAQcsLQV3CBuX6yOIru1kJk/qqqvcRmZrYe6WavZTSG+bB8MxhnL9YPf+pKQfuiP161q7ng==", + "version": "7.11.6", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.11.6.tgz", + "integrity": "sha512-DWtQ1PV3r+cLbySoHrwn9RWEgKMBLLma4OBQloPRyDYvc5msJM9kvTLo1YnlJd1P/ZuKbdli3ijr5q3FvAF3uA==", "dev": true, "requires": { - "@babel/types": "^7.10.4", + "@babel/types": "^7.11.5", "jsesc": "^2.5.1", - "lodash": "^4.17.13", "source-map": "^0.5.0" }, "dependencies": { "@babel/types": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.4.tgz", - "integrity": "sha512-UTCFOxC3FsFHb7lkRMVvgLzaRVamXuAs2Tz4wajva4WxtVY82eZeaUBtC2Zt95FU9TiznuC0Zk35tsim8jeVpg==", + "version": "7.11.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", + "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", - "lodash": "^4.17.13", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true } } }, @@ -96,15 +107,21 @@ }, "dependencies": { "@babel/types": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.4.tgz", - "integrity": "sha512-UTCFOxC3FsFHb7lkRMVvgLzaRVamXuAs2Tz4wajva4WxtVY82eZeaUBtC2Zt95FU9TiznuC0Zk35tsim8jeVpg==", + "version": "7.11.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", + "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", - "lodash": "^4.17.13", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true } } }, @@ -119,15 +136,21 @@ }, "dependencies": { "@babel/types": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.4.tgz", - "integrity": "sha512-UTCFOxC3FsFHb7lkRMVvgLzaRVamXuAs2Tz4wajva4WxtVY82eZeaUBtC2Zt95FU9TiznuC0Zk35tsim8jeVpg==", + "version": "7.11.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", + "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", - "lodash": "^4.17.13", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true } } }, @@ -145,13 +168,13 @@ } }, "@babel/helper-create-class-features-plugin": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.10.4.tgz", - "integrity": "sha512-9raUiOsXPxzzLjCXeosApJItoMnX3uyT4QdM2UldffuGApNrF8e938MwNpDCK9CPoyxrEoCgT+hObJc3mZa6lQ==", + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.10.5.tgz", + "integrity": "sha512-0nkdeijB7VlZoLT3r/mY3bUkw3T8WG/hNw+FATs/6+pG2039IJWjTYL0VTISqsNHMUTEnwbVnc89WIJX9Qed0A==", "dev": true, "requires": { "@babel/helper-function-name": "^7.10.4", - "@babel/helper-member-expression-to-functions": "^7.10.4", + "@babel/helper-member-expression-to-functions": "^7.10.5", "@babel/helper-optimise-call-expression": "^7.10.4", "@babel/helper-plugin-utils": "^7.10.4", "@babel/helper-replace-supers": "^7.10.4", @@ -170,49 +193,60 @@ } }, "@babel/helper-define-map": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.10.4.tgz", - "integrity": "sha512-nIij0oKErfCnLUCWaCaHW0Bmtl2RO9cN7+u2QT8yqTywgALKlyUVOvHDElh+b5DwVC6YB1FOYFOTWcN/+41EDA==", + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.10.5.tgz", + "integrity": "sha512-fMw4kgFB720aQFXSVaXr79pjjcW5puTCM16+rECJ/plGS+zByelE8l9nCpV1GibxTnFVmUuYG9U8wYfQHdzOEQ==", "dev": true, "requires": { "@babel/helper-function-name": "^7.10.4", - "@babel/types": "^7.10.4", - "lodash": "^4.17.13" + "@babel/types": "^7.10.5", + "lodash": "^4.17.19" }, "dependencies": { "@babel/types": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.4.tgz", - "integrity": "sha512-UTCFOxC3FsFHb7lkRMVvgLzaRVamXuAs2Tz4wajva4WxtVY82eZeaUBtC2Zt95FU9TiznuC0Zk35tsim8jeVpg==", + "version": "7.11.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", + "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", - "lodash": "^4.17.13", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true } } }, "@babel/helper-explode-assignable-expression": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.10.4.tgz", - "integrity": "sha512-4K71RyRQNPRrR85sr5QY4X3VwG4wtVoXZB9+L3r1Gp38DhELyHCtovqydRi7c1Ovb17eRGiQ/FD5s8JdU0Uy5A==", + "version": "7.11.4", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.11.4.tgz", + "integrity": "sha512-ux9hm3zR4WV1Y3xXxXkdG/0gxF9nvI0YVmKVhvK9AfMoaQkemL3sJpXw+Xbz65azo8qJiEz2XVDUpK3KYhH3ZQ==", "dev": true, "requires": { - "@babel/traverse": "^7.10.4", "@babel/types": "^7.10.4" }, "dependencies": { "@babel/types": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.4.tgz", - "integrity": "sha512-UTCFOxC3FsFHb7lkRMVvgLzaRVamXuAs2Tz4wajva4WxtVY82eZeaUBtC2Zt95FU9TiznuC0Zk35tsim8jeVpg==", + "version": "7.11.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", + "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", - "lodash": "^4.17.13", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true } } }, @@ -228,15 +262,21 @@ }, "dependencies": { "@babel/types": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.4.tgz", - "integrity": "sha512-UTCFOxC3FsFHb7lkRMVvgLzaRVamXuAs2Tz4wajva4WxtVY82eZeaUBtC2Zt95FU9TiznuC0Zk35tsim8jeVpg==", + "version": "7.11.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", + "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", - "lodash": "^4.17.13", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true } } }, @@ -250,15 +290,21 @@ }, "dependencies": { "@babel/types": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.4.tgz", - "integrity": "sha512-UTCFOxC3FsFHb7lkRMVvgLzaRVamXuAs2Tz4wajva4WxtVY82eZeaUBtC2Zt95FU9TiznuC0Zk35tsim8jeVpg==", + "version": "7.11.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", + "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", - "lodash": "^4.17.13", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true } } }, @@ -272,37 +318,49 @@ }, "dependencies": { "@babel/types": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.4.tgz", - "integrity": "sha512-UTCFOxC3FsFHb7lkRMVvgLzaRVamXuAs2Tz4wajva4WxtVY82eZeaUBtC2Zt95FU9TiznuC0Zk35tsim8jeVpg==", + "version": "7.11.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", + "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", - "lodash": "^4.17.13", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true } } }, "@babel/helper-member-expression-to-functions": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.10.4.tgz", - "integrity": "sha512-m5j85pK/KZhuSdM/8cHUABQTAslV47OjfIB9Cc7P+PvlAoBzdb79BGNfw8RhT5Mq3p+xGd0ZfAKixbrUZx0C7A==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.11.0.tgz", + "integrity": "sha512-JbFlKHFntRV5qKw3YC0CvQnDZ4XMwgzzBbld7Ly4Mj4cbFy3KywcR8NtNctRToMWJOVvLINJv525Gd6wwVEx/Q==", "dev": true, "requires": { - "@babel/types": "^7.10.4" + "@babel/types": "^7.11.0" }, "dependencies": { "@babel/types": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.4.tgz", - "integrity": "sha512-UTCFOxC3FsFHb7lkRMVvgLzaRVamXuAs2Tz4wajva4WxtVY82eZeaUBtC2Zt95FU9TiznuC0Zk35tsim8jeVpg==", + "version": "7.11.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", + "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", - "lodash": "^4.17.13", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true } } }, @@ -316,18 +374,18 @@ } }, "@babel/helper-module-transforms": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.10.4.tgz", - "integrity": "sha512-Er2FQX0oa3nV7eM1o0tNCTx7izmQtwAQsIiaLRWtavAAEcskb0XJ5OjJbVrYXWOTr8om921Scabn4/tzlx7j1Q==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.11.0.tgz", + "integrity": "sha512-02EVu8COMuTRO1TAzdMtpBPbe6aQ1w/8fePD2YgQmxZU4gpNWaL9gK3Jp7dxlkUlUCJOTaSeA+Hrm1BRQwqIhg==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.10.4", "@babel/helper-replace-supers": "^7.10.4", "@babel/helper-simple-access": "^7.10.4", - "@babel/helper-split-export-declaration": "^7.10.4", + "@babel/helper-split-export-declaration": "^7.11.0", "@babel/template": "^7.10.4", - "@babel/types": "^7.10.4", - "lodash": "^4.17.13" + "@babel/types": "^7.11.0", + "lodash": "^4.17.19" }, "dependencies": { "@babel/helper-module-imports": { @@ -340,15 +398,21 @@ } }, "@babel/types": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.4.tgz", - "integrity": "sha512-UTCFOxC3FsFHb7lkRMVvgLzaRVamXuAs2Tz4wajva4WxtVY82eZeaUBtC2Zt95FU9TiznuC0Zk35tsim8jeVpg==", + "version": "7.11.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", + "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", - "lodash": "^4.17.13", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true } } }, @@ -362,15 +426,21 @@ }, "dependencies": { "@babel/types": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.4.tgz", - "integrity": "sha512-UTCFOxC3FsFHb7lkRMVvgLzaRVamXuAs2Tz4wajva4WxtVY82eZeaUBtC2Zt95FU9TiznuC0Zk35tsim8jeVpg==", + "version": "7.11.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", + "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", - "lodash": "^4.17.13", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true } } }, @@ -381,37 +451,50 @@ "dev": true }, "@babel/helper-regex": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.10.4.tgz", - "integrity": "sha512-inWpnHGgtg5NOF0eyHlC0/74/VkdRITY9dtTpB2PrxKKn+AkVMRiZz/Adrx+Ssg+MLDesi2zohBW6MVq6b4pOQ==", + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.10.5.tgz", + "integrity": "sha512-68kdUAzDrljqBrio7DYAEgCoJHxppJOERHOgOrDN7WjOzP0ZQ1LsSDRXcemzVZaLvjaJsJEESb6qt+znNuENDg==", "dev": true, "requires": { - "lodash": "^4.17.13" + "lodash": "^4.17.19" + }, + "dependencies": { + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + } } }, "@babel/helper-remap-async-to-generator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.10.4.tgz", - "integrity": "sha512-86Lsr6NNw3qTNl+TBcF1oRZMaVzJtbWTyTko+CQL/tvNvcGYEFKbLXDPxtW0HKk3McNOk4KzY55itGWCAGK5tg==", + "version": "7.11.4", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.11.4.tgz", + "integrity": "sha512-tR5vJ/vBa9wFy3m5LLv2faapJLnDFxNWff2SAYkSE4rLUdbp7CdObYFgI7wK4T/Mj4UzpjPwzR8Pzmr5m7MHGA==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.10.4", "@babel/helper-wrap-function": "^7.10.4", "@babel/template": "^7.10.4", - "@babel/traverse": "^7.10.4", "@babel/types": "^7.10.4" }, "dependencies": { "@babel/types": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.4.tgz", - "integrity": "sha512-UTCFOxC3FsFHb7lkRMVvgLzaRVamXuAs2Tz4wajva4WxtVY82eZeaUBtC2Zt95FU9TiznuC0Zk35tsim8jeVpg==", + "version": "7.11.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", + "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", - "lodash": "^4.17.13", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true } } }, @@ -428,15 +511,21 @@ }, "dependencies": { "@babel/types": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.4.tgz", - "integrity": "sha512-UTCFOxC3FsFHb7lkRMVvgLzaRVamXuAs2Tz4wajva4WxtVY82eZeaUBtC2Zt95FU9TiznuC0Zk35tsim8jeVpg==", + "version": "7.11.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", + "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", - "lodash": "^4.17.13", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true } } }, @@ -451,37 +540,77 @@ }, "dependencies": { "@babel/types": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.4.tgz", - "integrity": "sha512-UTCFOxC3FsFHb7lkRMVvgLzaRVamXuAs2Tz4wajva4WxtVY82eZeaUBtC2Zt95FU9TiznuC0Zk35tsim8jeVpg==", + "version": "7.11.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", + "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", - "lodash": "^4.17.13", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + } + } + }, + "@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.11.0.tgz", + "integrity": "sha512-0XIdiQln4Elglgjbwo9wuJpL/K7AGCY26kmEt0+pRP0TAj4jjyNq1MjoRvikrTVqKcx4Gysxt4cXvVFXP/JO2Q==", + "dev": true, + "requires": { + "@babel/types": "^7.11.0" + }, + "dependencies": { + "@babel/types": { + "version": "7.11.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", + "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true } } }, "@babel/helper-split-export-declaration": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.10.4.tgz", - "integrity": "sha512-pySBTeoUff56fL5CBU2hWm9TesA4r/rOkI9DyJLvvgz09MB9YtfIYe3iBriVaYNaPe+Alua0vBIOVOLs2buWhg==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz", + "integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==", "dev": true, "requires": { - "@babel/types": "^7.10.4" + "@babel/types": "^7.11.0" }, "dependencies": { "@babel/types": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.4.tgz", - "integrity": "sha512-UTCFOxC3FsFHb7lkRMVvgLzaRVamXuAs2Tz4wajva4WxtVY82eZeaUBtC2Zt95FU9TiznuC0Zk35tsim8jeVpg==", + "version": "7.11.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", + "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", - "lodash": "^4.17.13", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true } } }, @@ -504,15 +633,21 @@ }, "dependencies": { "@babel/types": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.4.tgz", - "integrity": "sha512-UTCFOxC3FsFHb7lkRMVvgLzaRVamXuAs2Tz4wajva4WxtVY82eZeaUBtC2Zt95FU9TiznuC0Zk35tsim8jeVpg==", + "version": "7.11.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", + "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", - "lodash": "^4.17.13", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true } } }, @@ -528,15 +663,21 @@ }, "dependencies": { "@babel/types": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.4.tgz", - "integrity": "sha512-UTCFOxC3FsFHb7lkRMVvgLzaRVamXuAs2Tz4wajva4WxtVY82eZeaUBtC2Zt95FU9TiznuC0Zk35tsim8jeVpg==", + "version": "7.11.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", + "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", - "lodash": "^4.17.13", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true } } }, @@ -552,15 +693,15 @@ } }, "@babel/parser": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.4.tgz", - "integrity": "sha512-8jHII4hf+YVDsskTF6WuMB3X4Eh+PsUkC2ljq22so5rHvH+T8BzyL94VOdyFLNR8tBSVXOTbNHOKpR4TfRxVtA==", + "version": "7.11.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.11.5.tgz", + "integrity": "sha512-X9rD8qqm695vgmeaQ4fvz/o3+Wk4ZzQvSHkDBgpYKxpD4qTAUm88ZKtHkVqIOsYFFbIQ6wQYhC6q7pjqVK0E0Q==", "dev": true }, "@babel/plugin-proposal-async-generator-functions": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.10.4.tgz", - "integrity": "sha512-MJbxGSmejEFVOANAezdO39SObkURO5o/8b6fSH6D1pi9RZQt+ldppKPXfqgUWpSQ9asM6xaSaSJIaeWMDRP0Zg==", + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.10.5.tgz", + "integrity": "sha512-cNMCVezQbrRGvXJwm9fu/1sJj9bHdGAgKodZdLqOQIpfoH3raqmRPBM17+lh7CzhiKRRBrGtZL9WcjxSoGYUSg==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4", @@ -588,6 +729,16 @@ "@babel/plugin-syntax-dynamic-import": "^7.8.0" } }, + "@babel/plugin-proposal-export-namespace-from": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.10.4.tgz", + "integrity": "sha512-aNdf0LY6/3WXkhh0Fdb6Zk9j1NMD8ovj3F6r0+3j837Pn1S1PdNtcwJ5EG9WkVPNHPxyJDaxMaAOVq4eki0qbg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3" + } + }, "@babel/plugin-proposal-json-strings": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.10.4.tgz", @@ -598,6 +749,16 @@ "@babel/plugin-syntax-json-strings": "^7.8.0" } }, + "@babel/plugin-proposal-logical-assignment-operators": { + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.11.0.tgz", + "integrity": "sha512-/f8p4z+Auz0Uaf+i8Ekf1iM7wUNLcViFUGiPxKeXvxTSl63B875YPiVdUDdem7hREcI0E0kSpEhS8tF5RphK7Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" + } + }, "@babel/plugin-proposal-nullish-coalescing-operator": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.10.4.tgz", @@ -619,9 +780,9 @@ } }, "@babel/plugin-proposal-object-rest-spread": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.10.4.tgz", - "integrity": "sha512-6vh4SqRuLLarjgeOf4EaROJAHjvu9Gl+/346PbDH9yWbJyfnJ/ah3jmYKYtswEyCoWZiidvVHjHshd4WgjB9BA==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.11.0.tgz", + "integrity": "sha512-wzch41N4yztwoRw0ak+37wxwJM2oiIiy6huGCoqkvSTA9acYWcPfn9Y4aJqmFFJ70KTJUu29f3DQ43uJ9HXzEA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4", @@ -640,12 +801,13 @@ } }, "@babel/plugin-proposal-optional-chaining": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.10.4.tgz", - "integrity": "sha512-ZIhQIEeavTgouyMSdZRap4VPPHqJJ3NEs2cuHs5p0erH+iz6khB0qfgU8g7UuJkG88+fBMy23ZiU+nuHvekJeQ==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.11.0.tgz", + "integrity": "sha512-v9fZIu3Y8562RRwhm1BbMRxtqZNFmFA2EG+pT2diuU8PT3H6T/KXoZ54KgYisfOFZHV6PfvAiBIZ9Rcz+/JCxA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-skip-transparent-expression-wrappers": "^7.11.0", "@babel/plugin-syntax-optional-chaining": "^7.8.0" } }, @@ -696,6 +858,15 @@ "@babel/helper-plugin-utils": "^7.8.0" } }, + "@babel/plugin-syntax-export-namespace-from": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", + "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, "@babel/plugin-syntax-json-strings": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", @@ -705,6 +876,15 @@ "@babel/helper-plugin-utils": "^7.8.0" } }, + "@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, "@babel/plugin-syntax-nullish-coalescing-operator": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", @@ -789,15 +969,21 @@ } }, "@babel/types": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.4.tgz", - "integrity": "sha512-UTCFOxC3FsFHb7lkRMVvgLzaRVamXuAs2Tz4wajva4WxtVY82eZeaUBtC2Zt95FU9TiznuC0Zk35tsim8jeVpg==", + "version": "7.11.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", + "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", - "lodash": "^4.17.13", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true } } }, @@ -811,13 +997,12 @@ } }, "@babel/plugin-transform-block-scoping": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.10.4.tgz", - "integrity": "sha512-J3b5CluMg3hPUii2onJDRiaVbPtKFPLEaV5dOPY5OeAbDi1iU/UbbFFTgwb7WnanaDy7bjU35kc26W3eM5Qa0A==", + "version": "7.11.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.11.1.tgz", + "integrity": "sha512-00dYeDE0EVEHuuM+26+0w/SCL0BH2Qy7LwHuI4Hi4MH5gkC8/AqMN5uWFJIsoXZrAphiMm1iXzBw6L2T+eA0ew==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.4", - "lodash": "^4.17.13" + "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-classes": { @@ -921,12 +1106,12 @@ } }, "@babel/plugin-transform-modules-amd": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.10.4.tgz", - "integrity": "sha512-3Fw+H3WLUrTlzi3zMiZWp3AR4xadAEMv6XRCYnd5jAlLM61Rn+CRJaZMaNvIpcJpQ3vs1kyifYvEVPFfoSkKOA==", + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.10.5.tgz", + "integrity": "sha512-elm5uruNio7CTLFItVC/rIzKLfQ17+fX7EVz5W0TMgIHFo1zY0Ozzx+lgwhL4plzl8OzVn6Qasx5DeEFyoNiRw==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.10.4", + "@babel/helper-module-transforms": "^7.10.5", "@babel/helper-plugin-utils": "^7.10.4", "babel-plugin-dynamic-import-node": "^2.3.3" } @@ -944,13 +1129,13 @@ } }, "@babel/plugin-transform-modules-systemjs": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.10.4.tgz", - "integrity": "sha512-Tb28LlfxrTiOTGtZFsvkjpyjCl9IoaRI52AEU/VIwOwvDQWtbNJsAqTXzh+5R7i74e/OZHH2c2w2fsOqAfnQYQ==", + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.10.5.tgz", + "integrity": "sha512-f4RLO/OL14/FP1AEbcsWMzpbUz6tssRaeQg11RH1BP/XnPpRoVwgeYViMFacnkaw4k4wjRSjn3ip1Uw9TaXuMw==", "dev": true, "requires": { "@babel/helper-hoist-variables": "^7.10.4", - "@babel/helper-module-transforms": "^7.10.4", + "@babel/helper-module-transforms": "^7.10.5", "@babel/helper-plugin-utils": "^7.10.4", "babel-plugin-dynamic-import-node": "^2.3.3" } @@ -994,9 +1179,9 @@ } }, "@babel/plugin-transform-parameters": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.10.4.tgz", - "integrity": "sha512-RurVtZ/D5nYfEg0iVERXYKEgDFeesHrHfx8RT05Sq57ucj2eOYAP6eu5fynL4Adju4I/mP/I6SO0DqNWAXjfLQ==", + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.10.5.tgz", + "integrity": "sha512-xPHwUj5RdFV8l1wuYiu5S9fqWGM2DrYc24TMvUiRrPVm+SM3XeqU9BcokQX/kEUe+p2RBwy+yoiR1w/Blq6ubw==", "dev": true, "requires": { "@babel/helper-get-function-arity": "^7.10.4", @@ -1040,12 +1225,13 @@ } }, "@babel/plugin-transform-spread": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.10.4.tgz", - "integrity": "sha512-1e/51G/Ni+7uH5gktbWv+eCED9pP8ZpRhZB3jOaI3mmzfvJTWHkuyYTv0Z5PYtyM+Tr2Ccr9kUdQxn60fI5WuQ==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.11.0.tgz", + "integrity": "sha512-UwQYGOqIdQJe4aWNyS7noqAnN2VbaczPLiEtln+zPowRNlD+79w3oi2TWfYe0eZgd+gjZCbsydN7lzWysDt+gw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.4" + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-skip-transparent-expression-wrappers": "^7.11.0" } }, "@babel/plugin-transform-sticky-regex": { @@ -1059,9 +1245,9 @@ } }, "@babel/plugin-transform-template-literals": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.10.4.tgz", - "integrity": "sha512-4NErciJkAYe+xI5cqfS8pV/0ntlY5N5Ske/4ImxAVX7mk9Rxt2bwDTGv1Msc2BRJvWQcmYEC+yoMLdX22aE4VQ==", + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.10.5.tgz", + "integrity": "sha512-V/lnPGIb+KT12OQikDvgSuesRX14ck5FfJXt6+tXhdkJ+Vsd0lDCVtF6jcB4rNClYFzaB2jusZ+lNISDk2mMMw==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.10.4", @@ -1097,30 +1283,34 @@ } }, "@babel/preset-env": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.10.4.tgz", - "integrity": "sha512-tcmuQ6vupfMZPrLrc38d0sF2OjLT3/bZ0dry5HchNCQbrokoQi4reXqclvkkAT5b+gWc23meVWpve5P/7+w/zw==", + "version": "7.11.5", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.11.5.tgz", + "integrity": "sha512-kXqmW1jVcnB2cdueV+fyBM8estd5mlNfaQi6lwLgRwCby4edpavgbFhiBNjmWA3JpB/yZGSISa7Srf+TwxDQoA==", "dev": true, "requires": { - "@babel/compat-data": "^7.10.4", + "@babel/compat-data": "^7.11.0", "@babel/helper-compilation-targets": "^7.10.4", "@babel/helper-module-imports": "^7.10.4", "@babel/helper-plugin-utils": "^7.10.4", "@babel/plugin-proposal-async-generator-functions": "^7.10.4", "@babel/plugin-proposal-class-properties": "^7.10.4", "@babel/plugin-proposal-dynamic-import": "^7.10.4", + "@babel/plugin-proposal-export-namespace-from": "^7.10.4", "@babel/plugin-proposal-json-strings": "^7.10.4", + "@babel/plugin-proposal-logical-assignment-operators": "^7.11.0", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.10.4", "@babel/plugin-proposal-numeric-separator": "^7.10.4", - "@babel/plugin-proposal-object-rest-spread": "^7.10.4", + "@babel/plugin-proposal-object-rest-spread": "^7.11.0", "@babel/plugin-proposal-optional-catch-binding": "^7.10.4", - "@babel/plugin-proposal-optional-chaining": "^7.10.4", + "@babel/plugin-proposal-optional-chaining": "^7.11.0", "@babel/plugin-proposal-private-methods": "^7.10.4", "@babel/plugin-proposal-unicode-property-regex": "^7.10.4", "@babel/plugin-syntax-async-generators": "^7.8.0", "@babel/plugin-syntax-class-properties": "^7.10.4", "@babel/plugin-syntax-dynamic-import": "^7.8.0", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3", "@babel/plugin-syntax-json-strings": "^7.8.0", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0", "@babel/plugin-syntax-numeric-separator": "^7.10.4", "@babel/plugin-syntax-object-rest-spread": "^7.8.0", @@ -1153,14 +1343,14 @@ "@babel/plugin-transform-regenerator": "^7.10.4", "@babel/plugin-transform-reserved-words": "^7.10.4", "@babel/plugin-transform-shorthand-properties": "^7.10.4", - "@babel/plugin-transform-spread": "^7.10.4", + "@babel/plugin-transform-spread": "^7.11.0", "@babel/plugin-transform-sticky-regex": "^7.10.4", "@babel/plugin-transform-template-literals": "^7.10.4", "@babel/plugin-transform-typeof-symbol": "^7.10.4", "@babel/plugin-transform-unicode-escapes": "^7.10.4", "@babel/plugin-transform-unicode-regex": "^7.10.4", "@babel/preset-modules": "^0.1.3", - "@babel/types": "^7.10.4", + "@babel/types": "^7.11.5", "browserslist": "^4.12.0", "core-js-compat": "^3.6.2", "invariant": "^2.2.2", @@ -1178,22 +1368,28 @@ } }, "@babel/types": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.4.tgz", - "integrity": "sha512-UTCFOxC3FsFHb7lkRMVvgLzaRVamXuAs2Tz4wajva4WxtVY82eZeaUBtC2Zt95FU9TiznuC0Zk35tsim8jeVpg==", + "version": "7.11.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", + "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", - "lodash": "^4.17.13", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true } } }, "@babel/preset-modules": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.3.tgz", - "integrity": "sha512-Ra3JXOHBq2xd56xSF7lMKXdjBn3T772Y1Wet3yWnkDly9zHvJki029tAFzvAAK5cf4YV3yoxuP61crYRol6SVg==", + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.4.tgz", + "integrity": "sha512-J36NhwnfdzpmH41M1DrnkkgAqhZaqr/NBdPfQ677mLzlaXo+oDiv1deyCDtgAhz8p328otdob0Du7+xgHGZbKg==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0", @@ -1204,9 +1400,9 @@ } }, "@babel/runtime": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.10.4.tgz", - "integrity": "sha512-UpTN5yUJr9b4EX2CnGNWIvER7Ab83ibv0pcvvHc4UOdrBI5jb8bj+32cCwPX6xu0mt2daFNjYhoi+X7beH0RSw==", + "version": "7.11.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.11.2.tgz", + "integrity": "sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw==", "dev": true, "requires": { "regenerator-runtime": "^0.13.4" @@ -1224,45 +1420,57 @@ }, "dependencies": { "@babel/types": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.4.tgz", - "integrity": "sha512-UTCFOxC3FsFHb7lkRMVvgLzaRVamXuAs2Tz4wajva4WxtVY82eZeaUBtC2Zt95FU9TiznuC0Zk35tsim8jeVpg==", + "version": "7.11.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", + "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", - "lodash": "^4.17.13", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true } } }, "@babel/traverse": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.10.4.tgz", - "integrity": "sha512-aSy7p5THgSYm4YyxNGz6jZpXf+Ok40QF3aA2LyIONkDHpAcJzDUqlCKXv6peqYUs2gmic849C/t2HKw2a2K20Q==", + "version": "7.11.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.11.5.tgz", + "integrity": "sha512-EjiPXt+r7LiCZXEfRpSJd+jUMnBd4/9OUv7Nx3+0u9+eimMwJmG0Q98lw4/289JCoxSE8OolDMNZaaF/JZ69WQ==", "dev": true, "requires": { "@babel/code-frame": "^7.10.4", - "@babel/generator": "^7.10.4", + "@babel/generator": "^7.11.5", "@babel/helper-function-name": "^7.10.4", - "@babel/helper-split-export-declaration": "^7.10.4", - "@babel/parser": "^7.10.4", - "@babel/types": "^7.10.4", + "@babel/helper-split-export-declaration": "^7.11.0", + "@babel/parser": "^7.11.5", + "@babel/types": "^7.11.5", "debug": "^4.1.0", "globals": "^11.1.0", - "lodash": "^4.17.13" + "lodash": "^4.17.19" }, "dependencies": { "@babel/types": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.4.tgz", - "integrity": "sha512-UTCFOxC3FsFHb7lkRMVvgLzaRVamXuAs2Tz4wajva4WxtVY82eZeaUBtC2Zt95FU9TiznuC0Zk35tsim8jeVpg==", + "version": "7.11.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", + "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", - "lodash": "^4.17.13", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true } } }, @@ -1286,10 +1494,16 @@ "slash": "^3.0.0" } }, + "@types/node": { + "version": "14.6.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.6.4.tgz", + "integrity": "sha512-Wk7nG1JSaMfMpoMJDKUsWYugliB2Vy55pdjLpmLixeyMi7HizW2I/9QoxsPCkXl3dO+ZOVqPumKaDUv5zJu2uQ==", + "dev": true + }, "amble": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/amble/-/amble-1.0.0.tgz", - "integrity": "sha512-dUEuYiSe3bDYxt1gL/FWSlnS9E0GkHntnrC1gBWtRZaNHiwFy1c3sPSJYN+3Rf8qX63RdLYnEfwPZMoGnlOZOQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/amble/-/amble-1.1.0.tgz", + "integrity": "sha512-ughbDptkU0lCFV/pJwUHjEYJJNY3/63wPbvvK2SZQoiYm70nZeHugs8yrli3xnK3P8LhoaGI62/ZfHgraJkKEg==", "dev": true, "requires": { "chokidar": "^3.3.1", @@ -1346,9 +1560,9 @@ "dev": true }, "binary-extensions": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz", - "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", + "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==", "dev": true }, "brace-expansion": { @@ -1371,15 +1585,15 @@ } }, "browserslist": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.13.0.tgz", - "integrity": "sha512-MINatJ5ZNrLnQ6blGvePd/QOz9Xtu+Ne+x29iQSCHfkU5BugKVJwZKn/iiL8UbpIpa3JhviKjz+XxMo0m2caFQ==", + "version": "4.14.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.14.2.tgz", + "integrity": "sha512-HI4lPveGKUR0x2StIz+2FXfDk9SfVMrxn6PLh1JeGUwcuoDkdKZebWiyLRJ68iIPDpMI4JLVDf7S7XzslgWOhw==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001093", - "electron-to-chromium": "^1.3.488", - "escalade": "^3.0.1", - "node-releases": "^1.1.58" + "caniuse-lite": "^1.0.30001125", + "electron-to-chromium": "^1.3.564", + "escalade": "^3.0.2", + "node-releases": "^1.1.61" } }, "buffer-from": { @@ -1395,9 +1609,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001096", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001096.tgz", - "integrity": "sha512-PFTw9UyVfbkcMEFs82q8XVlRayj7HKvnhu5BLcmjGpv+SNyiWasCcWXPGJuO0rK0dhLRDJmtZcJ+LHUfypbw1w==", + "version": "1.0.30001125", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001125.tgz", + "integrity": "sha512-9f+r7BW8Qli917mU3j0fUaTweT3f3vnX/Lcs+1C73V+RADmFme+Ih0Br8vONQi3X0lseOe6ZHfsZLCA8MSjxUA==", "dev": true }, "chalk": { @@ -1412,9 +1626,9 @@ } }, "chokidar": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.1.tgz", - "integrity": "sha512-4QYCEWOcK3OJrxwvyyAOxFuhpvOVCYkr33LPfFNBjAD/w3sEzWsp2BUOkI4l9bHvWioAd0rc6NlHUOEaWkTeqg==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.2.tgz", + "integrity": "sha512-IZHaDeBeI+sZJRX7lGcXsdzgvZqKv6sECqsbErJA4mHWfpRrD8B97kSFN4cQz6nGBGiuFia1MKR4d6c1o8Cv7A==", "dev": true, "requires": { "anymatch": "~3.1.1", @@ -1424,7 +1638,7 @@ "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", - "readdirp": "~3.3.0" + "readdirp": "~3.4.0" } }, "color-convert": { @@ -1443,9 +1657,9 @@ "dev": true }, "colorette": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.1.0.tgz", - "integrity": "sha512-6S062WDQUXi6hOfkO/sBPVwE5ASXY4G2+b4atvhJfSsuUUhIaUKlkjLe9692Ipyt5/a+IPF5aVTu3V5gvXq5cg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.1.tgz", + "integrity": "sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw==", "dev": true }, "commander": { @@ -1557,9 +1771,9 @@ } }, "electron-to-chromium": { - "version": "1.3.494", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.494.tgz", - "integrity": "sha512-EOZuaDT3L1sCIMAVN5J0nGuGWVq5dThrdl0d8XeDYf4MOzbXqZ19OLKesN8TZj0RxtpYjqHpiw/fR6BKWdMwYA==", + "version": "1.3.564", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.564.tgz", + "integrity": "sha512-fNaYN3EtKQWLQsrKXui8mzcryJXuA0LbCLoizeX6oayG2emBaS5MauKjCPAvc29NEY4FpLHIUWiP+Y0Bfrs5dg==", "dev": true }, "es-abstract": { @@ -1616,9 +1830,9 @@ } }, "escalade": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.0.1.tgz", - "integrity": "sha512-DR6NO3h9niOT+MZs7bjxlj2a1k+POu5RN8CLTPX2+i78bRi9eLe7+0zXgUHMnGXWybYcL61E9hGhPKqedy8tQA==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.0.2.tgz", + "integrity": "sha512-gPYAU37hYCUhW5euPeR+Y74F7BL+IBsV93j5cvGriSaD1aG6MGsqsV1yamRdrWrb2j3aiZvb0X+UBOWpx3JWtQ==", "dev": true }, "escape-string-regexp": { @@ -1670,9 +1884,9 @@ "dev": true }, "fsevents": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.2.tgz", - "integrity": "sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", + "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", "dev": true, "optional": true }, @@ -1919,11 +2133,12 @@ "dev": true }, "jest-worker": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.1.0.tgz", - "integrity": "sha512-Z9P5pZ6UC+kakMbNJn+tA2RdVdNX5WH1x+5UCBZ9MxIK24pjYtFt96fK+UwBTrjLYm232g1xz0L3eTh51OW+yQ==", + "version": "26.3.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.3.0.tgz", + "integrity": "sha512-Vmpn2F6IASefL+DVBhPzI2J9/GJUsqzomdeN+P+dK8/jKxbh8R3BtFnx3FIta7wYlPU62cpJMJQo4kuOowcMnw==", "dev": true, "requires": { + "@types/node": "*", "merge-stream": "^2.0.0", "supports-color": "^7.0.0" }, @@ -1935,9 +2150,9 @@ "dev": true }, "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -2033,9 +2248,9 @@ "dev": true }, "node-releases": { - "version": "1.1.59", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.59.tgz", - "integrity": "sha512-H3JrdUczbdiwxN5FuJPyCHnGHIFqQ0wWxo+9j1kAXAzqNMAHlo+4I/sYYxpyK0irQ73HgdiyzD32oqQDcU2Osw==", + "version": "1.1.61", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.61.tgz", + "integrity": "sha512-DD5vebQLg8jLCOzwupn954fbIiZht05DAZs0k2u8NStSe6h9XdsuIQL8hSRKYiU8WUQRznmSDrKGbv3ObOmC7g==", "dev": true }, "normalize-path": { @@ -2127,12 +2342,12 @@ "dev": true }, "readdirp": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.3.0.tgz", - "integrity": "sha512-zz0pAkSPOXXm1viEwygWIPSPkcBYjW1xU5j/JBh5t9bGCJwa6f9+BJa6VaB2g+b55yVrmXzqkyLf4xaWYM0IkQ==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.4.0.tgz", + "integrity": "sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ==", "dev": true, "requires": { - "picomatch": "^2.0.7" + "picomatch": "^2.2.1" } }, "rechoir": { @@ -2160,9 +2375,9 @@ } }, "regenerator-runtime": { - "version": "0.13.5", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz", - "integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==", + "version": "0.13.7", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", + "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==", "dev": true }, "regenerator-transform": { @@ -2240,9 +2455,9 @@ } }, "rollup": { - "version": "2.21.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.21.0.tgz", - "integrity": "sha512-BEGgy+wSzux7Ycq58pRiWEOBZaXRXTuvzl1gsm7gqmsAHxkWf9nyA5V2LN9fGSHhhDQd0/C13iRzSh4bbIpWZQ==", + "version": "2.26.11", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.26.11.tgz", + "integrity": "sha512-xyfxxhsE6hW57xhfL1I+ixH8l2bdoIMaAecdQiWF3N7IgJEMu99JG+daBiSZQjnBpzFxa0/xZm+3pbCdAQehHw==", "dev": true, "requires": { "fsevents": "~2.1.2" @@ -2295,15 +2510,15 @@ "dev": true }, "rollup-plugin-terser": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-6.1.0.tgz", - "integrity": "sha512-4fB3M9nuoWxrwm39habpd4hvrbrde2W2GG4zEGPQg1YITNkM3Tqur5jSuXlWNzbv/2aMLJ+dZJaySc3GCD8oDw==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz", + "integrity": "sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==", "dev": true, "requires": { - "@babel/code-frame": "^7.8.3", - "jest-worker": "^26.0.0", - "serialize-javascript": "^3.0.0", - "terser": "^4.7.0" + "@babel/code-frame": "^7.10.4", + "jest-worker": "^26.2.1", + "serialize-javascript": "^4.0.0", + "terser": "^5.0.0" } }, "rollup-pluginutils": { @@ -2328,9 +2543,9 @@ "dev": true }, "serialize-javascript": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-3.1.0.tgz", - "integrity": "sha512-JIJT1DGiWmIKhzRsG91aS6Ze4sFUrYbltlkg2onR5OrnNM02Kl/hnY/T4FN2omvyeBbQmMJv+K4cPOpGzOTFBg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", + "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", "dev": true, "requires": { "randombytes": "^2.1.0" @@ -2570,9 +2785,9 @@ } }, "terser": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.0.tgz", - "integrity": "sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.3.1.tgz", + "integrity": "sha512-yD80f4hdwCWTH5mojzxe1q8bN1oJbsK/vfJGLcPZM/fl+/jItIVNKhFIHqqR71OipFWMLgj3Kc+GIp6CeIqfnA==", "dev": true, "requires": { "commander": "^2.20.0", diff --git a/package.json b/package.json index a59a0fa9..cc33448e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "wtf_wikipedia", "description": "parse wikiscript into json", - "version": "8.4.0", + "version": "8.5.0", "author": "Spencer Kelly (http://spencermounta.in)", "repository": { "type": "git", @@ -57,15 +57,15 @@ }, "dependencies": {}, "devDependencies": { - "@babel/core": "7.10.4", - "@babel/preset-env": "7.10.4", + "@babel/core": "7.11.6", + "@babel/preset-env": "7.11.5", "@rollup/plugin-alias": "3.1.1", - "amble": "1.0.0", - "rollup": "2.21.0", + "amble": "1.1.0", + "rollup": "2.26.11", "rollup-plugin-babel": "4.4.0", "rollup-plugin-commonjs": "10.1.0", "rollup-plugin-filesize-check": "0.0.1", - "rollup-plugin-terser": "6.1.0", + "rollup-plugin-terser": "7.0.2", "shelljs": "0.8.4", "tap-dancer": "0.2.0", "tape": "5.0.1" diff --git a/src/_fetch/_headers.js b/src/_fetch/_headers.js index 5d6830c7..63039e94 100644 --- a/src/_fetch/_headers.js +++ b/src/_fetch/_headers.js @@ -1,18 +1,12 @@ -const makeHeaders = function(options) { +const makeHeaders = function (options) { let agent = - options.userAgent || - options['User-Agent'] || - options['Api-User-Agent'] || - 'User of the wtf_wikipedia library' + options.userAgent || options['User-Agent'] || options['Api-User-Agent'] || 'User of the wtf_wikipedia library' let origin if (options.noOrigin) { origin = '' } else { - origin = - options.origin || - options.Origin || - '*' + origin = options.origin || options.Origin || '*' } const opts = { @@ -21,11 +15,10 @@ const makeHeaders = function(options) { 'Content-Type': 'application/json', 'Api-User-Agent': agent, 'User-Agent': agent, - Origin: origin + Origin: origin, }, - redirect: 'follow' + redirect: 'follow', } - console.log(opts) return opts } module.exports = makeHeaders diff --git a/src/_version.js b/src/_version.js index 535368a2..0569bb9b 100644 --- a/src/_version.js +++ b/src/_version.js @@ -1 +1 @@ -module.exports = '8.4.0' \ No newline at end of file +module.exports = '8.5.0' \ No newline at end of file diff --git a/tests/fetch/array.test.js b/tests/fetch/array.test.js index bda04091..4ac1b965 100644 --- a/tests/fetch/array.test.js +++ b/tests/fetch/array.test.js @@ -2,17 +2,17 @@ const test = require('tape') const wtf = require('../lib') function delay(time) { - return new Promise(function(resolve, reject) { - setTimeout(function() { + return new Promise(function (resolve) { + setTimeout(function () { resolve() }, time) }) } -test('test-array', async function(t) { +test('test-array', async function (t) { let arr = [ ['Toronto', 'Montreal'], - ['R', 'π'] + ['R', 'π'], ] for (const a of arr) { let docs = await wtf.fetch(a) diff --git a/tests/fetch/fetch.test.js b/tests/fetch/fetch.test.js index ed4ea706..cef1383b 100644 --- a/tests/fetch/fetch.test.js +++ b/tests/fetch/fetch.test.js @@ -1,22 +1,22 @@ var test = require('tape') var wtf = require('../lib') -test('fetch-as-promise', t => { +test('fetch-as-promise', (t) => { t.plan(1) var p = wtf.fetch('Tony Hawk', 'en', { - 'Api-User-Agent': 'wtf_wikipedia test script - ' + 'Api-User-Agent': 'wtf_wikipedia test script - ', }) - p.then(function(doc) { + p.then(function (doc) { t.ok(doc.sections().length > 0, 'promise returned document') }) - p.catch(function(e) { + p.catch(function (e) { t.throw(e) }) }) -test('fetch-as-callback', t => { +test('fetch-as-callback', (t) => { t.plan(1) - wtf.fetch('Tony Danza', 'en', function(err, doc) { + wtf.fetch('Tony Danza', 'en', function (err, doc) { if (err) { t.throw(err) } @@ -24,80 +24,79 @@ test('fetch-as-callback', t => { }) }) -test('fetch-invalid', t => { +test('fetch-invalid', (t) => { t.plan(1) var p = wtf.fetch('Taylor%20Swift', 'en', { - 'Api-User-Agent': 'wtf_wikipedia test script - ' + 'Api-User-Agent': 'wtf_wikipedia test script - ', }) - p.then(function(doc) { + p.then(function (doc) { t.ok(doc === null, 'invalid character query returns null') }) - p.catch(function(e) { + p.catch(function (e) { t.throw(e) }) }) -test('fetch-missing', t => { +test('fetch-missing', (t) => { t.plan(1) var p = wtf.fetch('NonExistentPage', 'en', { - 'Api-User-Agent': 'wtf_wikipedia test script - ' + 'Api-User-Agent': 'wtf_wikipedia test script - ', }) - p.then(function(doc) { + p.then(function (doc) { t.ok(doc === null, 'fetching non-existent page returns null') }) - p.catch(function(e) { + p.catch(function (e) { t.throw(e) }) }) -test('fetch-redirect', t => { +test('fetch-redirect', (t) => { t.plan(1) var p = wtf.fetch('USA', { lang: 'simple', follow_redirects: false, - 'Api-User-Agent': 'wtf_wikipedia test script - ' + 'Api-User-Agent': 'wtf_wikipedia test script - ', }) - p.then(function(doc) { + p.then(function (doc) { t.ok(doc.isRedirect(), 'got redirect') }) - p.catch(function(e) { + p.catch(function (e) { t.throw(e) }) }) -test('fetch-alternate-wiki', t => { +test('fetch-alternate-wiki', (t) => { t.plan(1) var p = wtf.fetch(336711, 'en', { 'Api-User-Agent': 'wtf_wikipedia test script - ', domain: 'www.mixesdb.com', - path: 'db/api.php' + path: 'db/api.php', }) - p.then(function(doc) { + p.then(function (doc) { t.ok(doc.sections().length > 0, 'alternate wiki returned document') }) - p.catch(function(e) { + p.catch(function (e) { t.throw(e) }) }) -test('fetch-alternate-wiki-with-no-origin', t => { +test('fetch-alternate-wiki-with-no-origin', (t) => { t.plan(1) var p = wtf.fetch('Abyssal whip', { 'Api-User-Agent': 'wtf_wikipedia test script - ', domain: 'oldschool.runescape.wiki', - noOrigin: true + noOrigin: true, }) - p.then(function(doc) { - console.log(doc) + p.then(function (doc) { t.ok(doc.sections().length > 0, 'alternate wiki different origin success') }) - p.catch(function(e) { + p.catch(function (e) { t.throw(e) }) }) //uncomment for testing on node>6 -test('ambiguous-pageids', async function(t) { +test('ambiguous-pageids', async function (t) { var doc = await wtf.fetch(1984, 'en') t.equal(doc.title(), 'Arab world', 'input as pageid') @@ -116,23 +115,23 @@ test('ambiguous-pageids', async function(t) { t.end() }) -test('intensive', t => { +test('intensive', (t) => { /* fires a bunch of requests in parallel - this should be enough to get blocked by wikipedia if the user agent is not set correctly */ var pages = ['Mouse', 'Rat', 'Porcupine', 'Chipmunk', 'Vole', 'Chinchilla', 'Gopher', 'Capybara', 'Beaver', 'Hamster'] t.plan(pages.length) - var promises = pages.map(page => + var promises = pages.map((page) => wtf.fetch(page, 'en', { - 'Api-User-Agent': 'wtf_wikipedia test script - ' + 'Api-User-Agent': 'wtf_wikipedia test script - ', }) ) Promise.all(promises) - .then(results => { - results.forEach(result => { + .then((results) => { + results.forEach((result) => { t.ok(result.title(), 'got a page') }) t.end() }) - .catch(e => { + .catch((e) => { t.error(e, e) }) })