From 1ab21f71ff2353969e415e38842e766af1fd64c9 Mon Sep 17 00:00:00 2001 From: Justin Date: Fri, 5 Jun 2015 16:18:48 +0000 Subject: [PATCH] v0.1.2; fix fmp tree bug --- genscrape.js | 2 +- package.json | 4 ++-- src/scrapers/findmypast-tree/index.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/genscrape.js b/genscrape.js index fd04faf..36c675c 100644 --- a/genscrape.js +++ b/genscrape.js @@ -4,4 +4,4 @@ return wrapper instanceof LazyWrapper?wrapper.clone():new LodashWrapper(wrapper.__wrapped__,wrapper.__chain__,arrayCopy(wrapper.__actions__))}function chunk(array,size,guard){if(guard?isIterateeCall(array,size,guard):size==null){size=1}else{size=nativeMax(+size||1,1)}var index=0,length=array?array.length:0,resIndex=-1,result=Array(ceil(length/size));while(index=120?createCache(argsIndex&&value):null)}}argsLength=args.length;var array=args[0],index=-1,length=array?array.length:0,result=[],seen=caches[0];outer:while(++index-1){splice.call(array,fromIndex,1)}}return array}function pullAt(array){return basePullAt(array||[],baseFlatten(arguments,false,false,1))}function remove(array,predicate,thisArg){var index=-1,length=array?array.length:0,result=[];predicate=getCallback(predicate,thisArg,3);while(++index>>0,result=Array(length);while(++index-1?collection[index]:undefined}predicate=getCallback(predicate,thisArg,3);return baseFind(collection,predicate,baseEach)}function findLast(collection,predicate,thisArg){predicate=getCallback(predicate,thisArg,3);return baseFind(collection,predicate,baseEachRight)}function findWhere(collection,source){return find(collection,baseMatches(source))}function forEach(collection,iteratee,thisArg){return typeof iteratee=="function"&&typeof thisArg=="undefined"&&isArray(collection)?arrayEach(collection,iteratee):baseEach(collection,bindCallback(iteratee,thisArg,3))}function forEachRight(collection,iteratee,thisArg){return typeof iteratee=="function"&&typeof thisArg=="undefined"&&isArray(collection)?arrayEachRight(collection,iteratee):baseEachRight(collection,bindCallback(iteratee,thisArg,3))}var groupBy=createAggregator(function(result,value,key){if(hasOwnProperty.call(result,key)){result[key].push(value)}else{result[key]=[value]}});function includes(collection,target,fromIndex){var length=collection?collection.length:0;if(!isLength(length)){collection=values(collection);length=collection.length}if(!length){return false}if(typeof fromIndex=="number"){fromIndex=fromIndex<0?nativeMax(length+fromIndex,0):fromIndex||0}else{fromIndex=0}return typeof collection=="string"||!isArray(collection)&&isString(collection)?fromIndex-1:getIndexOf(collection,target,fromIndex)>-1}var indexBy=createAggregator(function(result,value,key){result[key]=value});function invoke(collection,methodName){return baseInvoke(collection,methodName,baseSlice(arguments,2))}function map(collection,iteratee,thisArg){var func=isArray(collection)?arrayMap:baseMap;iteratee=getCallback(iteratee,thisArg,3);return func(collection,iteratee)}var partition=createAggregator(function(result,value,key){result[key?0:1].push(value)},function(){return[[],[]]});function pluck(collection,key){return map(collection,baseProperty(key))}function reduce(collection,iteratee,accumulator,thisArg){var func=isArray(collection)?arrayReduce:baseReduce;return func(collection,getCallback(iteratee,thisArg,4),accumulator,arguments.length<3,baseEach)}function reduceRight(collection,iteratee,accumulator,thisArg){var func=isArray(collection)?arrayReduceRight:baseReduce;return func(collection,getCallback(iteratee,thisArg,4),accumulator,arguments.length<3,baseEachRight)}function reject(collection,predicate,thisArg){var func=isArray(collection)?arrayFilter:baseFilter;predicate=getCallback(predicate,thisArg,3);return func(collection,function(value,index,collection){return!predicate(value,index,collection)})}function sample(collection,n,guard){if(guard?isIterateeCall(collection,n,guard):n==null){collection=toIterable(collection);var length=collection.length;return length>0?collection[baseRandom(0,length-1)]:undefined}var result=shuffle(collection);result.length=nativeMin(n<0?0:+n||0,result.length);return result}function shuffle(collection){collection=toIterable(collection);var index=-1,length=collection.length,result=Array(length);while(++index0){result=func.apply(this,arguments)}else{func=null}return result}}function bind(func,thisArg){var bitmask=BIND_FLAG;if(arguments.length>2){var partials=baseSlice(arguments,2),holders=replaceHolders(partials,bind.placeholder);bitmask|=PARTIAL_FLAG}return createWrapper(func,bitmask,thisArg,partials,holders)}function bindAll(object){return baseBindAll(object,arguments.length>1?baseFlatten(arguments,false,false,1):functions(object))}function bindKey(object,key){var bitmask=BIND_FLAG|BIND_KEY_FLAG;if(arguments.length>2){var partials=baseSlice(arguments,2),holders=replaceHolders(partials,bindKey.placeholder);bitmask|=PARTIAL_FLAG}return createWrapper(key,bitmask,object,partials,holders)}function curry(func,arity,guard){if(guard&&isIterateeCall(func,arity,guard)){arity=null}var result=createWrapper(func,CURRY_FLAG,null,null,null,null,null,arity);result.placeholder=curry.placeholder;return result}function curryRight(func,arity,guard){if(guard&&isIterateeCall(func,arity,guard)){arity=null}var result=createWrapper(func,CURRY_RIGHT_FLAG,null,null,null,null,null,arity);result.placeholder=curryRight.placeholder;return result}function debounce(func,wait,options){var args,maxTimeoutId,result,stamp,thisArg,timeoutId,trailingCall,lastCalled=0,maxWait=false,trailing=true;if(typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT)}wait=wait<0?0:+wait||0;if(options===true){var leading=true;trailing=false}else if(isObject(options)){leading=options.leading;maxWait="maxWait"in options&&nativeMax(+options.maxWait||0,wait);trailing="trailing"in options?options.trailing:trailing}function cancel(){if(timeoutId){clearTimeout(timeoutId)}if(maxTimeoutId){clearTimeout(maxTimeoutId)}maxTimeoutId=timeoutId=trailingCall=undefined}function delayed(){var remaining=wait-(now()-stamp);if(remaining<=0||remaining>wait){if(maxTimeoutId){clearTimeout(maxTimeoutId)}var isCalled=trailingCall;maxTimeoutId=timeoutId=trailingCall=undefined;if(isCalled){lastCalled=now();result=func.apply(thisArg,args);if(!timeoutId&&!maxTimeoutId){args=thisArg=null}}}else{timeoutId=setTimeout(delayed,remaining)}}function maxDelayed(){if(timeoutId){clearTimeout(timeoutId)}maxTimeoutId=timeoutId=trailingCall=undefined;if(trailing||maxWait!==wait){lastCalled=now();result=func.apply(thisArg,args);if(!timeoutId&&!maxTimeoutId){args=thisArg=null}}}function debounced(){args=arguments;stamp=now();thisArg=this;trailingCall=trailing&&(timeoutId||!leading);if(maxWait===false){var leadingCall=leading&&!timeoutId}else{if(!maxTimeoutId&&!leading){lastCalled=stamp}var remaining=maxWait-(stamp-lastCalled),isCalled=remaining<=0||remaining>maxWait;if(isCalled){if(maxTimeoutId){maxTimeoutId=clearTimeout(maxTimeoutId)}lastCalled=stamp;result=func.apply(thisArg,args)}else if(!maxTimeoutId){maxTimeoutId=setTimeout(maxDelayed,remaining)}}if(isCalled&&timeoutId){timeoutId=clearTimeout(timeoutId)}else if(!timeoutId&&wait!==maxWait){timeoutId=setTimeout(delayed,wait)}if(leadingCall){isCalled=true;result=func.apply(thisArg,args)}if(isCalled&&!timeoutId&&!maxTimeoutId){args=thisArg=null}return result}debounced.cancel=cancel;return debounced}function defer(func){return baseDelay(func,1,arguments,1)}function delay(func,wait){return baseDelay(func,wait,arguments,2)}var flow=createComposer();var flowRight=createComposer(true);function memoize(func,resolver){if(typeof func!="function"||resolver&&typeof resolver!="function"){throw new TypeError(FUNC_ERROR_TEXT)}var memoized=function(){var args=arguments,cache=memoized.cache,key=resolver?resolver.apply(this,args):args[0];if(cache.has(key)){return cache.get(key)}var result=func.apply(this,args);cache.set(key,result);return result};memoized.cache=new memoize.Cache;return memoized}function negate(predicate){if(typeof predicate!="function"){throw new TypeError(FUNC_ERROR_TEXT)}return function(){return!predicate.apply(this,arguments)}}function once(func){return before(func,2)}function partial(func){var partials=baseSlice(arguments,1),holders=replaceHolders(partials,partial.placeholder);return createWrapper(func,PARTIAL_FLAG,null,partials,holders)}function partialRight(func){var partials=baseSlice(arguments,1),holders=replaceHolders(partials,partialRight.placeholder);return createWrapper(func,PARTIAL_RIGHT_FLAG,null,partials,holders)}function rearg(func){var indexes=baseFlatten(arguments,false,false,1);return createWrapper(func,REARG_FLAG,null,null,null,indexes)}function spread(func){if(typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT)}return function(array){return func.apply(this,array)}}function throttle(func,wait,options){var leading=true,trailing=true;if(typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT)}if(options===false){leading=false}else if(isObject(options)){leading="leading"in options?!!options.leading:leading;trailing="trailing"in options?!!options.trailing:trailing}debounceOptions.leading=leading;debounceOptions.maxWait=+wait;debounceOptions.trailing=trailing;return debounce(func,wait,debounceOptions)}function wrap(value,wrapper){wrapper=wrapper==null?identity:wrapper;return createWrapper(wrapper,PARTIAL_FLAG,null,[value],[])}function clone(value,isDeep,customizer,thisArg){if(isDeep&&typeof isDeep!="boolean"&&isIterateeCall(value,isDeep,customizer)){isDeep=false}else if(typeof isDeep=="function"){thisArg=customizer;customizer=isDeep;isDeep=false}customizer=typeof customizer=="function"&&bindCallback(customizer,thisArg,1);return baseClone(value,isDeep,customizer)}function cloneDeep(value,customizer,thisArg){customizer=typeof customizer=="function"&&bindCallback(customizer,thisArg,1);return baseClone(value,true,customizer)}function isArguments(value){var length=isObjectLike(value)?value.length:undefined;return isLength(length)&&objToString.call(value)==argsTag||false}var isArray=nativeIsArray||function(value){return isObjectLike(value)&&isLength(value.length)&&objToString.call(value)==arrayTag||false};function isBoolean(value){return value===true||value===false||isObjectLike(value)&&objToString.call(value)==boolTag||false}function isDate(value){return isObjectLike(value)&&objToString.call(value)==dateTag||false}function isElement(value){return value&&value.nodeType===1&&isObjectLike(value)&&objToString.call(value).indexOf("Element")>-1||false}if(!support.dom){isElement=function(value){return value&&value.nodeType===1&&isObjectLike(value)&&!isPlainObject(value)||false}}function isEmpty(value){if(value==null){return true}var length=value.length;if(isLength(length)&&(isArray(value)||isString(value)||isArguments(value)||isObjectLike(value)&&isFunction(value.splice))){return!length}return!keys(value).length}function isEqual(value,other,customizer,thisArg){customizer=typeof customizer=="function"&&bindCallback(customizer,thisArg,3);if(!customizer&&isStrictComparable(value)&&isStrictComparable(other)){return value===other}var result=customizer?customizer(value,other):undefined;return typeof result=="undefined"?baseIsEqual(value,other,customizer):!!result}function isError(value){return isObjectLike(value)&&typeof value.message=="string"&&objToString.call(value)==errorTag||false}var isFinite=nativeNumIsFinite||function(value){return typeof value=="number"&&nativeIsFinite(value)};var isFunction=!(baseIsFunction(/x/)||Uint8Array&&!baseIsFunction(Uint8Array))?baseIsFunction:function(value){return objToString.call(value)==funcTag};function isObject(value){var type=typeof value;return type=="function"||value&&type=="object"||false}function isMatch(object,source,customizer,thisArg){var props=keys(source),length=props.length;customizer=typeof customizer=="function"&&bindCallback(customizer,thisArg,3);if(!customizer&&length==1){var key=props[0],value=source[key];if(isStrictComparable(value)){return object!=null&&value===object[key]&&hasOwnProperty.call(object,key)}}var values=Array(length),strictCompareFlags=Array(length);while(length--){value=values[length]=source[props[length]];strictCompareFlags[length]=isStrictComparable(value)}return baseIsMatch(object,props,values,strictCompareFlags,customizer)}function isNaN(value){return isNumber(value)&&value!=+value}function isNative(value){if(value==null){return false}if(objToString.call(value)==funcTag){return reNative.test(fnToString.call(value))}return isObjectLike(value)&&reHostCtor.test(value)||false}function isNull(value){return value===null}function isNumber(value){return typeof value=="number"||isObjectLike(value)&&objToString.call(value)==numberTag||false}var isPlainObject=!getPrototypeOf?shimIsPlainObject:function(value){if(!(value&&objToString.call(value)==objectTag)){return false}var valueOf=value.valueOf,objProto=isNative(valueOf)&&(objProto=getPrototypeOf(valueOf))&&getPrototypeOf(objProto);return objProto?value==objProto||getPrototypeOf(value)==objProto:shimIsPlainObject(value)};function isRegExp(value){return isObjectLike(value)&&objToString.call(value)==regexpTag||false}function isString(value){return typeof value=="string"||isObjectLike(value)&&objToString.call(value)==stringTag||false}function isTypedArray(value){return isObjectLike(value)&&isLength(value.length)&&typedArrayTags[objToString.call(value)]||false}function isUndefined(value){return typeof value=="undefined"}function toArray(value){var length=value?value.length:0;if(!isLength(length)){return values(value)}if(!length){return[]}return arrayCopy(value)}function toPlainObject(value){return baseCopy(value,keysIn(value))}var assign=createAssigner(baseAssign);function create(prototype,properties,guard){var result=baseCreate(prototype);if(guard&&isIterateeCall(prototype,properties,guard)){properties=null}return properties?baseCopy(properties,result,keys(properties)):result}function defaults(object){if(object==null){return object}var args=arrayCopy(arguments);args.push(assignDefaults);return assign.apply(undefined,args)}function findKey(object,predicate,thisArg){predicate=getCallback(predicate,thisArg,3);return baseFind(object,predicate,baseForOwn,true)}function findLastKey(object,predicate,thisArg){predicate=getCallback(predicate,thisArg,3);return baseFind(object,predicate,baseForOwnRight,true)}function forIn(object,iteratee,thisArg){if(typeof iteratee!="function"||typeof thisArg!="undefined"){iteratee=bindCallback(iteratee,thisArg,3)}return baseFor(object,iteratee,keysIn)}function forInRight(object,iteratee,thisArg){iteratee=bindCallback(iteratee,thisArg,3);return baseForRight(object,iteratee,keysIn)}function forOwn(object,iteratee,thisArg){if(typeof iteratee!="function"||typeof thisArg!="undefined"){iteratee=bindCallback(iteratee,thisArg,3)}return baseForOwn(object,iteratee)}function forOwnRight(object,iteratee,thisArg){iteratee=bindCallback(iteratee,thisArg,3);return baseForRight(object,iteratee,keys)}function functions(object){return baseFunctions(object,keysIn(object))}function has(object,key){return object?hasOwnProperty.call(object,key):false}function invert(object,multiValue,guard){if(guard&&isIterateeCall(object,multiValue,guard)){multiValue=null}var index=-1,props=keys(object),length=props.length,result={};while(++index0;while(++index=start&&value=0&&string.indexOf(target,position)==position}function escape(string){string=baseToString(string);return string&&reHasUnescapedHtml.test(string)?string.replace(reUnescapedHtml,escapeHtmlChar):string}function escapeRegExp(string){string=baseToString(string);return string&&reHasRegExpChars.test(string)?string.replace(reRegExpChars,"\\$&"):string}var kebabCase=createCompounder(function(result,word,index){return result+(index?"-":"")+word.toLowerCase()});function pad(string,length,chars){string=baseToString(string);length=+length;var strLength=string.length;if(strLength>=length||!nativeIsFinite(length)){return string}var mid=(length-strLength)/2,leftLength=floor(mid),rightLength=ceil(mid);chars=createPad("",rightLength,chars);return chars.slice(0,leftLength)+string+chars}function padLeft(string,length,chars){string=baseToString(string);return string&&createPad(string,length,chars)+string}function padRight(string,length,chars){string=baseToString(string);return string&&string+createPad(string,length,chars)}function parseInt(string,radix,guard){if(guard&&isIterateeCall(string,radix,guard)){radix=0}return nativeParseInt(string,radix)}if(nativeParseInt(whitespace+"08")!=8){parseInt=function(string,radix,guard){if(guard?isIterateeCall(string,radix,guard):radix==null){radix=0}else if(radix){radix=+radix}string=trim(string);return nativeParseInt(string,radix||(reHexPrefix.test(string)?16:10))}}function repeat(string,n){var result="";string=baseToString(string);n=+n;if(n<1||!string||!nativeIsFinite(n)){return result}do{if(n%2){result+=string}n=floor(n/2);string+=string}while(n);return result}var snakeCase=createCompounder(function(result,word,index){return result+(index?"_":"")+word.toLowerCase(); });var startCase=createCompounder(function(result,word,index){return result+(index?" ":"")+(word.charAt(0).toUpperCase()+word.slice(1))});function startsWith(string,target,position){string=baseToString(string);position=position==null?0:nativeMin(position<0?0:+position||0,string.length);return string.lastIndexOf(target,position)==position}function template(string,options,otherOptions){var settings=lodash.templateSettings;if(otherOptions&&isIterateeCall(string,options,otherOptions)){options=otherOptions=null}string=baseToString(string);options=baseAssign(baseAssign({},otherOptions||options),settings,assignOwnDefaults);var imports=baseAssign(baseAssign({},options.imports),settings.imports,assignOwnDefaults),importsKeys=keys(imports),importsValues=baseValues(imports,importsKeys);var isEscaping,isEvaluating,index=0,interpolate=options.interpolate||reNoMatch,source="__p += '";var reDelimiters=RegExp((options.escape||reNoMatch).source+"|"+interpolate.source+"|"+(interpolate===reInterpolate?reEsTemplate:reNoMatch).source+"|"+(options.evaluate||reNoMatch).source+"|$","g");var sourceURL="//# sourceURL="+("sourceURL"in options?options.sourceURL:"lodash.templateSources["+ ++templateCounter+"]")+"\n";string.replace(reDelimiters,function(match,escapeValue,interpolateValue,esTemplateValue,evaluateValue,offset){interpolateValue||(interpolateValue=esTemplateValue);source+=string.slice(index,offset).replace(reUnescapedString,escapeStringChar);if(escapeValue){isEscaping=true;source+="' +\n__e("+escapeValue+") +\n'"}if(evaluateValue){isEvaluating=true;source+="';\n"+evaluateValue+";\n__p += '"}if(interpolateValue){source+="' +\n((__t = ("+interpolateValue+")) == null ? '' : __t) +\n'"}index=offset+match.length;return match});source+="';\n";var variable=options.variable;if(!variable){source="with (obj) {\n"+source+"\n}\n"}source=(isEvaluating?source.replace(reEmptyStringLeading,""):source).replace(reEmptyStringMiddle,"$1").replace(reEmptyStringTrailing,"$1;");source="function("+(variable||"obj")+") {\n"+(variable?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(isEscaping?", __e = _.escape":"")+(isEvaluating?", __j = Array.prototype.join;\n"+"function print() { __p += __j.call(arguments, '') }\n":";\n")+source+"return __p\n}";var result=attempt(function(){return Function(importsKeys,sourceURL+"return "+source).apply(undefined,importsValues)});result.source=source;if(isError(result)){throw result}return result}function trim(string,chars,guard){var value=string;string=baseToString(string);if(!string){return string}if(guard?isIterateeCall(value,chars,guard):chars==null){return string.slice(trimmedLeftIndex(string),trimmedRightIndex(string)+1)}chars=chars+"";return string.slice(charsLeftIndex(string,chars),charsRightIndex(string,chars)+1)}function trimLeft(string,chars,guard){var value=string;string=baseToString(string);if(!string){return string}if(guard?isIterateeCall(value,chars,guard):chars==null){return string.slice(trimmedLeftIndex(string))}return string.slice(charsLeftIndex(string,chars+""))}function trimRight(string,chars,guard){var value=string;string=baseToString(string);if(!string){return string}if(guard?isIterateeCall(value,chars,guard):chars==null){return string.slice(0,trimmedRightIndex(string)+1)}return string.slice(0,charsRightIndex(string,chars+"")+1)}function trunc(string,options,guard){if(guard&&isIterateeCall(string,options,guard)){options=null}var length=DEFAULT_TRUNC_LENGTH,omission=DEFAULT_TRUNC_OMISSION;if(options!=null){if(isObject(options)){var separator="separator"in options?options.separator:separator;length="length"in options?+options.length||0:length;omission="omission"in options?baseToString(options.omission):omission}else{length=+options||0}}string=baseToString(string);if(length>=string.length){return string}var end=length-omission.length;if(end<1){return omission}var result=string.slice(0,end);if(separator==null){return result+omission}if(isRegExp(separator)){if(string.slice(end).search(separator)){var match,newEnd,substring=string.slice(0,end);if(!separator.global){separator=RegExp(separator.source,(reFlags.exec(separator)||"")+"g")}separator.lastIndex=0;while(match=separator.exec(substring)){newEnd=match.index}result=result.slice(0,newEnd==null?end:newEnd)}}else if(string.indexOf(separator,end)!=end){var index=result.lastIndexOf(separator);if(index>-1){result=result.slice(0,index)}}return result+omission}function unescape(string){string=baseToString(string);return string&&reHasEscapedHtml.test(string)?string.replace(reEscapedHtml,unescapeHtmlChar):string}function words(string,pattern,guard){if(guard&&isIterateeCall(string,pattern,guard)){pattern=null}string=baseToString(string);return string.match(pattern||reWords)||[]}function attempt(){var func=arguments[0],length=arguments.length,args=Array(length?length-1:0);while(--length>0){args[length-1]=arguments[length]}try{return func.apply(undefined,args)}catch(e){return isError(e)?e:new Error(e)}}function callback(func,thisArg,guard){if(guard&&isIterateeCall(func,thisArg,guard)){thisArg=null}return isObjectLike(func)?matches(func):baseCallback(func,thisArg)}function constant(value){return function(){return value}}function identity(value){return value}function matches(source){return baseMatches(baseClone(source,true))}function matchesProperty(key,value){return baseMatchesProperty(key+"",baseClone(value,true))}function mixin(object,source,options){if(options==null){var isObj=isObject(source),props=isObj&&keys(source),methodNames=props&&props.length&&baseFunctions(source,props);if(!(methodNames?methodNames.length:isObj)){methodNames=false;options=source;source=object;object=this}}if(!methodNames){methodNames=baseFunctions(source,keys(source))}var chain=true,index=-1,isFunc=isFunction(object),length=methodNames.length;if(options===false){chain=false}else if(isObject(options)&&"chain"in options){chain=options.chain}while(++index")[0]}var death1=document.evaluate("/html/body/table/tbody/tr/td[3]/table/tbody/tr[3]/td[1]/table/tbody/tr/td/table/tbody/tr/td/table/tbody/tr[2]/td[2]",document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);var death2=document.evaluate("/html/body/table/tbody/tr/td[3]/table/tbody/tr[4]/td[1]/table/tbody/tr/td/table/tbody/tr/td/table/tbody/tr[2]/td[2]",document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);var death=death1.snapshotLength?death1.snapshotItem(0):death2.snapshotLength?death2.snapshotItem(0):null;if(death){personData.deathDate=death.innerHTML.split("
")[0]}debug("data",personData);emitter.emit("data",personData)}},{"../utils":23,debug:1}],12:[function(require,module,exports){var debug=require("debug")("findmypast-record"),utils=require("../utils"),_=require("lodash");var urls=[/^http:\/\/search\.findmypast\.(co\.uk|com|ie|com\.au)\/record/];module.exports=function(register){register(urls,run)};function run(emitter){if($("#transcriptionDisplayTable").length!==1){debug("no data table");emitter.emit("noData");return}var personData={},dataFields=getDataFields();personData.givenName=getGivenName(dataFields);personData.familyName=getFamilyName(dataFields);personData.birthDate=getBirthDate(dataFields);personData.birthPlace=getBirthPlace(dataFields);personData.deathDate=getDeathDate(dataFields);personData.deathPlace=getDeathPlace(dataFields);personData.spouseGivenName=getSpouseGivenName(dataFields);personData.spouseFamilyName=getSpouseFamilyName(dataFields);personData.marriageDate=getMarriageDate(dataFields);personData.marriagePlace=getMarriagePlace(dataFields);personData.fatherGivenName=getFatherGivenName(dataFields);personData.motherGivenName=getMotherGivenName(dataFields);personData=utils.clean(personData);debug("data",personData);emitter.emit("data",personData)}function getGivenName(data){return processName(checkMultipleFields(data,["first name(s)"]))}function getFamilyName(data){return processName(checkMultipleFields(data,["last name"]))}function getBirthDate(data){var year=data["birth year"],month=data["birth month"],day=data["birth day"];return processDate(year,month,day)}function getBirthPlace(data){var simple=checkMultipleFields(data,["birth place","birth state"]);if(simple){return simple}if(data["subcategory"]==="Births & baptisms"){return getPlace(data)}}function getDeathDate(data){var year=data["death year"],month=data["death month"],day=data["death day"];return processDate(year,month,day)}function getDeathPlace(data){var simple=checkMultipleFields(data,["death place","death state"]);if(simple){return simple}if(data["subcategory"]==="Deaths & burials"){ -return getPlace(data)}}function getMarriageDate(data){var year=data["marriage year"],month=data["marriage month"],day=data["marriage day"];return processDate(year,month,day)}function getMarriagePlace(data){var simple=checkMultipleFields(data,["marriage place","marriage state"]);if(simple){return simple}if(data["subcategory"]==="Marriages & divorces"){return getPlace(data)}}function getSpouseGivenName(data){return processName(checkMultipleFields(data,["spouse's first name(s)"]))}function getSpouseFamilyName(data){return processName(checkMultipleFields(data,["spouse's last name"]))}function getFatherGivenName(data){return processName(checkMultipleFields(data,["father's first name(s)"]))}function getMotherGivenName(data){return processName(checkMultipleFields(data,["mother's first name(s)"]))}function getPlace(data){var town=checkMultipleFields(data,["place","district","town","residence town","parish"]),state=checkMultipleFields(data,["county","state","residence state"]),country=checkMultipleFields(data,["country"]);return _.map(_.compact([town,state,country]),utils.toTitleCase).join(", ")}function processDate(year,month,day){if(year){if(month&&day){return day+" "+month+" "+year}else{return year}}}function processName(name){debug("processName:"+name);if(!name||name==="-"){return}else{return utils.toTitleCase(name)}}function getDataFields(){var data={};$("#transcriptionDisplayTable tr").each(function(){var row=$(this),name=row.find("th").text().trim().toLowerCase(),value=row.find("td").text().trim();if(name&&value&&value!=="-"){data[name]=value}});return data}function checkMultipleFields(recordData,fields){for(var j in fields){if(recordData[fields[j]]){return recordData[fields[j]]}}}},{"../utils":23,debug:1,lodash:5}],13:[function(require,module,exports){var fmpUtils=require("./utils");var Family=function(data){this.data=data};var proto=Family.prototype;proto.getSpouseId=function(personId){if(this.data.FatherId===personId){return this.data.MotherId}else if(this.data.MotherId===personId){return this.data.FatherId}};proto.getMotherId=function(){return this.data.MotherId};proto.getFatherId=function(){return this.data.FatherId};proto.getMarriageDate=function(){return fmpUtils.getDate(this.data.MarriageDate)};proto.getMarriagePlace=function(){return this.data.MarriagePlace};module.exports=Family},{"./utils":17}],14:[function(require,module,exports){var fmpUtils=require("./utils");var Person=function(data){this.data=data};var proto=Person.prototype;proto.getGivenName=function(){return this.data.GivenNames};proto.getSurname=function(){return this.data.Surnames};proto.getBirthDate=function(){return fmpUtils.getDate(this.data.BirthDate)};proto.getBirthPlace=function(){return this.data.BirthPlace};proto.getDeathDate=function(){return fmpUtils.getDate(this.data.DeathDate)};proto.getDeathPlace=function(){return this.data.DeathPlace};module.exports=Person},{"./utils":17}],15:[function(require,module,exports){var debug=require("debug")("findmypast-tree:Relations"),Person=require("./Person"),Family=require("./Family"),_=require("lodash");var Relations=function(data){this.data=data};Relations.prototype.getPersonData=function(personId){personId=parseInt(personId,10);var personData={},person=this.getPerson(personId);if(person){personData.givenName=person.getGivenName();personData.familyName=person.getSurname();personData.birthDate=person.getBirthDate();personData.birthPlace=person.getBirthPlace();personData.deathDate=person.getDeathDate();personData.deathPlace=person.getDeathPlace();if(this.data.Relations){if(this.data.Relations.SpousalFamilys){var spouseFamilyId=this.data.Relations.SpousalFamilys[0];var spouseFamily=this.getFamily(spouseFamilyId);debug("spouseFamilyId:"+spouseFamilyId);if(spouseFamily){personData.marriageDate=spouseFamily.getMarriageDate();personData.marriagePlace=spouseFamily.getMarriagePlace();var spouseId=spouseFamily.getSpouseId(personId),spouse=this.getPerson(spouseId);if(spouse){personData.spouseGivenName=spouse.getGivenName();personData.spouseFamilyName=spouse.getSurname()}}}if(this.data.Relations.DirectFamilys){var parentsFamilyId=this.data.Relations.DirectFamilys[0],parentsFamily=this.getFamily(parentsFamilyId);debug("parentsFamilyId:"+parentsFamilyId);if(parentsFamily){var motherId=parentsFamily.getMotherId(),fatherId=parentsFamily.getFatherId(),mother=this.getPerson(motherId),father=this.getPerson(fatherId);if(mother){personData.motherGivenName=mother.getGivenName();personData.motherFamilyName=mother.getSurname()}if(father){personData.fatherGivenName=father.getGivenName();personData.fatherFamilyName=father.getSurname()}}}}}return personData};Relations.prototype.getPerson=function(personId){debug("getPerson:"+personId);var person=_.find(this.data.Persons,function(person){return person.Id===personId});if(person){return new Person(person)}};Relations.prototype.getFamily=function(familyId){debug("getFamily:"+familyId);var family=_.find(this.data.Familys,function(family){return family.Id===familyId});if(family){return new Family(family)}};module.exports=Relations},{"./Family":13,"./Person":14,debug:1,lodash:5}],16:[function(require,module,exports){var debug=require("debug")("findmypast-tree"),Relations=require("./Relations");var urls=[/^http:\/\/tree\.findmypast\.(co\.uk|com|ie|com\.au)/];module.exports=function(register){register(urls,run)};function run(emitter){debug("run");window.onhashchange=function(){processHash(emitter)};processHash(emitter)}function processHash(emitter){debug("processHash");var urlParts=window.location.hash.split("/"),treeId=urlParts[2],personId=urlParts[3];debug("hash: "+window.location.hash);debug("treeId: "+treeId);debug("personId: "+personId);if(parseInt(personId,10)){getRelations(treeId,personId).done(function(relations){if(relations&&relations.Object){debug("relations data");var personData=new Relations(relations.Object).getPersonData(personId);debug("person data",personData);emitter.emit("data",personData)}else{emitter.emit("noData");debug("no relation Object")}})}else{emitter.emit("noData");debug("not focused on a person")}}function getRelations(treeId,personId){return api(treeId,"api/familytree/getfamilytree?familytreeview=ProfileRelations&personId="+personId)}function api(treeId,url){debug("api request: "+url);return $.ajax({type:"GET",url:"/api/proxy/get?url="+encodeURIComponent(url),headers:{"Family-Tree-Ref":"863a418d-78de-43e6-9af6-c9ce320a86ef"}}).fail(function(e){debug("api error: "+url);debug(e)})}},{"./Relations":15,debug:1}],17:[function(require,module,exports){var debug=require("debug")("findmpast-tree:utils");var utils=module.exports={};utils.getDate=function(dateInt){debug("getDate:"+dateInt);if(dateInt){var dateString=""+dateInt,year=dateString.substr(0,4),month=dateString.substr(4,2),day=dateString.substr(6,2);if(month==="00"||day==="00"){return year}else{return year+"-"+month+"-"+day}}}},{debug:1}],18:[function(require,module,exports){var debug=require("debug")("fs-ancestor"),utils=require("../utils"),_=require("lodash");var urls=[utils.urlPatternToRegex("https://familysearch.org/tree/*")];module.exports=function(register){register(urls,run)};function run(emitter){debug("run");window.onhashchange=function(){processHash(emitter)};processHash(emitter)}function processHash(emitter){debug("processHash");var hashParts=utils.getHashParts();debug("hashParts",hashParts);if(hashParts["view"]=="ancestor"){var personId=hashParts["person"];var spouseId=hashParts["spouse"];if(personId){debug("personId",personId);getPersonWithRelationships(personId).done(function(data){debug("response");emitter.emit("data",normalizeData(data,personId,spouseId))}).fail(function(error){debug("ajax error",error);emitter.emit("error",error)})}else{emitter.emit("noData");debug("no personId")}}else{emitter.emit("noData");debug("not in the ancestor view")}}function normalizeData(responseData,personId,spouseId){var returnData={},person=getPerson(responseData,personId);var nameParts=getNameParts(person);returnData.givenName=nameParts.givenName;returnData.familyName=nameParts.familyName;var birthInfo=getBirthInfo(person);returnData.birthPlace=birthInfo.place;returnData.birthDate=birthInfo.date;var deathInfo=getDeathInfo(person);returnData.deathDate=deathInfo.date;returnData.deathPlace=deathInfo.place;var parents=getParents(responseData,personId);if(parents.mother){var motherNameParts=getNameParts(parents.mother);returnData.motherGivenName=motherNameParts.givenName;returnData.motherFamilyName=motherNameParts.familyName}if(parents.father){var fatherNameParts=getNameParts(parents.father);returnData.fatherGivenName=fatherNameParts.givenName;returnData.fatherFamilyName=fatherNameParts.familyName}var spouseRelationship=getSpouseRelationship(responseData,personId,spouseId);if(spouseRelationship){var spouseId=spouseRelationship.person1.resourceId===personId?spouseRelationship.person2.resourceId:spouseRelationship.person1.resourceId,spouse=getPerson(responseData,spouseId);if(spouse){var spouseNameParts=getNameParts(spouse);returnData.spouseGivenName=spouseNameParts.givenName;returnData.spouseFamilyName=spouseNameParts.familyName}var marriageData=getFactInfo(spouseRelationship,"http://gedcomx.org/Marriage");if(marriageData){returnData.marriageDate=marriageData.date;returnData.marriagePlace=marriageData.place}}return returnData}function getPerson(data,personId){return _.find(data.persons,{id:personId})}function getSpouseRelationship(data,personId,spouseId){var spouseRel;if(spouseId){var rels=_.compact([_.find(data.relationships,{type:"http://gedcomx.org/Couple",person1:{resourceId:personId},person2:{resourceId:spouseId}}),_.find(data.relationships,{type:"http://gedcomx.org/Couple",person2:{resourceId:personId},person1:{resourceId:spouseId}})]);if(rels[0]){spouseRel=rels[0]}}if(!spouseRel){var rels=_.compact([_.find(data.relationships,{type:"http://gedcomx.org/Couple",person1:{resourceId:personId}}),_.find(data.relationships,{type:"http://gedcomx.org/Couple",person2:{resourceId:personId}})]);if(rels[0]){spouseRel=rels[0]}}return spouseRel}function getParents(data,personId){var returnData={},parentsRelationship=_.find(data.childAndParentsRelationships,{child:{resourceId:personId}});if(parentsRelationship){if(parentsRelationship.father){returnData.father=getPerson(data,parentsRelationship.father.resourceId)}if(parentsRelationship.mother){returnData.mother=getPerson(data,parentsRelationship.mother.resourceId)}}return returnData}function getNameParts(person){var returnData={},preferredName=_.find(person.names,{preferred:true}),preferredParts=preferredName.nameForms[0].parts;if(preferredParts){returnData.givenName=utils.maybe(_.find(preferredParts,{type:"http://gedcomx.org/Given"})).value;returnData.familyName=utils.maybe(_.find(preferredParts,{type:"http://gedcomx.org/Surname"})).value}else{preferredParts=utils.splitName(preferredName.nameForms[0].fullText);returnData.givenName=preferredParts[0];returnData.familyName=preferredParts[1]}return returnData}function getBirthInfo(person){return getFactInfo(person,"http://gedcomx.org/Birth")}function getDeathInfo(person){return getFactInfo(person,"http://gedcomx.org/Death")}function getFactInfo(obj,type){var factInfo={},fact=_.find(obj.facts,{type:type});if(fact){if(fact.date){factInfo.date=utils.maybe(utils.maybe(fact.date.normalized)[0]).value||fact.date.original}if(fact.place){factInfo.place=utils.maybe(utils.maybe(fact.place.normalized)[0]).value||fact.place.original}}return factInfo}function getPersonWithRelationships(personId){return $.getJSON("https://familysearch.org/platform/tree/persons-with-relationships?persons&person="+personId)}},{"../utils":23,debug:1,lodash:5}],19:[function(require,module,exports){var debug=require("debug")("fs-record"),utils=require("../utils");var urls=[utils.urlPatternToRegex("https://familysearch.org/pal:/MM9.1.1/*"),utils.urlPatternToRegex("https://familysearch.org/ark:/61903/1:1:*")];module.exports=function(register){register(urls,run)};function run(emitter){debug("running");$.getJSON(window.location.href).done(function(response){emitter.emit("data",processData(response))}).fail(function(jqxhr,text,error){emitter.emit("error",error)})}function processData(recordData){var nameParts=getNameParts(recordData);var personData={givenName:nameParts[0],familyName:nameParts[1]};var events=getEvents(recordData);if(events.birth){var birthDetails=getEventDetails(events.birth,"birth");personData.birthDate=birthDetails.date;personData.birthPlace=birthDetails.place}if(events.death){var deathDetails=getEventDetails(events.death,"death");personData.deathDate=deathDetails.date;personData.deathPlace=deathDetails.place}if(recordData.spouse.length){var spouseNameParts=utils.splitName(recordData.spouse[0].name);personData["spouseGivenName"]=spouseNameParts[0];personData["spouseFamilyName"]=spouseNameParts[1]}var parents=getParents(recordData);if(parents.mother){var motherNameParts=utils.splitName(parents.mother.name);personData["motherGivenName"]=motherNameParts[0];personData["motherFamilyName"]=motherNameParts[1]}if(parents.father){var fatherNameParts=utils.splitName(parents.father.name);personData["fatherGivenName"]=fatherNameParts[0];personData["fatherFamilyName"]=fatherNameParts[1]}debug("processed data");return personData}function getEventDetails(eventInfo,eventType){var eventDetails={};if(eventInfo.date){eventDetails.date=checkMultipleFields(eventInfo.date,[["normalized",0,"text"],["normalized",0,"parts",0,"text"]])}if(eventInfo.place){eventDetails.place=checkMultipleFields(eventInfo.place,[["original","text"],["normalized",0,"text"]])}return eventDetails}function checkMultipleFields(recordData,fieldLists){for(var i in fieldLists){var data=checkFields(recordData,fieldLists[i]);if(data!==undefined)return data}return undefined}function checkFields(recordData,fieldList){var data=recordData;for(var i in fieldList){if(data[fieldList[i]]){data=data[fieldList[i]]}else{return undefined}}return data}function getEvents(recordData){var events={};for(var i in recordData.event){if(recordData.event[i].type=="BIRTH"){events.birth=recordData.event[i]}else if(recordData.event[i].type=="DEATH"){events.death=recordData.event[i]}}return events}function getParents(recordData){var parents={};for(var i in recordData.parent){if(recordData.parent[i].gender=="MALE"){parents.father=recordData.parent[i]}else{parents.mother=recordData.parent[i]}}return parents}function getNameParts(recordData){var nameParts=[undefined,undefined];if(recordData.name.length===0){return nameParts}var name=checkMultipleFields(recordData.name[0],[["normalized",0,"text"],["normalized",0,"parts"],["original","text"],["original","parts"]]);if(typeof name=="string"){nameParts=utils.splitName(name)}else{nameParts=processFSNameParts(name)}return nameParts}function processFSNameParts(parts){var given=[],family=[];for(var i in parts){if(parts[i].type=="GIVEN"){given.push(parts[i].text)}else if(parts[i].type=="SURNAME"){family.push(parts[i].text)}}return[given.join(" "),family.join(" ")]}},{"../utils":23,debug:1}],20:[function(require,module,exports){var debug=require("debug")("genealogieonline"),utils=require("../utils"),_=require("lodash");var urls=[utils.urlPatternToRegex("https://www.genealogieonline.nl/*")];module.exports=function(register){register(urls,run)};function run(emitter){var familyName=$('div[itemtype="http://schema.org/Person"]:eq(0) meta[itemprop="familyName"]').attr("content");if(familyName){var givenName=$('div[itemtype="http://schema.org/Person"]:eq(0) meta[itemprop="givenName"]').attr("content");var birthPlace=$('div[itemtype="http://schema.org/Person"]:eq(0) div[itemprop="birth"] span[itemprop="location"] span[itemprop="address"] meta[itemprop="addressLocality"]').attr("content");var birthDate=$('div[itemtype="http://schema.org/Person"]:eq(0) div[itemprop="birth"] meta[itemprop="startDate"]').attr("content");var deathPlace=$('div[itemtype="http://schema.org/Person"]:eq(0) div[itemprop="death"] span[itemprop="location"] meta[itemprop="name"]').attr("content");var deathDate=$('div[itemtype="http://schema.org/Person"]:eq(0) div[itemprop="death"] meta[itemprop="startDate"]').attr("content");var spouseGivenName=$('div[itemtype="http://schema.org/Person"]:eq(0) span[itemprop="spouse"]:eq(0) meta[itemprop="givenName"]').attr("content");var spouseFamilyName=$('div[itemtype="http://schema.org/Person"]:eq(0) span[itemprop="spouse"]:eq(0) meta[itemprop="familyName"]').attr("content");var marriagePlace=$('div[itemtype="http://schema.org/Person"]:eq(0) span[itemprop="marriage"] span[itemprop="location"] span[itemprop="address"] meta[itemprop="addressLocality"]').attr("content");var marriageDate=$('div[itemtype="http://schema.org/Person"]:eq(0) span[itemprop="marriage"] meta[itemprop="startDate"]').attr("content");var fathid=0;var mothid=1;if($('div[itemtype="http://schema.org/Person"]:eq(0) div[itemprop="parent"]:eq(0) meta[itemprop="gender"]').attr("content")=="female"){fathid=1;mothid=0}var fatherGivenName=$('div[itemtype="http://schema.org/Person"]:eq(0) div[itemprop="parent"]:eq('+fathid+') meta[itemprop="givenName"]').attr("content");var fatherFamilyName=$('div[itemtype="http://schema.org/Person"]:eq(0) div[itemprop="parent"]:eq('+fathid+') meta[itemprop="familyName"]').attr("content");var motherGivenName=$('div[itemtype="http://schema.org/Person"]:eq(0) div[itemprop="parent"]:eq('+mothid+') meta[itemprop="givenName"]').attr("content");var motherFamilyName=$('div[itemtype="http://schema.org/Person"]:eq(0) div[itemprop="parent"]:eq('+mothid+') meta[itemprop="familyName"]').attr("content");var personData={givenName:givenName,familyName:familyName,birthPlace:birthPlace,birthDate:birthDate,deathPlace:deathPlace,deathDate:deathDate,spouseGivenName:spouseGivenName,spouseFamilyName:spouseFamilyName,marriagePlace:marriagePlace,marriageDate:marriageDate,fatherGivenName:fatherGivenName,fatherFamilyName:fatherFamilyName,motherGivenName:motherGivenName,motherFamilyName:motherFamilyName};emitter.emit("data",_.pick(personData,_.identity))}else{emitter.emit("noData")}}},{"../utils":23,debug:1,lodash:5}],21:[function(require,module,exports){var debug=require("debug")("openarch"),utils=require("../utils"),_=require("lodash");var urls=[utils.urlPatternToRegex("https://www.openarch.nl/show*")];module.exports=function(register){register(urls,run)};function run(emitter){var givenName=$('div[itemtype="http://schema.org/Person"]:eq(0) meta[itemprop="givenName"]').attr("content");var familyName=$('div[itemtype="http://schema.org/Person"]:eq(0) meta[itemprop="familyName"]').attr("content");var birthPlace;var birthDate;var fathid=0;var mothid=1;var fatherGivenName;var fatherFamilyName;var motherGivenName;var motherFamilyName;var spouseGivenName;var spouseFamilyName;if(givenName){birthPlace=$('div[itemtype="http://schema.org/Person"]:eq(0) span[itemprop="birth"] span[itemprop="location"] meta[itemprop="name"]').attr("content");birthDate=$('div[itemtype="http://schema.org/Person"]:eq(0) span[itemprop="birth"] meta[itemprop="startDate"]').attr("content");spouseGivenName=$('div[itemtype="http://schema.org/Person"]:eq(1) meta[itemprop="givenName"]').attr("content");spouseFamilyName=$('div[itemtype="http://schema.org/Person"]:eq(1) meta[itemprop="familyName"]').attr("content");if(!spouseGivenName&&$('p[itemprop="parent"]:eq(0) meta[itemprop="gender"]').attr("content")=="female"){fathid=1;mothid=0}}else{givenName=$('li[itemtype="http://schema.org/Person"]:eq(0) meta[itemprop="givenName"]').attr("content");familyName=$('li[itemtype="http://schema.org/Person"]:eq(0) meta[itemprop="familyName"]').attr("content");birthPlace=$('li[itemtype="http://schema.org/Person"]:eq(0) span[itemprop="birth"] span[itemprop="location"] meta[itemprop="name"]').attr("content");birthDate=$('li[itemtype="http://schema.org/Person"]:eq(0) span[itemprop="birth"] meta[itemprop="startDate"]').attr("content")}fatherGivenName=$('p[itemprop="parent"]:eq('+fathid+') meta[itemprop="givenName"]').attr("content");fatherFamilyName=$('p[itemprop="parent"]:eq('+fathid+') meta[itemprop="familyName"]').attr("content");motherGivenName=$('p[itemprop="parent"]:eq('+mothid+') meta[itemprop="givenName"]').attr("content");motherFamilyName=$('p[itemprop="parent"]:eq('+mothid+') meta[itemprop="familyName"]').attr("content");if(givenName){var personData={givenName:givenName,familyName:familyName,birthPlace:birthPlace,birthDate:birthDate,spouseGivenName:spouseGivenName,spouseFamilyName:spouseFamilyName,fatherGivenName:fatherGivenName,fatherFamilyName:fatherFamilyName,motherGivenName:motherGivenName,motherFamilyName:motherFamilyName};emitter.emit("data",_.pick(personData,_.identity))}else{emitter.emit("noData")}}},{"../utils":23,debug:1,lodash:5}],22:[function(require,module,exports){var debug=require("debug")("werelate"),utils=require("../utils"),_=require("lodash");var urls=[utils.urlPatternToRegex("http://www.werelate.org/wiki/Person:*")];module.exports=function(register){register(urls,run)};function run(emitter){var personData={};var recordData={};$(".wr-infotable-factsevents tr").each(function(){var row=$(this);var label=$.trim($("span.wr-infotable-type",row).text()).toLowerCase();if(!recordData[label]){recordData[label]=row}});if(recordData.name){var nameParts=utils.splitName($.trim(recordData.name.children().eq(1).children("span").text()));personData.givenName=nameParts[0];personData.familyName=nameParts[1]}if(recordData.birth){var birthDate=$.trim($("span.wr-infotable-date",recordData.birth).text());if(birthDate){personData.birthDate=birthDate}var birthPlace=$.trim($("span.wr-infotable-place",recordData.birth).text());if(birthPlace){personData.birthPlace=birthPlace}}if(recordData.death){var deathDate=$.trim($("span.wr-infotable-date",recordData.death).text());if(deathDate){personData.deathDate=deathDate}var deathPlace=$.trim($("span.wr-infotable-place",recordData.death).text());if(deathPlace){personData.deathPlace=deathPlace}}if(recordData.marriage){var spouseNameParts=utils.splitName($.trim($(".wr-infotable-placedesc .wr-infotable-desc",recordData.marriage).text().substring(3)));personData.spouseGivenName=spouseNameParts[0];personData.spouseFamilyName=spouseNameParts[1]}var parentsBox=$(".wr-infobox-parentssiblings:first");if(parentsBox.length==1){$("ul .wr-infobox-fullname",parentsBox).each(function(i,e){var parentNameParts=utils.splitName($.trim($(this).text().substring(4)));if(i==0){personData.fatherGivenName=parentNameParts[0];personData.fatherFamilyName=parentNameParts[1]}else{personData.motherGivenName=parentNameParts[0];personData.motherFamilyName=parentNameParts[1]}})}emitter.emit("data",personData)}},{"../utils":23,debug:1,lodash:5}],23:[function(require,module,exports){var _=require("lodash");var utils={};utils.splitName=function(name){if(_.isString(name)&&name){return name.split(/\s+(?=\S*$)/)}else{return["",""]}};utils.urlPatternToRegex=function(pattern){pattern=pattern.replace(/\//g,"/");pattern=pattern.replace(/\./g,".");pattern=pattern.replace(/\-/g,"-");pattern=pattern.replace(/\*/g,".*");return new RegExp(pattern)};utils.getHashParts=function(){var hashParts={};if(window.location.hash){_.forEach(window.location.hash.substring(1).split("&"),function(part){var partPieces=part.split("=");hashParts[partPieces[0]]=partPieces[1]})}return hashParts};utils.getQueryParams=function(){var paramArray=window.location.search.substr(1).split("&");var params={};for(var i=0;i