﻿var WP,$$WP,pre_checkActivity,oldElement,currentElement,submitcount=0,isTabAllowed=!0,ALPHANUMERIC="1",EQUAL_TO_CODE="2",GREATER_THAN_CODE="3",LESS_THAN_CODE="4",REMOVE_IF_EQUAL_TO_REMOVE_CHAR="1",REMOVE_NONNUMERIC="2",BIRTH_YEAR_MIN_YEARS_BACK=10;function padNumber(e,t){var n=getDecimalSeparator();return e>0?(e=e.toString().replace(/\./,n),Array(t-e.length+1).join("0")+e):(e=(-e).toString().replace(/\./,n),"-"+Array(t-e.length).join("0")+e)}function padNumber2(e,t){return 0==e?Array(t+1).join("0"):padNumber(e,t)}function escapeRegExp(e){return e.replace(/[.*+\-?^${}()|[\]\\]/g,"\\$&")}function getDecimalSeparator(){var e;return(e=$$WP.Strings.get("NumericDecimalFormatterOverride","I18N.Numbers"))&&e.length>0?e:$$WP.I18N.DecimalSeparator}function getGroupSeparator(){var e;return(e=$$WP.Strings.get("NumericGroupSeparatorOverride","I18N.Numbers"))&&e.length>0?e:$$WP.I18N.GroupSeparator}function getRangeSeparator(){var e;return(e=$$WP.Strings.get("NumericRangeSeparatorOverride","I18N.Numbers"))&&e.length>0?e:$$WP.I18N.RangeSeparator}function IsNumericMinMax(e,t,n,i,o){return null!=e&&(null!==o&&""!==o||(o=!1),l=e.value,s=getGroupSeparator(),c=getDecimalSeparator(),u=(d=getErrorForScreenReader())+$$WP.Strings.get("NumericError","Core.CommonUtils"),m=new RegExp(escapeRegExp(s),"g"),g=new RegExp(escapeRegExp(c),"g"),""==l||(-1!=l.indexOf(s)&&l.indexOf(c)<0?(WP.Validators.DisplayErrors(u),!1):(a=(l=l.replace(m,"")).replace(g,"."),a=Number(a),isNaN(a)?(WP.Validators.DisplayErrors(u),r=!0):i||a==Math.round(a)?""!=t&&a<Number(t)?(WP.Validators.DisplayErrors(d+$$WP.Strings.get("MinimumNumericError","Core.CommonUtils").replace("@MYCHART@MINVALUE@",t)),r=!0):""!=n&&a>Number(n)&&(WP.Validators.DisplayErrors(d+$$WP.Strings.get("MaximumNumericError","Core.CommonUtils").replace("@MYCHART@MAXVALUE@",n)),r=!0):(WP.Validators.DisplayErrors(u),r=!0),!(r&&!o)&&(e.value=l,!0))));var a,r,l,s,c,d,u,m,g}function IsNumericOrRangeMinMax(e,t,n,i,o){if(null===e)return!1;if(null!==o&&""!==o||(o=!1),$(".Popup").length>0)return!1;var a,r,l,s,c,d,u,m,g,f,h,p,v,y;if(s=e.value,d=getDecimalSeparator(),u=getGroupSeparator(),m=getRangeSeparator().replace(/\s+/g,""),g=getErrorForScreenReader(),f=new RegExp(escapeRegExp(d),"g"),h=new RegExp(escapeRegExp(u),"g"),p=g+$$WP.Strings.get("NumericOrRangeError","Core.CommonUtils"),v=g+$$WP.Strings.get("MinimumNumericError","Core.CommonUtils"),y=g+$$WP.Strings.get("MaximumNumericError","Core.CommonUtils"),""===s)return!0;if(-1!==s.indexOf(u)&&s.indexOf(d)<0)return WP.Validators.DisplayErrors(p.replace("@MYCHART@RANGESEPARATOR@",m).replace("@MYCHART@MINVALUE@",t).replace("@MYCHART@MAXVALUE@",n)),o||(e.select(),e.focus()),!1;if(-1!==(c=(s=s.replace(h,"")).indexOf(m))){if(""===(a=s.substring(0,c).replace(f,".")))return WP.Validators.DisplayErrors(p.replace("@MYCHART@RANGESEPARATOR@",m).replace("@MYCHART@MINVALUE@",t).replace("@MYCHART@MAXVALUE@",n)),o||(e.select(),e.focus()),!1;r=s.substring(c+1).replace(f,".")}else a=s.replace(f,".");return a=Number(a),isNaN(a)?(WP.Validators.DisplayErrors(p.replace("@MYCHART@RANGESEPARATOR@",m).replace("@MYCHART@MINVALUE@",t).replace("@MYCHART@MAXVALUE@",n)),l=!0):(i||(a=Math.round(a)),""!==t&&a<Number(t)?(WP.Validators.DisplayErrors(v.replace("@MYCHART@MINVALUE@",t)),l=!0):""!==n&&a>Number(n)&&(WP.Validators.DisplayErrors(y.replace("@MYCHART@MAXVALUE@",n)),l=!0)),r&&!l&&(r=Number(r),isNaN(r)?(WP.Validators.DisplayErrors(p.replace("@MYCHART@RANGESEPARATOR@",m).replace("@MYCHART@MINVALUE@",t).replace("@MYCHART@MAXVALUE@",n)),l=!0):(i||(r=Math.round(r)),""!==t&&r<Number(t)?(WP.Validators.DisplayErrors(v.replace("@MYCHART@MINVALUE@",t)),l=!0):""!==n&&r>Number(n)?(WP.Validators.DisplayErrors(y.replace("@MYCHART@MAXVALUE@",n)),l=!0):(a>r||a===r)&&(WP.Validators.DisplayErrors(p.replace("@MYCHART@RANGESEPARATOR@",m).replace("@MYCHART@MINVALUE@",t).replace("@MYCHART@MAXVALUE@",n)),l=!0))),l?(o||(e.select(),e.focus()),!1):(i||(s=-1!==c?a+m+r:a),e.value=s,!0)}function autoLogout(e){var t;$$WPUtil.setActivity.msSinceLastActivity()<checkActivity.sessionTimeout?pre_checkActivity():(pre_checkActivity.logoutPage=e||pre_checkActivity.logoutPage,t=new $$WPComp.LoggingOutComponent,new $$WPContain.Popup({positioningFunction:$$WPContain.Positions.InsideCentered,Components:t,TitleText:null,IsClosable:!1,Class:"logout"}).show(!0))}function IsPatientInActiveVVCallback(e){"True"===e&&($$WPUtil.setActivity(),WP.Comm.startKeepAlive())}function checkActivity(e,t,n,i){var o,a,r=$afe.jq(window);if(checkActivity.refreshTimeout=e||checkActivity.refreshTimeout,checkActivity.sessionTimeout=t||checkActivity.sessionTimeout,checkActivity.logoutPage=i||checkActivity.logoutPage,checkActivity.warningPopup=!1!==n&&!1!==checkActivity.warningPopup||!0===n,!0!==checkActivity.__ranOnce&&((r=$afe.jq(window)).add(document.body),isDataTile()&&!isShareEverywhere()&&parent.window!==window&&r.add(parent.window),r.focus($$WPUtil.checkActivity),checkActivity.__ranOnce=!0),(o=$$WPUtil.setActivity.msSinceLastActivity())>=checkActivity.sessionTimeout)return document.write(""),void WP.Comm.logOut(null,!0,null,!0,!0);window.clearTimeout(checkActivity.tRefreshID),checkActivity.tRefreshID=window.setTimeout(checkActivity,Math.floor((checkActivity.refreshTimeout-o)/1e3)),window.clearTimeout(checkActivity.tSessionID),a=Math.floor((checkActivity.sessionTimeout-o)/1e3),checkActivity.tSessionID=window.setTimeout(autoLogout,a),o>checkActivity.refreshTimeout&&!0!==$$WPComp.TimeoutWarningComponent.hasVisibleInstance&&$$WPUtil.quickPopup(new $$WPComp.TimeoutWarningComponent({SecondsLeft:a}),{PierceShieldOfJustice:!0})}function logOut(e,t,n,i){return $afe.select("body").hasClass("passthru")?(self.location.href=makeLink("closeExternalJumpPopup.asp"),!1):(""!==e&&null!=e?self.location.href=e:"string"==typeof checkActivity.logoutPage&&""!==checkActivity.logoutPage?WP.Comm.logOut(null,!0,checkActivity.logoutPage,!1,n):getFederatedLogoutMode()||isShareEverywhere()||!0===t?WP.Comm.logOut(null,!0,null,!1,n):"function"==typeof i?WP.Comm.logOut(i,!1,null,!1,n):WP.Comm.logOut((function(e){$$WPUtil.IsNullOrEmpty(e)||(window.location=makeLink(e))}),!1,null,!1,n),!0)}function CheckLength(e,t,n,i){var o;return o=t,""!=i&&null!=i&&"1"==i&&(t-=1),!(e.value.replace(/\r\n/g,"").length>t)||(""==n&&(n=getErrorForScreenReader()+$$WP.Strings.get("MaximumTextError","Core.CommonUtils").replace("@MYCHART@MAXMIMUMLENGTH@",o)),$$WP.Utilities.quickMessageBox(n,"",[],null,[],""),e.focus(),!1)}function insideBodyLoad(e,t,n,i){return WP&&WP.Comm&&WP.Comm.startKeepAlive&&WP.Comm.startKeepAlive(),$$WPUtil.setActivity(),WP.Events.addListener(document.body,"click",$$WPUtil.setActivity),WP.Events.addListener(document.body,"keypress",$$WPUtil.setActivity),WP.Events.addListener(document.body,"click",$$WPUtil.NotifyMobileOfActivity),WP.Events.addListener(document.body,"input",$$WPUtil.NotifyMobileOfActivity),checkActivity(e,t,n,i),window.focus(),!0}function assignInlineEventHandlers(){$afe.select('a#printerfriendlylink:not([href="#"])').on("click",(function(e){return window.open(this.href.replace(/\#(.*)/,""),"WWW","width=1024,height=720,resizable,status,scrollbars").focus(),!1})),$afe.select('a#printerfriendlylink[href="#"]').on("click",(function(e){return $$WPUtil.PrintAndAuditNET(),!1})),$afe.select("a#printWindowPrintLink").on("click",(function(e){window.print()})),$afe.select("a#printWindowCloseLink").on("click",(function(e){window.close()})),$afe.select("a#sortOrgLink").on("click",(function(e){return sortOrgList(this),!1})),$afe.select("a#SelfSignupButton").on("click",(function(e){return $$WP.Utilities.TryRedirect(this.href),!1})),$afe.select("a#cookieHelpLink").on("click",(function(e){return window.open("Help/Cookies"),!1})),$afe.select("a#completedTaskPrinkLink").on("click",(function(e){return window.open(HTMLUnencode(this.href),"WWW","width=800,height=600,resizable,status,scrollbars").focus(),!1})),$afe.select("form#retryform").on("submit",(function(e){disableButton1(this.refresh)}))}function jumpToAnchor(e){var t=window.location.hash.substr(1);if(/^[a-zA-Z][\w-]*$/.test(t))if(""!==t){if(history.scrollRestoration="manual",!doJumpToAnchorAction(t)){e||(e=3e3);var n=new MutationObserver((function(e,n){doJumpToAnchorAction(t)&&n.disconnect()}));n.observe(document.body,{attributes:!0,childList:!0,subtree:!0}),setTimeout((function(){n.disconnect()}),e)}}else history.scrollRestoration="auto"}function doJumpToAnchorAction(e){return e="#"+e,$afe.select(e).filter(":visible").length>0&&(location.replace(e),$afe.select(e).focus(),!0)}function getPostLoginStringsManagerContent(e){$afe.select("#vbPrintHeader").empty().safeAppend($afe.renderTemplate($$WP.Templates.Core.vbPrintheader)),$afe.select("footer#footer #baselinks").empty().safeAppend($afe.renderTemplate($$WP.Templates.Core.vbBaselinks,e)),$afe.select(".cssSwitcher").click((function(e){var t;e&&"A"===e.currentTarget.nodeName&&(t=e.currentTarget.getAttribute("data-csstitle")),0!==t.length&&($$WP.Utilities.UI.ActivateStylesheet(t),$$WP.Utilities.UI.FocusCssSwitcher(t))}))}function getObjectValue(e){var t,n,i;if(e){if(0,i="",(t=e.length)>0)for(n=0;n<t;n++)i+=e[n].value;else i=e.value;return i}}function doMainKeyPress(e){try{return routeEvent(e)}catch(e){}}function submitForm(e){if("submit form"==e.form.submitcontrol.value)return e.form.submitform.click(),!1}function addFocus(e){return e.form.submitcontrol.value="nosubmit",!0}function taKeyDown(e){e.form.submitcontrol.value="nosubmit"}function recordKey(e){13==window.event.keyCode&&"nosubmit"!=e.submitcontrol.value?e.submitcontrol.value="submit form":e.submitcontrol.value=""}function containsSpace(e){var t;for(t=0;t<e.length;++t)if(" "==e.charAt(t))return!0;return!1}function containsPunctuation(e){var t,n,i=e.toUpperCase();for(t=0;t<i.length;++t)if(n=i.charAt(t),"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@._-".indexOf(n)<0)return!0;return!1}function selectCheckBox(e){var t;if(null!=e&&(document.all||document.getElementById)){for(t=0;t<e.length;t++)if(1==e[t].checked)return!0;return 1==e.checked||(alert($$WP.Strings.get("CheckBoxSelectionError","Core.CommonUtils")),!1)}return!0}function disableButton(e){return 0==submitcount?(submitcount++,!0):(e.disabled=!0,!1)}function removeWhiteSpace(e){var t=""+e;return t=t.replace(/\W/g,"")}function enableIfReqFilled(e,t){var n,i,o,a,r,l,s,c,d,u,m;if(document.getElementById&&((n=document.getElementById(e))&&(u=t.split("^"))&&0!=u.length)){for(r=[],a=[],c=0,m=enableIfReqFilled.arguments,i=2;i<m.length;i++)l=(o=m[i].split("^"))[0],o[1]||l,s=o[2]||l,(d=n[l])&&!r[s]&&(0==removeWhiteSpace(d.value).length?a[s]||(a[s]=!0,c++):(r[s]=!0,a[s]&&(a[s]=!1,c--)));if(!1===IsFormValid(e)&&c++,c>0)for(i=0;i<u.length;i++)disableBtn(n[u[i]]);else for(i=0;i<u.length;i++)enableBtn(n[u[i]])}}function IsFormValid(e,t){var n,i;try{if(WP&&WP.Validators&&WP.Validators.Forms&&(i=WP.Validators.Forms[e]))for(n=0;n<i.length;n++)if(removeWhiteSpace(i[n]).length>0)return!0===t&&alert(i[n]),!1}catch(e){}return!0}function confirmEmbedDelete(e,t,n){var i;return i=!0===n?$$WPUtil.quickMessageBoxByEnum.typeEnum.RestoreGoback:$$WPUtil.quickMessageBoxByEnum.typeEnum.RemoveGoback,$$WPUtil.confirmFormSubmission(e,t,i,(function(e,t){var n,i;t===$$WP.Components.TOOLBARIDENTIFIER+"continue"&&((n=document.getElementById("confirmStep"))&&(n=n.parentNode)&&((i=document.createElement("input")).type="hidden",i.className="hidden",i.name="clickSub",i.value="1",n.appendChild(i)))}))}function setCheckboxesByPrefix(e){var t,n;for(t=1,n=document.getElementById(e+t);null!==n;)$afe.jq(n).safeAttr("checked","true"),n.checked=!0,t+=1,n=document.getElementById(e+t)}function unsetCheckboxesByPrefix(e){var t,n;for(t=1,n=document.getElementById(e+t);null!==n;)n.removeAttribute("checked"),n.checked=!1,t+=1,n=document.getElementById(e+t)}function statusOfCheckboxesByPrefix(e){var t,n,i,o;for(i=!0,o=!1,t=1,n=document.getElementById(e+t);null!==n;)n.checked?o=!0:i=!1,t+=1,n=document.getElementById(e+t);return i?3:o?2:1}function checkAll(e,t){if("object"==typeof document&&null!=e&&null!=t&&document.getElementById&&"object"==typeof document.getElementById(e))for(var n,i=document.getElementById(e),o=0;n=i[o++];)"checkbox"==n.type&&(n.checked=!0)}function selectRadioButton(e){var t;if(document.all||document.getElementById){for(t=0;t<e.length;t++)if(1==e[t].checked)return!0;return 1==e.checked||(alert($$WP.Strings.get("RadioButtonSelectionError","Core.CommonUtils")),!1)}return!0}function disableButton1(e){return"object"==typeof e&&(e.disabled=!0),!0}function getParentDocument(){if(!parent)return null;try{return parent.document}catch(e){return null}}function addDataTileUtils(){if(getParentDocument()){var e=window.frameElement;null!=e&&(e.tryRedirect=$$WPUtil.TryRedirect,e.safeToRedirect=$$WPUtil.SafeToRedirect,WP&&WP.Events&&(e.hasUnsavedChanges=WP.Events.showBeforeUnloadMessage))}}function scrollTopOfTheIframe(e,t){getParentDocument()&&window.setTimeout((function(){for(var e,n,i=window.parent.document.getElementsByTagName("iframe"),o=0,a=i.length;o<a;o++)if((e=i[o]).contentWindow==window){var r=e.getBoundingClientRect();n=$$WPUtil.getScrollTop(),!0===t?r.top<0&&$$WPUtil.setScrollTop(n+r.top):$$WPUtil.setScrollTop(n+r.top);break}}),e)}function handleBrowserBack(e){null!==e&&null!==e.target&&null!==$$WP._currentURL&&0===document.getElementsByClassName("md_mychartquestionnaire_questionnaires").length&&$$WP._currentURL===e.target.location.href&&location.reload()}function dataTileLoad(){addDataTileUtils(),self===top&&$afe.select("body").addClass("removeOverflow"),$$WP._currentURL=window.location.href;try{$afe.select(".cardlist.column_3, .cardlist.column_4").trigger("cardLoad"),$afe.jq(window).on("popstate",handleBrowserBack),setupIframeResizer()}catch(e){return}}function setupIframeResizer(){var e,t,n;isIframeResizeScheduled=!1,setAppropriateHeight(),setAppropriateHeightOnResize(),(t=document.getElementById("appPopupRoot"))&&setAppropriateHeightOnDOMMutations(t),(e=document.getElementById("classicPopupRoot"))&&setAppropriateHeightOnDOMMutations(e),(n=document.getElementById("wrap"))&&setAppropriateHeightOnDOMMutations(n);var genericCallback=function(e){isIframeResizeScheduled||(setTimeout((function(){setAppropriateHeight(),isIframeResizeScheduled=!1}),100),isIframeResizeScheduled=!0)};document.body.addEventListener("animationend",genericCallback),document.body.addEventListener("transitionend",genericCallback),document.body.addEventListener("load",genericCallback,!0)}function setAppropriateHeightOnResize(){var e=getFrameWidth();$afe.jq(window).resize((function(){e==getFrameWidth()||isIframeResizeScheduled||(setTimeout((function(){setAppropriateHeight(),e=getFrameWidth(),isIframeResizeScheduled=!1}),100),isIframeResizeScheduled=!0)}))}function setAppropriateHeightOnDOMMutations(e){if(e){var t={attributes:!0,childList:!0,subtree:!0};new MutationObserver((function(n,i){isIframeResizeScheduled||(setTimeout((function(){i.disconnect(),setAppropriateHeight(),i.observe(e,t),isIframeResizeScheduled=!1}),100),isIframeResizeScheduled=!0)})).observe(e,t)}}function isShareEverywhere(){return $afe.select("html").hasClass("shareeverywhere")}function isDataTile(){return $afe.select("html").hasClass("datatile")}function isEmbedded(){return $afe.select("body").hasClass("embedded")}function isBedsideTV(){return $afe.select("html").hasClass("bedsidetv")}function setAppropriateHeight(){var e,t,n,i,o,a,r,l,s,c=document.getElementById("vdtFrame");if((isDataTile()&&getParentDocument()||c||$$WP.WidgetMode)&&("iframeMEDADVICE_ATTACHMENTS"!==window.name&&"iframeMESSAGELIST_ATTACHMENTS"!==window.name&&"iframeCACHED_UPLOAD_DATA"!==window.name&&(e=$$WPUtil.getScrollTop(),$$WP.WidgetMode||(t=window.frameElement),!t&&c&&(t=c),$$WP.WidgetMode||t&&document&&document.body&&t.style))){s=getContainerPrevHeight(t),setContainerMinHeight(t,""),$afe.select("body").addClass("autoheight"),i=($afe.select("iframe:not(.hidden)").length>0?document.body.scrollHeight:document.body.offsetHeight)+"px",$afe.select("body").removeClass("autoheight"),n=getMinHeightForDatePicker(),r=$afe.select(".Popup.component");for(var d=0;d<r.length;d++)(o=$afe.jq(r[d])).hasClass("externaljumppopup")&&"none"===o.find("> .scrollable > .content").css("max-height")&&!o.hasClass("hidden")?(o.css("height","auto"),l=o.outerHeight(),o.css("height",""),n="80vh",i=l+"px"):!o.hasClass("large")&&!o.hasClass("medium")||o.hasClass("hidden")?n=o.outerHeight()+70+"px":(o.css("height","auto"),i=o.outerHeight()+70+"px",o.css("height",""),n=i);if((a=$afe.select("#lightbox:not(.hidden):not(:empty)")).length>0)if(a.hasClass("captchaPopup")){i=Math.max(a.outerHeight(),650)+"px"}else i=a.outerHeight()+"px";var u=$afe.select("._ShieldOfJustice");if(u.length>0){var m=u.siblings("[role=dialog]");if(m.length>0){for(var g=0,f=0;f<m.length;f++){var h=m[f];h.classList.contains("size-10")||h.classList.contains("size-20")?g=Math.max(g,parseInt(s),450):(h.classList.add("autoheight"),g=Math.max(g,h.scrollHeight),h.classList.remove("autoheight")),repositionReactDataTilesPopup(window.frameElement,h)}g>0&&(i=g+"px")}}if(setContainerMinHeight(t,n),s!=i)if(setContainerHeight(t,i),!0!==$afe.select("body").prop("pageLoadedBefore"))scrollTopOfTheIframe(0,!0),$afe.select("body").prop("pageLoadedBefore",!0);else $$WPUtil.setScrollTop(e),document.activeElement.className.includes("scrollPosTarget")&&document.activeElement.scrollIntoView({behavior:"smooth",block:"center"});if(0===r.length&&0===a.length&&"invisible"===$afe.select("#__CAPTCHAVisibility").data("captcha-visibility")&&0!==$afe.select("#hCaptchaDisclaimer").length){var p=$afe.select("iframe:visible").filter((function(){return"hidden"!==$afe.jq(this).css("visibility")}));if(p.length>0){var v=p[0].getBoundingClientRect().height/2+p.offset().top+$afe.jq(window.frameElement).offset().top,y=parent.window.innerHeight;if(v>y+$$WPUtil.getScrollTop()||v<$$WPUtil.getScrollTop()){var $=v-y/2;$$WPUtil.setScrollTop($)}}}}}function getMinHeightForDatePicker(){return $calendarButtons=$afe.select(".calendar.datechooserAnchor"),$calendarButtons.length>0?"350px":""}function repositionReactDataTilesPopup(e,t){var n;isDataTile()&&null!=e&&(t.classList.contains("size-10")||t.classList.contains("size-20")?(n=$$WPUtil.getDataTileScrollTop(e)+35,overhang=n+t.clientHeight-e.scrollHeight,overhang>0&&(n-=overhang),t.style.top=n+"px",t.style.opacity=1):(t.style.top="",t.style.opacity=""))}function getFrameWidth(){return $$WP.WidgetMode?$$WPUtil.GetIframeWidth().then((function(e){return e})):window.frameElement?window.frameElement.offsetWidth:null}function setContainerHeight(e,t){$$WP.WidgetMode?($$WPUtil.SetCrossDomainIframeHeight(t),$$WP.ContainerHeight=t):e.style.height=t}function setContainerMinHeight(e,t){$$WP.WidgetMode?$$WPUtil.SetCrossDomainIframeMinHeight(t):e.style.minHeight=t}function getContainerPrevHeight(e){return $$WP.WidgetMode?$$WP.ContainerHeight:e.style.height}function DoRedirect(e,t){return!0===t?logOut(null,!0):$$WPUtil.SafeToRedirect(CreateLogOutPopup,e),!1}function CreateLogOutPopup(e){var t;e&&(t=new $$WPComp.LoggingOutComponent({positioningFunction:$$WPContain.Positions.InsideNearTop}),new $$WPContain.Popup({positioningFunction:$$WPContain.Positions.InsideNearTop,Components:t,IsClosable:!1,TitleText:null,Size:$$WPContain.Popup.SizeEnum.SMALL,Class:"logout"}).show(!0))}function InlineEndSession(e,t){var n,i=new $$WPComp.InlineLoggingOutComponent({positioningFunction:$$WPContain.Positions.InsideNearTop},(function(){t&&t(),e&&n.hide()}),!1);e&&(n=new $$WPContain.Popup({positioningFunction:$$WPContain.Positions.InsideNearTop,Components:i,IsClosable:!1,TitleText:null,Size:$$WPContain.Popup.SizeEnum.SMALL,Class:"logout"})).show(!0),i.logout()}function DoRedirectOE(){return this.document.write("<br /><br /><br /><br /><center>"+$$WP.Strings.get("LogoutRedirect","Core.CommonUtils")+"</center>"),window.location="./oebye.asp",!1}function captureBackEnterKey(){if($$WPUtil.setActivity(),window.event&&(8==window.event.keyCode||13==window.event.keyCode)){var e=window.event.srcElement,t=e.type;if(!e.readOnly){if(("text"==t||"textarea"==t||"password"==t)&&8==window.event.keyCode)return;if(("textarea"==t||"submit"==t)&&13==window.event.keyCode)return}return window.event.cancelBubble=!0,window.event.returnValue=!1,!1}}function showItem(e){var t;return document.getElementById?t=document.getElementById(e):document.all&&(t=document.all.item(e)),null!=t&&(t.style.display="block",!0)}function hideItem(e){var t;return document.getElementById?t=document.getElementById(e):document.all&&(t=document.all.item(e)),null!=t&&(t.style.display="none",!0)}function showElement(e,t){null===e&&(null!==t&&t.length>0&&(e=document.getElementById(t)),null===e)||removeClassNames(e,"hidden")}function hideElement(e,t){null===e&&(null!==t&&t.length>0&&(e=document.getElementById(t)),null===e)||(removeClassNames(e,"hidden"),e.className=e.className+" hidden")}function activateField(e,t){null===e&&("string"==typeof t&&t.length>0&&(e=document.getElementById(t)),null===e)||(removeClassNames(e,"disabled,activefield"),e.className=e.className+" activefield")}function activateFieldsByIds(e){var t,n;if(null!==e&&(n=e.split(",")),null!==n)for(t=0;t<n.length;t+=1)activateField(document.getElementById(n[t]))}function deactivateField(e,t){null===e&&("string"==typeof t&&t.length>0&&(e=document.getElementById(t)),null===e)||(removeClassNames(e,"disabled,activefield"),e.className=e.className+" disabled")}function deactivateFieldsByIds(e){var t,n;if(null!==e&&(n=e.split(",")),null!==n)for(t=0;t<n.length;t+=1)deactivateField(document.getElementById(n[t]))}function applyClass(e,t){var n,i;if(e){for(n=t.split(","),i=0;i<n.length;i++)containsClassName(e,n[i])||(e.className+=(e.className.length>0?" ":"")+n[i]);return e}}function removeClassNames(e,t){var n,i,o,a;if(!(!e||!t||e.className.length<1||t.length<1)){for(n=t.split(","),a=e.className,i=0;i<n.length;i+=1)o=new RegExp("(^|\\s+)"+n[i]+"(\\s+|$)","g"),a=a.replace(o," ");e.className=a}}function replaceClassNames(e,t,n){removeClassNames(e,t),applyClass(e,n)}function containsClassName(e,t){var n;return!(!e||"string"!=typeof t||t.length<1)&&(!("string"!=typeof e.className||e.className.length<1)&&(!!(n=new RegExp("(^|\\s+)"+t+"(\\s+|$)","g"))&&null!=e.className.match(n)))}function applyUniqueClassNameAmongSiblings(e,t){var n,i=e.parentNode;for(n=0;n<i.children.length;n++)removeClassNames(i.children[n],t);applyClass(e,t)}function selectAllFirstTime(e){return null===e||containsClassName(e,"clckd")||(e.select(),e.className=e.className+" clckd",e.onblur=function(){return removeClassNames(this,"clckd"),!1}),!1}function enableBtn(e){e&&e.removeAttribute&&(e.removeAttribute("disabled"),e.className=e.className.replace(/\ ?disabled/,""))}function disableBtn(e){var t="disabled";if(e){if("function"==typeof e)return;e.disabled=t,-1==e.className.indexOf(t)&&(e.className=e.className.replace(/\ *$/,""),e.className.length>0&&(t=" "+t),e.className=e.className+t)}}function getElementPosition(e,t){if(e.offsetParent){for(var n,i=e,o=0,a=0;i&&(n=i,"HTML"!=i.tagName)&&(!t||i!=t);){if(o+=i.offsetLeft,a+=i.offsetTop,i.scrollLeft&&(o-=i.scrollLeft),"wrap"==i.id.toLowerCase()){o-=i.offsetLeft,a-=i.offsetTop;break}(i=WP.DOM.Browser.isFirefox&&"fixed"===WP.DOM.Read.getStyle(i,"position")?null:i.offsetParent)&&i.classList.contains("fixedCalendarParent")&&(i=document.getElementById("classicPopupRoot"))}return-1!=navigator.userAgent.indexOf("Mac")&&void 0!==document.body.leftMargin&&(o+=document.body.leftMargin,a+=document.body.topMargin),o+="px",a+="px","HTML"==n.tagName&&((n=n.getElementsByTagName("body")[0]).offsetLeft&&(o-=n.offsetLeft),n.offsetTop&&(a-=n.offsetTop)),{x:o,y:a,topElement:n}}}function changePasswdCheck(e){return null!=e&&(getErrorForScreenReader(),""==e.oldpasswd.value?(alert($$WP.Strings.get("CurrentPasswordError","Core.CommonUtils")),e.oldpasswd.focus(),!1):e.newpasswd.value==e.verifypasswd.value||(alert($$WP.Strings.get("ReTypeNewPasswordError","Core.CommonUtils")),e.verifypasswd.focus(),!1))}function changeQuesAnsCheck(e){return null!=e&&(getErrorForScreenReader(),""==e.oldpasswd.value?(alert($$WP.Strings.get("CurrentPasswordError","Core.CommonUtils")),e.oldpasswd.focus(),!1):""!=e.pwdans.value||(alert($$WP.Strings.get("AnswerError","Core.CommonUtils")),e.pwdans.focus(),!1))}function CheckFilenameExtensions(){var e,t,n,i,o,a,r,l,s,c=document.getElementById("ALLOWED_EXTENSIONS"),d=0,u=!1,m=!0;if(!c)return!0;for(e=c.value,t=new RegExp("^([a-zA-Z]:(\\\\|/)|file://|/|\\\\\\\\)[^\\\\/:].*\\..+");!u;){if(!(n=document.getElementById("upload"+ ++d))){u=!0;break}if(0!=(i=n.value).length){if(-1!=navigator.userAgent.indexOf("MSIE")&&!t.test(i)){m=!1,u=!0;break}if((o=i.split(".")).length<2){m=!1,u=!0;break}if(a=o[o.length-1].toUpperCase(),-1==e.indexOf("^"+a+"^")){m=!1,u=!0;break}}}return m||((r=document.getElementById("progbar"))&&(r.className+=" hidden"),l=e.substr(1,e.length-2).replace(/\^/g,", "),s=$$WP.Strings.get("BadFilenameExtension","Core.CommonUtils").replace("@MYCHART@FILENAME@",i).replace("@MYCHART@ALLOWEDEXTENSIONS@",l),alert(s)),m}function checkEnter(e,t){if(null!=e&&"13"==e.keyCode)return null!=t&&t.click(),!1;return!0}function isBasicInlineValidationError(e,t,n,i,o,a,r,l,s,c,d){var u=!1,m=!1,g=!1,f=!1;return""!=n&&null!=n||(n=getErrorForScreenReader()+$$WP.Strings.get("RequiredFieldError","Global")),""!=l&&null!=l||(l=n),null!=e&&(""!=d&&null!=d||(d=-1),e.maxLength>1e4&&(i=!1),i&&d<0&&(d="dob"==e.id?e.maxLength-2:e.maxLength),""==e.value||null==e.value?(u=!0,m=!0):i&&e.value.length<d&&e.value.length>0?(u=!0,g=!0):c&&isNaN(e.value)&&(u=!0,f=!0),u?o||(m?s?isHighlighted(e)&&changeErrorField(t,n,!1,[e]):(turnOnHighlight(e),changeErrorField(t,n,!1,[e])):(g||f)&&(turnOnHighlight(e),changeErrorField(t,l,!1,[e]))):(r||turnOffHighlight(e),a||changeErrorField(t,"",!0,[e])),u)}function changeErrorField(e,t,n,i){var o,a,r,l,s;if(e.length>0&&(o=document.getElementById(e))){if(n&&("&nbsp;"===o.innerHTML||""===o.innerHTML))return;if(dangerou$.setHtml(o,t),i&&i.length>=1)for(a=""===t,r=0;r<i.length;r++)s=(l=$afe.jq(i[r])).safeAttr("aria-describedby"),a?(l.removeAttr("aria-invalid"),s===e&&l.removeAttr("aria-describedby")):(l.safeAttr("aria-invalid","true"),s||l.safeAttr("aria-describedby",e))}}function turnOnHighlight(e){e.className.search("inputHighlighted")<0&&(e.className=e.className+" inputHighlighted")}function turnOffHighlight(e){isHighlighted(e)&&(e.className=e.className.replace(" inputHighlighted",""))}function highlightIfEmpty(e,t){null!=e&&(""==e.value?t||turnOnHighlight(e):turnOffHighlight(e))}function isHighlighted(e){return null!=e&&e.className.search("inputHighlighted")>-1}function validateEmptinessOfTwoRelatedFields(e,t){e.value.length<1?t.value.length<1?isHighlighted(t)&&turnOnHighlight(e):turnOnHighlight(e):turnOffHighlight(e)}function checkKeyPress(e,t,n){var i=!1;switch(t){case ALPHANUMERIC:(e.keyCode>=48&&e.keyCode<=57||e.keyCode>=65&&e.keyCode<=90||e.keyCode>=96&&e.keyCode<=105||e.which>=48&&e.which<=57||e.which>=65&&e.which<=90||e.which>=96&&e.which<=105)&&(i=!0),WP.DOM.Browser.isAndroid&&(i=!0);break;case EQUAL_TO_CODE:e.keyCode!=n&&e.which!=n||(i=!0);break;case GREATER_THAN_CODE:(e.keyCode>n||e.which>n)&&(i=!0);break;case LESS_THAN_CODE:(e.keyCode<n||e.which<n)&&(i=!0);break;default:return i}return i}function checkIfFocusOnPrevField(e,t,n,i){var o,a;(a=i-1)>0&&checkKeyPress(e,EQUAL_TO_CODE,"8")&&""==t.value&&null!=(o=document.getElementById(n+a))&&(o.focus(),isTabAllowed=!0,o.value=o.value)}function autotab(e,t,n){checkKeyPress(e,ALPHANUMERIC)?t.getAttribute&&t.value.length==t.getAttribute("maxlength")&&(WP.DOM.Browser.isIPod||WP.DOM.Browser.isIPhone||WP.DOM.Browser.isIPad?(n.focus(),isTabAllowed=!1):(n.focus(),n.select(),isTabAllowed=!1)):checkKeyPress(e,EQUAL_TO_CODE,"16")&&(isTabAllowed=!0)}function isDiscreteFieldsError(e,t,n,i,o,a,r,l,s,c){var d,u,m,g,f,h=!1,p=!1,v=0;for(f=o,g=null==l,""!=o&&null!=o||(o=$$WP.Strings.get("RequiredFieldError","Global")),""==a&&(a=o),d=1;d<=t;d++)null!=(u=document.getElementById(e+d))&&(""!=u.value?(s&&(s=""),f=a,d=t):isHighlighted(u)&&s&&(s=""));if(g||(isHighlighted(l)&&!0,h=isBasicInlineValidationError(l,i,f,n,r,1,"",f,s,c)),h)p=!0;else for(null==t&&(t=1),d=1;d<=t;d++)(u=1==t?document.getElementById(e):document.getElementById(e+d)).maxLength>1e4&&(n=!1),n&&(v="dob"==u.id||"ssn"==u.id?u.maxLength-2:u.maxLength),null!=u&&(""==u.value?(h=!0,!r&&g&&(turnOnHighlight(u),changeErrorField(i,f,!1,[u]))):n&&u.value.length<v&&u.value.length>0?(h=!0,!0,!r&&g&&(turnOnHighlight(u),changeErrorField(i,f,!1,[u]))):(g&&turnOffHighlight(u),(l==u||g)&&((m=$afe.jq(u)).removeAttr("aria-invalid"),m.removeAttr("aria-describedby"))),isHighlighted(u)&&(p=!0));return h?(p||changeErrorField(i,""),!0):(changeErrorField(i,""),!1)}function checkIfTabAllowed(e,t){checkKeyPress(e,EQUAL_TO_CODE,"16")?isTabAllowed=!0:checkKeyPress(e,EQUAL_TO_CODE,"9")&&t.value.length<1&&!isTabAllowed&&(cancelEvent(e),isTabAllowed=!0)}function cancelEvent(e){e.cancelBubble=!0,e.returnValue=!1,e.stopPropagation&&(e.stopPropagation(),e.preventDefault())}function easyDOBEntry(e,t,n,i){null!=e&&(t?n?isValidTwoDigitYear(e.value)&&(i?isTabAllowed=!0:e.value=getFourDigitYearFromTwoDigitYear(e.value,BIRTH_YEAR_MIN_YEARS_BACK).toString()):1==e.value.length&&e.value>0&&(i?isTabAllowed=!0:e.value="0"+e.value):e.length?(isValidOneDigitDatePart(e[0].value)&&(e[0].value="0"+e[0].value),isValidOneDigitDatePart(e[1].value)&&(e[1].value="0"+e[1].value),isValidTwoDigitYear(e[2].value)&&(e[2].value=getFourDigitYearFromTwoDigitYear(e[2].value,BIRTH_YEAR_MIN_YEARS_BACK).toString())):e.value<100&&e.value>=0&&(e.value=getFourDigitYearFromTwoDigitYear(e.value,BIRTH_YEAR_MIN_YEARS_BACK).toString()))}function removeCharFromField(e,t,n,i){var o;null!=i&&""!=i||(i=REMOVE_IF_EQUAL_TO_REMOVE_CHAR),o=charKeyPressed(e),i==REMOVE_IF_EQUAL_TO_REMOVE_CHAR?!checkKeyPress(e,GREATER_THAN_CODE,"0")||checkKeyPress(e,EQUAL_TO_CODE,"9")||checkKeyPress(e,EQUAL_TO_CODE,"16")||o==n&&cancelEvent(e):i==REMOVE_NONNUMERIC&&(checkKeyPress(e,EQUAL_TO_CODE,"8")||checkKeyPress(e,EQUAL_TO_CODE,"9")||checkKeyPress(e,EQUAL_TO_CODE,"27")||checkKeyPress(e,EQUAL_TO_CODE,"46")||checkKeyPress(e,EQUAL_TO_CODE,"37")||checkKeyPress(e,EQUAL_TO_CODE,"39")||!isNaN(o)||cancelEvent(e))}function charKeyPressed(e){var t;return e||(e=window.event),e.keyCode?t=e.keyCode:e.which&&(t=e.which),t>0?String.fromCharCode(t):""}function ShowPharmacyHours(e,t,n){var i,o=document.getElementById(t).selectedIndex;null!=o&&(i=e+o,0==o?dangerou$.setHtml(document.getElementById(n).innerHTML,"&nbsp;"):dangerou$.setHtml(document.getElementById(n),document.getElementById(i).value))}function clearRadioSelection(e){var t,n;for(t=document.getElementsByName(e),n=0;n<t.length;n++)"radio"==t[n].type&&(t[n].checked=!1)}function UpdateAddressOptions(){var e,t,n,i,o,a,r,l,s,c,d;if(null!==(t=document.getElementById("pharmacy").selectedIndex)){for(n="pharmacyaddresses"+t,i=document.getElementById(n).value.split("*"),e=document.getElementsByName("address"),o=0;o<e.length;o++)if(!((r=e[o].id.indexOf("_"))<0)&&0!=(l=e[o].id.substring(r+1)).length&&99!=l&&(s="addresslabel_"+l,c=document.getElementById(s))){for(e[o].disabled=!0,applyClass(e[o],"hidden"),applyClass(c,"hidden"),c.disabled=!0,a=0;a<i.length;a++)if(i[a]==l){d||(d=e[o]),e[o].disabled=!1,removeClassNames(e[o],"hidden"),removeClassNames(c,"hidden"),c.disabled=!1;break}return""}d&&(d.checked=!0)}}function UpdateDeliveryMethods(e,t,n,i,o){var a,r,l,s,c,d,u,m,g,f,h,p,v,y;if(null!==(a=document.getElementById(t).selectedIndex)){if(r=e+a,null===document.getElementById(r))return(h=document.getElementById("deliveryoptions"))&&(applyClass(h,"hidden"),h.disabled=!0),showAndHideButtons("send","paynext"),(p=document.getElementById("paymentoptions"))&&(applyClass(p,"hidden"),p.disabled=!0),void hidePickupFields(["pickupoptions","addressoptions","comments"]);if(s=(l=document.getElementById(r).value).split("^"),hidePickupFields(["pickupoptions","addressoptions","comments"]),0===l.length)(h=document.getElementById("deliveryoptions"))&&(applyClass(h,"hidden"),h.disabled=!0);else{for(v=!1,(h=document.getElementById("deliveryoptions"))&&(removeClassNames(h,"hidden"),h.disabled=!1),m=1;m<4;m++)if(d=n+m,u=i+m,g=document.getElementById(d))for(g.checked&&1==o?(v=!0,1==g.value?showPickupFields(["pickupoptions"]):showPickupFields(["addressoptions","comments"])):g.checked=!1,g.disabled=!0,applyClass(g,"hidden"),applyClass(f=document.getElementById(u),"hidden"),f.disabled=!0,c=0;c<s.length;c++)s[c].split("|")[0]==m&&(g.disabled=!1,removeClassNames(g,"hidden"),removeClassNames(f,"hidden"),f.disabled=!1,y||(y=g));s.length>0&&!v&&y&&(y.checked=!0,1==y.value?(showPickupFields(["pickupoptions"]),hidePickupFields(["addressoptions","comments"])):showPickupFields(["addressoptions","comments"]))}UpdateAddressOptions(),UpdatePaymentMethods("pharmacymethods","pharmacy","deliverymethod","paymentmethod","paymentmethodlabel",o)}}function getRadioValue(e){var t,n;if(0==(t=document.getElementsByName(e)).length)return"";for(n=0;n<t.length;n++)if(1==t[n].checked)return t[n].value;return""}function UpdatePaymentMethods(e,t,n,i,o,a){var r,l,s,c,d,u,m,g,f,h,p,v,y,$,E,P;if(showAndHideButtons("send","paynext"),($=document.getElementById("paymentoptions"))&&(applyClass($,"hidden"),$.disabled=!0),r=document.getElementById(t).selectedIndex,f=getRadioValue(n),null!==r&&0!==f.length){for(l=e+r,s=document.getElementById(l).value.split("^"),y="",c=0;c<s.length;c++)if(f==(m=(h=s[c].indexOf("|"))<0?s[c]:s[c].substring(0,h))){h>=0&&(y=s[c].substring(h+1));break}if(y.length>0){for(E=!1,g=y.split("|"),($=document.getElementById("paymentoptions"))&&(removeClassNames($,"hidden"),$.disabled=!1),p=document.getElementsByName(i),c=0;c<p.length;c++)if(!((h=p[c].id.indexOf("_"))<0)&&0!=(m=p[c].id.substring(h+1)).length)for(u=o+"_"+m,d=document.getElementById(u),a&&p[c].checked?(E=!0,2==p[c].value&&showAndHideButtons("paynext","send")):p[c].checked=!1,P||(P=p[c]),p[c].disabled=!0,applyClass(p[c],"hidden"),applyClass(d,"hidden"),d.disabled=!0,v=0;v<g.length;v++)g[v]==m&&(p[c].disabled=!1,removeClassNames(p[c],"hidden"),removeClassNames(d,"hidden"),d.disabled=!1);g.length>0&&!E&&P&&(P.checked=!0,2==P.value&&showAndHideButtons("paynext","send"))}}}function HidePharmacyText(e,t,n,i){var o,a;e||(e=document.getElementById(t)),e&&(o=document.getElementById(n),a=document.getElementById(i),o&&a&&(e.options[e.selectedIndex].value==o.value?(a.disabled=!1,removeClassNames(a,"hidden")):(a.disabled=!0,applyClass(a,"hidden"))))}function showAndHideButtons(e,t){var n,i;(n=document.getElementById(e))&&(n.disabled=!1,removeClassNames(n,"hidden")),(i=document.getElementById(t))&&(i.disabled=!0,applyClass(i,"hidden"))}function showPickupFields(e){var t,n;if(e)for(t=0;t<e.length;t++)(n=document.getElementById(e[t]))&&(removeClassNames(n,"hidden"),n.disabled=!1)}function hidePickupFields(e){var t,n;if(e)for(t=0;t<e.length;t++)(n=document.getElementById(e[t]))&&(applyClass(n,"hidden"),n.disabled=!0)}function enableIfRadioCheckedAndElementsFilled(e,t,n,i,o){var a,r;a=document.getElementById(t),(r=document.getElementById(n))&&!containsClassName(r,"hidden")&&a&&a.checked?enableIfReqFilled(e,i,o):enableIfReqFilled(e,i)}function isValidEmail(e){return new RegExp(/^\s*[A-Za-z0-9\xC0-\xFFƒŠŒŽšœžŸ._%+-]+@[A-Za-z0-9\xC0-\xFFƒŠŒŽšœžŸ.-]+\.[A-Za-z\xC0-\xFFƒŠŒŽšœžŸ]{2,18}\s*$/).test(e)}function $T(e,t){return e&&(void 0!==e.innerText&&(e.innerText=t),void 0!==e.textContent&&(e.textContent=t)),e}function clearElement(e){if(e)for(e.innerHTML="",e.value="",e.innerText="";e.hasChildNodes();)e.removeChild(e.lastChild)}void 0===WP&&(WP={}),void 0===WP.myPath&&(WP.myPath=self.location.pathname.substr(0,self.location.pathname.indexOf(".asp")),0===WP.myPath.length&&(WP.myPath=self.location.pathname.substr(0,self.location.pathname.indexOf(".htm"))),0===WP.myPath.length?WP.myPath=self.location.pathname:WP.myPath=self.location.pathname.substr(0,WP.myPath.lastIndexOf("/")+1)),$$WP=$$WP||{},pre_checkActivity=checkActivity,"Netscape"==navigator.appName&&(window.captureEvents(Event.KEYPRESS),window.onkeypress=doMainKeyPress),getParentDocument()||console.log("Warning: Application is being displayed in a frame hosted on a different domain.");var HTMLEncodeDecodeDiv=document.createElement("div");function HTMLUnencode(e){return HTMLEncodeDecodeDiv.innerHTML=e||"",HTMLEncodeDecodeDiv.innerText||HTMLEncodeDecodeDiv.textContent}function HTMLEncode(e){return e.replace($$WP.Utilities.Global.HtmlChars,$$WP.Utilities.HtmlEncodeCallback)}function createElement(e,t,n){var i=document.createElement(e||"div");return t&&(i.className=t),n&&(i.id=n),i}function getPrefix(e){var t;return 0===(t=e?$$WP.Strings.get("DataTileStaticURLPrefix","Core.CommonUtils"):$$WP.Strings.get("DataTileURLPrefix","Core.CommonUtils")).length&&(t=WP.myPath+"@mychart@url@"),t}function applyPrefix(e,t){var n,i,o;return t=t||"",e?((i=t.indexOf("#"))>0&&(n=t.substring(i+1),t=t.substring(0,i)),o=(o=e.replace(/@mychart@url@/gi,t)).replace(/@mychart@wrappedurl@/gi,encodeURIComponent(t)),i>0&&(o=o+"#"+n),o):t}function makeStaticLink(e){var t,n,i;return 0===(e=e.replace(/\\/g,"/")).indexOf(".")&&(e=e.substring(1)),0===e.indexOf(".")&&(e=e.substring(1)),0===e.indexOf("/")&&(e=e.substring(1)),78===$$WP.ApplicationContext?Epic.PatientEngagement.Welcome.Core.Utilities.getUrl("Content/"+e):(t=getPrefix(!0),n=$$WP.AffiliateFilePath,i=new RegExp("svg$","i"),applyPrefix(t,e=!$$WPUtil.IsNullOrEmpty(n)&&i.test(e)?$$WP.AffiliateFilePath+"/"+e:$$WP.I18N.getMyChartLocale()+"/"+e))}function createImage(e,t,n,i){var o=createElement("img",e,t);return o.src=makeStaticLink("/images/"+(n||"")),o.alt=i||"",o.title=i||"",o}function getOffset(e,t){var n=e[t];for(e=e.offsetParent;e;)n+=e[t],e=e.offsetParent;return n}function createAlert(e,t,n){var i,o,a;if(0!==e.length)return i=createElement("span","alert"),!0===t&&(o=createImage("yield","","warning.png",$$WP.Strings.get("YieldTitle","Core.CommonUtils")),i.appendChild(o)),a=createElement("span","errHolder"),dangerou$.setHtml(a,e),i.appendChild(a),n&&(n.appendChild(i),n.className=""),i;clearElement(n)}function getChild(e,t){for(var n=e.firstChild;t>0;){for(t--;n&&("#comment"===n.nodeName||"#text"===n.nodeName);)n=n.nextSibling;if(!n)return null;n=n.nextSibling}for(;n&&("#comment"===n.nodeName||"#text"===n.nodeName);)n=n.nextSibling;return n}function getTrackedWindowString(e){return""!==e&&null!=e||(e="openWindows"),getCookie(e,!0)}function openWindow(e,t,n,i,o,a,r){var l,s,c;return void 0!==n&&""!==n||o||(n="status=0,menubar=0,scrollbars=1,resizable=1,toolbar=0"),r?openWindowInternal(e,t,n):(null==i&&(i="openWindows"),c=""===(s=getCookie(i,!0))?0:s.split("^").length,null!=t&&""!==t||(t="mycWin"+makeLink("")+c),l=openWindowInternal(e,t,n),setCookie(i,s=s+(s.length>0?"^":"")+t,!0),l)}function openWindowInternal(e,t,n){var i;return(i=$$WP._windowOpenReal(e,t,n))&&(i.opener=null),i}function openOAuthWindow(e){var t=$$WPUtil.getDomain(window.location),n=e.callback||function(){window.location.reload()},i=openWindow(e.sUrl,e.sName,e.sFeature);i&&i.focus();var msgListner=function(e){if(e.origin==t&&"GotAccessToken"==e.data){try{i.close()}catch(e){}window.removeEventListener?window.removeEventListener("message",msgListner,!1):window.detachEvent?window.detachEvent("onmessage",msgListner):document.detachEvent&&document.detachEvent("onmessage",msgListner),n()}};window.attachEvent?window.attachEvent("onmessage",msgListner):document.attachEvent?document.attachEvent("onmessage",msgListner):window.addEventListener&&window.addEventListener("message",msgListner);var o=document.getElementById("GetAccessTokenProxy");!o&&(-1!==navigator.userAgent.indexOf("MSIE")||navigator.appVersion.indexOf("Trident/")>0)&&((o=document.createElement("iframe")).src=e.sProxy,o.width=0,o.height=0,o.frameBorder=0,o.style.visibility="hidden",o.id="GetAccessTokenProxy",document.body.appendChild(o))}function postMessageForOAuthPopup(e,t){if(-1!==navigator.userAgent.indexOf("MSIE")||navigator.appVersion.indexOf("Trident/")>0){var n=document.getElementById("GetAccessTokenProxy");try{n.contentWindow.postMessage(e,t)}catch(e){}}else window.postMessage(e,t)}function closeAllWindows(e){var t,n,i,o,a,r;if(""!==e&&null!=e||(e="openWindows"),t=getCookie(e,!0)){for(a=(n=t.split("^")).length,o=0;o<a;o++)if(i=n[o])try{(r=$$WP._windowOpenReal("",i,""))&&r.close&&r.close()}catch(e){}deleteCookie(e,!0)}}function setCookie(e,t,n,i){var o;e&&(o=e+(n?"4"+makeLink("").replace(new RegExp("/","g"),"").toLowerCase():"")+"="+escape(t)+";path=/",o+=i?"; expires="+i.toGMTString():"",hasSameSiteBug()||$$WP.DisableSameSiteSecureCookie||(o+=";SameSite=None; Secure"),document.cookie=o)}function hasSameSiteBug(){var e=navigator.userAgent,t=RegExp("^.*CPU OS 1[0-2].*Version/1[0-2].*Safari.*$"),n=RegExp("^.*CPU iPhone OS 1[0-2].*Version/1[0-2].*Safari.*$"),i=RegExp("^.*Macintosh; Intel Mac OS X 10_1[0-4].*Version/1[0-3].*Safari.*$"),o=RegExp("^.*Chrom[^ /]+/(5[1-9]|6[0-6])[.d]*.*$"),a=RegExp("^.*CriOS[^ /]+/(5[1-9]|6[0-6])[.d]*.*$"),r=RegExp("^.*CPU OS 12.*like Mac OS X.*$"),l=RegExp("^.*CPU iPhone OS 12.*$");return!!(t.test(e)||n.test(e)||i.test(e)||o.test(e)||a.test(e)||r.test(e)||l.test(e))}function getCookie(e,t){var n,i,o,a,r,l,s,c;if(c="",!(n=document.cookie)||0===n.length)return c;if(i=n.split(";"))for(r=new RegExp(e+(t?"4"+makeLink("").replace(new RegExp("/","g"),"").toLowerCase():"")+"s?="),l=/^\s+|\s+$/g,a=0;a<i.length&&!o;a+=1)(s=i[a].replace(l,"")).search(r)>-1&&(c=unescape(s.substr(s.indexOf("=")+1)).replace(l,""),o=!0);return c}function deleteCookie(e,t){e&&setCookie(e,"",t,new Date(1))}function makeLink(e){return e.match(/^(epic)?https?:\/\//i)?e:78===$$WP.ApplicationContext?Epic.PatientEngagement.Welcome.Core.Utilities.getUrl(e):applyPrefix(getPrefix(!1),e)}function makeErrorPageLink(){return 78===$$WP.ApplicationContext?makeLink("Core/Home/Error"):makeLink("500.aspx")}function makeStaticImageLink(e){return 78===$$WP.ApplicationContext?Epic.PatientEngagement.Welcome.Core.Utilities.getUrl("Content/images/"+e):makeStaticLink("images/"+e)}function addQueryStringToUrl(e,t,n){if(e&&t){var i=-1!==e.indexOf("?");n||(n=""),e=e+(i?"&":"?")+t+"="+n}return e}function getCSRFTokenAsQS(e){$afe.select("body").hasClass("isPrelogin")?e():$$WPUtil.IsNullOrEmpty($$WP.Settings.DotNetOnly)||!$$WP.Settings.DotNetOnly?(($$WP=$$WP||{})._CSRFCallBackQueue=$$WP._CSRFCallBackQueue||[],$$WP._CSRFTokenQs?e($$WP._CSRFTokenQs):$$WP._CSRFReqSent?$$WP._CSRFCallBackQueue.push(e):($$WP._CSRFReqSent=!0,$.get(makeLink("Home/CSRFToken"),(function getCSRFTokenAsQS$getToken(t){var n,i,o;if(t&&(i=(n=dangerou$.parseHtml(t)).safeAttr("name")||"__RequestVerificationToken",o=n.val(),$$WP._CSRFTokenName=i,$$WP._CSRFToken=o,$$WP._CSRFTokenQs=i+"="+encodeURIComponent(o),$$WP._CSRFTokenQsToken=encodeURIComponent(o)),e($$WP._CSRFTokenQs),$$WP._CSRFCallBackQueue.length>0){for(var a=0;a<$$WP._CSRFCallBackQueue.length;a++)"function"==typeof $$WP._CSRFCallBackQueue[a]&&setTimeout($$WP._CSRFCallBackQueue[a],0,$$WP._CSRFTokenQs);$$WP._CSRFCallBackQueue=[]}})))):e()}function setFederatedLogoutMode(e){$$WP.FederatedLogoutMode=e}function getFederatedLogoutMode(){return 1==$$WP.FederatedLogoutMode}function disableEmptyFormInputs(e){var t,n;for(t=document.getElementById(e).getElementsByTagName("input"),n=0;n<t.length;n++)t[n].value.length||$afe.jq(t[n]).safeAttr("disabled",!0)}function removeNonNumericInput(e){var t=e.value.replace(/[^\d]/g,"");e.value!=t&&(e.value=t)}function removeFadedtextHint(e){$afe.jq(e).hasClass("fadedtext")&&(e.value="")}$$WP.Utilities=$$WP.Utilities||{},$$WP.Utilities.Global=$$WP.Utilities.Global||{},$$WP.Utilities.Global.HtmlEntities={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},$$WP.Utilities.Global.HtmlChars=/[&<>"'\/`]/g,$$WP.Utilities.HtmlEncodeCallback=function $$WP$U$G$HEC(e){return $$WP.Utilities.Global.HtmlEntities[e]||e};try{$$WP&&$$WP.Utilities&&!$$WP.Utilities.isValidBrowser()&&-1===window.location.href.indexOf("Home/Error?Code=4")&&(window.location=makeLink("Home/Error?Code=4"))}catch(e){}function logAction(e,t,n){78===$$WP.ApplicationContext&&Epic.PatientEngagement.Welcome.Core.EventLogging.EventLoggingServices.logAction(e,t,n)}function SetActivity(){$$WPUtil.setActivity()}function SetBlurActivity(){$$WPUtil.setActivity()}function HandleKeyPress(e){return $$WPUtil.setActivity(),!0}function HandleKeyPressAndMaxLen(e,t,n,i){var o;return o="Netscape"!=navigator.appName?window.event.keyCode:e.which,$$WPUtil.setActivity(),8===o||0===o||(!(!e.ctrlKey||86===o||118===o)||CheckLength(t,n,i,1))}function HandleBlurAndMaxLen(e,t,n,i){return HandleKeyPressAndMaxLen(e,t,n,i)}function HandleOnChangeAndMaxLen(e,t,n){return $$WPUtil.setActivity(),CheckLength(e,t,n)}function enableIfChecked(e){if(document.getElementById){var t,n,i,o,a,r,l,s,c=[];if(i=document.getElementById(e)){for(a=enableIfChecked.arguments,o=1;o<a.length;o++)(n=i[a[o]])&&"object"==typeof n&&c.push(n);for(r=i.getElementsByTagName("input"),l=!1,s=0;s<r.length;s++)if(("checkbox"==(t=r[s]).type||"radio"==t.type)&&-1==t.className.toLowerCase().indexOf("hidden")&&t.checked){l=!0;break}for(o=0;o<c.length;o++)n=c[o],l?enableBtn(n):disableBtn(n)}}}function enableIfAllChecked(){var e,t,n;for(n=!0,e=0;e<arguments.length;e++)t="#"+arguments[e],0!==$afe.select(t).length&&($afe.select(t).prop("checked")||(n=!1));return n}function decodeMnemonics(e,t){var n,i;for(n in t=t||{})void 0!==t[n]&&(i=new RegExp(n,"g"),e=e.replace(i,t[n]));return e}function disableButtonAndShowSpinner(e){e.prop("disabled",!0),e.addClass("omitdisablestyling");var t=document.createElement("div");$afe.jq(t).addClass("spinningLoadWheel"),e.safeAfter(t)}function moveFormSubmissionButtonAndShowSpinner(e){var t=document.createElement("input");$afe.jq(t).addClass("button completeworkflow omitdisablestyling formbuttons"),$afe.jq(t).prop("id","noActionButton"),$afe.jq(t).prop("value","Submit"),$afe.jq(t).prop("type","submit"),$afe.jq(t).prop("disabled",!0),e.safeAfter(t),e.css("position","absolute"),e.css("left","-999em");var n=document.createElement("div");$afe.jq(n).addClass("spinningLoadWheel"),$afe.jq(t).safeAfter(n),e.on("keydown",(function(e){32!==e.keyCode&&13!==e.keyCode||e.preventDefault()}))}function reportFormFactor(){$$WP.Analytics.UsageTrackingController.logFormFactor()}function getErrorForScreenReader(){return"<span class='clearlabel'>"+$$WP.Strings.get("ErrorLabelText","Global")+"</span>"}function vdtAdmissionLoad(){var e,t,n,i=!1,o=document.getElementById("appRoot");if((e=document.getElementById("loadingSpinner"))&&(e.style.display="none"),(e=document.getElementById("vdtFrame")).parentNode.style.height="auto",e.contentDocument||(i=!0),i||null==e.contentDocument.getElementById("vdtError")||(n=!0),n)(e=document.getElementById("vdtErrorDiv")).style.display="inherit";else{e.style.display="inherit";try{$afe.jq(window).on("popstate",handleBrowserBack),isDataTile()?(t=getGenericHeight(e),e.style.height!=t&&(e.style.height=t)):setAppropriateHeight(),(o=document.getElementById("appRoot"))&&setAppropriateHeightOnDOMMutations(o)}catch(e){return}}}function getGenericHeight(e){return e.style.height="100px",Math.max(document.body.scrollHeight||200,document.body.offsetHeight||200)+16+"px"}function setClientTimeZone(){$$WP.I18N.setClientTimeZone()}function addMobileTitle(e){"undefined"!=typeof Android&&Android.setWebViewTitle?Android.setWebViewTitle(e):window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.setWebViewTitle&&window.webkit.messageHandlers.setWebViewTitle.postMessage(e)}function isArbitraryDownloadSupported(){if($$WP.Utilities.UI.IsMobile){if("undefined"!=typeof Android)return Android.webViewDownloadEnabled&&Android.webViewDownloadEnabled();if(window.webkit&&window.webkit.messageHandlers)return window.webkit.messageHandlers.webViewDownloadEnabled&&window.webkit.messageHandlers.webViewDownloadEnabled()}return!0}function getFourDigitYearFromTwoDigitYear(e,t){var n,i,o=parseInt(e),a=(new Date).getFullYear();return isNaN(t)&&(t=BIRTH_YEAR_MIN_YEARS_BACK),n=a-t,isNaN(o)?n:(i=n%100)<o?100*(Math.floor(n/100)-1)+o:n-i+o}function isValidTwoDigitYear(e){return 2==e.length&&e>=0}function isValidOneDigitDatePart(e){return e<10&&e>0&&e.length<2}function getAppVirtualPath(){return makeLink("")}function getDeviceIdKey(){return"MYCHART-WEB-DEVICE-"+getAppVirtualPath()}function reconcileWebDevice(e){if(!(void 0!==$$WP&&void 0!==$$WP.IsMidloginStep||isShareEverywhere()||isBedsideTV())){e=!!e;var t,n=getDeviceIdKey();$$WPUtil.isLocalStorageAvailable()&&void 0!==window.localStorage&&(t=localStorage.getItem(n));var i={deviceId:t,skipSessionCheck:e};$.ajax({url:makeLink("Authentication/RememberDevices/ReconcileWebDevice"),type:"POST",data:i,dataType:"json",success:function(e){var t,i=$$WPUtil.isLocalStorageAvailable()&&void 0!==window.localStorage;i&&(t=localStorage.getItem(n)),(e.forceUpdate||null===t)&&e.deviceId&&(t=e.deviceId,i&&localStorage.setItem(n,t))}})}}