mirror of
https://scm.univ-tours.fr/22107988t/rappaurio-sae501_502.git
synced 2025-08-29 01:55:58 +02:00
3 lines
90 KiB
JavaScript
3 lines
90 KiB
JavaScript
"use strict";function _interopDefault(t){return t&&"object"==typeof t&&"default"in t?t.default:t}function trimWrappers(t){return t.replace(/\[\[/g,"").replace(/\]\]/g,"").replace(/\{\{/g,"").replace(/\}\}/g,"").trim()}function trimOr(t){var e=t.indexOf("|");return-1!==e?t.substring(0,e):t}function getValue(t,e){if(!t)return null;var r=t.trim().replace(/File:/,"").replace(/\{\{\d+\}\}/g,"").replace(extraPropertyPattern,"").replace(endingPattern,"");if("y"===r||"yes"===r)return!0;if("birthPlace"==e)return t.trim();var a=r.match(linksPattern);return a?a[0].split(linkSeparatorPattern).filter(function(t){return t}):trimOr(trimWrappers(r))}function dataType(t){var e=t.globalPattern,r=t.parsePattern,a=t.parse,n=t.variable,l=t.name;return function(t){var i=t.match(e);if(!i){var s;return s={},defineProperty(s,l,[]),defineProperty(s,"sourceAfter",t),s}var o=i.map(function(t){return a(t.match(r))}),u=i.reduce(function(t,e,r){return o[r]===DO_NOT_REPLACE?t:t.replace(e,"$"+n+"_"+r)},t);return{data:defineProperty({},l,o),sourceAfter:u}}}function byDataHandler(t,e){var r=t.source,a=t.context,n=e(r),l=n.data,i=n.sourceAfter;return{context:Object.assign({},a,l),source:i}}function extractData(t){return dataTypes$1.map(function(t){return t.handler}).reduce(byDataHandler,{context:{},source:t})}function findPropertyList(t){var e=t.match(keyValueGlobalPattern);return e?e.map(function(t){var e=keyValuePattern.exec(t);if(!e)return null;var r=slicedToArray(e,3),a=r[1],n=r[2],l=camelCase(a.trim());return{key:l,value:getValue(n,l)}}).filter(function(t){return t}):[]}function fillVariable(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=r.simplifyDataValues;if("string"!=typeof t)return console.log("Warning: Something went wrong. Could not fill variables in: ("+(void 0===t?"undefined":_typeof(t))+") "+JSON.stringify(t)),{};var n=dataTypes$1.find(function(e){return t.match(e.pattern)});if(n){var l=n.pattern.exec(t),i=slicedToArray(l,2),s=i[0],o=i[1],u=e[n.name][parseInt(o,10)];return a||"string"!=typeof u?u:t.replace(s,u)}return t}function fillVariables(t,e,r){if(void 0===t)return t;if(t instanceof Date)return t;if("number"==typeof t)return t;if(Array.isArray(t))return t.map(function(t){return fillVariables(t,e,r)});if("object"===(void 0===t?"undefined":_typeof(t)))return Object.keys(t).reduce(function(a,n){return Object.assign(a,defineProperty({},n,fillVariables(t[n],e,r)))},{});var a=fillVariable(t,e,r);return a===t?t:fillVariables(a,e,r)}function handleSmallData(t,e,r){var a=r.simplifyDataValues;if("string"==typeof t&&t.match(smallDataType.pattern)){var n=t.replace(smallDataType.pattern,"").replace(/,/,"").trim(),l=smallDataType.pattern.exec(t),i=slicedToArray(l,2),s=i[1],o=e[smallDataType.name][parseInt(s,10)],u={primary:getVariableValue(n,e,{simplifyDataValues:a}),secondary:getVariableValue(o,e,{simplifyDataValues:a})};return a?u.primary:u}return null}function getVariableValue(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=r.simplifyDataValues,n=handleSmallData(t,e,{simplifyDataValues:a});return n||fillVariables(t,e,{simplifyDataValues:a})}function reduceVariable(t,e,r,a){if(null===e)return null;if("boolean"==typeof e)return e;if(Array.isArray(e))return e.map(function(t){return getVariableValue(t,r,a)});if(t.match(/areaTotal/)||t.match(/population/)){var n=numberParse(e);if(!1===n&&(n=parseFloat(e,10)),!isNaN(n))return n}if(t.match(/date/i)){var l=+new Date(e);if(!isNaN(l))return new Date(e)}var i=getVariableValue(e,r,a);return Array.isArray(i)?i.map(function(t){return getVariableValue(t,r,a)}):i}function byVariableReduction(t,e){return function(r,a){var n=a.key,l=a.value,i=reduceVariable(n,l,t,e);return""===i||null===i?r:Object.assign({},r,defineProperty({},n,i))}}function extractProperties(t){var e=t.source,r=t.context,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=a.simplifyDataValues,l=void 0===n||n;return findPropertyList(e).reduce(byVariableReduction(r,{simplifyDataValues:l}),{})}function transformProperties(t){return Object.keys(t).reduce(function(e,r){var a=t[r],n=r.match(blankNamePattern);if(n){var l=n[1]||"",i=t["blank"+l+"NameSec2"],s=t["blank"+l+"InfoSec2"];return"string"!=typeof i?e:Object.assign(e,defineProperty({},camelCase(i),s))}return r.match(blankInfoPattern)?e:Object.assign(e,defineProperty({},r,a))},{})}function findOuterIndex(t){for(var e=[],r=0;r<t.length-1;r++){var a=t.substr(r,2);if("{{"!==a){if("}}"===a){e.pop();if(0===e.length)return r+2;r++}}else e.push(r),r++}}function parse(t){var e=t.match(infoBoxStartPattern);if(!e)return{data:t,sourceLeft:null};var r=e.index,a=t.substring(r),n=findOuterIndex(a);if(!n)return{data:t,sourceLeft:null};var l=a.substring(0,n),i=t.substring(n);return{data:l,sourceLeft:!i.match(infoBoxStartPattern)?null:i}}function extractInfoboxes(t){for(var e=parse(t),r=[e.data];e.sourceLeft;)e=parse(e.sourceLeft),r.push(e.data);return r}function cleanSource(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.removeSmall,a=void 0!==r&&r,n=e.removeReferences;return(void 0===n||n)&&(t=t.replace(/<ref(\s\w+=[^>]+)?>.*<\/ref>/g,"").replace(/<ref(\s\w+=[^>]+)?\s?\/>/g,"")),a&&(t=t.replace(/<small>.*<\/small>/g,"")),t.replace(/'''?/g,"").replace(/\|display=inline/g,"").replace(/<br\s?\/?>/g,",").replace(/−/g,"-").replace(/<sup>/g,"^").replace(/\{\{sfn\|([^\}\}]+)\}\}/g,"").replace(/\{\{efn\|([^\}\}]+)\}\}/g,"").replace(/−/g,"-").replace(/<\/sup>/g,"").replace(/\{\{\s*nowrap\s*\|([^\n\}]+)\}\}/gi,"$1").replace(/<!--([\s\S]*?)-->/g,"").replace(/ /g," ").replace("|''See list''","")}function transformRowSpan(t){return t.map(transformCells).reduce(function(t,e,r){for(var a=0===r?0:1,n=0;n<e.length;n++)t[n+a]||(t[n+a]={}),e[n]&&(t[n+a][e[n]]=1);return t},[]).map(function(t){return Object.keys(t).join(",")}).join(" || ")}function clean(t){return t.substring(2,t.length-2).replace(linkPattern$1,function(t,e){return e.split("|")[0]}).replace(/'''?/g,"")}function parseRow(t){var e=t[0].match(/BS(\d)/),r=t[0].substring(2),a=1,n=[],l=1;for(e&&(a=e[1],r=t[0].substring(3));l<=a;l++)n.push(t[l]);return{type:r,margin:t[l++],text1:t[l++],text2:t[l++],comment:t[l++],icons:n}}function getMatches(t,e){for(var r=void 0,a=[];null!==(r=e.exec(t));)a.push({value:r[1]&&r[1].trim(),start:r.index,end:r.index+r[0].length});return a}function parseTableData(t){var e=t.match(rowPattern$1);return e?e.map(function(t){var e=t.match(rowPatternSingle);return slicedToArray(e,2)[1].trim().split("|").slice(1)}):[]}function getTables(t){var e=getMatches(t,tableStartPattern$1),r=getMatches(t,tableEndPattern$1);return e.map(function(e,a){var n=r[a];if(!n)throw new Error("[Table Parsing] Failed to pair table");return{rows:parseTableData(t.substring(e.end,n.start).trim().replace(/'''/g,"")),start:e.start,end:n.end}})}function last(t){return t.length?t[t.length-1]:void 0}function parseInfobox(t,e){var r=extractInfoboxes(t).map(function(t){return transformProperties(extractProperties(extractData(cleanSource(t,e)),e))});if(!r.length)return{};var a={general:r.shift()};return r.forEach(function(t){var e=t.type;e?a[camelCase(e)]=t:Object.assign(a,{general:Object.assign({},a.general,t)})}),a.tables=parseTables(t),a.bsTables=parseBsTables(t),a.lists=parseLists(t),a}var camelCase=_interopDefault(require("camelcase")),_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},defineProperty=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},slicedToArray=function(){function t(t,e){var r=[],a=!0,n=!1,l=void 0;try{for(var i,s=t[Symbol.iterator]();!(a=(i=s.next()).done)&&(r.push(i.value),!e||r.length!==e);a=!0);}catch(t){n=!0,l=t}finally{try{!a&&s.return&&s.return()}finally{if(n)throw l}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),toConsumableArray=function(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)},smallGlobalPattern=/\{\{small\|([^\}\}]+)\}\}/g,smallPattern=/small\|([^\}\}]+)\}\}/,small={globalPattern:smallGlobalPattern,parsePattern:smallPattern,parse:function(t){return slicedToArray(t,2)[1]},variable:"SMALL",name:"smalls"},flagGlobalPattern=/\{\{flag\|([^\}\}]+)\}\}/g,flagPattern=/flag\|([^\}\}]+)\}\}/,flag={globalPattern:flagGlobalPattern,parsePattern:flagPattern,parse:function(t){return slicedToArray(t,2)[1]},variable:"FLAG",name:"flags"},coordsGlobalPattern=/\{\{coord\|([^\}\}]+)\}\}/g,coordsPattern=/coord\|([^\}\}]+)\}\}/,coords={globalPattern:coordsGlobalPattern,parsePattern:coordsPattern,parse:function(t){return slicedToArray(t,2)[1]},variable:"COORD",name:"coords"},globalPattern=/\[\[([^\]\|]+)\|?([^\]]+)?\]\]/g,pattern=/\[\[([^\]\|]+)\|?([^\]]+)?\]\]/,instances={globalPattern:globalPattern,parsePattern:pattern,parse:function(t){var e=slicedToArray(t,3),r=e[1],a=e[2];return r||a},variable:"INSTANCE",name:"instances"},extraPropertyPattern=/\n?\s?\|\s?\w+$/,endingPattern=/\n\}\}$/,linksPattern=/((\$\w+_\d+)\s*,?\s*){2,}/g,linkSeparatorPattern=/[,\s?]/g,listItemPrefixPattern=/^\|\s?/,unbulletedListGlobalPattern=/\{\{(?:unbulleted list|ubl|ubt|ublist|unbullet)\s?\|([^\}\}]+)\}\}/gi,unbulletedListItemPattern=/\|\s*([^|}]+)/g,unbulletedLists={globalPattern:unbulletedListGlobalPattern,parsePattern:unbulletedListItemPattern,parse:function(t){return t?t.map(function(t){return t.replace(listItemPrefixPattern,"").trim()}).filter(function(t){return t&&t.length}):[]},variable:"UNBULLETED_LIST",name:"unbulletedLists"},listItemPrefixPattern$1=/^\*\s*/,plainListGlobalPattern=/\n(\*\s*[^*|]+)+/g,plainListItemPattern=/\*\s*([^*|]+)/g,unmarkedLists={globalPattern:plainListGlobalPattern,parsePattern:plainListItemPattern,parse:function(t){return t?t.map(function(t){return t.replace(listItemPrefixPattern$1,"").trim()}).filter(function(t){return t&&t.length}):[]},variable:"UNMARKED_LIST",name:"unmarkedLists"},listItemPrefixPattern$2=/^\*\s?/,plainListGlobalPattern$1=/\{\{f?p?P?l?a?i?n?t?\s?list\s?\|([^\}\}]+)\}\}/g,plainListItemPattern$1=/\*\s*([^*}]+)/g,plainLists={globalPattern:plainListGlobalPattern$1,parsePattern:plainListItemPattern$1,parse:function(t){return t?t.map(function(t){return t.replace(listItemPrefixPattern$2,"").trim()}).filter(function(t){return t&&t.length}):[]},variable:"PLAIN_LIST",name:"plainLists"},marriageGlobalPattern=/\{\{Marriage\|([^\}\}]+)\}\}/gi,marriagePattern=/Marriage\|([^|]+)\|(.*)\}\}/i,marriages={globalPattern:marriageGlobalPattern,parsePattern:marriagePattern,parse:function(t){var e=slicedToArray(t,3);return{who:e[1],married:e[2]}},variable:"MARRIAGE",name:"marriages"},nbayGlobalPattern=/\{\{nbay\|([^\}\}]+)\}\}/gi,nbayPattern=/nbay\|([^|]+)\|(.*)\}\}/i,nbay={globalPattern:nbayGlobalPattern,parsePattern:nbayPattern,parse:function(t){var e=slicedToArray(t,3),r=e[1];e[2];return r},variable:"nbay",name:"nbay"},otherGlobalPattern=/\{\{([^|\n]+)\|([^|\n]+)\|?([^\}\n]+)?\}\}/g,otherPattern=/\{\{([^|\n]+)\|([^|\n]+)\|?([^\}\n]+)?\}\}/,other={globalPattern:otherGlobalPattern,parsePattern:otherPattern,parse:function(t){var e=slicedToArray(t,4),r=e[1];e[2],e[3];return r},variable:"OTHER",name:"others"},hlistGlobalPattern=/\{\{hlist\|([^\}\}]+)\}\}/gi,hlistPattern=/hlist\|(.*)\n?\}\}/i,hlist={globalPattern:hlistGlobalPattern,parsePattern:hlistPattern,parse:function(t){return slicedToArray(t,2)[1].split("|")},variable:"HLIST",name:"hlists"},birthDateGlobalPattern=/\{\{birth\sdate([^\}\}]+)\}\}/gi,birthDatePattern=/(\d+)\|(\d+)\|(\d+)/,millisInYear=31536e6,birthDates={globalPattern:birthDateGlobalPattern,parsePattern:birthDatePattern,parse:function(t){var e=slicedToArray(t,4),r=e[1],a=e[2],n=e[3],l=new Date(r,a-1,n);return{date:l,age:Math.floor((Date.now()-+l)/millisInYear)}},variable:"BIRTH_DATE",name:"birthDates"},DO_NOT_REPLACE=Symbol("DO NOT REPLACE"),labeledDateGlobalPattern=/\{\{([^\n\}\}]+)\}\}/g,labeledDatePattern=/(.*)/,labeledDates={globalPattern:labeledDateGlobalPattern,parsePattern:labeledDatePattern,parse:function(t){var e=t[0].indexOf("|");if(e>-1){var r=t[0].substring(e+1).slice(0,-2),a=new Date(r+" GMT");if(!isNaN(a.getTime()))return{date:a};if(a=new Date(r.split("|").join("-")+" GMT"),!isNaN(a.getTime()))return{date:a}}return DO_NOT_REPLACE},variable:"LABELED_DATE",name:"labeledDates"},deathDateGlobalPattern=/\{\{death\sdate\sand\sage([^\}\}]+)\}\}/gi,deathDatePattern=/(\d+)\|(\d+)\|(\d+)\|(\d+)\|?(\d+)?\|?(\d+)?/,millisInYear$1=31536e6,deathDates={globalPattern:deathDateGlobalPattern,parsePattern:deathDatePattern,parse:function(t){var e=slicedToArray(t,7),r=e[1],a=e[2],n=e[3],l=e[4],i=e[5],s=void 0===i?0:i,o=e[6],u=void 0===o?0:o,c=new Date(r,a-1,n),f=new Date(l,s-1,u);return{date:c,age:Math.floor((Number(c)-Number(f))/millisInYear$1)}},variable:"DEATH_DATE",name:"deathDates"},URLGlobalPattern=/\{\{URL\|([^\}\}]+)\}\}/g,URLPattern=/URL\|([^\}\}]+)\}\}/,url={globalPattern:URLGlobalPattern,parsePattern:URLPattern,parse:function(t){return slicedToArray(t,2)[1]},variable:"URL",name:"urls"},websiteGlobalPattern=/\[(https?):\/\/((?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6})\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)\s+([\w\s]+)\]/g,websitePattern=/\[(https?):\/\/((?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6})\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)\s+([\w\s]+)\]/,website={globalPattern:websiteGlobalPattern,parsePattern:websitePattern,parse:function(t){var e=slicedToArray(t,5),r=e[1],a=e[2],n=e[3];return{protocol:r,hostname:a,path:n,title:e[4],url:r+"://"+a+n}},variable:"WEBSITE",name:"websites"},globalPattern$1=/\{\{Extra[^}}]+\}\}/gi,parsePattern=/\|\s?(\w+)\s+=\s+(.+)/g,propPattern=/\|\s?(\w+)\s+=\s+(.+)/,extra={globalPattern:globalPattern$1,parsePattern:parsePattern,parse:function(t){return t.reduce(function(t,e){var r=e.match(propPattern),a=slicedToArray(r,3),n=a[1],l=a[2];return t[n]=l,t},{})},variable:"EXTRA",name:"extra"},convertGlobalPattern=/\{\{convert\|([\d\.]+)\|(\w+)/g,convertPattern=/\{\{convert\|([\d\.]+)\|(\w+)/,convert={globalPattern:convertGlobalPattern,parsePattern:convertPattern,parse:function(t){var e=slicedToArray(t,3);return e[1]+" "+e[2]},variable:"CONVERT",name:"converts"},filmDatesPattern=/\{\{film\sdate([^\}\}]+)\}\}/gi,filmDatePatternGlobal=/(\d+)\|?(\d+)\|?(\d+)\|?([^\|\}]*)\|?(ref\d+=([^\|\}]*))?/g,filmDatePattern=/(\d+)\|?(\d+)\|?(\d+)\|?([^\|\}]*)\|?(ref\d+=([^\|\}]*))?/,filmDates={globalPattern:filmDatesPattern,parsePattern:filmDatePatternGlobal,parse:function(t){return t.map(function(t){var e=t.match(filmDatePattern),r=slicedToArray(e,7),a=(r[0],r[1]),n=r[2],l=r[3],i=r[4],s=(r[5],r[6]);return{date:new Date(a,n&&n-1,l),location:i,ref:s}})},variable:"FILM_DATES",name:"filmDates"},otherGlobalPattern$1=/<ref(\s\w+=[^>]+)?>(.*)<\/ref>/g,otherPattern$1=/<ref(\s\w+=[^>]+)?>(.*)<\/ref>/,attributeGlobalPattern=/(\w+)=(["\w]+)/g,attributePattern=/(\w+)=(["\w]+)/,ref1={globalPattern:otherGlobalPattern$1,parsePattern:otherPattern$1,parse:function(t){var e=slicedToArray(t,3),r=(e[0],e[1]),a=e[2];return{attributes:((r||"").match(attributeGlobalPattern)||[]).reduce(function(t,e){if(e){var r=e.match(attributePattern),a=slicedToArray(r,3),n=(a[0],a[1]),l=a[2];t[n]=l.replace(/"/g,"")}return t},{}),contents:a}},variable:"REF",name:"refs"},otherGlobalPattern$2=/<ref(\s\w+=[^>]+)?\/>/g,otherPattern$2=/<ref(\s\w+=[^>]+)?\/>/,attributeGlobalPattern$1=/(\w+)=(["\w]+)/g,attributePattern$1=/(\w+)=(["\w]+)/,ref2={globalPattern:otherGlobalPattern$2,parsePattern:otherPattern$2,parse:function(t){return{attributes:t[1].match(attributeGlobalPattern$1).reduce(function(t,e){var r=e.match(attributePattern$1),a=slicedToArray(r,3),n=(a[0],a[1]),l=a[2];return t[n]=l.replace(/"/g,""),t},{})}},variable:"REF",name:"refs"},globalPattern$2=/\{\{formatnum:\d+\}\}/gi,parsePattern$1=/\{\{formatnum:(\d+)\}\}/,formatNum={globalPattern:globalPattern$2,parsePattern:parsePattern$1,parse:function(t){var e=slicedToArray(t,2),r=e[1];return parseFloat(r)},variable:"FORMAT_NUM",name:"formatNum"},dataTypes=[instances,ref1,ref2,small,formatNum,flag,coords,marriages,birthDates,labeledDates,deathDates,unbulletedLists,website,hlist,url,convert,nbay,filmDates,other,extra,plainLists,unmarkedLists],dataTypes$1=dataTypes.map(function(t){return{handler:dataType(t),name:t.name,pattern:new RegExp("\\$"+t.variable+"_(\\d+)")}}),keyValueGlobalPattern=/\|\s*([-'\u0400-\u04FF\w\s]+)\s*=\s*([^|]+)?/g,keyValuePattern=/\|\s*([-'\u0400-\u04FF\w\s]+)\s*=\s*([^|]+)?/,numberParse=function(t){return"string"==typeof t&&(t=t.trim().replace(/ /g,""),t.match(/,/)&&t.match(/\./)?t.indexOf(",")<t.indexOf(".")?parseEnglish(t):parseSpanish(t):t.match(/,/)&&!t.match(/\./)?t.match(/,/g).length>1?parseEnglish(t):t.match(/,[0-9]{3}($|^[0-9])/)?parseEnglish(t):parseSpanish(t):!t.match(/,/)&&t.match(/\./)?t.match(/\./g).length>1?parseSpanish(t):t.match(/\.[0-9]{3}($|^[0-9])/)?parseSpanish(t):parseEnglish(t):(+t).toString()===t&&+t)},parseEnglish=function(t){return+t.replace(/,/g,"")},parseSpanish=function(t){return+t.replace(/\./g,"").replace(/,/g,".")},smallDataType=dataTypes$1.find(function(t){return"smalls"===t.name}),blankNamePattern=/blank(\d+)?NameSec2/,blankInfoPattern=/blank(\d+)?InfoSec2/,infoBoxStartPattern=/{{\w*box/,tableStartPattern=/{\|(.*)\n?/,tableEndPattern=/\n\|}/,headersPattern=/!\s?(.*)/g,rowPattern=/\|-/,cellSeparatorPattern=/(?:\n\|)|(?:\|\|)/,linkPattern=/\[\[([^\]]+)\]\]/g,linkNamePattern=/^.*\|/,inlineHeaderPattern="!!",actionPattern=/{{anchor\|(.*)}}/g,rowSpanCountPattern=/rowspan="(\d+)"/,stripLinks=function(t){return t.replace(linkPattern,function(t,e){return e.replace(linkNamePattern,"").trim()||e})},removeActions=function(t){return t.replace(actionPattern,"")},transformCell=function(t){return stripLinks(removeActions(t||"")).replace(rowSpanCountPattern,"").replace(linkNamePattern,"").trim()},transformCells=function(t){return t.split(cellSeparatorPattern).map(transformCell)},findIndex=function(t,e){var r=t.match(e);return r?r.index:-1},findTableStart=function(t){var e=t.match(tableStartPattern);return e?e.index+e[0].length:-1},findTableEnd=function(t){return findIndex(t,tableEndPattern)},getHeaders=function(t){for(var e=[],r=void 0;r=headersPattern.exec(t);)e.push.apply(e,toConsumableArray(r[1].split(inlineHeaderPattern).map(transformCell)));return e},getRows=function(t){var e=t.split(rowPattern).map(function(t){return t.replace(/^.*\n+?\|/,"").trim()}).filter(function(t){return t}),r=[],a=0,n=0,l=[],i=!0,s=!1,o=void 0;try{for(var u,c=e[Symbol.iterator]();!(i=(u=c.next()).done);i=!0){var f=u.value,p=f.match(rowSpanCountPattern);p&&(a=0,n=parseInt(p[1]),l=[]),a<n?(l.push(f),++a===n&&r.push(transformRowSpan(l))):r.push(f)}}catch(t){s=!0,o=t}finally{try{!i&&c.return&&c.return()}finally{if(s)throw o}}return r},getNextTable=function(t,e,r){var a=t,n=findTableStart(a);if(-1===n)return null;a=a.substring(n);var l=findTableEnd(a);if(-1===l)return null;a=a.substring(0,l);var i=getRows(a);if(!i.length)return null;var s=getHeaders(i[0]);return s.length?{data:i.slice(1).map(transformCells).map(function(t){return s.reduce(function(a,n,l){return a[camelCase(fillVariable(n,e,r))]=fillVariables(t[l],e,r),a},{})}),end:n+l}:null},parseTables=function(t,e){for(var r=cleanSource(t,e),a=extractData(r),n=[],l=a.source,i=null;i=getNextTable(l,a.context,e);){if(!i)return n;n.push(i.data),l=l.substring(i.end)}return n},linkPattern$1=/\[\[([^\]]+)\]\]/g,kmPattern=/{{BSkm\|([\dx]+,[\dx]+)\|([\dx]+,[\dx]+)}}/g,parseBsTables=function(t){var e=t.replace(kmPattern,"$1/$2").match(/{{BS([^}}]+)}}/g);return e?e.map(function(t){return clean(t).split("|")}).map(parseRow).filter(function(t){return"-"!==t.type[0]}):null},headingPattern=/[^=]==\s?([\w\s]+)\s?==/g,subheadingPattern=/===([\w\s]+)===/g,tableStartPattern$1=/{{list.+start.*}}/gi,tableEndPattern$1=/{{list.+end.*}}/gi,rowPattern$1=/{{(.*)}}/g,rowPatternSingle=/{{(.*)}}/,parseLists=function(t){var e=getMatches(t,headingPattern),r=getMatches(t,subheadingPattern),a=getTables(t);return a.forEach(function(t){var a=e.filter(function(e){return e.end<t.start}).map(function(t){return t.value});t.heading=last(a);var n=r.filter(function(e){return e.end<t.start}).map(function(t){return t.value});t.subheading=last(n),delete t.start,delete t.end}),a};module.exports=parseInfobox;
|
||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVuZGxlLm1pbi5qcyIsInNvdXJjZXMiOlsiLi4vdXRpbC9nZXRWYWx1ZS5qcyIsIi4uL2RhdGEtdHlwZXMvZGF0YVR5cGUuanMiLCIuLi91dGlsL2V4dHJhY3REYXRhLmpzIiwiLi4vdXRpbC9wcm9wZXJ0eUxpc3QuanMiLCIuLi91dGlsL2ZpbGxWYXJpYWJsZXMuanMiLCIuLi91dGlsL2V4dHJhY3RQcm9wZXJ0aWVzLmpzIiwiLi4vdXRpbC90cmFuc2Zvcm1Qcm9wZXJ0aWVzLmpzIiwiLi4vdXRpbC9leHRyYWN0SW5mb2JveGVzLmpzIiwiLi4vdXRpbC9jbGVhblNvdXJjZS5qcyIsIi4uL3V0aWwvcGFyc2VUYWJsZXMuanMiLCIuLi91dGlsL3BhcnNlQnNUYWJsZXMuanMiLCIuLi91dGlsL3BhcnNlTGlzdHMuanMiLCIuLi9pbmRleC5qcyIsIi4uL2RhdGEtdHlwZXMvc21hbGwuanMiLCIuLi9kYXRhLXR5cGVzL2ZsYWcuanMiLCIuLi9kYXRhLXR5cGVzL2Nvb3Jkcy5qcyIsIi4uL2RhdGEtdHlwZXMvaW5zdGFuY2VzLmpzIiwiLi4vZGF0YS10eXBlcy91bmJ1bGxldGVkTGlzdHMuanMiLCIuLi9kYXRhLXR5cGVzL3VubWFya2VkTGlzdHMuanMiLCIuLi9kYXRhLXR5cGVzL3BsYWluTGlzdHMuanMiLCIuLi9kYXRhLXR5cGVzL21hcnJpYWdlcy5qcyIsIi4uL2RhdGEtdHlwZXMvb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