var Buttons=function(){return{Loading:{button:{loadingText:"Please wait",loadingClass:"is-loading",set:function(n){var i=n[0].nodeName==="INPUT",t=Buttons.Loading.button.loadingText,r=Buttons.Loading.button.loadingClass;n.data("text",i?n.val():n.text()).addClass(r).attr("disabled","disabled");setTimeout(function(){if(n.hasClass(r)){i?n.val(t+"..."):n.text(t+"...");n.width(Math.ceil(n.width())).css({"white-space":"nowrap","text-align":"left"});var u=0,f=setInterval(function(){if(!n.hasClass(r)||n.closest("body").length==0){clearInterval(f);return}u=++u%4;i?n.val(t+Array(u+1).join(".")):n.text(t+Array(u+1).join("."))},500)}},500)},unset:function(n){if(n.length){var i=n[0].nodeName==="INPUT",t=n.data("text"),r=Buttons.Loading.button.loadingClass;n.css({width:"","white-space":"","text-align":""}).removeClass(r).removeAttr("disabled");typeof t!="undefined"&&t!==""&&(i?n.val(t):n.text(t))}}}}}}(),Validation=function(){return{Init:function(){Validation.KenticoUpdatePanels.Init();Validation.TermsAndConditionsInit();Validation.ConfigureValidator();Validation.MaxLengthTextAreas()},ConfigureValidator:function(){if(typeof ValidatorUpdateDisplay!="undefined"){var n=ValidatorUpdateDisplay;ValidatorUpdateDisplay=function(t){if(t.controltovalidate){var i=$.inArray(t,Page_Validators),r=$.inArray(t.controltovalidate,Page_Validators.map(function(n){return n.controltovalidate})),u=$("#"+t.controltovalidate);r<i&&u.attr("aria-invalid")=="true"||$("#"+t.controltovalidate).attr("aria-invalid",!t.isvalid)}n(t)}}},TermsAndConditionsInit:function(){var n=$("input[type=checkbox][data-termsSelection]"),t=$("[data-validator=termsAndConditions]");n.on("change",function(){var n=document.getElementById(t.attr("id"));ValidatorValidate(n);ValidatorUpdateIsValid();ValidationSummaryOnSubmit()})},MaxLengthTextAreas:function(){var n=$("[data-js-field-character-count]");n.length&&n.each(function(){var n=$(this),t=isNaN(parseInt(n.data("js-field-character-count")))?0:parseInt(n.data("js-field-character-count")),i=n.is("textarea")?n:n.find("textarea").first();if(i.length&&t!==0)i.on("input",function(){var n=$(this),u=n.parent().find("[data-js-field-character-count-display]").first(),r=n.val(),i;r.length>t&&n.val(r.slice(0,t));i=t-n.val().length;u.html(i+" character"+(i!==1?"s":"")+" remaining")})})},ValidateTermsAndConditions:function(n,t){var i=$("input[type=checkbox][data-termsSelection]");t.IsValid=i.is(":checked")},ValidateEmail:function(n,t){t.IsValid=/\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/.test(t.Value)},ValidateCKEditorRequired:function(n,t){var i=$(n).closest("[data-js-embed-ckeditor]").find("textarea").val();t.IsValid=!(i===undefined||i==null||!/\S/.test(i))},KenticoUpdatePanels:{inputErrorClass:"error",errorLabelSelector:".e-field-error",Init:function(){Validation.KenticoUpdatePanels.Change();typeof Sys!="undefined"&&(Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(Validation.KenticoUpdatePanels.BeforeAjaxUpdate),Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(Validation.KenticoUpdatePanels.AfterAjaxUpdate))},Change:function(){$(document).on("change",".FormPanel input, .FormPanel select, .FormPanel textarea",function(){var n=$(this),i=n.parent(),r=i[0].id,t=Validation.KenticoUpdatePanels.GetErrorLabelForInputWrapper(r,"e");n.removeClass(Validation.KenticoUpdatePanels.inputErrorClass);t.length&&t.hide()})},BeforeAjaxUpdate:function(n,t){var i=$(t.get_postBackElement());i.length&&Buttons.Loading.button.set(i.first())},AfterAjaxUpdate:function(n,t){var i=$(t.get_panelsUpdated());Validation.KenticoUpdatePanels.EnhanceErroredFields(i);$.each(n._asyncPostBackControlIDs,function(){Buttons.Loading.button.unset($("[name='"+this+"']"))})},EnhanceErroredFields:function(n){n.length&&n.each(function(){var t=$(this),i=t.find(Validation.KenticoUpdatePanels.errorLabelSelector),n,r;i.each(function(){var i=$(this),r=i[0].id,n=Validation.KenticoUpdatePanels.GetInputWrapperForErrorLabel(r),t;(n.length||(n=i.closest(".f-newsletter__subscribe__field-wrapper")),t=n.length?n.find("input, select, textarea").first():[],t.length)&&(t.attr({"aria-described-by":r,"aria-invalid":!0}),t.addClass(Validation.KenticoUpdatePanels.inputErrorClass))});Validation.KenticoUpdatePanels.ScrollToMessage(t);n=Validation.KenticoUpdatePanels.GetInputWrapperForErrorLabel(i.first().attr("id"));n.length&&(r=n.find("input, select, textarea").first(),r.focus())})},AddAccessibility:function(n){n.length&&n.each(function(){var n=$(this),t=n.find(Validation.KenticoUpdatePanels.errorLabelSelector);t.each(function(){var i=$(this),r=i[0].id,n=Validation.KenticoUpdatePanels.GetInputWrapperForErrorLabel(r),t=n.length?n.find("input, select, textarea").first():[];t.length&&t.addClass(Validation.KenticoUpdatePanels.inputErrorClass)});Validation.KenticoUpdatePanels.ScrollToMessage(n)})},GetInputWrapperForErrorLabel:function(n){return Validation.KenticoUpdatePanels.GetElFromID(n,"i")},GetErrorLabelForInputWrapper:function(n){return Validation.KenticoUpdatePanels.GetElFromID(n,"e")},GetElFromID:function(n,t){if(typeof n!="string"||typeof t!="string")return[];var i=n.substring(n.lastIndexOf("_")+1),r=[t,i.substring(1)].join(""),u=n.replace(i,r);return $("#"+u)},ScrollToMessage:function(n){var t,i;typeof n!="undefined"&&n.length&&(t=n.find(".alert--success").first(),t.length&&t.is(":visible")&&(i=$("html,body"),i.is(":animated")||i.animate({scrollTop:t.offset().top-150},1e3)))}}}}(),FindPsych;$(function(){Validation.Init()});var Utils=function(){var n=navigator.userAgent;return{Debounce:function(n,t,i){var r;return function(){var u=this,f=arguments,e=function(){r=null;i||n.apply(u,f)},o=i&&!r;clearTimeout(r);r=setTimeout(e,t);o&&n.apply(u,f)}},MaintainAspectRatio:function(n){var t=$(n),i=t.parent();t.each(function(){$(this).data("aspectRatio",this.height/this.width).removeAttr("height").removeAttr("width")});$(window).resize(function(){var n=i.width();t.each(function(){var t=$(this);t.width(n).height(n*t.data("aspectRatio"))})}).resize()},ReturnYoutubeVideoID:function(n){var i=$(n).is("iframe")?$(n).attr("src"):$(n).is("a")?$(n).attr("href"):"",t=i.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/);return t&&t[2].length==11?t[2]:"ReturnYoutubeVideoID failed."},EqualiseHeights:function(n,t){var i=function(n){var t=0;n.each(function(){var i=$(this),n;i.css({height:""});n=i.height();n>t&&(t=n)});n.height(t)};typeof t=="undefined"?i($(n)):$(t).each(function(){i($(this).find(n))})},SlideToggle:function(n,t,i){var t=typeof t=="number"?parseInt(t):"fast";typeof n!="undefined"&&n.length&&(n.hasClass("visually-hidden")?Utils.SlideDown(n,t,i):Utils.SlideUp(n,t,i))},SlideUp:function(n,t,i){var t=typeof t=="number"?parseInt(t):"fast";typeof n!="undefined"&&n.length&&n.slideUp(t,function(){n.addClass("visually-hidden").attr("aria-hidden","true").slideDown(0);typeof i=="function"&&i()})},SlideDown:function(n,t,i){var t=typeof t=="number"?parseInt(t):"fast";typeof n!="undefined"&&n.length&&n.slideUp(0,function(){n.removeClass("visually-hidden").removeAttr("aria-hidden").slideDown(t,function(){typeof i=="function"&&i()})})},SlideUpHeight:function(n){if(typeof n!="undefined"&&n.length){var t=parseInt(n.css("height"));n.css({height:t,overflow:"hidden",transition:"height .4s ease, visibility .4s ease"}).removeAttr("data-visible-collapsible").attr("aria-hidden",!0);setTimeout(function(){n.css({height:0,visibility:"hidden"})},10)}},SlideDownHeight:function(n){if(typeof n!="undefined"&&n.length){n.removeClass("visually-hidden");n.css({height:"auto"});var t=parseInt(n.css("height"));n.css({height:0,visibility:"hidden",overflow:"hidden",transition:"height .4s ease, visibility .4s ease"});setTimeout(function(){n.css({height:t,visibility:"visible"}).attr("data-visible-collapsible","").removeAttr("aria-hidden");setTimeout(function(){n.css({height:"auto"}).attr("data-visible-collapsible","").removeAttr("aria-hidden")},440)},10)}},WasIs:function(n){var t=$.extend({wasMinWidth:null,isMinWidth:null,wasMaxWidth:null,isMaxWidth:null,ifTrueDo:null,ifFalseDo:null},n),r=undefined,u=$(window).innerWidth(),f=null,e=null,o=null,s=null,i={};$(window).smartresize(function(){t.wasMinWidth!==null&&t.wasMinWidth!==undefined&&(f=r>parseInt(t.wasMinWidth),i.wasMinWidth=f);t.wasMaxWidth!==null&&t.wasMaxWidth!==undefined&&(o=r<parseInt(t.wasMaxWidth),i.wasMaxWidth=o);u=$(window).innerWidth();t.isMinWidth!==null&&t.isMinWidth!==undefined&&(e=u>parseInt(t.isMinWidth),i.isMinWidth=e);t.isMaxWidth!==null&&t.isMaxWidth!==undefined&&(s=u<parseInt(t.isMaxWidth),i.isMaxWidth=s);var n=0,h=0;for(property in i)n++,i[property]===!0&&h++;n===h?t.ifTrueDo!==null&&t.ifTrueDo!==undefined&&typeof t.ifTrueDo=="function"&&t.ifTrueDo.call(this):t.ifFalseDo!==null&&t.ifFalseDo!==undefined&&typeof t.ifFalseDo=="function"&&t.ifFalseDo.call(this);r=$(window).innerWidth()}).resize()},IsAndroidMobile:function(){return n.indexOf("Android")>-1&&n.indexOf("Mozilla/5.0")>-1&&n.indexOf("AppleWebKit")>-1},IsAndroidNativeBrowser:function(){var t=new RegExp(/AppleWebKit\/([\d.]+)/),r=t.exec(n),i=r===null?null:parseFloat(t.exec(n)[1]);return this.IsAndroidMobile()&&i!==null&&i<537},MinWidth:function(n){return Modernizr.mq!=undefined?Modernizr.mq("only screen and (min-width: "+n+")")?!0:!1:'"Media Queries" is not an included detect in your Modernizr build.'},MaxWidth:function(n){return Modernizr.mq!=undefined?Modernizr.mq("only screen and (max-width: "+n+")")?!0:!1:'"Media Queries" is not an included detect in your Modernizr build.'},DeviceOrientation:function(){return Modernizr.mq!=undefined?Modernizr.mq("only screen and (orientation:portrait)")?"portrait":Modernizr.mq("only screen and (orientation:landscape)")?"landscape":null:'"Media Queries" is not an included detect in your Modernizr build.'},DetectFirefox:function(){Modernizr.addTest("firefox",function(){return!!navigator.userAgent.match(/firefox/i)})},AddUserAgentAsClass:function(){var n=document.documentElement;n.setAttribute("data-useragent",navigator.userAgent)},AddIndexOfSupport:function(){Array.prototype.indexOf||(Array.prototype.indexOf=function(n,t){for(var i=t||0,r=this.length;i<r;i++)if(this[i]===n)return i;return-1})}()}}(),FontSize=function(){var n;return{buttonSelector:"[data-js-font-size]",normalFontSize:62.5,currentFontSize:62.5,wrapper:undefined,tenPercent:undefined,minFontSize:undefined,maxFontSize:undefined,Init:function(){FontSize.SetUpOptions();FontSize.Click()},SetUpOptions:function(){FontSize.wrapper=$("html").first();FontSize.tenPercent=FontSize.normalFontSize/10;FontSize.minFontSize=FontSize.normalFontSize-FontSize.tenPercent*2;FontSize.maxFontSize=FontSize.normalFontSize+FontSize.tenPercent*5},Click:function(){$(FontSize.buttonSelector).click(function(n){var t=$(this),i=t.data("js-font-size");i==="increase"?FontSize.Increase():FontSize.Decrease();n.preventDefault()})},Increase:function(){var n=FontSize.GetNewFontSizeValue("increase");FontSize.SetNewFontSizeValue(n);$(window).trigger("resize")},Decrease:function(){var n=FontSize.GetNewFontSizeValue("decrease");FontSize.SetNewFontSizeValue(n);$(window).trigger("resize")},GetNewFontSizeValue:function(n){var i=FontSize.wrapper,t;return typeof i=="undefined"?FontSize.normalFontSize:(t=FontSize.currentFontSize,n==="increase"?t<FontSize.maxFontSize?t+6.25:t:t>FontSize.minFontSize?t-6.25:t)},SetNewFontSizeValue:function(t){var i=FontSize.wrapper,r=FontSize.normalFontSize,u=Math.round(t/r*100),f=t!==r?["Text size: ",u,"%"].join(""):"Text size: 100%";i.attr("data-font-size-note",f).addClass("display-font-message");clearTimeout(n);n=setTimeout(function(){i.removeClass("display-font-message")},2e3);i.css({"font-size":[t,"%"].join("")});FontSize.currentFontSize=t}}}(),Navigation=function(){var n={mainNav:"[data-mainnav]",mainNavToggle:"[data-mainnav-toggle]",navItem:"[data-mainnav-item]",subNav:"[data-mainnav-sub]",subNavOpener:"[data-mainnav-sub-opener]",subNavCloser:"[data-mainnav-sub-closer]",subNavIndicator:"[data-mainnav-sub-indicator]",skipLinks:"[data-skiplink]"},t="is-active",i="e-nav-active";return{Init:function(){this.Bindings();this.MobileBindings()},Bindings:function(){var f=$(n.mainNav).first(),u=$(n.navItem),r=$("html").first();if(u.length){$(n.navItem).on("mouseenter focusin",function(){var u=$(this),f=u.find(n.subNav).first(),o=u.find(n.subNavIndicator).first();if(Utils.MinWidth("1280px")&&f.length){r.addClass(i);u.addClass(t);var e=0,s=u.position().left,e=s+parseInt(u.css("width"))/2;o.css("left",e+"px");f.css({left:Math.min(Math.max(e-parseInt(f.css("width"))/2,0),parseInt(u.parent().css("width"))-parseInt(f.css("width")))+"px"})}});$(n.navItem).on("mouseleave focusout",function(n){var u=$(this);Utils.MinWidth("1280px")&&(u.has(n.relatedTarget).length||u.removeClass(t),r.removeClass(i))})}},MobileBindings:function(){function r(t){return $(t).closest(n.navItem).first()}var o=$(n.mainNavToggle),f=$(n.subNavOpener),e=$(n.subNavCloser),s=$(n.mainNav),u=$("html").first();$(document).on("click",n.mainNavToggle,function(){u.toggleClass(i)}).on("click focusin",function(t){var r=$(t.target);r.is(n.mainNavToggle)||r.is(n.skipLinks)||r.closest(n.mainNav).length||u.removeClass(i)});f.on("click",function(){var i=r(this);i.hasClass(t)?(i.removeClass(t),setTimeout(function(){i.find("a").first().focus()},150)):(i.addClass(t),setTimeout(function(){i.find(n.subNavCloser).first().focus()},150))});e.on("click",function(){var n=r(this);n.removeClass(t);setTimeout(function(){n.find("a").first().focus()},150)});$(n.subNav+" a").on("blur",function(i){$(i.relatedTarget).closest(n.subNav).length||r(this).removeClass(t)});$(n.subNav+" a").on("focus",function(){r(this).addClass(t)});Utils.WasIs({wasMaxWidth:"1279px",isMinWidth:"1280px",ifTrueDo:function(){u.removeClass(i)}})}}}(),Expandables=function(){var n={wrapper:"[data-component-expandable]",trigger:"[data-component-expandable-trigger]",content:"[data-component-expandable-content]"},t={wrapper:"data-component-expandable"};return{Init:function(){this.Bindings()},Bindings:function(){$(document).on("click",n.trigger,function(t){t.preventDefault();Expandables.ToggleExpandable($(this).closest(n.wrapper).first())})},OpenExpandable:function(i){i=$(i);Utils.SlideDownHeight(i.find(n.content).first());i.attr(t.wrapper,"expanded")},CloseExpandable:function(i){i=$(i);Utils.SlideUpHeight(i.find(n.content).first());i.attr(t.wrapper,"closed")},ToggleExpandable:function(n){n=$(n);n.attr(t.wrapper)==="expanded"?this.CloseExpandable(n):this.OpenExpandable(n)}}}(),Tabs=function(){var t={wrapper:"[data-component-tabs]",track:"[data-component-tabs-track]",trigger:"[data-component-tabs-trigger-id]",content:"[data-component-tabs-content-id]"},n={currentTab:"data-component-tabs-active-tab",triggerId:"data-component-tabs-trigger-id",contentId:"data-component-tabs-content-id",triggerActive:"data-component-tabs-trigger-active"};return{Init:function(){this.Bindings();$(t.wrapper).each(function(){Tabs.UpdateState(this)})},Bindings:function(){$(document).on("click",t.trigger,function(i){i.preventDefault();var r=$(this),u=r.attr(n.triggerId),f=r.closest(t.wrapper).first();Tabs.SetPage(f,u)})},SetPage:function(t,i){var r=$(t),u=r.attr(n.currentTab);return u!==i&&(r.attr(n.currentTab,i),this.UpdateState(r)),!1},UpdateState:function(i){i=$(i);var r=i.attr(n.currentTab),u=i.find(t.track),f=i.find("["+n.triggerId+"="+r+"]");i.find(t.trigger).attr(n.triggerActive,!1);f.attr(n.triggerActive,!0);setTimeout(function(){i.find($("["+n.contentId+'="'+r+'"]')).find("input, select, textarea").not('[type="hidden"]').first().focus()},600);u.css("transform","translateX(-"+r*100+"%)")}}}();$(function(){Expandables.Init();Tabs.Init()});var AnchorList=function(){var n={listWrapper:"[data-widget-anchors]",itemLink:"[data-widget-anchors-link]",anchorItems:[".e-editable-text h3"]},t='<a href="${0}" class="w-anchor-list__item" data-widget-anchors-link><svg class="i-arrow-down w-anchor-list__icon" aria-hidden="true"><use xlink:href="/Custom/UI/Content/svg/symbol-defs.svg?v=20180703#icon-arrow-down"><\/use><\/svg>${1}<\/a>';return{Init:function(){var i="",u=$(n.anchorItems.join()),r=[];u.each(function(){var e=$(this);itemText=e.text().trim();for(var n=itemText.replace(/\s/g,"-").replace(/[^0-9a-zA-Z\-]+/g,"").replace(/[\-]+/g,"-").toLowerCase(),f=1,u=n;r.indexOf(u)>=0&&!$(u).length;)u=n+"-"+f,f=f+1;n=u;r.push(n);e.attr("id",n);i=i+t.replace(/\$\{0\}/g,"#"+n).replace(/\$\{1\}/g,itemText)});$(n.listWrapper).append(i);this.Bindings()},Bindings:function(){if($(n.itemLink).length)$(document).on("click",n.itemLink,function(n){n.preventDefault();var t=$(this);$("html, body").animate({scrollTop:$(""+t.attr("href")).offset().top},800)})}}}(),ImageGallery=function(){var n={galleryWrapper:"[data-widget-gallery-wrapper]",galleryItem:"[data-widget-gallery-item]"};return{Init:function(){$(n.galleryWrapper).each(function(){$(this).magnificPopup({delegate:n.galleryItem,type:"image",mainClass:"mfp-move-horizontal",removalDelay:300,gallery:{enabled:!0,navigateByImgClick:!1,tCounter:'<span class="mfp-counter">%curr% / %total%<\/span>'},closeMarkup:'<button title="%title%" type="button" class="mfp-close"><svg class="i-close"><use xlink:href="/Custom/UI/Content/svg/symbol-defs.svg?v=20180703#icon-close"><\/use><\/svg><\/button>',callbacks:{open:function(){$.magnificPopup.instance.next=function(){var n=this;n.wrap.removeClass("mfp-image-loaded");setTimeout(function(){$.magnificPopup.proto.next.call(n)},200)};$.magnificPopup.instance.prev=function(){var n=this;n.wrap.removeClass("mfp-image-loaded");setTimeout(function(){$.magnificPopup.proto.prev.call(n)},200)}},imageLoadComplete:function(){var n=this;setTimeout(function(){n.wrap.addClass("mfp-image-loaded")},16);ImageGallery.Bindings()}}})})},Bindings:function(){var n=$.magnificPopup.instance;$(".mfp-content").swipe({swipeLeft:function(){n.next()},swipeRight:function(){n.prev()},threshold:50})}}}(),Questions=function(){var n={parent:"[data-questions-item]",parentData:"data-questions-item",trigger:"[data-questions-trigger]",expandable:"[data-questions-expandable]"};return{Init:function(){$(n.parent).length&&this.Bindings()},Bindings:function(){$(document).on("click",n.trigger,function(){Questions.ToggleQuestion($(this).siblings(n.expandable))})},OpenQuestion:function(t){t=$(t);Utils.SlideDownHeight(t);t.closest(n.parent).first().attr(n.parentData,"expanded")},CloseQuestion:function(t){t=$(t);Utils.SlideUpHeight(t);t.closest(n.parent).first().attr(n.parentData,"closed")},ToggleQuestion:function(t){var i=t.closest(n.parent);i.attr(n.parentData)==="expanded"?this.CloseQuestion(t):this.OpenQuestion(t)},UpdateState:function(t){var i=$(t);i.is(n.expandable)||(i=t.find(n.expandable).first());i!==null&&i.closest(n.parentData).attr(n.parentData)==="expanded"?this.OpenQuestion(i):this.CloseQuestion(i)}}}(),Video=function(){var n={videoOverlay:"[data-widget-video-overlay]",videoOverlayData:"data-widget-video-overlay",videoTranscript:"[data-widget-video-transcript]",videoTranscriptData:"data-widget-video-transcript",transcriptTrigger:"[data-widget-video-transcript-trigger]",transcriptTriggerText:"[data-widget-video-transcript-trigger-text]"};return{Init:function(){this.Bindings()},Bindings:function(){$(document).on("click",n.transcriptTrigger,function(){Video.ToggleTranscript($(this).siblings(n.videoTranscript))});$(document).on("click",n.videoOverlay,function(t){t.preventDefault();var i=$(this),r=i.siblings("iframe").first(),u=r.attr("src");i.attr(n.videoOverlayData,"hidden");r.attr("src",u+(new RegExp(/\?/g).test(u)?"&":"?")+"autoplay=1")})},OpenTranscript:function(t){t=$(t);Utils.SlideDownHeight(t);t.attr(n.videoTranscriptData,"expanded");t.siblings(n.transcriptTrigger).first().find(n.transcriptTriggerText).text("Close")},CloseTranscript:function(t){t=$(t);Utils.SlideUpHeight(t);t.attr(n.videoTranscriptData,"closed");t.siblings(n.transcriptTrigger).first().find(n.transcriptTriggerText).text("Read")},ToggleTranscript:function(t){t=$(t);t.attr(n.videoTranscriptData)==="expanded"?this.CloseTranscript(t):this.OpenTranscript(t)}}}(),Widgets=function(){return{RegisterWidgets:function(){Questions.Init();Video.Init();ImageGallery.Init();AnchorList.Init()}}}(),Maps=function(){var n=[],t=!1,r="AIzaSyCee79VnxaUHOCb2O-YtZiFMHEbKazWHM8",u="/Custom/UI/Content/images/icon-location-orange.png",f={mapPopupTrigger:"[data-js-map-popup]"},i={latitude:"data-js-map-latitude",longitude:"data-js-map-longitude",inforWindowContent:"data-js-map-location"};return{Init:function(){var n=this;this.AssureAPI(this.Bindings())},AssureAPI:function(i){window.google&&window.google.maps||t?window.google&&window.google.maps||!t?i.apply(this,arguments):n.push(i):(t=!0,$.getScript("https://maps.googleapis.com/maps/api/js?key="+r+"",function(){for(var t=0;t<n.length;t++)n[t].apply(this,arguments)}))},Bindings:function(){var n=this;$(document).off("click.MapPopup").on("click.MapPopup",f.mapPopupTrigger,function(t){t.preventDefault();var r=$(t.target),u=r.attr(i.latitude),f=r.attr(i.longitude),e=r.attr(i.inforWindowContent);!u||!f||n.OpenModal(u,f,e)})},OpenModal:function(n,t,i){var r,h,c;try{var f=new google.maps.LatLng(parseFloat(n),parseFloat(t)),e=$('<div class="e-popup" />'),o=$('<div class="c-map" />'),s=$('<div class="c-map__map c-map__map--popup" />');o.append(s);e.append(o);r=new google.maps.Map(s.get(0),{disabledDefaultUI:!0,clickableIcons:!1});r.setCenter(f);r.setZoom(15);$.magnificPopup.open({items:[{src:e,type:"inline"},]});h=new google.maps.Marker({position:f,icon:u,map:r});!i||(c=new google.maps.InfoWindow({content:i}),h.addListener("click",function(){c.open(r,this)}))}catch(l){console.error("Unable to create map popup: "+l)}},GetGoogleMapsApiKey:function(){return r},GetGoogleMapsPinPath:function(){return u}}}();$(function(){Maps.Init()});VueComponents=window.VueComponents||{};VueComponents.MultiSelect=function(){var n=new MobileDetect(window.navigator.userAgent),t={listItem:"[data-js-multiselect-item]"},i=44,r="multiselect-component",u='\t\t<div>\t\t\t<div class="e-form__input-group" ref="inputGroup">\t\t\t\t<select\t\t\t\t\tmultiple\t\t\t\t\tref="select"\t\t\t\t\tclass="e-select"\t\t\t\t\tv-if="multiSelectVisible()"\t\t\t\t\tv-bind:aria-labelledby="getID(\'selected-options\')"\t\t\t\t\tv-model="selectedOptions"\t\t\t\t\tv-bind:aria-controls="getID(\'options-popup\')">\t\t\t\t\t<option disabled selected>No preference<\/option>\t\t\t\t\t<option v-for="option in options" v-bind:value="option.value">{{option.text}}<\/option>\t\t\t\t<\/select>\t\t\t\t<div\t\t\t\t\ttabindex="0"\t\t\t\t\trole="button"\t\t\t\t\tv-bind:aria-haspopup="getID(\'options-popup\')"\t\t\t\t\tv-bind:aria-expanded="optionPopupVisible"\t\t\t\t\tref="buttonSelect"\t\t\t\t\tv-if="!multiSelectVisible()"\t\t\t\t\tv-on:focus="showOptions()"\t\t\t\t\tv-on:blur="hideOptions()"\t\t\t\t\tv-on:keypress.enter="toggleOptions()"\t\t\t\t\tv-on:keypress.space="toggleOptions()"\t\t\t\t\tv-on:mousedown="toggleOptions($event)"\t\t\t\t\tv-on:keydown.down.prevent="moveSelection($event, \'down\')"\t\t\t\t\tv-on:keydown.esc.prevent="hideOptions()"\t\t\t\t\tclass="e-select">\t\t\t\t\t{{defaultText}}\t\t\t\t<\/div>\t\t\t\t<span class="e-select-arrow" aria-hidden="true"><svg class="i-arrow-up e-select-arrow__up"><use xlink:href="/Custom/UI/Content/svg/symbol-defs.svg?v=20180703#icon-arrow-up"><\/use><\/svg><svg class="i-arrow-down e-select-arrow__down"><use xlink:href="/Custom/UI/Content/svg/symbol-defs.svg?v=20180703#icon-arrow-down"><\/use><\/svg><\/span>\t\t\t<\/div>\t\t\t<div\t\t\t\tclass="e-select-popup"\t\t\t\tref="optionPopup"\t\t\t\trole="listbox"\t\t\t\tv-if="optionPopupVisible"\t\t\t\tv-bind:aria-label="label"\t\t\t\tv-bind:id="getID(\'options-popup\')">\t\t\t\t<template v-for="option in options">\t\t\t\t\t<span\t\t\t\t\t\tclass="e-select-popup__option"\t\t\t\t\t\tv-bind:class="{\'e-select-popup__option--selected\' : isOptionSelected(option)}"\t\t\t\t\t\tv-bind:aria-selected="[isOptionSelected(option) ? \'true\' : \'false\']"\t\t\t\t\t\trole="option"\t\t\t\t\t\tref="listItem"\t\t\t\t\t\ttabindex="0"\t\t\t\t\t\tv-on:focus="showOptions()"\t\t\t\t\t\tv-on:blur="hideOptions()"\t\t\t\t\t\tv-on:click="toggleSelectedOption(option)"\t\t\t\t\t\tv-on:keydown.esc.prevent="hideOptions()"\t\t\t\t\t\tv-on:keydown.tab.prevent="hideOptions()"\t\t\t\t\t\tv-on:keypress.enter.prevent="toggleSelectedOption(option)"\t\t\t\t\t\tv-on:keydown.space.prevent="toggleSelectedOption(option)"\t\t\t\t\t\tv-on:keydown.down.prevent="moveSelection($event, \'down\')"\t\t\t\t\t\tv-on:keydown.up.prevent="moveSelection($event, \'up\')"\t\t\t\t\t\tdata-js-multiselect-item>\t\t\t\t\t\t{{option.text}}\t\t\t\t\t\t<span class="e-select-popup__option__icons">\t\t\t\t\t\t\t<svg class="i-plus e-select-popup__option__icons__icon"><use xlink:href="/Custom/UI/Content/svg/symbol-defs.svg?v=20180703#icon-plus"><\/use><\/svg>\t\t\t\t\t\t\t<svg class="i-tick e-select-popup__option__icons__icon"><use xlink:href="/Custom/UI/Content/svg/symbol-defs.svg?v=20180703#icon-tick"><\/use><\/svg>\t\t\t\t\t\t<\/span>\t\t\t\t\t<\/span>\t\t\t\t<\/template>\t\t\t<\/div>\t\t\t<div\t\t\t\tclass="e-select-options"\t\t\t\tv-if="selectedOptions !== null && selectedOptions !== \'\' && selectedOptions.length"\t\t\t\tv-bind:id="getID(\'selected-options\')"\t\t\t\tv-bind:aria-label="\'Selected options for \' + label">\t\t\t\t<span\t\t\t\t\tclass="e-btn e-btn--secondary e-select-options__item"\t\t\t\t\ttabindex="0"\t\t\t\t\tv-for="option in getSelectedOptions(selectedOptions)"\t\t\t\t\tv-on:click="removeSelectedOption(option)"\t\t\t\t\tv-on:keydown.enter="removeSelectedOption(option)"\t\t\t\t\taria-label="Click, or press enter while focused to remove item">\t\t\t\t\t{{option.text}}\t\t\t\t\t<svg class="i-close e-select-options__item__icon"><use xlink:href="/Custom/UI/Content/svg/symbol-defs.svg?v=20180703#icon-close"><\/use><\/svg>\t\t\t\t<\/span>\t\t\t<\/div>\t\t<\/div>\t';return{Register:function(){Vue.options.components[r]||Vue.component(r,{template:u,props:["options","rootSelectedOptions","rootUpdateKey","label","defaultText"],data:function(){return{instanceSelectedOptions:this.rootSelectedOptions||[],optionPopupVisible:!1}},computed:{selectedOptions:{get:function(){return!!this.instanceSelectedOptions&&!!this.instanceSelectedOptions.length>0?this.instanceSelectedOptions:""},set:function(n){this.instanceSelectedOptions=n.filter(function(n){return!isNaN(parseInt(n))});FindPsych.SetSearchComponentVueData(this.rootUpdateKey,this.instanceSelectedOptions,!0)}}},watch:{selectedOptions:function(){this.setSelectText()},optionPopupVisible:function(n){n&&this.repositionPopup()},rootSelectedOptions:function(n){this.instanceSelectedOptions=n}},mounted:function(){var n=this;this.setSelectText();$(window).off("resize.VueMultiSelect").on("resize.VueMultiSelect",Utils.Debounce(function(){n.optionPopupVisible=!1},200))},methods:{getOption:function(n){for(var t=0;t<this.options.length;t++)if(this.options[t].value===n)return this.options[t];return null},getSelectedOptions:function(n){var t=this;return n.filter(function(n){return!isNaN(parseInt(n))}).map(function(n){return t.getOption(n)})},getID:function(n){return n+"_"+this._uid},repositionPopup:function(){var n=this;this.$nextTick(function(){var t=$(n.$refs.inputGroup).first(),r=$(n.$refs.optionPopup).first();if(t.length&&r.length){var u=$("html").get(0).scrollHeight,f=t.position().top+i,e=t.offset().top,o=t.position().left,s=t.css("width"),h=u-e-i*2;r.css({width:s,top:f,left:o,position:"absolute",maxHeight:h,height:"auto"})}})},moveSelection:function(n,i){var r=$(this.$refs.listItem),e=$(n.target),u,f;r.length&&(u=e.prev(t.listItem),f=e.next(t.listItem),i?i==="up"?(u.length||r.last().focus(),u.focus()):i==="down"&&(f.length||r.first().focus(),f.focus()):r.first().focus())},isOptionSelected:function(n){return typeof this.selectedOptions!="object"?!1:this.selectedOptions.some(function(t){return t===n.value})},showOptions:function(){this.optionPopupVisible=!0},hideOptions:function(){this.optionPopupVisible=!1},toggleOptions:function(n){this.optionPopupVisible?(n.preventDefault(),this.hideOptions()):this.showOptions()},removeSelectedOption:function(n){var t=this;this.instanceSelectedOptions.splice(this.instanceSelectedOptions.indexOf(n.value),1);$(this.$refs.select).find("option:selected").each(function(){var n=this,i=$(n),r=t.instanceSelectedOptions.some(function(t){return n.value===t.value});r||i.prop("selected",!1)})},addSelectedOption:function(n){this.instanceSelectedOptions.push(n.value)},toggleSelectedOption:function(n){this.isOptionSelected(n)?this.removeSelectedOption(n):this.addSelectedOption(n)},multiSelectVisible:function(){return n.mobile()||n.phone()||n.tablet()?!0:!1},setSelectText:function(){!this.$refs.buttonSelect||(this.$refs.buttonSelect.innerText=this.selectedOptions.length>0?this.selectedOptions.length+" item"+(this.selectedOptions.length>1?"s":""):this.defaultText)}}})}}}();VueComponents=window.VueComponents||{};VueComponents.Location=function(){var n="location-component",t={locationOption:"[data-js-location-option]"},i={getPostCodeSuggestions:"/RANZCPWebServices/LocationService.asmx/GetLocationsFromPostcode",getLocationSuggestions:"/RANZCPWebServices/LocationService.asmx/GetLocationsFromSuburbName"},r="Current location",u="Unable to get current location. Please try manual entry",f='\t\t<div>\t\t\t<label v-bind:for="getID(\'location\')" class="e-label e-label--outside">Location<\/label>\t\t\t<div class="e-form__group e-form__group--inline">\t\t\t\t<div\t\t\t\t\tclass="e-form__input-group"\t\t\t\t\tv-bind:class="{\'e-form__input-group--icon\' : !inSidebar}">\t\t\t\t\t<div class="e-form__input-group__inner" v-bind:data-invalid="showError">\t\t\t\t\t\t<svg v-if="!inSidebar" class="i-location e-form__input-group__icon"><use xlink:href="/Custom/UI/Content/svg/symbol-defs.svg?v=20180703#icon-location"><\/use><\/svg>\t\t\t\t\t\t<input\t\t\t\t\t\t\ttype="search"\t\t\t\t\t\t\tref="locationInput"\t\t\t\t\t\t\tautocomplete="off"\t\t\t\t\t\t\tv-model="location"\t\t\t\t\t\t\tv-bind:id="getID(\'location\')"\t\t\t\t\t\t\tv-bind:placeholder="placeholderText"\t\t\t\t\t\t\tv-bind:aria-invalid="showError"\t\t\t\t\t\t\t@input="handleLocationInput()"\t\t\t\t\t\t\t@focus="handleLocationFocus()"\t\t\t\t\t\t\t@blur="handleLocationBlur()"\t\t\t\t\t\t\t@keypress.enter.prevent="submitSearch($event)"\t\t\t\t\t\t\t@keydown.down.prevent="moveLocationSelection($event, \'down\')"\t\t\t\t\t\t\tclass="e-field"\t\t\t\t\t\t\tv-bind:class="{\'e-field--location\' : useCurrentLocation || validLocationSelected, \'e-field--with-dd\' : locationDropdownVisible}" />\t\t\t\t\t\t<ul class="e-autocomplete-list" v-if="locationDropdownVisible" v-cloak role="listbox">\t\t\t\t\t\t\t<li\t\t\t\t\t\t\t\tclass="e-autocomplete-list__item"\t\t\t\t\t\t\t\ttabindex="0"\t\t\t\t\t\t\t\trole="option"\t\t\t\t\t\t\t\tv-for="location in locationOptions"\t\t\t\t\t\t\t\tv-on:click="setLocation(location)"\t\t\t\t\t\t\t\tv-on:keydown.down.prevent="moveLocationSelection($event, \'down\')"\t\t\t\t\t\t\t\tv-on:keydown.up.prevent="moveLocationSelection($event, \'up\')"\t\t\t\t\t\t\t\tv-on:keypress.enter.prevent="setLocation(location)"\t\t\t\t\t\t\t\tv-on:focus="handleSuggestionFocus()"\t\t\t\t\t\t\t\tv-on:blur="handleSuggestionBlur()"\t\t\t\t\t\t\t\tref="locationOption"\t\t\t\t\t\t\t\tdata-js-location-option>\t\t\t\t\t\t\t\t{{location.displayText}}\t\t\t\t\t\t\t<\/li>\t\t\t\t\t\t<\/ul>\t\t\t\t\t<\/div>\t\t\t\t\t<span class="e-field-error" v-if="!!useCurrentLocationFailMessage">{{ useCurrentLocationFailMessage }}<\/span>\t\t\t\t\t<span class="e-field-error" v-if="!!showError">\t\t\t\t\t\tYou must select a location from the suggested options <strong>or<\/strong> search without a specified location.\t\t\t\t\t\t<button\t\t\t\t\t\t\ttype="button"\t\t\t\t\t\t\tclass="e-field-error__action"\t\t\t\t\t\t\tv-on:click="handleClearLocation">\t\t\t\t\t\t\tClear location?\t\t\t\t\t\t<\/button>\t\t\t\t\t<\/span>\t\t\t\t<\/div>\t\t\t\t<span class="e-form__group__centre-caption">or<\/span>\t\t\t\t<button type="button" class="e-btn e-btn--secondary" v-on:click="tryCurrentLocation()">Use my current location<\/button>\t\t\t<\/div>\t\t<\/div>\t';return{Register:function(){Vue.options.components[n]||Vue.component(n,{template:f,props:["rootLatitude","rootLongitude","rootLocation","rootUseCurrentLocation","rootCountry","rootValidationErrors","placeholderText","inSidebar"],data:function(){return{location:null,locationOptions:null,locationDropdownVisible:!1,validLocationSelected:!1,useCurrentLocation:!1,useCurrentLocationFailMessage:null,latitude:null,longitude:null,showError:!1}},mounted:function(){var n=this;this.location=this.rootLocation;this.validLocationSelected=!!this.rootLatitude&&!!this.rootLongitude;this.useCurrentLocation=this.rootUseCurrentLocation;this.latitude=this.rootLatitude;this.longitude=this.rootLongitude;FindPsych.GetEventBus().$on("manualCountryChange",function(){n.useCurrentLocation=!1;n.validLocationSelected=!1;n.location=null;n.locationOptions=null;n.locationDropdownVisible=!1})},watch:{locationOptions:function(n){(!n||n.length<1)&&(this.locationDropdownVisible=!1)},useCurrentLocation:function(n){n&&(this.locationDropdownVisible=!1);this.$emit("useCurrentLocationChange",n)},rootUseCurrentLocation:function(n){this.useCurrentLocation=n},rootLatitude:function(n){this.latitude=n},rootLongitude:function(n){this.longitude=n},rootLocation:function(n){this.location=n},rootValidationErrors:function(n){this.showError=!!n.location}},methods:{getID:function(n){return n+"_"+this._uid},tryCurrentLocation:function(){var n=this;if(!1 in window.navigator){this.useCurrentLocationFailMessage=u;return}window.navigator.geolocation.getCurrentPosition(function(t){FindPsych.SetSearchComponentVueData("country",FindPsych.GetCurrentCountry(!0).abbreviation,!1);n.$nextTick(function(){n.setLocation({latitude:t.coords.latitude,longitude:t.coords.longitude,displayText:r});n.useCurrentLocation=!0;n.inSidebar})},function(t){console.log(t);n.showError=!0;n.useCurrentLocationFailMessage=u})},handleLocationInput:function(){this.$emit("locationTextChanged",this.$refs.locationInput.value);/^\d{4}/.test(this.$refs.locationInput.value)?this.setLocations(i.getPostCodeSuggestions,this.$refs.locationInput.value):/^[a-zA-Z]{2}/.test(this.$refs.locationInput.value)?this.setLocations(i.getLocationSuggestions,this.$refs.locationInput.value):this.locationDropdownVisible=!1},handleLocationFocus:function(){this.useCurrentLocation=!1;this.validLocationSelected?(this.validLocationSelected=!1,this.locationDropdownVisible=!1,this.$refs.locationInput.value="",this.locationOptions=null,this.setLocation({latitude:null,longitude:null,displayText:null})):this.$refs.locationInput.value!==r&&this.locationOptions!==null&&this.locationOptions.length>0?this.locationDropdownVisible=!0:(this.$refs.locationInput.value="",this.setLocation({latitude:null,longitude:null,displayText:null}))},handleLocationBlur:function(){this.locationDropdownVisible=!1},handleSuggestionFocus:function(){this.locationDropdownVisible=!0},handleSuggestionBlur:function(){this.locationDropdownVisible=!1},moveLocationSelection:function(n,i){var r=$(this.$refs.locationOption),e=$(n.target),u,f;r.length&&(u=e.prev(t.locationOption),f=e.next(t.locationOption),i?i==="up"?(u.length||r.last().focus(),u.focus()):i==="down"&&(f.length||r.first().focus(),f.focus()):r.first().focus())},setLocations:function(n,t){var i=this;$.ajax({url:n,data:JSON.stringify({query:t,country:FindPsych.GetCountryByAbbreviation(FindPsych.GetSearchComponentVueData("country")).country}),dataType:"json",contentType:"application/json; charset=utf-8",method:"POST"}).done(function(n){i.locationOptions=JSON.parse(n.d);i.locationDropdownVisible=!0})},setLocation:function(n){!n.latitude||!n.longitude||(this.validLocationSelected=!0,this.showError=!1);this.showError=!1;this.useCurrentLocationFailMessage=null;this.locationDropdownVisible=!1;this.latitude=n.latitude;this.longitude=n.longitude;this.location=n.displayText;this.$emit("locationChange",n)},submitSearch:function(){$(this.$refs.locationInput).blur();this.$emit("submitSearch")},handleClearLocation:function(){this.location=null;this.showError=!1;this.locationDropdownVisible=!1;this.$refs.locationInput.value="";this.locationOptions=null;this.setLocation({latitude:null,longitude:null,displayText:null})}}})}}}();VueComponents=window.VueComponents||{};VueComponents.PsychSearch=function(){var n="psych-search-component",t=[1.5,5,10,20,50,100],i='\t\t<div class="s-psychsearch__wrapper">\t\t\t<button\t\t\t\ttype="button"\t\t\t\tref="wrapperToggleBtn"\t\t\t\tv-on:click="toggleWrapper()"\t\t\t\tclass="e-btn e-btn--primary s-psychsearch__btn-collapse">\t\t\t\tFilter and refine\t\t\t\t<svg class="i-arrow-down"><use xlink:href="/Custom/UI/Content/svg/symbol-defs.svg?v=20180703#icon-arrow-down"><\/use><\/svg>\t\t\t<\/button>\t\t\t<h2 class="h3 s-psychsearch__heading" v-if="inSidebar">Filter and refine<\/h2>\t\t\t<div class="s-psychsearch__wrapper__inner" ref="searchWrapper">\t\t\t\t<div v-if="!inSidebar">\t\t\t\t\t<div class="row">\t\t\t\t\t\t<div class="col-xs-12 col-sm-9">\t\t\t\t\t\t\t<location-component\t\t\t\t\t\t\t\tref="locationComponent"\t\t\t\t\t\t\t\tv-on:locationChange="handleLocationChange"\t\t\t\t\t\t\t\tv-on:submitSearch="redirectSearch"\t\t\t\t\t\t\t\tv-on:locationTextChanged="handleLocationTextChanged"\t\t\t\t\t\t\t\tv-on:useCurrentLocationChange="handleCurrentLocationChange"\t\t\t\t\t\t\t\tv-bind:root-country="country"\t\t\t\t\t\t\t\tv-bind:root-latitude="latitude"\t\t\t\t\t\t\t\tv-bind:root-longitude="longitude"\t\t\t\t\t\t\t\tv-bind:root-location="locationName"\t\t\t\t\t\t\t\tv-bind:root-validation-errors="validationErrors"\t\t\t\t\t\t\t\tv-bind:root-use-current-location="useCurrentLocation"\t\t\t\t\t\t\t\tv-bind:in-sidebar="inSidebar"\t\t\t\t\t\t\t\tv-bind:placeholder-text="getPlaceholderText()">\t\t\t\t\t\t\t<\/location-component>\t\t\t\t\t\t<\/div>\t\t\t\t\t\t<div class="col-xs-6 col-sm-3">\t\t\t\t\t\t\t<div class="e-form__group">\t\t\t\t\t\t\t\t<label v-bind:for="getID(\'radius\')">Radius<\/label>\t\t\t\t\t\t\t\t<div class="e-form__input-group">\t\t\t\t\t\t\t\t\t<select class="e-select" v-bind:id="getID(\'radius\')" v-model="radius">\t\t\t\t\t\t\t\t\t\t<option v-for="option in getRadiusOptions()" v-bind:value="option">+{{option}}km<\/option>\t\t\t\t\t\t\t\t\t<\/select>\t\t\t\t\t\t\t\t\t<span class="e-select-arrow" aria-hidden="true"><svg class="i-arrow-up e-select-arrow__up"><use xlink:href="/Custom/UI/Content/svg/symbol-defs.svg?v=20180703#icon-arrow-up"><\/use><\/svg><svg class="i-arrow-down e-select-arrow__down"><use xlink:href="/Custom/UI/Content/svg/symbol-defs.svg?v=20180703#icon-arrow-down"><\/use><\/svg><\/span>\t\t\t\t\t\t\t\t<\/div>\t\t\t\t\t\t\t<\/div>\t\t\t\t\t\t<\/div>\t\t\t\t\t<\/div>\t\t\t\t\t<div class="row">\t\t\t\t\t\t<div class="col-xs-12">\t\t\t\t\t\t\t<div class="e-form__group">\t\t\t\t\t\t\t\t<input type="checkbox" class="e-checkbox" v-bind:id="getID(\'online-consultations\')" v-model="onlineConsultations" />\t\t\t\t\t\t\t\t<label v-bind:for="getID(\'online-consultations\')" class="e-label e-label--omnes">Show psychiatrists who offer online appointments (any location)<\/label>\t\t\t\t\t\t\t<\/div>\t\t\t\t\t\t<\/div>\t\t\t\t\t<\/div>\t\t\t\t\t<div class="e-alert e-alert--warning" v-if="showOnlineConsultAlert">\t\t\t\t\t\tResults will be limited to only psychiatrists offering online appointments.\t\t\t\t\t<\/div>\t\t\t\t<\/div>\t\t\t\t<div class="row">\t\t\t\t\t<div class="col-xs-12">\t\t\t\t\t\t<div class="e-form__group">\t\t\t\t\t\t\t<label class="e-label">Treats age groups<\/label>\t\t\t\t\t\t\t<checkboxlist-component\t\t\t\t\t\t\t\tv-bind:options="getAgeGroupOptions()"\t\t\t\t\t\t\t\tv-bind:rootSelectedOptions="treatsAges"\t\t\t\t\t\t\t\trootUpdateKey="treatsAges">\t\t\t\t\t\t\t<\/checkboxlist-component>\t\t\t\t\t\t<\/div>\t\t\t\t\t<\/div>\t\t\t\t<\/div>\t\t\t\t<div class="row">\t\t\t\t\t<div class="col-xs-12 col-sm-6">\t\t\t\t\t\t<div class="e-form__group">\t\t\t\t\t\t\t<label class="e-label">With expertise in<\/label>\t\t\t\t\t\t\t<multiselect-component\t\t\t\t\t\t\t\tv-bind:options="getExpertiseOptions()"\t\t\t\t\t\t\t\tv-bind:rootSelectedOptions="expertiseIn"\t\t\t\t\t\t\t\trootUpdateKey="expertiseIn"\t\t\t\t\t\t\t\tlabel="Expertise options"\t\t\t\t\t\t\t\tdefaultText="No preference">\t\t\t\t\t\t\t<\/multiselect-component>\t\t\t\t\t\t<\/div>\t\t\t\t\t<\/div>\t\t\t\t\t<div class="col-xs-12 col-sm-6">\t\t\t\t\t\t<div class="e-form__group">\t\t\t\t\t\t\t<label class="e-label">Offers these services<\/label>\t\t\t\t\t\t\t<multiselect-component\t\t\t\t\t\t\t\tv-bind:options="getOtherSeviceOptions()"\t\t\t\t\t\t\t\tv-bind:rootSelectedOptions="servicesOffered"\t\t\t\t\t\t\t\trootUpdateKey="servicesOffered"\t\t\t\t\t\t\t\tlabel="Service options"\t\t\t\t\t\t\t\tdefaultText="No preference">\t\t\t\t\t\t\t<\/multiselect-component>\t\t\t\t\t\t<\/div>\t\t\t\t\t<\/div>\t\t\t\t<\/div>\t\t\t\t<div class="row">\t\t\t\t\t<div class="col-xs-12 col-sm-6">\t\t\t\t\t\t<div class="e-form__group">\t\t\t\t\t\t\t<label class="e-label">Has experience with<\/label>\t\t\t\t\t\t\t<multiselect-component\t\t\t\t\t\t\t\tv-bind:options="getExperienceOptions()"\t\t\t\t\t\t\t\tv-bind:rootSelectedOptions="experienceWith"\t\t\t\t\t\t\t\trootUpdateKey="experienceWith"\t\t\t\t\t\t\t\tlabel="Experienced with options"\t\t\t\t\t\t\t\tdefaultText="No preference">\t\t\t\t\t\t\t<\/multiselect-component>\t\t\t\t\t\t<\/div>\t\t\t\t\t<\/div>\t\t\t\t\t<div class="col-xs-12 col-sm-6">\t\t\t\t\t\t<div class="e-form__group">\t\t\t\t\t\t\t<label class="e-label">Languages spoken<\/label>\t\t\t\t\t\t\t<multiselect-component\t\t\t\t\t\t\t\tv-bind:options="getLanguageOptions()"\t\t\t\t\t\t\t\tv-bind:rootSelectedOptions="languages"\t\t\t\t\t\t\t\trootUpdateKey="languages"\t\t\t\t\t\t\t\tlabel="Languages spoken"\t\t\t\t\t\t\t\tdefaultText="No preference">\t\t\t\t\t\t\t<\/multiselect-component>\t\t\t\t\t\t<\/div>\t\t\t\t\t<\/div>\t\t\t\t<\/div>\t\t\t\t<div class="row">\t\t\t\t\t<div class="col-xs-12 col-sm-6">\t\t\t\t\t\t<div class="e-form__group">\t\t\t\t\t\t\t<label v-bind:for="getID(\'surname\')">Psychiatrist surname<\/label>\t\t\t\t\t\t\t<input\t\t\t\t\t\t\t\ttype="text"\t\t\t\t\t\t\t\tv-model="psychSurname"\t\t\t\t\t\t\t\tv-bind:id="getID(\'surname\')"\t\t\t\t\t\t\t\tv-on:keypress.enter.prevent="!onSearchResultsPage ? redirectSearch() : submitSearch()"\t\t\t\t\t\t\t\tclass="e-field" />\t\t\t\t\t\t<\/div>\t\t\t\t\t<\/div>\t\t\t\t<\/div>\t\t\t\t<hr class="e-hr" v-if="inSidebar" />\t\t\t\t<div v-if="inSidebar">\t\t\t\t\t<div class="row">\t\t\t\t\t\t<div class="col-xs-12 col-lg-9">\t\t\t\t\t\t\t<location-component\t\t\t\t\t\t\t\tref="locationComponent"\t\t\t\t\t\t\t\tv-on:locationChange="handleLocationChange"\t\t\t\t\t\t\t\tv-on:submitSearch="submitSearch"\t\t\t\t\t\t\t\tv-on:locationTextChanged="handleLocationTextChanged"\t\t\t\t\t\t\t\tv-on:useCurrentLocationChange="handleCurrentLocationChange"\t\t\t\t\t\t\t\tv-bind:root-country="country"\t\t\t\t\t\t\t\tv-bind:root-latitude="latitude"\t\t\t\t\t\t\t\tv-bind:root-longitude="longitude"\t\t\t\t\t\t\t\tv-bind:root-location="locationName"\t\t\t\t\t\t\t\tv-bind:root-validation-errors="validationErrors"\t\t\t\t\t\t\t\tv-bind:root-use-current-location="useCurrentLocation"\t\t\t\t\t\t\t\tv-bind:in-sidebar="inSidebar"\t\t\t\t\t\t\t\tv-bind:placeholder-text="getPlaceholderText()">\t\t\t\t\t\t\t<\/location-component>\t\t\t\t\t\t<\/div>\t\t\t\t\t\t<div class="col-xs-6 col-lg-3">\t\t\t\t\t\t\t<div class="e-form__group">\t\t\t\t\t\t\t\t<label v-bind:for="getID(\'radius\')">Radius<\/label>\t\t\t\t\t\t\t\t<div class="e-form__input-group">\t\t\t\t\t\t\t\t\t<select class="e-select" v-bind:id="getID(\'radius\')" v-model="radius">\t\t\t\t\t\t\t\t\t\t<option v-for="option in getRadiusOptions()" v-bind:value="option">+{{option}}km<\/option>\t\t\t\t\t\t\t\t\t<\/select>\t\t\t\t\t\t\t\t\t<span class="e-select-arrow" aria-hidden="true"><svg class="i-arrow-up e-select-arrow__up"><use xlink:href="/Custom/UI/Content/svg/symbol-defs.svg?v=20180703#icon-arrow-up"><\/use><\/svg><svg class="i-arrow-down e-select-arrow__down"><use xlink:href="/Custom/UI/Content/svg/symbol-defs.svg?v=20180703#icon-arrow-down"><\/use><\/svg><\/span>\t\t\t\t\t\t\t\t<\/div>\t\t\t\t\t\t\t<\/div>\t\t\t\t\t\t<\/div>\t\t\t\t\t<\/div>\t\t\t\t\t<div class="row">\t\t\t\t\t\t<div class="col-xs-12">\t\t\t\t\t\t\t<div class="e-form__group">\t\t\t\t\t\t\t\t<input type="checkbox" class="e-checkbox" v-bind:id="getID(\'online-consultations\')" v-model="onlineConsultations" />\t\t\t\t\t\t\t\t<label v-bind:for="getID(\'online-consultations\')" class="e-label e-label--omnes">Show psychiatrists who offer online appointments (any location)<\/label>\t\t\t\t\t\t\t<\/div>\t\t\t\t\t\t<\/div>\t\t\t\t\t<\/div>\t\t\t\t\t<div class="e-alert e-alert--warning" v-if="showOnlineConsultAlert">\t\t\t\t\t\tNo location provided. Results will be limited to only psychiatrists offering online consultations.\t\t\t\t\t<\/div>\t\t\t\t<\/div>\t\t\t\t<div class="e-form__submit">\t\t\t\t\t<button\t\t\t\t\t\ttype="button"\t\t\t\t\t\tv-if="!onSearchResultsPage"\t\t\t\t\t\tv-on:click="redirectSearch()"\t\t\t\t\t\tclass="e-btn e-btn--xl e-btn--primary">\t\t\t\t\t\tSearch\t\t\t\t\t<\/button>\t\t\t\t\t<button\t\t\t\t\t\ttype="button"\t\t\t\t\t\tv-if="!!onSearchResultsPage"\t\t\t\t\t\tv-on:click="submitSearch()"\t\t\t\t\t\tclass="e-btn e-btn--primary">\t\t\t\t\t\tRefine\t\t\t\t\t<\/button>\t\t\t\t<\/div>\t\t\t<\/div>\t\t<\/div>\t';return{Register:function(){if(!Vue.options.components[n]){var r=FindPsych.GetSearchComponentVueData(),u=!1;if(!r){console.error("The psych-search vue component requires initialisation with a valid data object.");return}Vue.component(n,{template:i,props:["onSearchResultsPage","inSidebar"],data:function(){return r},computed:{showOnlineConsultAlert:function(){return this.onlineConsultations&&(!this.latitude||!this.longitude)}},mounted:function(){var n=this;this.onSearchResultsPage&&!u&&(FindPsych.Search(!0),u=!0)},watch:{country:function(){this.servicesOffered=[];this.latitude=null;this.longitude=null;this.locationName=null;FindPsych.Search(!0)}},methods:{getID:function(n){return n+"_"+this._uid},getRadiusOptions:function(){return t},handleLocationChange:function(n){this.latitude=n.latitude;this.longitude=n.longitude;this.locationName=n.displayText;this.latitude||this.longitude||this.locationName||(this.locationText=null)},handleLocationTextChanged:function(n){this.locationText=n},getExpertiseOptions:function(){return FindPsych.GetExpertiseOptions()},getOtherSeviceOptions:function(){return FindPsych.GetOtherSeviceOptions(this.country)},getExperienceOptions:function(){return FindPsych.GetExperienceOptions()},getAgeGroupOptions:function(){return FindPsych.GetAgeGroupOptions()},getLanguageOptions:function(){return FindPsych.GetLanguageOptions()},toggleWrapper:function(){var t=$(this.$refs.wrapperToggleBtn),n=$(this.$refs.searchWrapper);n.is(":visible")?(n.slideUp(300),t.removeClass("active")):(n.slideDown(300),t.addClass("active"))},handleCurrentLocationChange:function(n){this.useCurrentLocation=n},getPlaceholderText:function(){var t=FindPsych.GetCountryByName("New Zealand"),n="Enter suburb or postcode";return this.country===t.abbreviation&&(n="Enter town/city or postcode"),n},redirectSearch:function(){FindPsych.Redirect()},submitSearch:function(){FindPsych.Search()}}})}}}}();VueComponents=window.VueComponents||{};VueComponents.PsychTabs=function(){var n="psych-tabs",t='\t\t<div class="c-tabs">\t\t\t<div class="c-tabs__heading">\t\t\t\t<span class="c-tabs__heading__text" v-if="tabMessageVisible()">Kitea te rata hauora hinengaro<\/span>\t\t\t\t<div class="c-tabs__heading__item" v-for="item in getCountries()">\t\t\t\t\t<input\t\t\t\t\t\ttype="radio"\t\t\t\t\t\tv-model="country"\t\t\t\t\t\tv-bind:name="getID(\'country\')"\t\t\t\t\t\tv-bind:value="item.abbreviation"\t\t\t\t\t\tv-bind:id="getID(\'find-psych-\' + item.abbreviation.toLowerCase())" class="visually-hidden" />\t\t\t\t\t<label\t\t\t\t\t\tclass="c-tabs__heading__item__tab"\t\t\t\t\t\tv-on:click="triggerManualChange()"\t\t\t\t\t\tv-bind:for="getID(\'find-psych-\' + item.abbreviation.toLowerCase())"\t\t\t\t\t\tv-bind:aria-label="item.name">{{item.abbreviation}}<\/label>\t\t\t\t<\/div>\t\t\t<\/div>\t\t<\/div>\t';return{Register:function(){if(!Vue.options.components[n]){var i=FindPsych.GetSearchComponentVueData();if(!i){console.error("Psych tabs component must be registered with the FindPsych data object.");return}Vue.component(n,{template:t,data:function(){return i},watch:{country:function(n){if(FindPsych.SetResultVueData("items",[],!0),FindPsych.SetResultVueData("itemTotal",0),!!window.localStorage){var t=FindPsych.GetCountryByAbbreviation(n).name;localStorage.setItem(FindPsych.GetLocalStorageCountryKey(),t)}}},methods:{getID:function(n){return n+"_"+this._uid},getCountries:function(){return FindPsych.GetCountryTypes()},tabMessageVisible:function(){return this.country.toLowerCase()===FindPsych.GetCountryByName("New Zealand").abbreviation.toLowerCase()},triggerManualChange:function(){FindPsych.GetEventBus().$emit("manualCountryChange")}}})}}}}();VueComponents=window.VueComponents||{};VueComponents.Map=function(){var t="map-component",i='\t\t<div class="c-map"\t\t\tref="mapWrapper"\t\t\tv-bind:class="{\'c-map--no-results\' : (!markers || markers.length < 1) && !isLoading, \'is-loading\' : isLoading }">\t\t\t<div class="c-map__toggle">\t\t\t\t<button\t\t\t\t\ttype="button"\t\t\t\t\tclass="c-map__toggle__option"\t\t\t\t\tv-on:click="setListMode(false)"\t\t\t\t\tv-bind:class="{\'active\' : !results.listMode}">\t\t\t\t\tMap\t\t\t\t<\/button>\t\t\t\t<button\t\t\t\t\ttype="button"\t\t\t\t\tclass="c-map__toggle__option"\t\t\t\t\tv-on:click="setListMode(true)"\t\t\t\t\tv-bind:class="{\'active\' : results.listMode}">\t\t\t\t\tList\t\t\t\t<\/button>\t\t\t<\/div>\t\t\t<div class="c-map__map"\t\t\t\tref="mapEl" v-show="!results.listMode"\t\t\t\t:aria-label="getMapAriaLabel()">\t\t\t<\/div>\t\t<\/div>\t',n;return{Register:function(){Vue.component(t,{template:i,data:function(){return{results:FindPsych.GetResults(),markers:[],infoWindows:[]}},computed:{isLoading:function(){return FindPsych.GetSearchComponentVueData("searchLoading")}},mounted:function(){var t=this;Maps.AssureAPI(function(){n=new google.maps.Map(t.$refs.mapEl,{disabledDefaultUI:!0,clickableIcons:!1});t.setCenter(n);t.setZoom(n);t.setPins()});FindPsych.GetEventBus().$on("resultsUpdated",function(n){!n||(t.results=null);t.results=FindPsych.GetResults()});FindPsych.GetEventBus().$on("resultPinClicked",function(n){if(n&&n.id){var i=t.markers.filter(function(t){return t.result.id===n.id})[0];!i||($("html, body").animate({scrollTop:$(t.$refs.mapWrapper).offset().top},1e3),new google.maps.event.trigger(i,"click"))}})},watch:{results:function(){!n||(this.setPins(),this.setZoom(n),this.setCenter(n))}},methods:{removeAllPins:function(){this.markers.forEach(function(n){n.setMap(null)});this.markers=[]},removeAllInfoWindows:function(){this.infoWindows.forEach(function(n){n.setMap(null)});this.infoWindows=[]},setPins:function(){var t=this,r=FindPsych.GetSearchComponentVueData("latitude"),u=FindPsych.GetSearchComponentVueData("longitude"),f=FindPsych.GetSearchComponentVueData("radius"),i;if(window.google&&window.google.maps&&(this.removeAllPins(),this.removeAllInfoWindows(),!!this.results.items))for(i=0;i<this.results.items.length;i++)(function(i){var e=FindPsych.GetMainLocation(i),o,s,h;!e||(e.distance!==0&&e.distance<=f||r==null||u==null)&&(o=new google.maps.Marker({result:i,locationInfo:e,position:new google.maps.LatLng(e.latitude,e.longitude),icon:Maps.GetGoogleMapsPinPath(),map:n}),s="",!e.phone||(s='<a href="tel:'+e.phone.replace(/[^\d]/g,"")+'" class="e-cta-link c-map__infowindow__phone">'+e.phone+"<\/a>"),h=new google.maps.InfoWindow({content:'\t\t\t\t\t\t\t\t\t\t\t\t\t<div class="c-map__infowindow">\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h2 class="c-map__infowindow__heading">\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href="'+i.profileUrl+t.getQueryString()+'">\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'+i.name+'\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/h2>\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class="c-map__infowindow__address">'+FindPsych.GetFormattedAddress(e)+"<\/div>\t\t\t\t\t\t\t\t\t\t\t\t\t\t"+s+"\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\t\t\t\t\t\t\t\t\t\t\t\t"}),o.addListener("click",function(i){t.infoWindows.forEach(function(n){n.close()});h.open(n,this);t.handlePinClick(i,this.result.id)}),t.infoWindows.push(h),t.markers.push(o))})(this.results.items[i])},setCenter:function(n){var t=FindPsych.GetSearchComponentVueData("latitude"),i=FindPsych.GetSearchComponentVueData("longitude"),r=FindPsych.GetCurrentCountry();if(!t||!i){r.country===FindPsych.GetCountryByAbbreviation("AU").country?n.setCenter(new google.maps.LatLng(-25.785957,133.5087833)):n.setCenter(new google.maps.LatLng(-41.57888,174.3823013));return}n.setCenter(new google.maps.LatLng(t,i))},setZoom:function(n){var u=FindPsych.GetSearchComponentVueData("latitude"),f=FindPsych.GetSearchComponentVueData("longitude"),i=FindPsych.GetSearchComponentVueData("radius"),t,r;try{i=parseInt(i);switch(i){case 100:t=10;break;case 50:t=11;break;case 20:t=12;break;case 10:t=13;break;case 5:default:t=14}u&&f||(r=FindPsych.GetCurrentCountry(),t=r.country===FindPsych.GetCountryByAbbreviation("AU").country?3:4);n.setZoom(t)}catch(e){console.error("Unable to set map zoom. "+e)}},handlePinClick:function(n,t){FindPsych.SetResultVueData("selectedResultId",t,!1)},setListMode:function(n){FindPsych.SetResultVueData("listMode",n,!1)},getQueryString:function(){return FindPsych.GetQueryString()},getMapAriaLabel:function(){return this.isLoading||!!this.markers&&this.markers.length>0?"":!!this.results&&!!this.results.items&&this.results.items.length>0&&(!this.markers||this.markers.length<1)?"No results found in given search radius, but results found for psychiatrists offering online consultations":"No results found please refine your filters"}}})}}}();VueComponents=window.VueComponents||{};VueComponents.SearchResults=function(){var i={locationWrapper:"[data-js-location-wrapper]",locationContent:"[data-js-location-content]",locationItem:"[data-js-location-id]"},t={activeLocation:"s-psychresults__item--active",activeLocationContent:"active"},v={locationId:"data-js-location-id"},y="search-results-component",p='\t\t<div class="s-psychresults" v-bind:class="{ \'is-loading\' : isLoading() }">\t\t\t<p class="s-psychresults__info" v-if="itemTotal > 0">\t\t\t\t<strong>\t\t\t\t\t{{itemTotal}} result<template v-if="itemTotal !== 1">s<\/template> found\t\t\t\t<\/strong> \t\t\t\tfor \t\t\t\t<template v-for="(expertise, index) in getExpertise()">\t\t\t\t\t<strong class="s-psychresults__info__subheading">{{expertise.text}}<\/strong><template v-if="index + 1 < getExpertise().length">, <\/template>\t\t\t\t<\/template>\t\t\t\t<strong>\t\t\t\t\tPsychiatrist\t\t\t\t<\/strong>\t\t\t\t<span v-html="getStylisedLocation()"><\/span>\t\t\t\t<template v-for="(service, index) in getServices()">\t\t\t\t\t<template v-if="index === 0">offering services <\/template>\t\t\t\t\t<strong class="s-psychresults__info__subheading">{{service.text}}<\/strong><template v-if="index + 1 < getServices().length">,<\/template>\t\t\t\t<\/template>\t\t\t\t<template v-for="(experience, index) in getExperience()">\t\t\t\t\t<template v-if="index === 0">with experience in <\/template>\t\t\t\t\t<strong class="s-psychresults__info__subheading">{{experience.text}}<\/strong><template v-if="index + 1 < getExperience().length">,<\/template>\t\t\t\t<\/template>\t\t\t\t<template v-for="(group, index) in getAgeGroups()">\t\t\t\t\t<template v-if="index === 0">treating age groups <\/template>\t\t\t\t\t<strong class="s-psychresults__info__subheading">{{group.text}}<\/strong><template v-if="index + 1 < getAgeGroups().length">,<\/template>\t\t\t\t<\/template>\t\t\t\t<template v-for="(language, index) in getLanguages()">\t\t\t\t\t<template v-if="index === 0">speaking languages <\/template>\t\t\t\t\t<strong class="s-psychresults__info__subheading">{{language.text}}<\/strong><template v-if="index + 1 < getLanguages().length">,<\/template>\t\t\t\t<\/template>\t\t\t<\/p>\t\t\t<div class="e-editable-text s-psychresults__no-results" v-else>\t\t\t\t<h2>No results found<\/h2>\t\t\t\t<p>Sorry, no results were found. Search suggestions:<\/p>\t\t\t\t<ul>\t\t\t\t\t<li>check your spelling<\/li>\t\t\t\t\t<li>try using fewer search options<\/li>\t\t\t\t\t<li>try a larger search radius<\/li>\t\t\t\t<\/ul>\t\t\t\t<p>If you\'re still having problems, please use our feedback form at the bottom of the page.<\/p>\t\t\t<\/div>\t\t\t<div\t\t\t\tclass="s-psychresults__item"\t\t\t\tv-if="!!items && items.length"\t\t\t\tv-for="profile in items"\t\t\t\ttabindex="0"\t\t\t\tv-bind:data-js-location-id="profile.id">\t\t\t\t<div class="s-psychresults__item__inner">\t\t\t\t\t<h3 class="h2 s-psychresults__item__header">\t\t\t\t\t\t<span v-on:click="handlePinClick(profile)" class="s-psychresults__item__indicator s-psychresults__item__indicator--clickable" v-if="showPin(profile)">\t\t\t\t\t\t\t<svg class="i-location s-psychresults__item__heading__icon"><use xlink:href="/Custom/UI/Content/svg/symbol-defs.svg?v=20180703#icon-location"><\/use><\/svg>\t\t\t\t\t\t<\/span>\t\t\t\t\t\t<span v-if="!!profile.offersOnlineServices" class="s-psychresults__item__indicator">\t\t\t\t\t\t\t<svg class="i-laptop s-psychresults__item__heading__icon"><use xlink:href="/Custom/UI/Content/svg/symbol-defs.svg?v=20180703#icon-laptop"><\/use><\/svg>\t\t\t\t\t\t\t<span class="visually-hidden">Offers online consultations<\/span>\t\t\t\t\t\t<\/span>\t\t\t\t\t\t<a v-bind:href="profile.profileUrl + getQueryString()" class="s-psychresults__item__heading">\t\t\t\t\t\t\t<span v-html="styliseName(profile.name)"><\/span>\t\t\t\t\t\t<\/a>\t\t\t\t\t<\/h3>\t\t\t\t\t<div class="s-psychresults__item__col">\t\t\t\t\t\t<template v-if="!!profile.psychExpertises && profile.psychExpertises.length > 0">\t\t\t\t\t\t\t<h4 class="s-psychresults__item__col__heading">Expertise<\/h4>\t\t\t\t\t\t\t<span v-for="expertise in profile.psychExpertises.slice(0, 4)" class="s-psychresults__item__info-item">{{expertise.description}}<\/span>\t\t\t\t\t\t\t<strong\t\t\t\t\t\t\t\tv-if="profile.psychExpertises.length > 4"\t\t\t\t\t\t\t\tclass="s-psychresults__item__info-item s-psychresults__item__info-item--link">\t\t\t\t\t\t\t\t+ {{ profile.psychExpertises.length - 4 }} more\t\t\t\t\t\t\t<\/strong>\t\t\t\t\t\t<\/template>\t\t\t\t\t\t<template v-else-if="!!profile.psychExperienceWith && profile.psychExperienceWith.length > 0">\t\t\t\t\t\t\t<h4 class="s-psychresults__item__col__heading">Experience with<\/h4>\t\t\t\t\t\t\t<span v-for="experience in profile.psychExperienceWith.slice(0, 4)" class="s-psychresults__item__info-item">{{experience.description}}<\/span>\t\t\t\t\t\t\t<strong\t\t\t\t\t\t\t\tv-if="profile.psychExperienceWith.length > 4"\t\t\t\t\t\t\t\tclass="s-psychresults__item__info-item s-psychresults__item__info-item--link">\t\t\t\t\t\t\t\t+ {{ profile.psychExperienceWith.length - 4 }} more\t\t\t\t\t\t\t<\/strong>\t\t\t\t\t\t<\/template>\t\t\t\t\t\t<template v-else-if="!!profile.psychServices && profile.psychServices.length > 0">\t\t\t\t\t\t\t<h4 class="s-psychresults__item__col__heading">Services offered<\/h4>\t\t\t\t\t\t\t<span v-for="service in profile.psychServices.slice(0, 4)" class="s-psychresults__item__info-item">{{service.description}}<\/span>\t\t\t\t\t\t\t<strong\t\t\t\t\t\t\t\tv-bind:href="profile.profileUrl"\t\t\t\t\t\t\t\tv-if="profile.psychServices.length > 4"\t\t\t\t\t\t\t\tclass="s-psychresults__item__info-item s-psychresults__item__info-item--link">\t\t\t\t\t\t\t\t+ {{ profile.psychServices.length - 4 }} more\t\t\t\t\t\t\t<\/strong>\t\t\t\t\t\t<\/template>\t\t\t\t\t<\/div>\t\t\t\t\t<div class="s-psychresults__item__col">\t\t\t\t\t\t<div\t\t\t\t\t\t\tclass="s-psychresults__item__location"\t\t\t\t\t\t\tv-for="(location, index) in profile.psychAddresses"\t\t\t\t\t\t\tv-if="!!location.streetAddress1 || !!location.locationName || !!location.suburb"\t\t\t\t\t\t\tv-bind:class="{\'active\' : index === 0}"\t\t\t\t\t\t\tdata-js-location-wrapper>\t\t\t\t\t\t\t<button\t\t\t\t\t\t\t\ttype="button"\t\t\t\t\t\t\t\tclass="s-psychresults__item__location__toggle"\t\t\t\t\t\t\t\tref="locationToggle"\t\t\t\t\t\t\t\tv-on:click="toggleLocation($event)">\t\t\t\t\t\t\t\t<svg class="i-plus-circle s-psychresults__item__location__toggle__icon"><use xlink:href="/Custom/UI/Content/svg/symbol-defs.svg?v=20180703#icon-plus-circle"><\/use><\/svg>\t\t\t\t\t\t\t\t<svg class="i-minus-circle s-psychresults__item__location__toggle__icon"><use xlink:href="/Custom/UI/Content/svg/symbol-defs.svg?v=20180703#icon-minus-circle"><\/use><\/svg>\t\t\t\t\t\t\t\t{{ getLocationName(location) }}\t\t\t\t\t\t\t<\/button>\t\t\t\t\t\t\t<div class="s-psychresults__item__location__content" data-js-location-content v-bind:style="{\'display\' : index === 0  ? \'block\':\'none\'}">\t\t\t\t\t\t\t\t<span class="s-psychresults__item__location__content__detail">\t\t\t\t\t\t\t\t\t<svg class="i-location s-psychresults__item__location__content__detail__icon"><use xlink:href="/Custom/UI/Content/svg/symbol-defs.svg?v=20180703#icon-location"><\/use><\/svg>\t\t\t\t\t\t\t\t\t<span v-html="getFormattedAddress(location)"><\/span>\t\t\t\t\t\t\t\t<\/span>\t\t\t\t\t\t\t\t<span class="s-psychresults__item__location__content__detail" v-if="!!location.phone">\t\t\t\t\t\t\t\t\t<svg class="i-phone-receiver s-psychresults__item__location__content__detail__icon"><use xlink:href="/Custom/UI/Content/svg/symbol-defs.svg?v=20180703#icon-phone-receiver"><\/use><\/svg>\t\t\t\t\t\t\t\t\t<a v-bind:href="\'tel:\'+cleanNumber(location.phone)" class="s-psychresults__item__location__content__detail__alt-link">{{location.phone}}<\/a>\t\t\t\t\t\t\t\t<\/span>\t\t\t\t\t\t\t\t<span class="s-psychresults__item__location__content__detail" v-if="!!location.email">\t\t\t\t\t\t\t\t\t<svg class="i-mail s-psychresults__item__location__content__detail__icon"><use xlink:href="/Custom/UI/Content/svg/symbol-defs.svg?v=20180703#icon-mail"><\/use><\/svg>\t\t\t\t\t\t\t\t\t<a v-bind:href="\'mailto:\' + location.email">{{location.email}}<\/a>\t\t\t\t\t\t\t\t<\/span>\t\t\t\t\t\t\t<\/div>\t\t\t\t\t\t<\/div>\t\t\t\t\t<\/div>\t\t\t\t<\/div>\t\t\t<\/div>\t\t\t<div class="s-psychresults__btn-wrapper">\t\t\t\t<button\t\t\t\t\tclass="e-btn e-btn--secondary s-psychresults__btn-wrapper__btn"\t\t\t\t\ttype="button"\t\t\t\t\tv-on:click="loadMore()"\t\t\t\t\tv-if="!!items && items.length < itemTotal">\t\t\t\t\tLoad more\t\t\t\t<\/button>\t\t\t<\/div>\t\t<\/div>\t',r=null,n=null,u=null,f=null,e=null,w=null,o=null,s=[],h=[],c=[],b=[],l=[],a=function(){var t=$.extend(!0,{},FindPsych.GetSearchComponentVueData());u=t.expertiseIn.map(function(n){return s.filter(function(t){return n===t.value})[0]||null});f=t.servicesOffered.map(function(n){return h.filter(function(t){return n===t.value})[0]||null});e=t.experienceWith.map(function(n){return c.filter(function(t){return n===t.value})[0]||null});o=t.languages.map(function(n){return l.filter(function(t){return n===t.value})[0]||null});r=FindPsych.GetQueryString();n=t.locationName};return{Register:function(){var d=FindPsych.GetResults(),k=FindPsych.GetSearchComponentVueData("onlineConsultations");s=FindPsych.GetExpertiseOptions();h=FindPsych.GetOtherSeviceOptions(FindPsych.GetSearchComponentVueData("country"));c=FindPsych.GetExperienceOptions();b=FindPsych.GetAgeGroupOptions();l=FindPsych.GetLanguageOptions();a();Vue.component(y,{template:p,data:function(){return d},watch:{selectedResultId:function(n){var u=$(i.locationItem),r;u.removeClass(t.activeLocation);r=u.filter(function(){return parseInt($(this).attr(v.locationId))===n}).first();r.length&&r.addClass(t.activeLocation)},items:function(){a();k=FindPsych.GetSearchComponentVueData("onlineConsultations")}},methods:{cleanNumber:function(n){return n.replace(/[^\d]/g,"")},toggleLocation:function(n){var f=$(n.target),u=f.closest(i.locationWrapper),r=u.find(i.locationContent).first();r.length&&(r.is(":visible")?(r.slideUp(300),u.removeClass(t.activeLocationContent)):(r.slideDown(300),u.addClass(t.activeLocationContent)))},getExpertise:function(){return u},getExperience:function(){return e},getServices:function(){return f},getAgeGroups:function(){return w},getLanguages:function(){return o},getLocation:function(){return n},getStylisedLocation:function(){var i="offering <strong>online consultations<\/strong>",t;if(!n){if(this.checkOffersOnlineServices())return i}else return t=" near "+n,n==="Current location"&&(t=t.toLowerCase()),this.checkOffersOnlineServices()&&(t+=" or "+i),t;return""},loadMore:function(){FindPsych.Search(!1,!0)},getQueryString:function(){return r},getLocationName:function(n){if(!n)return"";var t="Location";return(n.locationName?t=n.locationName:!n.suburb||(t=n.suburb),n.distance!==null)?t+(" - "+n.distance.toFixed(2)+"km"):t},checkOffersOnlineServices:function(){return k},getFormattedAddress:function(n){return FindPsych.GetFormattedAddress(n,!0)},isLoading:function(){return FindPsych.GetSearchComponentVueData("searchLoading")},showPin:function(n){var t=FindPsych.GetMainLocation(n);if(!t)return!1;var i=FindPsych.GetSearchComponentVueData("latitude"),r=FindPsych.GetSearchComponentVueData("longitude"),u=FindPsych.GetSearchComponentVueData("radius");return t.distance!==0&&t.distance<=u||!i||!r?!0:!1},handlePinClick:function(n){FindPsych.GetEventBus().$emit("resultPinClicked",n)},styliseName:function(n){var i=n.trim().split(" "),r=i.slice(0,i.length-1).join(" "),t=i[i.length-1];return t='<span class="s-psychresults__item__nb-block">'+t,t+='<svg class="i-arrow-thin-right s-psychresults__item__icon"><use xlink:href="/Custom/UI/Content/svg/symbol-defs.svg?v=20180703#icon-arrow-thin-right"><\/use><\/svg>',t+="<\/span>",r+" "+t}}})}}}();VueComponents=window.VueComponents||{};VueComponents.EmailResults=function(){var t="emailresults-component",i='\t\t<div class="s-psychsearch__actions" v-if="!!items && items.length > 0">\t\t\t<button\t\t\t\ttype="button"\t\t\t\tv-if="showEmail"\t\t\t\tclass="e-btn e-btn--secondary s-psychsearch__actions__btn"\t\t\t\tv-on:click="openModal($event)">\t\t\t\t<svg class="i-mail s-psychsearch__actions__btn__icon"><use xlink:href="/Custom/UI/Content/svg/symbol-defs.svg?v=20180703#icon-mail"><\/use><\/svg>\t\t\t\tEmail results\t\t\t<\/button>\t\t\t<button\t\t\t\ttype="button"\t\t\t\tv-if="showPrint"\t\t\t\tclass="e-btn e-btn--secondary s-psychsearch__actions__btn"\t\t\t\tv-on:click="printResults()">\t\t\t\t<svg class="i-fax s-psychsearch__actions__btn__icon"><use xlink:href="/Custom/UI/Content/svg/symbol-defs.svg?v=20180703#icon-fax"><\/use><\/svg>\t\t\t\tPrint results\t\t\t<\/button>\t\t<\/div>\t',n={emailForm:"#upEmailForm",hiddenInput:"#hdSearchData"};return{Register:function(){Vue.component(t,{template:i,data:function(){return FindPsych.GetResults()},computed:{showEmail:function(){return!1},showPrint:function(){return!0}},mounted:function(){},watch:{},methods:{openModal:function(){var t=$(n.hiddenInput);t.val(JSON.stringify(FindPsych.GetSearchComponentVueData()));$.magnificPopup.open({items:[{src:n.emailForm,type:"inline"},],prependTo:"form"})},printResults:function(){window.print()}}})}}}();VueComponents=window.VueComponents||{};VueComponents.CheckboxList=function(){var n="checkboxlist-component",t='\t\t<div class="e-form__group e-form__group--inline e-form__group--checkboxlist">\t\t\t<div class="e-form__input-group" ref="inputGroup" v-for="(option, index) in options">\t\t\t\t<input \t\t\t\t\tclass="e-checkbox e-checkbox--small"\t\t\t\t\ttype="checkbox"\t\t\t\t\tv-bind:id="getID(\'radioItem\', index)"\t\t\t\t\tv-model="selectedOptions"\t\t\t\t\tv-bind:value="option.value"\t\t\t\t/>\t\t\t\t<label\t\t\t\t\tclass="e-label"\t\t\t\t\tv-bind:for="getID(\'radioItem\', index)">\t\t\t\t\t{{option.text}}\t\t\t\t<\/label>\t\t\t<\/div>\t\t<\/div>\t';return{Register:function(){Vue.options.components[n]||Vue.component(n,{template:t,props:["options","rootSelectedOptions","rootUpdateKey"],computed:{selectedOptions:{get:function(){return!this.rootSelectedOptions?null:this.rootSelectedOptions},set:function(n){FindPsych.SetSearchComponentVueData(this.rootUpdateKey,n,!0)}}},mounted:function(){},methods:{getID:function(n,t){return this.getName(n)+"_"+t},getName:function(n){return n+"_"+this._uid}}})}}}();FindPsych=function(){function c(n){var r=i,t=r.filter(function(t){return t.name.toLowerCase()===n.toLowerCase()})[0];return t?t:(console.error("Country "+n+" not found. Cannot get country"),f())}function w(n){var r=i,t=r.filter(function(t){return t.abbreviation.toLowerCase()===n.toLowerCase()})[0];return t?t:(console.error("Country with abbreviation "+n+" not found. Cannot get country"),f())}function b(n){var r=i,t=r.filter(function(t){return t.country===n})[0];return t?t:(console.error("Country with enum "+n+" not found. Cannot get country"),f())}function l(n){var t;return n?t=window.psychCountry:(!window.localStorage||(t=localStorage.getItem(e)),t||(t=window.psychCountry)),c(t)}function f(){return i[0]}function k(n){var t=$.currentQueryString();for(var i in t)try{t[i]=JSON.parse(t[i])}catch(r){}n=$.extend(!0,n,t)}function a(n,t){var u=v(n),i,r;!t&&history.pushState?(i=window.location.protocol+"//"+window.location.host+window.location.pathname,i+=u,r=localStorage.getItem(o),!r||r===i||window.history.pushState({path:i},"",i),localStorage.setItem(o,i)):window.location=t+u}function v(n){var t=$.extend(!0,{},n),r=["onlineConsultations","newPatients"];for(var i in t)t[i]&&i!=="validationErrors"?typeof t[i]=="object"&&(t[i]=JSON.stringify(t[i])):r.indexOf(i)===-1&&delete t[i];return"?"+$.param(t)}function d(){var n=$(r.main).first(),t;n.length&&typeof n.get(0).__vue__=="undefined"&&(t=new Vue({el:r.main}))}function y(n){return(t.validationErrors={},!!n.locationText&&(!n.longitude||!n.latitude))?(t.validationErrors.location=!0,!1):!0}var n=new Vue,r={main:"#main-content",noRender:"[data-js-vue-norender]",psychSearchComponent:"psych-search-component"},p=$(r.psychSearchComponent);if(!p.length||!!window.inCMS){!window.inCMS||$(r.noRender).show();return}var e="__USER_COUNTRY__",o="__USER_PREVIOUS_URL__",s={searchResultsPage:"/find-a-psychiatrist/results",searchResultsEndpoint:"/RANZCPWebServices/PsychProfileService.asmx/SearchProfiles"},i=Object.seal(window.findPsychCountryTypes),t={country:l().abbreviation,psychSurname:null,locationText:null,locationName:null,state:null,seed:Math.floor(Math.random()*1e6),latitude:null,longitude:null,useCurrentLocation:!1,onlineConsultations:!1,radius:10,expertiseIn:[],servicesOffered:[],experienceWith:[],treatsAges:[],languages:[],selectedResultId:null,page:1,searchLoading:!0,validationErrors:{}},u=null,h={listMode:!1,selectedResultId:null,itemTotal:null,items:[]};return{Init:function(){k(t);VueComponents.PsychSearch.Register(this.GetSearchComponentVueData());VueComponents.PsychTabs.Register(this.GetSearchComponentVueData());VueComponents.Location.Register();VueComponents.MultiSelect.Register();VueComponents.Map.Register();VueComponents.SearchResults.Register();VueComponents.EmailResults.Register();VueComponents.CheckboxList.Register();d()},GetSearchComponentVueData:function(n){return!n?t:t[n]},GetResults:function(){return h},SetSearchComponentVueData:function(i,r,u){typeof i!="undefined"&&typeof r!="undefined"&&(t[i]=r,!n||!u||n.$emit("coreDataChange",i))},SetResultVueData:function(t,i,r){typeof t!="undefined"&&typeof i!="undefined"&&(h[t]=i,!n||!r||(t==="items"?n.$emit("resultsUpdated",!0):n.$emit("resultsUpdated",!1)))},GetCountryTypes:function(){return i},GetCountryByName:function(n){return c(n)},GetCountryByAbbreviation:function(n){return w(n)},GetCountryByEnum:function(n){return b(n)},GetEventBus:function(){return n},Redirect:function(){var n=this.GetSearchComponentVueData(),t=y(n);t&&a(n,s.searchResultsPage)},GetExpertiseOptions:function(){var n=window.findPsychExpertiseList;return n?n.map(function(n){return{value:n.id,text:n.description}}):(console.error("Expertise options not found. Verify data source"),[])},GetOtherSeviceOptions:function(n){var t=window.findPsychServicesList,i,r;return t?(i=this.GetCountryByAbbreviation(n),r=t.filter(function(n){return n.country===i.country}).map(function(n){return{value:n.id,text:n.description}}),r):(console.error("Services list options not found. Verify data source"),[])},GetExperienceOptions:function(){var n=window.findPsychExperienceList;return n?n.map(function(n){return{value:n.id,text:n.description}}):(console.error("Experience list options not found. Verify data source"),[])},GetAgeGroupOptions:function(){var n=window.findPsychAgeGroupsList;return n?n.map(function(n){return{value:n.id,text:n.description,"default":n.defaultOption}}):(console.error("Age group list options not found. Verify data source"),[])},GetLanguageOptions:function(){var n=window.findPsychLanguagesList;return n?n.map(function(n){return{value:n.id,text:n.description}}):(console.error("Language list options not found. Verify data source"),[])},GetLocalStorageCountryKey:function(){return e},Search:function(t,i){var f=this,r=$.extend(!0,{},f.GetSearchComponentVueData()),e;!i||u===null?i||t||(r.page=1):(r=u,r.page=r.page+1);r.initialSearch=!!t;e=y(r);e&&(this.SetSearchComponentVueData("searchLoading",!0,!0),$.ajax({url:s.searchResultsEndpoint,data:JSON.stringify({searchQuery:JSON.stringify(r)}),dataType:"json",contentType:"application/json; charset=utf-8",method:"POST"}).done(function(e){var o=f.GetResults(),s;typeof e.d=="string"?(s=JSON.parse(e.d),i?o.items=o.items.concat(s.results):(u=$.extend(!0,{},r),o.items=s.results),o.itemTotal=s.resultTotal):i||t?!i||(r.page=r.page-1):(o.items=[],o.itemTotal=0,r.page=1);a(r);f.SetSearchComponentVueData("searchLoading",!1,!0);n.$emit("resultsUpdated",!0)}).fail(function(n,t){console.error("Unable to get search results. Error: "+t)}).complete(function(){f.SetSearchComponentVueData("searchLoading",!1,!0)}))},GetQueryString:function(){return v(this.GetSearchComponentVueData())},GetMainLocation:function(n){try{return n.psychAddresses[0]}catch(t){return null}},GetFormattedAddress:function(n){if(!n)return"";var t="";return!n.streetAddress1||(t+=n.streetAddress1+"<br />"),!n.streetAddress2||(t+=n.streetAddress2+"<br />"),!n.streetAddress3||(t+=n.streetAddress3+"<br />"),!n.suburb||(t+=n.suburb.toUpperCase()+" "),!n.postCode||(t+=n.postCode+" "),!n.state||(t+=n.state.toUpperCase()+" "),t},GetCurrentCountry:function(n){return l(n)}}}();$(function(){!FindPsych||FindPsych.Init()});$(function(){typeof Sys!="undefined"&&Validation.Init();Navigation.Init();SkipLinks.Init();FontSize.Init();Footer.Init();ProjectFunctions.Init();Widgets.RegisterWidgets();Utils.AddUserAgentAsClass()});var ProjectFunctions=function(){return{Init:function(){this.Fallbacks();this.ResponsiveTables();this.ScrollTop()},Fallbacks:function(){Modernizr.flexbox||Utils.EqualiseHeights('[class^="col-"], [class*=" col-"]',".row--flex")},ResponsiveTables:function(){var n=$(".e-editable-text table");n.each(function(){var n=$(this),t=$.map(n.find("th"),function(n){return $(n).text().trim()});n.find("td").each(function(){var n=$(this);n.attr("data-responsive-table-header",t[n.index()])})})},ScrollTop:function(){var n=$("html").first(),t="is-scrolled",i=200;$(window).scroll(function(){$(this).scrollTop()>i?n.hasClass(t)||n.addClass(t):n.hasClass(t)&&n.removeClass(t)});$(document).on("click","[data-scroll-top]",function(){$("html, body").animate({scrollTop:0},1500)})}}}(),SkipLinks=function(){var n="[data-skiplink]",t="[data-mainnav]",i="[data-mainnav-toggle]",r="e-nav-active";return{Init:function(){this.Bindings()},Bindings:function(){var u=$(n);if(u.length)u.on("click",function(n){var f=$(this),e=$(f.attr("href")),u;e.is(t)&&$(window)[0].innerWidth<1280&&(n.preventDefault(),u=$("html").first(),u.addClass(r),setTimeout(function(){$(i).first().focus()},200))})}}}(),Footer=function(){var i=$("[data-footer-panel-trigger]").first(),n=$("[data-footer-panel]").first(),t="is-active";return{Init:function(){this.Bindings()},Bindings:function(){var t=this;if(i.length&&n.length)i.on("click",function(n){n.preventDefault();t.TogglePanel()})},OpenPanel:function(){n.length&&(Utils.SlideDownHeight(n),n.addClass(t),i.addClass(t),setTimeout(function(){n.find(".e-field, .e-select, .e-textarea").first().focus()},450))},ClosePanel:function(){n.length&&(Utils.SlideUpHeight(n),n.removeClass(t),i.removeClass(t))},TogglePanel:function(){n.length&&(n.hasClass(t)?this.ClosePanel():this.OpenPanel())}}}()