/*! Copyright © 2009-2017 Postcode Anywhere (Holdings) Ltd. (http://www.postcodeanywhere.co.uk) * * Address v3.50 * Component for address lookup integrations. * * WEB-2-1 13/12/2017 15:38:49 */ (function(n,t){function u(){r.addEventListener?(i.ignore(r,"DOMContentLoaded",u),e=!0,i.ready()):r.readyState==="complete"&&(i.ignore(r,"onreadystatechange",u),e=!0,i.ready())}function v(){r.readyState==="complete"?(e=!0,i.ready()):(r.addEventListener?i.listen(r,"DOMContentLoaded",u):i.listen(r,"onreadystatechange",u),i.listen(n,"load",u))}function a(n){var t=new i.XMLHttpRequest;t.onreadystatechange=function(){t.readyState===4&&t.status===200&&n.callback(i.parseJSON(t.responseText))},n.credentials&&(t.withCredentials=n.credentials),t.onerror=n.serviceError,t.ontimeout=n.timeoutError,t.open("POST",n.destination,!0),t.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),t.send(n.query)}function p(n){function o(n,t){var i=r.createElement("input");i.name=n,i.value=t,u.appendChild(i)}var u=r.createElement("form"),t=r.createElement("iframe"),s=!1,e,f;u.method="POST",u.action=i.protocol+"//"+i.host+"/"+n.service+"/json.ws";for(e in n.data)o(e,n.data[e]);o("CallbackVariable","window.name"),o("CallbackWithScriptTags","true"),t.onload=function(){s?(n.callback({Items:i.parseJSON(t.contentWindow.name)}),r.body.removeChild(t)):(s=!0,t.contentWindow.location="about:blank")},t.style.display="none",r.body.appendChild(t),f=t.contentDocument||t.contentWindow.document,f.body?f.body.appendChild(u):f.appendChild(u),u.submit()}function o(n){navigator.appName==="Microsoft Internet Explorer"?p(n):a(n)}function y(n){var t=new i.XMLHttpRequest;n.url.length>i.limit?(n.post=!0,o(n)):(t.onreadystatechange=function(){t.readyState===4&&t.status===200&&n.callback(i.parseJSON(t.responseText))},n.credentials&&(t.withCredentials=n.credentials),t.onerror=n.serviceError,t.ontimeout=n.timeoutError,t.open("GET",n.url,!0),t.send())}function h(n){var t=i.create("script",{type:"text/javascript",async:"async"}),u=r.getElementsByTagName("head")[0];n.position=i.scriptRequests.push(n),t.src=n.url+"&callback=pca.scriptRequests["+(n.position-1)+"].callback",t.onload=t.onreadystatechange=function(){this.readyState&&this.readyState!=="loaded"&&this.readyState!=="complete"||(t.onload=t.onreadystatechange=null,u&&t.parentNode&&u.removeChild(t))},t.src.length>i.limit?(n.post=!0,o(n)):u.insertBefore(t,u.firstChild)}function l(n){navigator.appName==="Microsoft Internet Explorer"?h(n):y(n)}function s(t){if(i.blockRequests&&i.waitingRequest){i.requestQueue=[t];return}if(t.block&&(i.blockRequests=!0),t.queue&&i.waitingRequest){i.requestQueue.push(t);return}if(i.waitingRequest=!0,t.cache&&i.requestCache[t.url]){function r(){t.callback(i.requestCache[t.url].response)}n.setImmediate?n.setImmediate(r):n.setTimeout(r,1);return}t.post?o(t):l(t)}function c(n){i.waitingRequest=!1,n.block&&(i.blockRequests=!1),n.response.Items.length===1&&n.response.Items[0].Error!==t?n.error(n.response.Items[0].Description):n.success(n.response.Items,n.response),n.cache&&(i.requestCache[n.url]=n),n.position&&(i.scriptRequests[n.position-1]=null),i.requestQueue.length&&s(i.requestQueue.shift())}var i=n.pca=n.pca||{},r=n.document,e,f;i.protocol=(n.location||r.location).protocol==="https:"?"https:":"http:",i.host="services.postcodeanywhere.co.uk",i.endpoint="json3ex.ws",i.limit=2e3,i.synonyms=[{r:/\bN(?=\s)/,w:"NORTH"},{r:/\b(?:NE|NORTHEAST)(?=\s)/,w:"NORTH EAST"},{r:/\b(?:NW|NORTHWEST)(?=\s)/,w:"NORTH WEST"},{r:/\bS(?=\s)/,w:"SOUTH"},{r:/\b(?:SE|SOUTHEAST)(?=\s)/,w:"SOUTH EAST"},{r:/\b(?:SW|SOUTHWEST)(?=\s)/,w:"SOUTH WEST"},{r:/\bE(?=\s)/,w:"EAST"},{r:/\bW(?=\s)/,w:"WEST"},{r:/\bST(?=\s)/,w:"SAINT"}],i.diacritics=[{r:/[ÀÁÂÃ]/gi,w:"A"},{r:/Å/gi,w:"AA"},{r:/[ÆæÄ]/gi,w:"AE"},{r:/Ç/gi,w:"C"},{r:/Ð/gi,w:"DJ"},{r:/[ÈÉÊË]/gi,w:"E"},{r:/[ÌÍÏ]/gi,w:"I"},{r:/Ñ/gi,w:"N"},{r:/[ÒÓÔÕ]/gi,w:"O"},{r:/[ŒØÖ]/gi,w:"OE"},{r:/Š/gi,w:"SH"},{r:/ß/gi,w:"SS"},{r:/[ÙÚÛ]/gi,w:"U"},{r:/Ü/gi,w:"UE"},{r:/[ŸÝ]/gi,w:"ZH"},{r:/-/gi,w:" "},{r:/[.,]/gi,w:""}],i.hypertext=[{r:/&/g,w:"&"},{r:/"/g,w:"""},{r:/'/g,w:"'"},{r://g,w:">"}],i.requestQueue=[],i.requestCache={},i.scriptRequests=[],i.waitingRequest=!1,i.blockRequests=!1,i.styleFixes=[],i.agent=navigator&&navigator.userAgent||"",i.galaxyFix=/Safari\/534.30/.test(i.agent)&&/GT-I8190|GT-I9100|GT-I9305|GT-P3110/.test(i.agent),i.container=null,i.XMLHttpRequest=n.XMLHttpRequest,e=!1,f=[],i.fuzzyMatch=!0,i.fuzzyTags=["*"],i.ready=function(n){var i,t;if(e){if(f.length)for(i=f,f=[],t=0;ti.data[t]?1:-1:n.tag>i.tag?1:-1}),n.fire("sort"),n},n.reverse=function(){return n.items.reverse(),n.fire("reverse"),n},n.filter=function(t){var u=i.formatTag(t),r=n.count;return n.count=0,n.firstVisibleItem=null,n.lastVisibleItem=null,n.all(function(t){~t.tag.indexOf(u)?(t.show(),n.count++,n.firstVisibleItem=n.firstVisibleItem||t,n.lastVisibleItem=t):t.hide()}),r!==n.count&&n.fire("filter"),n},n.match=function(t){var u=i.formatTag(t),r=[];return n.all(function(n){~n.tag.indexOf(u)&&r.push(n)}),r},n.clear=function(){return n.items=[],n.count=0,n.highlighted=-1,n.firstItem=null,n.lastItem=null,n.firstVisibleItem=null,n.lastVisibleItem=null,n.fire("clear"),n},n.all=function(t){for(var i=0;i=0;i--)if(t?t(n.items[i]):n.items[i].visible)return n.items[i];return null},n.next=function(t){for(var i=n.highlighted+1;i=0;i--)if(t?t(n.items[i]):n.items[i].visible)return n.items[i];return n.last()},n.visibleItems=function(){var t=[];return n.all(function(n){n.visible&&t.push(n)}),t},n},i.List=function(t){function u(n,t,u){var f=new i.Item(n,t);return f.listen("mouseover",function(){r.collection.highlight(f),f.highlight()}),r.collection.listen("highlight",f.lowlight),f.listen("select",function(n){r.collection.fire("select",n),u(n)}),f}var r=new i.Eventable(this);return r.options=t||{},r.element=i.create("div",{className:"pca pcalist"}),r.collection=new i.Collection,r.visible=!0,r.scroll={held:!1,moved:!1,origin:0,position:0,x:0,y:0,dx:0,dy:0},r.highlightedItem=null,r.headerItem=null,r.footerItem=null,r.firstItem=null,r.lastItem=null,r.firstItemClass="pcafirstitem",r.lastItemClass="pcalastitem",r.options.minItems=r.options.minItems||0,r.options.maxItems=r.options.maxItems||10,r.options.allowTab=r.options.allowTab||!1,r.show=function(){return r.visible=!0,r.element.style.display="",r.fire("show"),r.resize(),r},r.hide=function(){return r.visible=!1,r.element.style.display="none",r.fire("hide"),r},r.draw=function(){return r.destroy(),r.headerItem&&r.element.appendChild(r.headerItem.element),r.collection.all(function(n){r.element.appendChild(n.element)}),r.footerItem&&r.element.appendChild(r.footerItem.element),r.resize(),r.fire("draw"),r},r.markItems=function(){r.firstItem&&i.removeClass(r.firstItem.element,r.firstItemClass),r.lastItem&&i.removeClass(r.lastItem.element,r.lastItemClass),r.collection.count&&(r.firstItem=r.headerItem||r.collection.firstVisibleItem,r.lastItem=r.footerItem||r.collection.lastVisibleItem,i.addClass(r.firstItem.element,r.firstItemClass),i.addClass(r.lastItem.element,r.lastItemClass))},r.add=function(n,t,i){return r.collection.add(n,t,i),r.draw(),r},r.destroy=function(){while(r.element.childNodes&&r.element.childNodes.length)r.element.removeChild(r.element.childNodes[0]);return r},r.clear=function(){return r.collection.clear(),r.destroy(),r.fire("clear"),r},r.setScroll=function(n){return r.element.scrollTop=n,r.fire("scroll"),r},r.enableTouch=function(){function f(t){t=t||n.event,r.scroll.held=!0,r.scroll.moved=!1,r.scroll.origin=parseInt(r.scrollTop),r.scroll.y=parseInt(t.touches[0].pageY)}function e(){r.scroll.held=!1}function t(){r.scroll.held=!1}function u(t){r.scroll.held&&(t=t||n.event,i.smash(t),r.scroll.dy=r.scroll.y-parseInt(t.touches[0].pageY),r.scroll.position=r.scroll.origin+r.scroll.dy,r.setScroll(r.scroll.position),r.scroll.moved=!0)}return i.listen(r.element,"touchstart",f),i.listen(r.element,"touchmove",u),i.listen(r.element,"touchend",e),i.listen(r.element,"touchcancel",t),r},r.move=function(n){return n&&(r.collection.highlight(n),(n===r.headerItem||n===r.footerItem)&&n.highlight(),r.scrollToItem(n)),r},r.next=function(){return r.move(r.nextItem())},r.previous=function(){return r.move(r.previousItem())},r.first=function(){return r.move(r.firstItem)},r.last=function(){return r.move(r.lastItem)},r.nextItem=function(){return r.highlightedItem?r.highlightedItem===r.collection.lastVisibleItem&&(r.footerItem||r.headerItem)?r.footerItem||r.headerItem:r.footerItem&&r.headerItem&&r.highlightedItem===r.footerItem?r.headerItem:r.collection.next():r.firstItem},r.previousItem=function(){return r.highlightedItem?r.highlightedItem===r.collection.firstVisibleItem&&(r.footerItem||r.headerItem)?r.headerItem||r.footerItem:r.footerItem&&r.headerItem&&r.highlightedItem===r.headerItem?r.footerItem:r.collection.previous():r.lastItem},r.currentItem=function(){return r.highlightedItem},r.selectable=function(){return r.visible&&!!r.currentItem()},r.select=function(){return r.selectable()&&r.currentItem().select(),r},r.navigate=function(n){switch(n){case 40:return r.next(),!0;case 38:return r.previous(),!0;case 13:if(r.selectable())return r.select(),!0;case 9:if(r.options.allowTab)return r.next(),!0}return!1},r.scrollToItem=function(n){return r.scroll.position=r.element.scrollTop,n.element.offsetTopr.scroll.position+r.element.offsetHeight&&(r.scroll.position=n.element.offsetTop+n.element.offsetHeight-r.element.offsetHeight,r.setScroll(r.scroll.position)),r},r.filter=function(n){var t=r.collection.count;return r.collection.filter(n),r.markItems(),t!==r.collection.count&&r.fire("filter",n),r},r.getHeight=function(){for(var t=r.collection.visibleItems(),o=r.headerItem?i.getSize(r.headerItem.element).height:0,e=r.footerItem?i.getSize(r.footerItem.element).height:0,f=0,u=0,n=0;n0&&(r.element.style.height=n+"px")},r.setHeaderItem=function(n,t,f){return r.headerItem=u(n,t,f),i.addClass(r.footerItem.element,"pcaheaderitem"),r.markItems(),r},r.setFooterItem=function(n,t,f){return r.footerItem=u(n,t,f),i.addClass(r.footerItem.element,"pcafooteritem"),r.markItems(),r},r.collection.listen("highlight",function(n){r.highlightedItem=n}),r.collection.listen("add",function(n){r.markItems(),r.fire("add",n)}),r.options.name&&(i.setAttributes(r.element,{id:r.options.name,role:"listbox","aria-activedescendant":""}),r.collection.listen("add",function(n){function u(n){n.listen("highlight",function(){i.setAttributes(r.element,{"aria-activedescendant":n.id})})}for(var t=0;ts.height,l,c;return f.upwards=!w&&y&&!f.options.onlyDown,f.upwards?f.options.force?f.element.style.top=-(s.height+a.height+2)+"px":(f.element.style.top=o.top-h.top-s.height+(e?u.top:0)+"px",f.element.style.left=o.left-h.left+(e?u.left:0)+"px"):f.options.force?f.element.style.top="auto":(f.element.style.top=o.top-h.top+a.height+1+(e?u.top:0)+"px",f.element.style.left=o.left-h.left+(e?u.left:0)+"px"),f.options.left&&(f.element.style.left=parseInt(f.element.style.left)+parseInt(f.options.left)+"px"),f.options.top&&(f.element.style.top=parseInt(f.element.style.top)+parseInt(f.options.top)+"px"),l=parseInt(i.getStyle(f.element,"borderLeftWidth"))+parseInt(i.getStyle(f.element,"borderRightWidth"))||0,c=Math.max(i.getSize(t).width-l,0),f.fixedWidth||(f.element.style.minWidth=c+"px"),(r.documentMode&&r.documentMode<=7||/\bMSIE\s(7|6)/.test(i.agent))&&(f.setWidth(Math.max(c,280)),f.element.style.left=(parseInt(f.element.style.left)||0)-2+"px",f.element.style.top=(parseInt(f.element.style.top)||0)-2+"px"),f.positionField=t,f.fire("move"),f},f.reposition=function(){return f.positionField&&f.position(f.positionField),f},f.prompt=function(n,t){if(typeof t=="number"){if(t===0?n=" "+n:t>=n.length?(n=n+" ",t++):(n=n.substring(0,t)+" "+n.substring(t,n.length),t++),i.setValue(f.field,n),f.field.setSelectionRange)f.field.focus(),f.field.setSelectionRange(t,t);else if(f.field.createTextRange){var r=f.field.createTextRange();r.move("character",t),r.select()}}else i.setValue(f.field,n);return f},f.show=function(){return f.disabled||f.stealth||(f.visible=!0,f.element.style.display="",f.list.collection.count?(f.options.emptyMessage&&f.header.clear().hide(),f.list.show()):(f.options.emptyMessage&&f.header.setText(f.options.emptyMessage).show(),f.list.hide()),f.setScroll(0),f.reposition(),f.fire("show")),f},f.showAll=function(){f.list.filter(""),f.show()},f.hide=function(){return f.visible=!1,f.element.style.display="none",f.fire("hide"),f},f.focus=function(n){f.field=n,f.focused=!0,f.show(),f.position(n),f.fire("focus")},f.blur=function(){f.focused=!1,f.checkHide(),f.fire("blur")},f.checkHide=function(){return!f.visible||f.focused||f.hover||f.hide(),f},f.handleKey=function(n,t){n===27?(f.hide(),f.fire("escape")):n===17?f.controlDown=!1:n===8||n===46?(f.filter(),f.fire("delete")):n!==0&&n<=46&&n!==32?f.visible&&f.list.navigate(n)?t&&i.smash(t):(n===38||n===40)&&f.filter():f.visible&&f.filter(),f.fire("keyup",n)},f.keydown=function(t){t=t||n.event;var r=t.which||t.keyCode;r===17&&(f.controlDown=!0),r===9&&f.options.allowTab&&i.smash(t)},f.keyup=function(t){t=t||n.event;var i=t.which||t.keyCode;f.handleKey(i,t)},f.keypress=function(t){var r=n.event?n.event.keyCode:t.which;f.visible&&r===13&&f.list.selectable()&&i.smash(t)},f.paste=function(){n.setTimeout(function(){f.filter(),f.fire("paste")},0)},f.click=function(n){f.fire("click",n)},f.dblclick=function(n){f.fire("dblclick",n)},f.change=function(n){f.fire("change",n)},f.resize=function(){f.visible&&f.reposition()},f.add=function(n,t,i){return f.list.add(n,t,i),f},f.clear=function(){return f.list.clear(),f},f.setScroll=function(n){return f.list.setScroll(n),f},f.setWidth=function(n){return typeof n=="number"?(n=Math.max(n,220),f.element.style.width=n+"px",r.documentMode&&r.documentMode<=5&&(n-=2),f.list.element.style.width=n+"px"):(f.element.style.width=n,f.list.element.style.width=n),f.fixedWidth=n!=="auto",f.element.style.minWidth=0,f},f.setHeight=function(n){return f.list.element.style.height=typeof n=="number"?n+"px":n,f},f.filter=function(n){return n=n||i.getValue(f.field),f.skipFilter?f.list.collection.match(n).length+/g,"")},i.escapeHtml=function(n){return i.replaceList(n,i.hypertext)},i.validId=function(n){return/[a-z0-9\-_:\.\[\]]+/gi.exec(n)},i.trimSpaces=function(n){return n.replace(/^\s+|\s(?=\s)|\s$/g,"")},i.tidy=function(n,t){t=t.replace("\\","\\\\");var i=new RegExp("^"+t+"+|"+t+"(?="+t+")|"+t+"$","gi");return n.replace(i,"")},i.getText=function(n){return/[a-zA-Z][a-zA-Z\s]+[a-zA-Z]/.exec(n)},i.getNumber=function(n){return/\d+/.exec(n)},i.parseJSON=function(n){return n&&/^[\],:{}\s]*$/.test(n.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))?typeof JSON!="undefined"?JSON.parse(n):eval(n):{}},i.parseJSONDate=function(n){return new Date(parseInt(i.getNumber(n)))},i.containsWord=function(n,t){var i=new RegExp("\\b"+t+"\\b","gi");return i.test(n)},i.removeWord=function(n,t){var i=new RegExp("\\s?\\b"+t+"\\b","gi");return n.replace(i,"")},i.merge=function(n,t){for(var i in n)t[i]||(t[i]=n[i]);return t},i.getElement=function(n,t){var f,u;if(!n)return null;if(typeof n.nodeType=="number")return n;if(typeof n=="string"){if(t=i.getElement(t)||r,f=t.getElementById?t.getElementById(n):null,f)return f;if(u=t.getElementsByName?t.getElementsByName(n):null,u.length)return u[0]}return i.fuzzyMatch?i.getElementByRegex(n,t):null},i.getElementByRegex=function(n,t){var e,o,u,f;if(typeof n=="string")try{n=new RegExp(n)}catch(s){return null}if(n&&typeof n=="object"&&n.constructor===RegExp)for(t=i.getElement(t)||r,e=0;e"))},i.inputField=function(n){return(n=i.getElement(n))?n.tagName&&(n.tagName==="INPUT"||n.tagName==="TEXTAREA")&&n.type&&(n.type==="text"||n.type==="search"||n.type==="email"||n.type==="textarea"||n.type==="number"||n.type==="tel"):!1},i.selectList=function(n){return(n=i.getElement(n))?n.tagName&&n.tagName==="SELECT":!1},i.getSelectedItem=function(n){return(n=i.getElement(n))&&n.tagName==="SELECT"&&n.selectedIndex>=0?n.options[n.selectedIndex]:null},i.checkBox=function(n){return(n=i.getElement(n))?n.tagName&&n.tagName==="INPUT"&&n.type&&n.type==="checkbox":!1},i.clear=function(n){return i.setValue(n,""),i},i.getPosition=function(t){var f={left:0,top:0},u,r;if(t=i.getElement(t)){if(!t.tagName)return f;if(typeof t.getBoundingClientRect!="undefined"){var s=t.getBoundingClientRect(),e=!i.isPage(i.getTopOffsetParent(t)),h=i.getScroll(n),o=i.getParentScroll(t);return{left:s.left+o.left+(e?0:h.left),top:s.top+o.top+(e?0:h.top)}}u=0,r=0;do u+=t.offsetLeft,r+=t.offsetTop;while(t=t.offsetParent);return{left:u,top:r}}return f},i.isPage=function(t){return t===n||t===r||t===r.body},i.getScroll=function(n){return{left:parseInt(n.scrollX||n.scrollLeft,10)||(i.isPage(n)?parseInt(r.documentElement.scrollLeft)||0:0),top:parseInt(n.scrollY||n.scrollTop,10)||(i.isPage(n)?parseInt(r.documentElement.scrollTop)||0:0)}},i.getSize=function(n){return{height:n.offsetHeight||n.innerHeight||(i.isPage(n)?r.documentElement.clientHeight||r.body.clientHeight:0),width:n.offsetWidth||n.innerWidth||(i.isPage(n)?r.documentElement.clientWidth||r.body.clientWidth:0)}},i.getParentScroll=function(n){var u={left:0,top:0},r,t;if(n=i.getElement(n)){if(!n.tagName||!(n=n.parentNode))return u;r=0,t=0;do{if(i.isPage(n))break;r+=parseInt(n.scrollLeft)||0,t+=parseInt(n.scrollTop)||0}while(n=n.parentNode);return{left:r,top:t}}return u},i.getTopOffsetParent=function(n){while(n.offsetParent)if(n=n.offsetParent,i.getStyle(n,"position")==="fixed")break;return n},i.getStyle=function(t,i){return((n.getComputedStyle?n.getComputedStyle(t):t.currentStyle)||{})[i]||""},i.addClass=function(n,t){(n=i.getElement(n))&&(i.containsWord(n.className||"",t)||(n.className+=(n.className?" ":"")+t))},i.removeClass=function(n,t){(n=i.getElement(n))&&(n.className=i.removeWord(n.className,t))},i.setAttribute=function(n,t,r){(n=i.getElement(n))&&n.setAttribute(t,r)},i.setAttributes=function(n,t){if(n=i.getElement(n))for(var r in t)n.setAttribute(r,t[r])},i.applyStyleFixes=function(n,t){for(var h,u,f,s,o,e=0;e0&&(u=[{target:arguments[0].target||arguments[0].srcElement}]),e=function(){r=null,i||n.apply(o,u)},f=i&&!r,clearTimeout(r),r=setTimeout(e,t),f&&n.apply(o,u)}},i.fnDefined=function(n){return typeof n=="function"},i.getLabel=function(n){for(var f=r.getElementsByTagName("LABEL"),u,t=0;t
{"+r.nameProperty+"}
",r.load=function(){function l(n){r.change(n),r.fire("select",n)}function c(t){if(n.selectList(t)){var i=n.getSelectedItem(t);r.change(r.find(i.value)||r.find(i.text))}else r.setCountry(n.getValue(t));r.textChanged=!1}var s,i,e,h,t,u,o,f;if(n.addClass(r.autocomplete.element,"pcacountrylist"),r.options.codesList){for(s=r.options.codesList.replace(/\s/g,"").split(","),i=[],r.autocomplete.clear(),e=0;e{count} matching results"},cy:{DIDYOUMEAN:"A oeddech yn meddwl:",NORESULTS:"Dim canlyniadau ar ganlyniadau",KEEPTYPING:"Cadwch teipio eich cyfeiriad i arddangos mwy o ganlyniadau",RETRIEVEERROR:"Mae'n ddrwg gennym, ni allem adfer y cyfeiriad hwn",SERVICEERROR:"Gwall gwasanaeth:",COUNTRYSELECT:"Dewiswch gwlad",NOLOCATION:"Mae'n ddrwg gennym, nid oeddem yn gallu cael eich lleoliad",NOCOUNTRY:"Mae'n ddrwg gennym, ni allem ddod o hyd y wlad hon",MANUALENTRY:"Ni allaf ddod o hyd i fy nghyfeiriad. Gadewch i mi deipio mewn",RESULTCOUNT:"{count} Canlyniadau paru"},fr:{DIDYOUMEAN:"Vouliez-vous dire:",NORESULTS:"Aucun résultat n'a été trouvé",KEEPTYPING:"Continuer à taper votre adresse pour afficher plus de résultats",RETRIEVEERROR:"Désolé , nous ne pouvions pas récupérer cette adresse",SERVICEERROR:"Erreur de service:",COUNTRYSELECT:"Changer de pays",NOLOCATION:"Désolé, nous n'avons pas pu obtenir votre emplacement",NOCOUNTRY:"Désolé, nous n'avons pas trouvé ce pays",MANUALENTRY:"Je ne peux pas trouver mon adresse. Permettez-moi de taper dans",RESULTCOUNT:"{count} résultats correspondants"},de:{DIDYOUMEAN:"Meinten Sie:",NORESULTS:"Keine Adressen gefunden",KEEPTYPING:"Geben Sie mehr von Ihrer Adresse ein, um weitere Ergebnisse anzuzeigen",RETRIEVEERROR:"Wir konnten diese Adresse leider nicht abrufen",SERVICEERROR:"Service-Fehler:",COUNTRYSELECT:"Land wechseln",NOLOCATION:"Wir konnten Ihren Standort leider nicht finden",NOCOUNTRY:"Wir konnten dieses Land leider nicht finden",MANUALENTRY:"Ich kann meine Adresse nicht finden. Lassen Sie mich es manuell eingeben",RESULTCOUNT:"{count} passenden Ergebnisse"}},n.exampleAddress={Id:"GBR|PR|52509479|0|0|0",DomesticId:"52509479",Language:"ENG",LanguageAlternatives:"ENG",Department:"",Company:"Postcode Anywhere (Europe) Ltd",SubBuilding:"",BuildingNumber:"",BuildingName:"Waterside",SecondaryStreet:"",Street:"Basin Road",Block:"",Neighbourhood:"",District:"",City:"Worcester",Line1:"Waterside",Line2:"Basin Road",Line3:"",Line4:"",Line5:"",AdminAreaName:"Worcester",AdminAreaCode:"47UE",Province:"Worcestershire",ProvinceName:"Worcestershire",ProvinceCode:"",PostalCode:"WR5 3DA",CountryName:"United Kingdom",CountryIso2:"GB",CountryIso3:"GBR",CountryIsoNumber:826,SortingNumber1:"94142",SortingNumber2:"",Barcode:"(WR53DA1PX)",Label:"Postcode Anywhere (Europe) Ltd\nWaterside\nBasin Road\n\nWorcester\nWR5 3DA\nUnited Kingdom",Type:"Commercial",DataLevel:"Premise",Field1:"",Field2:"",Field3:"",Field4:"",Field5:"",Field6:"",Field7:"",Field8:"",Field9:"",Field10:"",Field11:"",Field12:"",Field13:"",Field14:"",Field15:"",Field16:"",Field17:"",Field18:"",Field19:"",Field20:""},n.templates={AUTOCOMPLETE:"{HighlightedText}{{HighlightedDescription}}"},n.Address=function(t,i){function u(){r.lastActionTimer!=null&&(window.clearTimeout(r.lastActionTimer),r.lastActionTimer=null)}var r=new n.Eventable(this),f;r.fields=t||[],r.options=i||{},r.key=r.options.key||"",r.options.name=r.options.name||"",r.options.source=r.options.source||"",r.options.populate=typeof r.options.populate=="boolean"?r.options.populate:!0,r.options.onlyInputs=typeof r.options.onlyInputs=="boolean"?r.options.onlyInputs:!1,r.options.autoSearch=typeof r.options.autoSearch=="boolean"?r.options.autoSearch:!1,r.options.preselect=typeof r.options.preselect=="boolean"?r.options.preselect:!0,r.options.minSearch=r.options.minSearch||1,r.options.minItems=r.options.minItems||1,r.options.maxItems=r.options.maxItems||7,r.options.advancedFields=r.options.advancedFields||[],r.options.manualEntry=typeof r.options.manualEntry=="boolean"?r.options.manualEntry:!1,r.options.manualEntryItem=typeof r.options.manualEntryItem=="boolean"?r.options.manualEntryItem:!1,r.options.disableTime=r.options.disableTime||6e4,r.options.suppressAutocomplete=typeof r.options.suppressAutocomplete=="boolean"?r.options.suppressAutocomplete:!0,r.options.setCountryByIP=typeof r.options.setCountryByIP=="boolean"?r.options.setCountryByIP:!1,r.options.brand=r.options.brand||"PostcodeAnywhere"||"PostcodeAnywhere",r.options.product=r.options.product||"Capture+",r.options.culture=r.options.culture||"en-GB",r.options.prompt=typeof r.options.prompt=="boolean"?r.options.prompt:!1,r.options.promptDelay=r.options.promptDelay||0,r.options.inlineMessages=typeof r.options.inlineMessages=="boolean"?r.options.inlineMessages:!1,r.options.setCursor=typeof r.options.setCursor=="boolean"?r.options.setCursor:!1,r.options.matchCount=typeof r.options.matchCount=="boolean"?r.options.matchCount:!1,r.options.languagePreference=r.options.languagePreference||"",r.options.filteringMode=r.options.filteringMode||n.filteringMode.EVERYTHING,r.options.orderingMode=r.options.orderingMode||n.orderingMode.DEFAULT,r.options.countries=r.options.countries||{},r.options.countries.defaultCode=r.options.countries.defaultCode||"",r.options.countries.value=r.options.countries.value||"",r.options.countries.prepopulate=typeof r.options.countries.prepopulate=="boolean"?r.options.countries.prepopulate:!0,r.options.list=r.options.list||{},r.options.list.name=r.options.name?r.options.name+"_results":"",r.options.list.maxItems=r.options.list.maxItems||r.options.maxItems,r.options.list.minItems=r.options.list.minItems||r.options.minItems,r.options.countries.list=r.options.countries.list||n.merge(r.options.list,{}),r.options.countries.list.name=r.options.name?r.options.name+"_countries":"",r.options.bar=r.options.bar||{},f="",n&&n.initial&&n.initial.accountCode&&(f=n.initial.accountCode),r.options.bar.visible=typeof r.options.bar.visible=="boolean"?r.options.bar.visible:!1&&f!=="DORMI11113"?!0:!1,r.options.bar.showCountry=typeof r.options.bar.showCountry=="boolean"?r.options.bar.showCountry:!0,r.options.bar.showLogo=typeof r.options.bar.showLogo=="boolean"?r.options.bar.showLogo:!0,r.options.bar.logoLink=typeof r.options.bar.logoLink=="boolean"?r.options.bar.logoLink:!1,r.options.bar.logoClass=r.options.bar.logoClass||"pcalogo"||"pcalogo",r.options.bar.logoTitle=r.options.bar.logoTitle||"Powered by www.pcapredict.com",r.options.bar.logoUrl=r.options.bar.logoUrl||"http://www.pcapredict.com/",r.options.search=r.options.search||{},r.country=r.options.countries.defaultCode,r.advancedFields=r.options.advancedFields,r.initialSearch=!1,r.searchContext=null,r.lastActionTimer=null,r.notifcationTimer=null,r.storedSearch=null,r.geolocation=null,r.loaded=!1,r.language="en",r.filteringMode=r.options.filteringMode,r.orderingMode=r.options.orderingMode,r.testMode=!1,r.instance=null,r.frugalSearch=!0,r.blockSearches=!0,r.cacheRequests=!0,r.autocomplete=null,r.countrylist=null,r.messageBox=null,r.load=function(){for(var p=[],h=[],t,v,f,b,e,w,y,u,a,l,o,s,c=0;c=36&&n<=40&&!r.initialSearch||n>40)&&r.searchFromField()}),r.autocomplete.listen("paste",function(){r.newSearch(),r.searchFromField()}),r.autocomplete.listen("focus",r.focus),r.autocomplete.listen("blur",r.blur),r.autocomplete.listen("show",function(){r.fire("show")}),r.autocomplete.listen("hide",function(){r.fire("hide")}),r.autocomplete.listen("dblclick",r.searchFromField),r.autocomplete.list.listen("filter",function(){r.frugalSearch&&r.search(n.getValue(r.autocomplete.field))}),r.autocomplete.listen("delete",r.newSearch),!r.options.countries.value&&h.length&&(r.options.countries.value=n.getValue(h[0])),r.options.countries.language=r.language,r.countrylist=new n.CountryList(h,r.options.countries),r.countrylist.autocomplete.options.emptyMessage=n.messages[r.language].NOCOUNTRY,r.country=r.countrylist.country.iso3,r.countrylist.listen("change",function(n){r.country=n&&n.iso3?n.iso3:r.options.countries.defaultCode,r.fire("country",n)}),r.countrylist.listen("select",r.switchToSearchMode),r.countrylist.autocomplete.listen("filter",function(){r.options.preselect&&r.countrylist.autocomplete.list.first()}),r.countrylist.autocomplete.listen("show",function(){r.fire("show")}),r.countrylist.autocomplete.listen("hide",function(){r.autocomplete.enable(),r.storedSearch!=null&&n.setValue(r.autocomplete.field,r.storedSearch),r.storedSearch=null,r.fire("hide")}),r.countrylist.autocomplete.list.collection.count===1&&(r.options.bar.showCountry=!1),f=n.create("div",{className:"pcaflagbutton"}),b=r.countrylist.flag(),f.appendChild(b),r.autocomplete.footer.setContent(r.options.bar.showCountry?f:""),n.listen(f,"click",r.switchToCountrySelect),e=n.create("div",{className:"pcaflagbutton"}),w=r.countrylist.flag(),e.appendChild(w),r.countrylist.autocomplete.footer.setContent(r.options.bar.showCountry?e:""),n.listen(e,"click",r.switchToSearchMode),y=n.create("div",{className:"pcamessage pcadisableselect",innerHTML:n.messages[r.language].COUNTRYSELECT}),r.autocomplete.footer.setContent(r.options.bar.showCountry?y:""),u=n.create("a",{href:r.options.bar.logoUrl,target:"_blank",rel:"nofollow"}),a=n.create("div",{className:r.options.bar.logoClass+" pcalogo"+r.language,title:r.options.bar.logoTitle}),r.options.bar.logoLink?u.appendChild(a):u=a,r.autocomplete.footer.setContent(u),r.showFooterLogo=function(){u.style.display=r.options.bar.showLogo?"":"none"},r.showFooterMessage=function(){u.style.display=r.options.bar.showCountry?"none":r.options.bar.showLogo?"":"none"},r.options.bar.visible?(r.autocomplete.footer.show(),r.showFooterMessage()):r.autocomplete.hide(),l=n.create("div",{className:"pcamessage pcadisableselect",innerHTML:n.messages[r.language].COUNTRYSELECT}),r.countrylist.autocomplete.footer.setContent(r.options.bar.showCountry?l:""),r.options.bar.visible&&r.countrylist.autocomplete.footer.show(),r.options.manualEntryItem&&r.addManualEntryItem(),r.options.setCountryByIP&&r.setCountryByIP(),i.name&&(o=i.list.name,s=i.countries.list.name,n.setAttributes(y,{id:o+"_label"}),n.setAttributes(f,{id:o+"_button",role:"button","aria-labelledby":o+"_label"}),n.setAttributes(l,{id:s+"_label"}),n.setAttributes(e,{id:s+"_button",role:"button","aria-labelledby":s+"_label"})),r.messageBox=n.create("div",{className:"pcatext pcanotification"}),n.append(r.messageBox,n.container),r.loaded=!0,r.fire("load")},r.searchFromField=function(){var t=n.getValue(r.autocomplete.field);t&&!r.autocomplete.disabled&&(!r.initialSearch||!r.frugalSearch)&&t.length>=r.options.minSearch&&(r.initialSearch=!0,r.search(t))},r.search=function(t){function e(t,i){t.length?r.display(t,n.templates.AUTOCOMPLETE,i):r.noResultsMessage()}var f,i,u;return r.searchContext&&(~t.indexOf(r.searchContext.search)?t=t.replace(r.searchContext.search,r.searchContext.text):r.searchContext=null),f=r.searchContext?r.searchContext.id||"":"",i={searchTerm:t,lastId:f,options:r.options.search},r.fire("search",i),i.searchTerm&&(u={Key:r.key,Text:i.searchTerm,Origin:r.country,Language:r.language,Container:i.lastId,Filter:r.filteringMode,Instance:r.instance,Test:r.testMode,$block:r.blockSearches,$cache:r.cacheRequests},i.options.maxSuggestions&&(u.MaxSuggestions=i.options.maxSuggestions),i.options.maxResults&&(u.MaxResults=i.options.maxResults),i.options.language&&(u.Language=i.options.language),i.options.limit&&(u.Limit=i.options.limit),i.options.countries&&(u.Countries=i.options.countries),i.options.datasets&&(u.Datasets=i.options.datasets),n.fetch("Capture/Interactive/Find/v1.00",u,e,r.error)),r},r.retrieve=function(t){function u(t){r.message(n.messages[r.language].RETRIEVEERROR,{clickToDisable:r.options.manualEntry,error:!0,clearList:!0}),r.error(t)}function e(n){n.length?r.populate(n):u(n)}for(var f={Key:r.key,Id:t,Source:r.options.source,$cache:r.cacheRequests},i=0;i=0?t.Cursor:null)):(n.setValue(r.autocomplete.field,i+" "),r.autocomplete.field.focus()),r.searchContext={id:t.Id,text:t.Text,search:i},r.search(i)}return r.fire("select",t),t.Type==="Address"?r.retrieve(t.Id):i(),r},r.highlight=function(n,t,i){function e(n,r){for(var u,f=r.length-1;f>=0;f--)u=r[f].split("-"),n=n.substring(0,parseInt(u[0]))+t+n.substring(parseInt(u[0]),parseInt(u[1]))+i+n.substring(parseInt(u[1]),n.length);return n}var f,r,u;for(t=t||"",i=i||"",f=0;f0&&(r.HighlightedText=e(r.HighlightedText,u[0].split(","))),u.length>1&&(r.HighlightedDescription=e(r.HighlightedDescription,u[1].split(","))))},r.populate=function(t){var u=t[0],h,f,a,o,v,l,e,s,i,c,y;if(r.options.languagePreference)for(h=0;h1)return n.Company;t===1&&i===1?e=n.Company:(t--,i--)}for(u=n.Line1?n.Line2?n.Line3?n.Line4?n.Line5?5:4:3:2:1:0,o=i>=u?t:Math.floor(1+(u/i+(i-(t-1))/i)*(t-1)),s=Math.floor(u/i+(i-t)/i),f=0;f1?t.substring(0,2).toLowerCase():"en",n.messages[r.language]||(r.language="en")},r.setCulture=function(n){r.options.culture=n,r.reload()},r.setWidth=function(n){r.autocomplete.setWidth(n),r.countrylist.autocomplete.setWidth(n)},r.setHeight=function(n){r.autocomplete.setHeight(n),r.countrylist.autocomplete.setHeight(n)},r.clear=function(){for(var t=0;t{text}",r.manualEntry)},r.bound=function(i){if(i=n.getElement(i))for(var u=0;u