// Copyright 2014 Apple Inc.  All Rights Reserved.
(function(){return function(e,t){var s,n=t.getNullSpan();for(s=0;s<e.address.length&&(!n||!n.exists());s++)n=t.getSpan().innerCapture(e.address[s],1),n.exists()&&(n=n.replace(/\[\/?t(?:[hrd]|able)\d+]/g,""),n=n.replace(/\s{2,}/," "),n=n.trim(),n.innerAddress().exists()&&(n=n.innerAddress()));if(!n||!n.exists()){for(s=0;s<e.addressLabel.length&&(!n||!n.exists());s++){var r=t.getSpan().next(e.addressLabel[s]),a=r.nextAddress();if(a.exists()){var i=a.getStart()-r.getEnd();i<144&&(n=a)}}if(n.exists()&&!t.getSpan().isPlain())for(s=0;s<e.footer.length;s++)t.getSpan().next(e.footer[s]).contains(n)&&(n=t.getNullSpan())}return n}}).call();