function bootstrapServiceBindings(n){n.run(["$rootScope",function(){}]);var t=n.requires,i=n.name;switch(n.name){case"CPApp":bindDataService(n);bindValidation(n);bindErrorHandler(n);bindApi(n);bindLanguages(n);bindMessageService(n);break;case"PWPApp":bindModalService(n);case"MWPApp":bindViewVersionService(n);case"CAPApp":bindDataService(n);bindValidation(n);bindErrorHandler(n);bindApi(n);bindLanguages(n);bindMessageService(n);bindDocumentUploaderService(n);n.name==="CAPApp"&&(window["moment-range"].extendMoment(moment),bindModalService(n));break;case"MAPApp":bindDataService(n);bindErrorHandler(n);bindApi(n);bindLanguages(n);bindMessageService(n)}}function bindDataService(n){n.service("DataService",["$window","$log",function(n,t){this.get=function(i){if(i in n._data)return n._data[i];t.error("Key '"+i+"' not found in DataService. Valid keys: "+Object.keys(n._data).join(", "))};this.rules=function(){if("_rules"in n)return n._rules;t.error("Rules object undefined")};var i=this;_.each(n._data,function(n,t){t==="get";i[t]=n})}])}function bindValidation(){}function bindErrorHandler(n){n.factory("ErrorHandler",function(){var n={},i=[],t=!1;return i.push(function(){}),{alertBanner:function(){return t},isError:function(t){return t in n?!0:!1},getAsString:function(t){return t in n?n[t][0]:null},getAsArray:function(){var t=[];return _.each(n,function(n){t.push(n[0])}),t},clear:function(){n=[];t=!1},set:function(i){if(t=!1,i==null){t="The request has some errors";return}_.isObject(i.errors)&&"errors"in i?(t=_.isUndefined(i.errors.Message)?"The following entries require attention.":i.errors.Message,n=i.errors):(t=i.errors,n=i)},add:function(n){this.callbacks.forEach(function(t){t(n)})},registerCallback:function(n){i.push(n)},all:function(){return n},addError:function(t,i){n[t]=[i]}}})}function bindApi(n){n.factory("API",["$http","$q","ErrorHandler","MessageService",function(n,t,i,r){function u(u,f,e,o){var s=t.defer(),c;return u=u.toLowerCase(),c=[h+f],u.match(/post|put/)?c.push(e):u.match(/get/)&&c.push(Object.assign({params:e},o)),i.clear(),n[u].apply(null,c).success(function(n){if(n.statusCode===409)r.prompt(n.title,n.errors,"Save Both").then(function(n){s.reject({allowConflict:n})},function(n){s.resolve({allowConflict:n})});else if(n.statusCode>=400)i.set(n),typeof n.errors=="string"&&n.statusCode===500&&r.exception(n.title,n.errors),n.statusCode===401&&r.exception(n.title,n.errors),s.reject(n);else{if(n.statusCode===302){location.assign(n.data);return}s.resolve(n)}}).error(function(n,t){if(t===500){console.log("server error");return}i.set(n);typeof n.errors=="string";s.reject(n)}),s.promise}var f=location.href.split("/"),e=f[0],o=f[2],s=e+"//"+o,h=s;return{get:function(n,t,i){return u("get",n,t,i)},post:function(n,t,i){return u("post",n,t,i)},put:function(n,t,i){return u("put",n,t,i)},"delete":function(n,t){return u("delete",n,{},t)}}}])}function bindMessageService(n){n.factory("MessageService",["$q","ErrorHandler",function(n){var t;return t=typeof bootbox=="undefined"?{alert:function(n){window.alert(n.message);n.callback(!0)},exception:function(n){return this.alert(n.message)},confirm:function(n){n.callback(window.confirm(n.message))}}:bootbox,{alert:function(i,r){var u=n.defer();return t.alert({title:"<b>"+i+"<\/b>",message:r,size:"small",className:"wbx-modal-core",buttons:{ok:{label:"Ok",className:"wbx-btn-secondary"}},callback:function(){u.resolve(!0)}}),u.promise},prompt:function(i,r,u,f){f=f||{};f.cancelClass=f.cancelClass||"wbx-btn-secondary";f.confirmClass=f.confirmClass||"wbx-btn-danger";var e=n.defer();return u=u||"Remove",t.confirm({title:"<b>"+i+"<\/b>",message:r,buttons:{cancel:{label:"Cancel",className:f.cancelClass},confirm:{label:u,className:f.confirmClass}},className:"wbx-modal-core",callback:function(n){n?e.resolve(n):e.reject(n)}}),e.promise},exception:function(i,r){var u=n.defer();return i=i||"An Error Ocurred With Your Request.",t.alert({title:"<b>"+i+"<\/b>",message:r,buttons:{ok:{label:"OK",className:"wbx-btn-secondary"}},className:"wbx-modal-core",callback:function(n){n?u.resolve(n):u.reject(n)}}),u.promise}}}])}function bindLanguages(n){n.config(["$translateProvider",function(n){_.isUndefined(window._locales)||(n.translations("en",window._locales.en),n.translations("es",window._locales.es),n.translations("zh",window._locales.zh),n.translations("tl",window._locales.tl),n.translations("vi",window._locales.vi),n.translations("ar",window._locales.ar),n.translations("fr",window._locales.fr),n.translations("ko",window._locales.ko),n.translations("ru",window._locales.ru),n.translations("de",window._locales.de));n.useStaticFilesLoader({files:[{prefix:"/Scripts/angular-validation/locales/",suffix:".json"}]});var t=window.navigator.languages?window.navigator.languages[0]:null;t=t||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage;t.indexOf("-")!==-1&&(t=t.split("-")[0]);t.indexOf("_")!==-1&&(t=t.split("_")[0]);n.preferredLanguage(t);n.fallbackLanguage("en")}])}function bindDocumentUploaderService(n){function t(n,t){function i(n,i){return t.upload({url:"/api/upload",data:i,file:n}).then(r,u,f)}function r(n){return n}function u(t){return n.reject(t)}function f(n){return parseInt(100*n.loaded/n.total)}return{uploadDocument:i}}n.factory("documentUploadDataService",["$q","Upload",t])}function bindModalService(n){function t(n){function u(n,i){return n||(n={}),n.backdrop="static",n.keyboard=!1,t(n,i)}function t(t,u){var f={},e={};return angular.extend(f,i,t),angular.extend(e,r,u),f.controller||(f.controller=function(n,t){n.modalOptions=e;n.modalOptions.ok=function(){t.close("ok")};n.modalOptions.close=function(){t.close("cancel")}},f.controller.$inject=["$scope","$uibModalInstance"]),f.component!=undefined&&(delete f.controller,delete f.controllerAs,delete f.templateUrl),n.open(f).result}var i={backdrop:!0,keyboard:!0,modalFade:!0,templateUrl:"/Templates/Modal",windowClass:"wbx-modal wbx-absolute-left",appendTo:angular.element("#allContainer")},r={cancelButtonText:"Cancel",actionButtonText:"Accept",actionButtonClass:"wbx-btn-primary",headerText:"Proceed?",bodyText:"?"};return{showModal:u,show:t}}n.service("WbxModalService",t);t.$inject=["$uibModal"]}function bindViewVersionService(n){n.factory("ViewVersionCheckService",["$window",function(n){function t(t){var i=n.matchMedia("(max-width: 575px)");i.addListener(t);t(i.matches)}return{initialize:t}}])}function formatMoney(n){return parseFloat(n).toFixed(2)}function stepperCtrl(n,t,i,r){var u=this;u.StateManager=[];u.currentStep=0;u.$onInit=function(){u.showNavigation=u.setShowNavigation();u.fixed=u.fixed||!1;u.initStateManager();u.updateDisplayMode()};u.setShowNavigation=function(){return u.showButtonNavigation?u.showButtonNavigation.toLowerCase()==="true":!0};u.initStateManager=function(){for(var n=0;n<u.steps;n++)n===0?u.StateManager.push({step:n,disabled:!1,active:!0,completed:!1}):u.StateManager.push({step:n,disabled:!0,active:!1,completed:!1})};u.confirmStep=function(n){n!==u.StateManager.length&&(n>0&&u.markBeforeStepsAsCompleted(n),u.setCurrentStepStatus(n))};u.reConfirmStep=function(){var n=u.getActiveStatusStep();u.markBeforeStepsAsCompleted(n);u.setCurrentStepStatus(n)};u.selectStep=function(t,i){if(u.currentStep<t&&!u.StateManager[t].completed){i.stopPropagation();return}var r=u.getTabContentElements();u.removeActiveClassFromTabContentElements(r);u.addActiveClassToCurrentStepElement(r,t);u.StateManager[u.currentStep].disabled=!1;u.StateManager[u.currentStep].completed=!0;u.StateManager[u.currentStep].active=!1;u.setCurrentStepStatus(t);n.$emit("stepperSelectedStep",++t)};u.getTabContentElements=function(){return $(".tab-content").children()};u.removeActiveClassFromTabContentElements=function(n){n.map(function(t){$("#"+n[t].id).removeClass("active")})};u.addActiveClassToCurrentStepElement=function(n,t){$("#"+n[t].id).addClass("active")};u.setCurrentStepStatus=function(n){u.StateManager[n].disabled=!1;u.StateManager[n].completed=!1;u.StateManager[n].active=!0;u.currentStep=n};u.markBeforeStepsAsCompleted=function(n){u.StateManager.map(function(t){t.step<=n&&(t.disabled=!1,t.completed=!0,t.active=!1);t.step>n&&(t.disabled=!0,t.active=!1,t.completed=!1)})};u.getActiveStatusStep=function(){for(var t=0,n=0;n<u.StateManager.length;n++)if(u.StateManager[n].active){t=u.StateManager[n].step;break}return t};u.next=function(n){if(u.currentStep!==u.StateManager.length-1&&u.StateManager[u.currentStep+1].disabled){n.stopPropagation();return}var t=u.currentStep+1;u.selectStep(t)};u.completeStepClicked=!1;u.nextAndConfirm=function(){var n,i;u.completeStepClicked||(u.completeStepClicked=!0,n=u.getTabContentElements(),u.removeActiveClassFromTabContentElements(n),i=u.currentStep+1,u.confirmStep(i),u.addActiveClassToCurrentStepElement(n,u.currentStep),t(function(){u.completeStepClicked=!1},500))};u.back=function(){var n=u.currentStep-1;u.selectStep(n)};u.finish=function(){u.StateManager[u.currentStep].disabled=!1;u.StateManager[u.currentStep].completed=!0;u.StateManager[u.currentStep].active=!1;n.$emit("stepperStepsCompleted")};t(function(){u.setActiveStep();u.confirmStep(u.currentStep)});u.setActiveStep=function(){var n=$(".tab-content").children();n.map(function(t){var i=$("#"+n[t].id).hasClass("active");i&&(u.currentStep=t)})};u.showNextButton=function(){u.stepConfirmed=!0;u.nextAndConfirm()};n.$on("stepperCompletedStep",function(){u.nextAndConfirm()});n.$on("stepperNextStep",function(n){u.next(n)});n.$on("stepperBackStep",function(){u.back()});n.$on("stepperSelectNewStep",function(n,t){u.selectStep(--t,n)});n.$on("stepperReConfirmCurrentStep",function(){u.reConfirmStep()});n.$on("stepperFinishSteps",function(){u.finish()});n.$on("stepperResetWizard",function(){u.currentStep=0;u.confirmStep(0);u.stepConfirmed=!1});angular.element(r).bind("resize",function(){u.updateDisplayMode()});u.updateDisplayMode=function(){var n=$(".nav-tabs"),t=$("tab-content");r.innerWidth<667&&u.steps>5||u.steps>9?(n.hasClass("nav-stacked")||n.addClass("nav-stacked"),n.hasClass("stickyHeading")&&n.removeClass("stickyHeading")):(n.hasClass("nav-stacked")&&n.removeClass("nav-stacked"),n.hasClass("stickyHeading")||n.addClass("stickyHeading"))}}var url=window.location.href,app=null;app=url.indexOf("PatientManagement")>-1?angular.module("PWPApp",["ui.bootstrap","dndLists","ghiscoding.validation","pascalprecht.translate","ngSanitize"]):url.indexOf("EntityManagement")>-1?angular.module("PWPApp",["isteven-multi-select","ui.bootstrap","ghiscoding.validation","pascalprecht.translate","ngSanitize"]):url.indexOf("Entry")>-1||url.indexOf("ManageDocuments")>-1?angular.module("PWPApp",["ngFileUpload","ghiscoding.validation","pascalprecht.translate","ngSanitize","ui.bootstrap"]):angular.module("PWPApp",["ui.bootstrap","ghiscoding.validation","pascalprecht.translate","ngSanitize","wbx-multifactor"]);bootstrapServiceBindings(app);app.config(["$compileProvider",function(n){n.debugInfoEnabled(!1)}]);app.run(["$rootScope","$location",function(){$("#mainContainer").show();$("#allContainer").show()}]);app.service("WBXVerificationCountService",function(){var n=0;return{setVerificationCount:function(t){n=t},getVerificationCount:function(){return n},increaseVerificationCount:function(){return n++,n},decreaseVerificationCount:function(){return n--,n}}});typeof String.prototype.trim!="function"&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),function(){"use strict";function n(){return{restrict:"A",link:{post:function(n,t){var i=window.navigator.userAgent,r=/MSIE|Trident|Edge\//.test(i);r&&angular.element(t).attr("aria-live","polite")}}}}app.directive("wbxAriaLiveIfIe",n)}(),function(){"use strict";function n(){return{restrict:"A",link:function(n,t,i){setTimeout(function(){let u=[];const r=i.name.split("."),f=_.chain(t.find("label")).filter(function(n){return n.attributes["data-translation-key"]!=undefined}).map(function(n){let t=angular.element(n.parentElement).find("wbx-validation-text")[0],r=t!=undefined,i=r?t.attributes["override-error-list"]:undefined,u=i!=undefined;return{overrideValidations:u?i.value:undefined,inputId:n.attributes.for.value,text:n.attributes["data-translation-key"].value}});f.forEach(function(t){n.vm[r[1]][t.inputId]!=null&&(n.vm[r[1]][t.inputId].wbxLabelKey=t.text,n.vm[r[1]][t.inputId].wbxOverrideValidations=t.overrideValidations,u.push(t.inputId))});n.vm[r[1]].controlsList=u},500)}}}app.directive("wbxFormWithErrorBanner",n)}();app.directive("wbxDateMask",["$parse","$timeout",function(n,t){return function(i,r,u){var f=n(u.ngModel);t(function(){var n=moment(r.val());n.isValid()&&r.val(n.format("MM/DD/YYYY"));r.inputmask("mm/dd/yyyy",{yearrange:{minyear:1900,maxyear:2078},clearIncomplete:!0,oncomplete:function(){i.$apply(function(n){f.assign(n,r.val())})},onincomplete:function(){i.$apply(function(n){f.assign(n,"")})},oncleared:function(){i.$apply(function(n){f.assign(n,"")})}})})}}]);app.directive("wbxDateMaskMmyyyy",["$parse",function(n){return function(t,i,r){var u=n(r.ngModel);i.inputmask("mm/yyyy",{yearrange:{minyear:1900,maxyear:2078},clearIncomplete:!0,oncomplete:function(){t.$apply(function(n){u.assign(n,i.val())})},onincomplete:function(){t.$apply(function(n){u.assign(n,"")})},oncleared:function(){t.$apply(function(n){u.assign(n,"")})}})}}]);app.directive("wbxTimeMask",["$parse",function(n){var t=function(t,i,r,u){var f=function(t,i,u,f){var e=n(r.ngModel);return i.inputmask("h:s t",{oncleared:function(){t.$apply(function(n){e.assign(n,null)})}}),f};u.$parsers.unshift(function(n){return f(t,i,r,n)});u.$formatters.push(function(n){var u=moment(n,moment.ISO_8601),e=n;return u.isValid()&&(e=u.format("hh:mm a")),f(t,i,r,e)});r.$observe("wbxTimeMask",function(){return f(t,i,r,u.$viewValue)})};return{require:"ngModel",link:t}}]);app.directive("wbxAlphaNumericMask",["$parse",function(n){return function(t,i,r){var u=n(r.ngModel);i.inputmask("*{0,}",{placeholder:"",oncomplete:function(){t.$apply(function(n){u.assign(n,i.val())})},oncleared:function(){t.$apply(function(n){u.assign(n,"")})}})}}]);app.directive("wbxAlphaNumericNoSpecialCharsMask",["$parse",function(n){return function(t,i,r){var u=n(r.ngModel);i.inputmask("Regex",{placeholder:"",regex:r.wbxRegex,oncomplete:function(){t.$apply(function(n){u.assign(n,i.val())})},oncleared:function(){t.$apply(function(n){u.assign(n,"")})}})}}]);app.directive("wbxMaxNumericMask",["$parse",function(n){return function(t,i,r){var u=n(r.ngModel);i.inputmask("9{0,"+r.wbxMaxLength+"}",{placeholder:"",oncomplete:function(){t.$apply(function(n){u.assign(n,i.val())})},oncleared:function(){t.$apply(function(n){u.assign(n,i.val())})}})}}]);app.directive("wbxNumericMask",["$parse",function(n){return function(t,i,r){var u=n(r.ngModel);i.inputmask(r.wbxNumericType!=null?r.wbxNumericType.toLowerCase():"integer",{digits:r.wbxNumericType!=null&&r.wbxNumericType.toLowerCase()=="decimal"?r.wbxDigits!=null?r.wbxDigits:2:"*",max:r.wbxNumericMaxValue,min:r.wbxNumericMinValue,allowMinus:r.wbxNumericAllowMinus!=null?r.wbxNumericAllowMinus.toLowerCase()=="true":!1,radixFocus:!1,allowPlus:!1,rightAlign:!r.wbxIsLeftAligned,oncomplete:function(){t.$apply(function(n){u.assign(n,i.val())})},oncleared:function(){t.$apply(function(n){u.assign(n,"")})}})}}]);app.directive("wbxCurrencyMask",["$filter","$parse",function(n,t){var i=function(n,i,r,u){var f=function(n,i,r,u){var f=t(r.ngModel);return i.inputmask("currency",{prefix:"",radixFocus:!1,max:r.wbxCurrencyMaxValue,allowMinus:r.wbxCurrencyAllowMinus!=null?r.wbxCurrencyAllowMinus.toLowerCase()=="true":!1,digits:r.wbxCurrencyDecimalPoints,clearMaskOnLostFocus:!0,autoUnmask:!0,oncleared:function(){n.$apply(function(n){f.assign(n,null)})}}),u};u.$parsers.unshift(function(n){var t="";return isNaN(n)||(t=n.replace(/[^\d|\-+|\.+]/g,"")),t});u.$formatters.push(function(t){return f(n,i,r,t)});r.$observe("wbxCurrencyMaxValue",function(){return f(n,i,r,u.$viewValue)})};return{require:"ngModel",link:i}}]);app.directive("wbxSsnMask",["$parse",function(n){return function(t,i,r){var u=n(r.ngModel);i.inputmask("999-99-9999",{clearIncomplete:!0,oncomplete:function(){t.$apply(function(n){u.assign(n,i.val())})},oncleared:function(){t.$apply(function(n){u.assign(n,"")})}})}}]);app.directive("wbxPhoneMask",["$parse",function(n){var t=function(t,i,r,u){var f=function(t,i,u,f){var e=n(r.ngModel);return i.inputmask("(999) 999-9999",{clearIncomplete:!0,oncleared:function(){t.$apply(function(n){e.assign(n,null)})}}),f};u.$parsers.unshift(function(n){return n.replace(/([-~!@#$%^&*()_+=`{}\[\]\|\\:;'<>,.\/? ])+/g,"").length===10?n.replace(/\s/g,""):n});u.$formatters.push(function(n){return f(t,i,r,n)});r.$observe("wbxPhoneMask",function(){return f(t,i,r,u.$viewValue)})};return{require:"ngModel",link:t}}]);app.directive("wbxPhoneMaskAllowAsterisks",["$parse",function(n){return function(t,i,r){var u=n(r.ngModel);i.inputmask("(999) 999-9999",{definitions:{"9":{validator:"[0-9*]",cardinality:1,definitionSymbol:"*"}},onKeyDown:function(n){n.key==="*"&&(n.key="",n.preventDefault())},oncomplete:function(){t.$apply(function(n){u.assign(n,i.val().replace(/\s/g,""))})},oncleared:function(){t.$apply(function(n){u.assign(n,"")})}})}}]);app.directive("wbxAndroidDateMask",[function(){function n(n,t){if(n!==null)if(n.createTextRange){var i=n.createTextRange();i.move("character",t);i.select()}else n.setSelectionRange?(n.focus(),n.setSelectionRange(t,t)):n.focus()}return{restrict:"A",link:function(t,i,r){navigator.userAgent.match(/Android/i)&&i.bind("keyup",function(){var u=r.id,t=document.getElementById(u).value;t.substring(0,1)!="m"&&t.substring(1,2)!="m"&&t.substring(3,4)!="d"&&(t.substring(4,t.length)=="d/yyyy"?n(i[0],4):t.substring(4,5)!="d"&&t.substring(6,7)!="y"&&t.substring(7,t.length)=="yyy"&&n(i[0],7))})}}}]);app.directive("wbxAndroidPhoneMask",[function(){function n(n,t){if(n!==null)if(n.createTextRange){var i=n.createTextRange();i.move("character",t);i.select()}else n.setSelectionRange?(n.focus(),n.setSelectionRange(t,t)):n.focus()}return{restrict:"A",link:function(t,i,r){navigator.userAgent.match(/Android/i)&&i.bind("keyup",function(){var u=r.id,t=document.getElementById(u).value;t.substring(0,2)!="(_"&&t.substring(2,3)!="_"&&t.substring(3,6)!="_) "&&t.substring(6,7)!="_"&&(t.substring(7,t.length)=="__-____"?n(i[0],7):t.substring(7,8)!="_"&&t.substring(8,10)!="_-"&&t.substring(10,11)!="_"&&t.substring(11,t.length)=="___"&&n(i[0],11))})}}}]);app.directive("wbxAndroidSsnMask",[function(){function n(n,t){if(n!==null)if(n.createTextRange){var i=n.createTextRange();i.move("character",t);i.select()}else n.setSelectionRange?(n.focus(),n.setSelectionRange(t,t)):n.focus()}return{restrict:"A",link:function(t,i,r){navigator.userAgent.match(/Android/i)&&i.bind("keyup",function(){var u=r.id,t=document.getElementById(u).value;t.substring(0,1)!="_"&&t.substring(1,2)!="_"&&t.substring(2,4)!="_-"&&t.substring(4,5)!="_"&&(t.substring(5,t.length)=="_-____"?n(i[0],5):t.substring(5,7)!="_-"&&t.substring(7,8)!="_"&&t.substring(8,t.length)=="___"&&n(i[0],8))})}}}]);app.directive("wbxEinMask",["$parse",function(n){return function(t,i,r){var u=n(r.ngModel);i.inputmask("99-9999999",{oncomplete:function(){t.$apply(function(n){u.assign(n,i.val())})},oncleared:function(){t.$apply(function(n){u.assign(n,"")})}})}}]);app.directive("wbxFilenameMask",["$parse",function(n){return function(t,i,r){var u=n(r.ngModel);i.inputmask("Regex",{placeholder:"",regex:"[0-9A-Za-z!#$%&+=^_`{}~-]*",repeat:r.wbxMaxLength,oncomplete:function(){t.$apply(function(n){u.assign(n,i.val())})},oncleared:function(){t.$apply(function(n){u.assign(n,"")})}})}}]);app.directive("wbxRoutingNumber",["$parse",function(n){return function(t,i,r){var u=n(r.ngModel);i.inputmask("999999999",{placeholder:"",clearIncomplete:!1,oncomplete:function(){t.$apply(function(n){u.assign(n,i.val())})},oncleared:function(){t.$apply(function(n){u.assign(n,"")})}})}}]);app.directive("wbxAccountNumber",["$parse",function(n){return function(t,i,r){var u=n(r.ngModel);i.inputmask("9{9,17}",{placeholder:"",clearIncomplete:!1,oncomplete:function(){t.$apply(function(n){u.assign(n,i.val())})},oncleared:function(){t.$apply(function(n){u.assign(n,"")})}})}}]);app.directive("currencyMask",["$parse",function(n){return function(t,i,r){var e=n(r.ngModel),f=2,u;angular.isDefined(r.currencyDecimalPlaces)&&(f=r.currencyDecimalPlaces);u="";angular.isDefined(r.currencySeparator)&&(u=r.currencySeparator);i.autoNumeric("init",{aSep:u,mDec:f});i.css("text-align","right");i.keyup(function(){t.$apply(function(n){var t=i.val();e.assign(n,t)})});i.focusout(function(){var n=i.val()})}}]);app.directive("wbxSsnMaskOld",["$parse",function(n){return function(t,i,r){var u=n(r.ngModel);i.inputmask("999-99-9999",{clearIncomplete:!0,oncomplete:function(){t.$apply(function(n){u.assign(n,i.val())})},oncleared:function(){t.$apply(function(n){u.assign(n,"")})}})}}]);app.directive("wbxPhoneMaskOld",["$parse",function(n){var t=function(t,i,r,u){var f=function(t,i,u,f){var e=n(r.ngModel);return i.inputmask("(999) 999-9999",{clearIncomplete:!0,oncleared:function(){t.$apply(function(n){e.assign(n,null)})}}),f};u.$parsers.unshift(function(n){return n.replace(/([-~!@#$%^&*()_+=`{}\[\]\|\\:;'<>,.\/? ])+/g,"").length===10?n.replace(/\s/g,""):n});u.$formatters.push(function(n){return f(t,i,r,n)});r.$observe("wbxPhoneMask",function(){return f(t,i,r,u.$viewValue)})};return{require:"ngModel",link:t}}]);app.directive("wbxZipMaskOld",["$parse",function(n){return function(t,i,r){var u=n(r.ngModel);i.inputmask("99999",{placeholder:"",clearIncomplete:!0,oncomplete:function(){t.$apply(function(n){u.assign(n,i.val())})},onincomplete:function(){t.$apply(function(n){u.assign(n,"")})},oncleared:function(){t.$apply(function(n){u.assign(n,"")})}})}}]);app.directive("wbxZipFourMaskOld",["$parse",function(n){return function(t,i,r){var u=n(r.ngModel);i.inputmask("9999",{placeholder:"",clearIncomplete:!0,oncomplete:function(){t.$apply(function(n){u.assign(n,i.val())})},onincomplete:function(){t.$apply(function(n){u.assign(n,"")})},oncleared:function(){t.$apply(function(n){u.assign(n,"")})}})}}]);app.directive("wbxEntityIdMask",["$parse",function(n){return function(t,i,r){var u=n(r.ngModel);i.inputmask("integer",{rightAlign:!1,allowMinus:!1,allowPlus:!1,oncomplete:function(){t.$apply(function(n){u.assign(n,i.val())})},oncleared:function(){t.$apply(function(n){u.assign(n,"")})}})}}]);app.directive("wbxFournumberMask",["$parse",function(n){return function(t,i,r){var u=n(r.ngModel);i.inputmask("9999",{placeholder:"",clearIncomplete:!1,oncomplete:function(){t.$apply(function(n){u.assign(n,i.val())})},oncleared:function(){t.$apply(function(n){u.assign(n,"")})}})}}]);app.directive("wbxZipMask",["$parse",function(n){return function(t,i,r){var u=n(r.ngModel);i.inputmask("99999",{placeholder:"",oncomplete:function(){t.$apply(function(n){u.assign(n,i.val())})},oncleared:function(){t.$apply(function(n){u.assign(n,"")})}})}}]);app.directive("wbxZipFourMask",["$parse",function(n){return function(t,i,r){var u=n(r.ngModel);i.inputmask("9999",{placeholder:"",oncomplete:function(){t.$apply(function(n){u.assign(n,i.val())})},oncleared:function(){t.$apply(function(n){u.assign(n,"")})}})}}]);app.directive("wbxNpiMask",["$parse",function(n){return function(t,i,r){var u=n(r.ngModel);i.inputmask("9999999999",{placeholder:"",oncomplete:function(){t.$apply(function(n){u.assign(n,i.val())})},oncleared:function(){t.$apply(function(n){u.assign(n,"")})}})}}]);app.directive("wbxMemberIdMask",["$parse",function(n){return function(t,i,r){var u=n(r.ngModel);i.inputmask("99",{placeholder:"",oncomplete:function(){t.$apply(function(n){u.assign(n,i.val())})},onBeforePaste:function(n){t.$apply(function(t){u.assign(t,n)})}})}}]);app.directive("wbxPhoneExtensionMask",["$parse",function(n){return function(t,i,r){var u=n(r.ngModel);i.inputmask("99999",{placeholder:"",oncomplete:function(){t.$apply(function(n){u.assign(n,i.val())})},oncleared:function(){t.$apply(function(n){u.assign(n,"")})}})}}]);app.directive("wbxCardNumberMask",["$parse",function(){return function(n,t){t.inputmask("9999 9999 9999 9999",{placeholder:""})}}]);app.directive("wbxDateMaskMmyy",["$parse",function(){return function(n,t){t.inputmask("99/99",{placeholder:""})}}]);app.directive("wbxCvcMask",["$parse",function(){return function(n,t){t.inputmask("9999",{placeholder:""})}}]);app.directive("wbxAccountNumberMask",["$parse",function(){return function(n,t){t.inputmask("99999999999999999999",{placeholder:""})}}]),function(){"use strict";function n(n){function i(t,i,r){t.applyMask=function(){var u=n(r.ngModel);i.inputmask("999-99-9999",{oncomplete:function(){t.$apply(function(n){u.assign(n,i.val())})},oncleared:function(){t.$apply(function(n){u.assign(n,"")})}})};t.removeMask=function(){i.inputmask("remove")}}return{link:i,controller:t,restrict:"A",scope:{wbxSsnMaskNew:"=?"}}}function t(n){n.$watch("wbxSsnMaskNew",function(t){t!=!1?n.applyMask():n.removeMask()})}app.directive("wbxSsnMaskNew",n);n.$inject=["$parse"];t.$inject=["$scope"]}();app.directive("wbxValidationMessage",function(){return{restrict:"A",priority:1e3,require:"^wbxValidationTooltip",link:function(n,t,i,r){r.$addExpression(i.ngIf||!0)}}});app.directive("wbxValidationTooltip",["$timeout",function(n){return{restrict:"E",transclude:!0,require:"^form",scope:{tooltipPlacement:"=?",customErrorList:"<?"},template:'<div class="wbx-alert-icon fa fa-caret-left fa-lg" ng-show="errorCount > 0"><\/div>',controller:["$scope",function(n){var t=[];n.errorCount=0;this.$addExpression=function(n){t.push(n)};n.$watch(function(){var n=0;return angular.forEach(t,function(){++n}),n},function(t){n.errorCount=t})}],link:function(t,i,r,u,f){t.$form=u;t.tooltipPlacement==null&&(t.tooltipPlacement="right");f(t,function(f){var o=i.find(".wbx-alert-icon"),e=angular.element('<div class="wbx-validationMessageTemplate tooltip-danger" />');e.append(f);i.append(e);n(function(){t.$field=u[r.target];o.tooltip({placement:t.tooltipPlacement,html:!0,title:f,container:"body"})})})}}}]);app.directive("wbxRequiredValidationTooltip",["$timeout",function(n){return{restrict:"E",transclude:!0,require:"^form",scope:{tooltipPlacement:"=?"},template:'<div class="wbx-required-icon fa fa-caret-left fa-lg"><\/div>',link:function(t,i,r,u,f){t.$form=u;t.tooltipPlacement==null&&(t.tooltipPlacement="right");f(t,function(){var f=i.find(".wbx-required-icon");n(function(){t.$field=u[r.target];f.tooltip({placement:t.tooltipPlacement,html:!0,title:"Required",container:"body"})})})}}}]);app.directive("wbxValidateDate",function(){return{restrict:"A",require:"ngModel",link:function(n,t,i,r){var u=function(n){var t=n==null||n==""||moment(n).isValid();return r.$setValidity("incomplete",t),n};r.$parsers.unshift(u);r.$formatters.push(u)}}});app.directive("wbxIsNotFuture",[function(){var n=function(n,t,i,r){var u=function(n){let t=!n||moment(n).isValid()&&!moment(n).isAfter(moment(),"days")||dateIsIncomplete(n);return r.$setValidity("isNotFuture",t),n};r.$parsers.unshift(u);r.$formatters.push(u)};return{require:"ngModel",link:n}}]);let dateIsIncomplete=function(n){return!n||n.indexOf("m")>-1||n.indexOf("d")>-1||n.indexOf("y")>-1};app.directive("wbxIsBefore",[function(){var n=function(n,t,i,r){var u=function(n){let t=n&&i.wbxIsBefore&&moment(n).isValid()&&moment(i.wbxIsBefore).isValid()&&moment(n).isBefore(moment(i.wbxIsBefore),"days")||dateIsIncomplete(n)||dateIsIncomplete(i.wbxIsBefore);return r.$setValidity("isBefore",t),n};r.$parsers.unshift(u);r.$formatters.push(u);i.$observe("wbxIsBefore",function(){return u(r.$viewValue)})};return{require:"ngModel",link:n}}]);app.directive("wbxIsAfter",[function(){var n=function(n,t,i,r){var u=function(n){let t=n&&i.wbxIsAfter&&moment(n).isValid()&&moment(i.wbxIsAfter).isValid()&&!moment(n).isBefore(moment(i.wbxIsAfter),"days")||dateIsIncomplete(n)||dateIsIncomplete(i.wbxIsAfter);return r.$setValidity("isAfter",t),n};r.$parsers.unshift(u);r.$formatters.push(u);i.$observe("wbxIsAfter",function(){return u(r.$viewValue)})};return{require:"ngModel",link:n}}]);app.directive("wbxDateRange",[function(){var n=function(n,t,i,r){var u=function(n){var o=!0,t,u,f,e,s;return n!=null&&n!=""&&i.wbxDateRange!=null&&i.wbxDateRange!=""&&(t=moment(n),u=moment(i.wbxDateRange),t.isValid()&&u.isValid()&&(f=moment.min(t,u),i.wbxMaxYears!=null?e=f.add(i.wbxMaxYears,"years"):i.wbxMaxMonths!=null?e=f.add(i.wbxMaxMonths,"months"):i.wbxMaxDays!=null&&(e=f.add(i.wbxMaxDays,"days")),s=moment.max(t,u),o=s.isSameOrBefore(e))),r.$setValidity("wbxDateRange",o),n};r.$parsers.unshift(u);r.$formatters.push(u);i.$observe("wbxDateRange",function(){return u(r.$viewValue)})};return{require:"ngModel",link:n}}]);app.directive("wbxMinAge",[function(){var n=function(n,t,i,r){var u=function(n){var t=!0,f=/^\-?[0-9]*$/.test(i.wbxMinAge),u;return n!=null&&n!=""&&i.wbxMinAge!=null&&i.wbxMinAge!=""&&moment(n).isValid()&&f&&(u=moment().subtract(i.wbxMinAge,"years"),moment(n).isAfter(u,"days")&&(t=!1)),r.$setValidity("minAge",t),n};r.$parsers.unshift(u);r.$formatters.push(u);i.$observe("wbxMinAge",function(){return u(r.$viewValue)})};return{require:"ngModel",link:n}}]);app.directive("wbxValidateTime",function(){return{restrict:"A",require:"ngModel",link:function(n,t,i,r){var u=function(n){var t=!0;return n&&(t=n.charAt(4)=="m"||n.charAt(6)=="x"?!1:!0),r.$setValidity("incomplete",t),n};r.$parsers.unshift(u);r.$formatters.push(u)}}});app.directive("wbxIsAfterTime",[function(){var n=function(n,t,i,r){var u=function(n){var f=!0,t,u;return n!=null&&n!=""&&i.wbxIsAfterTime!=null&&i.wbxIsAfterTime!=""&&(t=moment(n,moment.ISO_8601),t.isValid()||(n.indexOf("am")>-1||n.indexOf("pm")>-1)&&(t=moment(n,"hh:mm:ss a")),u=moment(i.wbxIsAfterTime,moment.ISO_8601),u.isValid()||(i.wbxIsAfterTime.indexOf("am")>-1||i.wbxIsAfterTime.indexOf("pm")>-1)&&(u=moment(i.wbxIsAfterTime,"hh:mm:ss a")),t!=null&&t!=""&&u!=null&&u!=""&&t.isValid()&&u.isValid()&&t.isBefore(u,"second")&&(f=!1)),r.$setValidity("isAfterTime",f),n};r.$parsers.unshift(u);r.$formatters.push(u);i.$observe("wbxIsAfterTime",function(){return u(r.$modelValue)})};return{require:"ngModel",link:n}}]);app.directive("wbxIsBeforeTime",[function(){var n=function(n,t,i,r){var u=function(n){var f=!0,t,u;return n!=null&&n!=""&&i.wbxIsBeforeTime!=null&&i.wbxIsBeforeTime!=""&&(t=moment(n,moment.ISO_8601),t.isValid()||(n.indexOf("am")>-1||n.indexOf("pm")>-1)&&(t=moment(n,"hh:mm:ss a")),u=moment(i.wbxIsBeforeTime,moment.ISO_8601),u.isValid()||(i.wbxIsBeforeTime.indexOf("am")>-1||i.wbxIsBeforeTime.indexOf("pm")>-1)&&(u=moment(i.wbxIsBeforeTime,"hh:mm:ss a")),t!=null&&t!=""&&u!=null&&u!=""&&t.isValid()&&u.isValid()&&t.isAfter(u,"second")&&(f=!1)),r.$setValidity("isBeforeTime",f),n};r.$parsers.unshift(u);r.$formatters.push(u);i.$observe("wbxIsBeforeTime",function(){return u(r.$modelValue)})};return{require:"ngModel",link:n}}]);app.directive("wbxHasValue",[function(){var n=function(n,t,i,r){var u=function(n){var u=i.wbxHasValue,t=n,f=t==null||t==""||t!=null&&t!=""&&u!=null&&u!="";return r.$setValidity("noValue",f),n};r.$parsers.unshift(u);r.$formatters.push(u);i.$observe("wbxHasValue",function(){return u(r.$viewValue)})};return{require:"ngModel",link:n}}]);app.directive("wbxValidateMinCharacters",function(){return{restrict:"A",require:"ngModel",link:function(n,t,i,r){var u=function(n){var u=i.wbxValidateMinCharacters,t=!0;return n!=null&&n.trim()!=""&&(t=n.replace(/([-~!@#$%^&*()_+=`{}\[\]\|\\:;'<>,.\/? ])+/g,"").length<u?!1:!0),r.$setValidity("incomplete",t),n};r.$parsers.unshift(u);r.$formatters.push(u)}}});app.directive("wbxValidateMinCharactersVariableLength",function(){return{restrict:"A",require:"ngModel",link:function(n,t,i,r){var u=function(n){var u=i.wbxValidateMinCharactersVariableLength,t=!0;return n!=null&&n.trim()!=""&&(t=n.replace(/([-~!@#$%^&*()_+=`{}\[\]\|\\:;'<>,.\/? ])+/g,"").length<u?!1:!0),r.$setValidity("minCharactersVariableLength",t),n};r.$parsers.unshift(u);r.$formatters.push(u)}}});app.directive("wbxValidateNpi",function(){return{restrict:"A",require:"ngModel",link:function(n,t,i,r){var u=function(n){var u=!0,t,i,f;if(n!=null&&n.trim()!="")if(n.length==0)u=!0;else if(n.length!=10)u=!1;else{for(t=0,i=0;i<n.length-1;i++)i%2==0?(f=n.substring(i,i+1)*2,t+=f>=10?(""+f).substring(0,1)*1+(""+f).substring(1,2)*1:f):t+=n.substring(i,i+1)*1;t+=24;t=t%10==0?0:(parseInt(t/10)+1)*10-t;u=n.substring(9,10)==t}else u=!0;return r.$setValidity("npi",u),n};r.$parsers.unshift(u);r.$formatters.push(u)}}});app.directive("wbxValidateEmail",function(){return{restrict:"A",require:"ngModel",link:function(n,t,i,r){const u=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;r.$validators.email=function(n,t){return r.$isEmpty(n)?!0:u.test(t)}}}});app.directive("wbxValidateUrl",function(){return{restrict:"A",require:"ngModel",link:function(n,t,i,r){var u=function(n){var t=!0,i;return n&&(i=/^(http(s)?)?(\:\/\/)?[\w-]+(\.[\w-]+)+([\w.,@?^!=%&amp;:\/~+#-]*[\w@?^=%&amp;\/~+#-])+$/gmi,t=i.test(n)),r.$setValidity("url",t),n};r.$parsers.unshift(u);r.$formatters.push(u)}}});app.directive("wbxIsMatched",[function(){var n=function(n,t,i,r){var u=function(n){var e=i.wbxCaseSensitive!=null?i.wbxCaseSensitive:"true",t=i.wbxIsMatched!=null?i.wbxIsMatched:"",u=n!=null?n:"",f=!1;return f=e=="true"?t==u:t.toLowerCase()==u.toLowerCase(),r.$setValidity("notMatched",f),n};r.$parsers.unshift(u);r.$formatters.push(u);i.$observe("wbxIsMatched",function(){return u(r.$viewValue)})};return{require:"ngModel",link:n}}]);app.directive("wbxIsBeforeInt",[function(){var n=function(n,t,i,r){var u=function(n){var u=!0,f=/^\-?[0-9]*$/,s=f.test(n),t,e,o;return s&&(t=i.wbxIsBeforeInt,t&&f.test(t)&&(e=parseInt(t),o=parseInt(n),u=e>=o)),r.$setValidity("isBeforeInt",u),n};r.$parsers.unshift(u);r.$formatters.push(u);i.$observe("wbxIsBeforeInt",function(){return u(r.$viewValue)})};return{require:"ngModel",link:n}}]);app.directive("wbxIsAfterInt",[function(){var n=function(n,t,i,r){var u=function(n){var u=!0,f=/^\-?[0-9]*$/,s=f.test(n),t,e,o;return s&&(t=i.wbxIsAfterInt,t&&f.test(t)&&(e=parseInt(t),o=parseInt(n),u=e<=o)),r.$setValidity("isAfterInt",u),n};r.$parsers.unshift(u);r.$formatters.push(u);i.$observe("wbxIsAfterInt",function(){return u(r.$viewValue)})};return{require:"ngModel",link:n}}]);app.directive("wbxValidateRoutingNumber",function(){return{restrict:"A",require:"ngModel",link:function(n,t,i,r){var u=function(n){var f=!0,t,u,i;if(n!=null&&n.trim()!=""){if(n.indexOf("*****")!==-1&&n.length===9)return r.$setValidity("routingNumber",!0),n;for(i="",t=0;t<n.length;t++)c=parseInt(n.charAt(t),10),c>=0&&c<=9&&(i=i+c);if(n.length<9)return r.$setValidity("incomplete",!1),n;for(r.$setValidity("incomplete",!0),u=0,t=0;t<i.length;t+=3)u+=parseInt(i.charAt(t),10)*3+parseInt(i.charAt(t+1),10)*7+parseInt(i.charAt(t+2),10);f=u!=0&&u%10==0?!0:!1}return r.$setValidity("routingNumber",f),n};r.$parsers.unshift(u);r.$formatters.push(u)}}});app.directive("wbxValidateAccountNumber",function(){return{restrict:"A",require:"ngModel",link:function(n,t,i,r){var u=function(n){var t=!0;return n!=null&&n.trim()!==""&&(n.length<4||n.length>17)&&(t=!1),r.$setValidity("ADA_AccountNumber",t),n};r.$parsers.unshift(u);r.$formatters.push(u)}}});app.directive("wbxValidateMinValue",function(){return{restrict:"A",require:"ngModel",link:function(n,t,i,r){var u=function(n){var f=!0,u,e,t,o,s;return n!=""&&(u=/^\-?[0-9]*\.?[0-9]*$/,e=u.test(n),e&&(t=i.wbxValidateMinValue,t&&u.test(t)&&(o=parseFloat(t),s=parseFloat(n),f=o<=s))),r.$setValidity("minValue",f),n};r.$parsers.unshift(u);r.$formatters.push(u);i.$observe("wbxValidateMinValue",function(){return u(r.$viewValue)})}}});app.directive("wbxValidateMaxValue",function(){return{restrict:"A",require:"ngModel",link:function(n,t,i,r){var u=function(n){var f=!0,u,e,t,o,s;return n!=""&&(u=/^\-?[0-9]*\.?[0-9]*$/,e=u.test(n),e&&(t=i.wbxValidateMaxValue,t&&u.test(t)&&(o=parseFloat(t),s=parseFloat(n),f=o>=s))),r.$setValidity("maxValue",f),n};r.$parsers.unshift(u);r.$formatters.push(u);i.$observe("wbxValidateMaxValue",function(){return u(r.$viewValue)})}}});app.directive("wbxIsNotFutureMonthYear",[function(){var n=function(n,t,i,r){var u=function(t){var e,u;i.wbxIsNotFutureMonthYear.length>0&&!n.$eval(i.wbxIsNotFutureMonthYear)&&r.$setValidity("isNotFutureMonthYear",!0);var f=!0,o=/[my]/i.test(t);return o||(e=new Date(Date()),t&&(u=new Date(t.substr(0,2)+"-01-"+t.substr(3,4)),isNaN(u.getTime())||(f=e.getTime()>u.getTime()))),r.$setValidity("isNotFutureMonthYear",f),t},f=function(n){return r.$setValidity("isNotFutureMonthYear",!0),n==!0?u(r.$modelValue):void 0};r.$parsers.unshift(u);r.$formatters.push(u);n.$watch(i.wbxIsNotFutureMonthYear,f)};return{require:"ngModel",link:n}}]);app.directive("wbxIsAfterMmyyyy",[function(){var n=function(n,t,i,r){var u=function(n){var u=!0,f=/((0[1-9])|(1[0-2]))\/(\d{4})/,s=f.test(n),t,e,o;return s&&(t=i.wbxIsAfterMmyyyy,t&&f.test(t)&&(e=t.substr(3,4)+t.substr(0,2),o=n.substr(3,4)+n.substr(0,2),u=e<=o)),r.$setValidity("isAfter",u),n};r.$parsers.unshift(u);r.$formatters.push(u);i.$observe("wbxIsAfterMmyyyy",function(){return u(r.$viewValue)})};return{require:"ngModel",link:n}}]);app.directive("wbxDoesNotMatch",[function(){var n=function(n,t,i,r){var u=function(n){var t=i.wbxDoesNotMatch!=null?i.wbxDoesNotMatch:"",u=n!=null?n:"",f=t!=u;return r.$setValidity("Matches",f),n};r.$parsers.unshift(u);r.$formatters.push(u);i.$observe("wbxDoesNotMatch",function(){return u(r.$viewValue)})};return{require:"ngModel",link:n}}]);app.directive("wbxValidatePasswordPolicy",function(){return{restrict:"A",require:"ngModel",link:function(n,t,i,r){var u=function(n){var t=i.wbxValidatePasswordPolicy,u=t=="true";return r.$setValidity("PasswordNotValid",u),n};r.$parsers.unshift(u);r.$formatters.push(u);i.$observe("wbxValidatePasswordPolicy",function(){return u(r.$viewValue)})}}});app.directive("wbxValidatePhone",function(){return{restrict:"A",require:"ngModel",link:function(n,t,i,r){var u=function(n){var t=!0;return n&&(t=n.replace(/([-~!@#$%^&*()_+=`{}\[\]\|\\:;'<>,.\/? ])+/g,"").length!==10?!1:!0),r.$setValidity("incomplete",t),n};r.$parsers.unshift(u);r.$formatters.push(u)}}});app.directive("wbxValidateZip",function(){return{restrict:"A",require:"ngModel",link:function(n,t,i,r){var u=function(n){var t=!0;return n&&(t=n.replace(/([-~!@#$%^&*()_+=`{}\[\]\|\\:;'<>,.\/? ])+/g,"").length!==5?!1:!0),r.$setValidity("incompleteZip",t),n};r.$parsers.unshift(u);r.$formatters.push(u)}}});app.directive("wbxValidateCardNumber",function(){return{restrict:"A",require:"ngModel",link:function(n,t,i,r){var u=function(n){let t=!!n&&n.length===19;return r.$setValidity("incomplete",t),n};r.$parsers.unshift(u);r.$formatters.push(u)}}});app.directive("wbxValidateExpDate",function(){return{restrict:"A",require:"ngModel",link:function(n,t,i,r){var u=function(n){var t=n&&n.length==5,f;if(t){var i=n.split("/"),e=i[0]+"/20"+i[1],u=moment(e,"MM/YYYY");t=t&&u.isValid()}return r.$setValidity("incomplete",t),f=t?u.isAfter(moment().subtract(1,"months"),"months"):!0,r.$setValidity("isFutureExpDate",f),n};r.$parsers.unshift(u);r.$formatters.push(u)}}});app.directive("wbxValidateCvc",function(){return{restrict:"A",require:"ngModel",link:function(n,t,i,r){var u=function(n){let t=!!n&&n.length>=3;return r.$setValidity("incomplete",t),n};r.$parsers.unshift(u);r.$formatters.push(u)}}});app.directive("wbxValidateConfirmRoutingNumber",function(){return{restrict:"A",require:"ngModel",link:function(n,t,i,r){var u=function(n){return r.$setValidity("routingNumbersMatch",n==i.wbxRoutingNumberValue),n};r.$parsers.unshift(u);r.$formatters.push(u);i.$observe("wbxRoutingNumberValue",function(){return u(r.$viewValue)})}}});app.directive("wbxValidateConfirmAccountNumber",function(){return{restrict:"A",require:"ngModel",link:function(n,t,i,r){var u=function(n){return r.$setValidity("accountNumbersMatch",n==i.wbxAccountNumberValue),n};r.$parsers.unshift(u);r.$formatters.push(u);i.$observe("wbxAccountNumberValue",function(){return u(r.$viewValue)})}}});app.directive("wbxValidateRoutingNumberLenght",function(){return{restrict:"A",require:"ngModel",link:function(n,t,i,r){var u=function(n){let t=!!n&&n.length===9;return r.$setValidity("routingNumberLength",t),n};r.$parsers.unshift(u);r.$formatters.push(u)}}});app.directive("wbxAutoDismiss",[function(){return{restrict:"A",scope:{wbxAutoDismiss:"=",wbxAutoTopScroll:"<"},controller:["$scope","$timeout",function(n,t){n.$watch("wbxAutoDismiss",function(i){if(i!=null&&i){document.getElementById(n.BannerId).hidden=!1;var r=document.getElementById("header")!=null?document.getElementById("header").offsetHeight:50,u=document.getElementById("mainNav")!=null?document.getElementById("mainNav").offsetHeight-40:0,f=r+u;$("#"+n.BannerId).offset()==undefined?console.log("WbxUtils is being used."):(t(function(){$("html, body").animate({scrollTop:n.wbxAutoTopScroll===!0?0:$("#"+n.BannerId).offset().top-f-30},"fast")},100),t(function(){n.wbxAutoDismiss=!1;document.getElementById(n.BannerId).hidden=!0},5e3))}})}],link:function(n,t,i){n.BannerId=i.id}}}]);app.directive("wbxAutoScroll",[function(){return{restrict:"A",scope:{wbxAutoScroll:"=",wbxAutoTopScroll:"<"},controller:["$scope","$timeout",function(n,t){n.$watch("wbxAutoScroll",function(i,r){if(i!=null&&i!=r&&i)if(n.IsInsideModal)$("#"+n.BannerId).offset()==undefined?console.log("WbxUtils is being used."):t(function(){n.modalAlertParentElement.animate({scrollTop:0},"fast")},100);else{var f=document.getElementById("header")!=null?document.getElementById("header").offsetHeight:0,e=document.getElementById("mainNav")!=null?document.getElementById("mainNav").offsetHeight-40:0,u=f+e,o=document.getElementById("Wbx-Stepper")!=null?document.getElementById("mainNav").offsetHeight+u+170:0;$("#"+n.BannerId).offset()==undefined?console.log("WbxUtils is being used."):t(function(){$("html, body").animate({scrollTop:n.wbxAutoTopScroll===!0?0:$("#"+n.BannerId).offset().top-u-30},"fast")},100)}})}],link:function(n,t,i){n.BannerId=i.id;n.element=t;n.IsInsideModal=t.closest("div.modal").length>0;n.IsInsideModal&&(n.modalAlertParentElement=t.closest("div.wbx-modal-scrollable"))}}}]);app.directive("wbxClearAttribute",[function(){return{restrict:"A",scope:{show:"="},controller:["$scope","$attrs",function(n,t){n.attribute=t.wbxClearAttribute;n.value=t[n.attribute];n.$watch("show",function(i){i?t.$set(n.attribute,n.value):t.$set(n.attribute,"")})}]}}]);app.directive("wbxMergeNgModel",[function(){return{restrict:"A",require:"ngModel",scope:{wbxMergeNgModel:"=?",wbxList:"=?"},controller:["$scope",function(n){n.$watch("wbxMergeNgModel",function(t){t?n.NgModel.$setViewValue(!0):n.NgModel.$setViewValue(!1);n.NgModel.$render()});n.$watch("wbxList",function(t){if(t!=null){var i=!1;angular.forEach(n.wbxList,function(n){n.Selected&&(i=!0)});i?n.NgModel.$setViewValue(!0):n.NgModel.$setViewValue(!1);n.NgModel.$render()}},!0)}],link:function(n,t,i,r){n.NgModel=r}}}]);app.directive("wbxRadioEnforcer",[function(){return{restrict:"A",scope:{ngModel:"=",ngModelRadio:"=?",ngModelRadioList:"=?",ngModelProperty:"@"},controller:["$scope",function(n){n.$watchCollection("ngModel",function(t,i){if(t!=null&&t!=i&&t)if(n.ngModelRadio!=null)angular.forEach(n.ngModelRadio,function(t,i){i!=n.ngModelProperty&&i.indexOf("SubSection")<0&&(n.ngModelRadio[i]=null)});else if(n.ngModelRadioList!=null){var r=0;angular.forEach(n.ngModelRadioList,function(t){r!=n.ngModelProperty&&(t.Selected=null);r++})}})}]}}]);app.directive("wbxAutoSelect",[function(){return{restrict:"A",scope:{ngModel:"=",list:"="},controller:["$scope",function(n){n.$watchCollection("list",function(t){t!=null&&t.length==1&&(n.ngModel=t[0].Value)})}]}}]);app.directive("wbxRedactedInput",["$window",function(n){return{restrict:"A",scope:{ngModel:"="},require:["ngModel","^form"],link:function(t,i,r,u){var f=u[0],e=u[1],o=i.closest("form")[0].id;i.on("click",function(n){n.stopPropagation();(t.oldValue===""||t.oldValue===null||t.oldValue===undefined)&&(t.oldValue=f.$viewValue);t.selectAllInputContents(this)});i.on("blur",function(n){n.stopPropagation();f.$modelValue===undefined||f.$modelValue===null?t.oldValue===null||t.oldValue===undefined?t.oldValue="":t.oldValue.indexOf("**")!==-1&&(t.ngModel=t.oldValue):f.$modelValue!==undefined&&f.$modelValue!==t.oldValue&&(t.oldValue=f.$modelValue);t.updateViewValue(t.oldValue);t.$apply()});i.on("keydown",function(){event.stopPropagation();f.$modelValue&&f.$modelValue.indexOf("*")!==-1&&t.selectAllInputContents(this)});$("#"+o).on("submit",function(){e.$submitted&&e.$valid&&t.redactValue()});t.selectAllInputContents=function(t){n.getSelection().toString()||t.setSelectionRange(0,t.value.length)};t.redactValue=function(){var n=f.$modelValue?f.$modelValue.trim():"",i="",r;n.length-4<=4?i="*".repeat(n.length):(r=n.substr(n.length-4),i="*".repeat(n.length-4)+r);t.ngModel=i;t.oldValue=i;t.updateViewValue(i)};t.updateViewValue=function(n){f.$modelValue=n;f.$viewValue=n;f.$render()}}}}]);app.directive("wbxStopPropagation",function(){return{restrict:"A",link:function(n,t){t.bind("click",function(){return!1})}}});app.filter("wbxContactsSign",function(){return function(n){return n==null?n:n!=""&&n>=0?"+"+n.toString():n.toString()}}),function(){"use strict";function n(){return function(n){return n==null||n==""?"Present":n}}app.filter("wbxDatePresentFilter",n);n.$inject=[]}();app.filter("wbxDateFilter",function(){return function(n,t){var r,i;return n!=undefined&&(r=n.toString(),r.length>0)?(i=new Date(r),t?"**/**/"+i.getFullYear().toString():(i.getMonth()+1).toString()+"/"+i.getDate().toString()+"/"+i.getFullYear().toString()):""}});app.filter("wbxDeaFilter",function(){return function(n,t){if(n!=undefined){var i=n,r=i.length;return r<=4?i:t?"*****"+i.substr(r-4,4):i}}}),function(){"use strict";function n(){return function(n,t){var i,r;return n==null||t==null?null:(i=!0,n=n.trim().replace(/([-~!@#$%^&*()_+=`{}\[\]\|\\:;'<>,.\/? ])+/g,""),r=null,angular.forEach(t,function(t){i&&t.Value==n&&(i=!1,r=t.Text)}),r)}}app.filter("wbxDropDownFilter",n);n.$inject=[]}(),function(){"use strict";function n(){return function(n){if(n==null)return n;var t=n.trim().replace(/([-~!@#$%^&*()_+=`{}\[\]\|\\:;'<>,.\/? ])+/g,"");return t.substring(0,2)+"-"+t.substring(3,t.length)}}app.filter("wbxEINFilter",n);n.$inject=[]}(),function(){"use strict";function n(){return function(n,t,i){if(!Array.isArray(n))return console.error("Error on filtering multi select. It's not an array."),n;return(angular.isUndefined(i)?n:n.map(function(n){return n[i]})).join(t)}}app.filter("wbxMultiSelectFilter",n);n.$inject=[]}(),function(){"use strict";function n(){return function(n){return n==null||n==""?n:n+" %"}}app.filter("wbxPercentageFilter",n);n.$inject=[]}(),function(){"use strict";function n(){return function(n){if(n==null)return n;var t=n.trim().replace(/([-~!@#$%^&*()_+=`{}\[\]\|\\:;'<>,.\/? ])+/g,"");return t==""||t==null?null:"("+t.substring(0,3)+") "+t.substring(3,6)+"-"+t.substring(6,t.length)}}app.filter("wbxPhoneFilter",n);n.$inject=[]}();app.filter("wbxRxNumberUnsigned",function(){return function(n,t){return n==null?"--":(n=n.toFixed(t),n.toString())}});app.filter("wbxRxNumber",function(){return function(n,t){return n==null?"--":(n=n.toFixed(t),n>=0?"+"+n.toString():n.toString())}}),function(){"use strict";function n(){return function(n){return n==null||n==""?n:moment(n).isValid?n+" (Age="+moment().diff(n,"years")+")":void 0}}app.filter("wbxShowAgeFilter",n);n.$inject=[]}(),function(){"use strict";function n(){return function(n,t){if(n==null)return n;t==null&&(t=!0);var i=n.trim().replace(/([-~!@#$%^&*()_+=`{}\[\]\|\\:;'<>,.\/? ])+/g,""),r=0;return i!=null&&(r=i.length),3<r&&r<6?t?"***-"+i.substr(3):i.substr(0,3)+"-"+i.substr(3):r>5?t?"***-**-"+i.substr(5,4):i.substr(0,3)+"-"+i.substr(3,2)+"-"+i.substr(5,4):i}}app.filter("wbxSSNFilter",n);n.$inject=[]}(),function(){"use strict";function n(){return function(n,t){if(n==null||n=="")return n;var i=moment(n,moment.ISO_8601);return(!i.isValid()&&n.indexOf("am")>-1||n.indexOf("pm")>-1)&&(i=moment(n,"hh:mm:ss a")),i.isValid()?t?i.format("hh:mm:ss a"):i.format("hh:mm a"):null}}app.filter("wbxTimeFilter",n);n.$inject=["$filter"]}();app.directive("wbxConvertToNumber",function(){return{require:"ngModel",link:function(n,t,i,r){r.$parsers.push(function(n){return parseInt(n,10)});r.$formatters.push(function(n){return angular.isDefined(n)?""+n:null})}}});app.directive("enterAsTab",function(){return{restrict:"A",link:function(n,t){t.bind("keydown",function(n){var u=n.keyCode||n.which,r,i;if(u===13){n.preventDefault();r=parseFloat(t[0].getAttribute("tabindex"));i=null;do n.shiftKey==!1?r++:r>1&&r--,i=$("[tabindex="+r+"]"),i!=null&&i.focus();while(i!=null&&i.is(":visible")==!1||i.is(":disabled")==!0)}})}}});app.directive("wbxEligibilitySearchCriteria",["$http","$q","$timeout",function(n,t,i){return{restrict:"E",templateUrl:"/Templates/EligibilitySearchCriteria",require:"^form",scope:{searchData:"=searchCriteriaObject",clearSearchCriteria:"=",isDoneLoading:"=",requestToCreateMember:"=?",isCreateMemberMode:"=?",createMember:"&?",sessionInfo:"=?",additionalSearchCriteriaRequired:"="},controller:["$scope","GoogleTagManagerService",function(r,u){r.clearSearchCriteria=!1;r.searchCriteriaSessions=null;r.$watchCollection("[clearSearchCriteria, searchCriteriaSessions]",function(n){n[0]!=null&&n[1]!=null&&(r.resetMemberInfo(),r.clearSearchCriteria=!1)});r.initSearchCriteria=function(){if(r.sessionInfo==null){var n=r.getSearchCriteriaSessions();n.then(function(){r.populateSessionInfo()},function(){})}else r.searchCriteriaSessions=r.sessionInfo,r.populateSessionInfo()};r.populateSessionInfo=function(){r.resetMemberInfo();r.isDoneLoading=!0;r.searchData.passedInfo!=null&&r.searchData.passedInfo.RETAIN_MODE!=1&&i(function(){r.searchData.MemberInfoSelect=r.searchData.passedInfo.SEARCH_TYPE;r.searchData.SUBSCRIBER_ID=r.searchData.passedInfo.SUBSCRIBER_ID;r.searchData.LAST_NAME=r.searchData.passedInfo.LAST_NAME;r.searchData.FIRST_NAME=r.searchData.passedInfo.FIRST_NAME;r.searchData.DOB=r.searchData.passedInfo.DOB;r.searchData.LAST_SSN=r.searchData.passedInfo.SSN})};r.MemberInfoChanged=function(){var n="";r.searchData.MemberInfoSelect=="1"?n="subscriber id":r.searchData.MemberInfoSelect=="2"?n="subscriber id and date of birth":r.searchData.MemberInfoSelect=="3"?n="last name and first name":r.searchData.MemberInfoSelect=="4"?n="last name and date of birth":r.searchData.MemberInfoSelect=="5"?n="last name, first name, and date of birth":r.searchData.MemberInfoSelect=="6"?n="last four(4) digits of SSN and date of birth":r.searchData.MemberInfoSelect=="7"&&(n="subscriber id, last name, first name, and date of birth");u.setClickInfo("click","verify member eligibility / start claim or authorization",n+" radio button","field_interaction","","radio button",n);r.clearMemberInfo()};r.clearMemberInfo=function(){r.searchData.SUBSCRIBER_ID=null;r.searchData.DOB=null;r.searchData.LAST_NAME=null;r.searchData.FIRST_NAME=null;r.searchData.LAST_SSN=null;r.additonalSearchFields=null;r.searchData.IsSubscriberIdUnknown=!1;r.isCreateMemberMode=!1};r.resetMemberInfo=function(){r.searchData.MemberInfoSelect=r.searchCriteriaSessions.SEARCH_SUBSCRIBER_ID_FLAG?1:r.searchCriteriaSessions.SEARCH_SUBSCRIBER_ID_DOB_FLAG?2:r.searchCriteriaSessions.SEARCH_LAST_FIRST_FLAG?3:r.searchCriteriaSessions.SEARCH_LAST_DOB_FLAG?4:r.searchCriteriaSessions.SEARCH_LAST_FIRST_DOB_FLAG?5:r.searchCriteriaSessions.SEARCH_SSN_DOB_FLAG?6:r.searchCriteriaSessions.SEARCH_SUBSCRIBER_ID_FIRST_LAST_DOB_FLAG?7:1;r.clearMemberInfo()};r.getSearchCriteriaSessions=function(){var i=t.defer();return n({method:"GET",url:"/WebSession/GetSearchCriteriaSessions"}).then(function(n){r.searchCriteriaSessions=n.data;i.resolve()},function(n){console.error(n.data.Message);console.error(n);r.ExceptionDialogControl!=null?r.ExceptionDialogControl.showDialog("Error in getting search criteria sessions."):bootbox.alert(n.data.Message);i.reject(!1)}),i.promise};r.clearSubscriberId=function(){r.searchData.SUBSCRIBER_ID=null};r.$watch("requestToCreateMember",function(n){n&&(r.searchData.IsSubscriberIdUnknown&&(r.searchData.IsSubscriberIdUnknown=!1,i(function(){$("#SubscriberId6TextBox").focus()}),r.search_form.$setSubmitted(),r.isCreateMemberMode=!0),i(function(){r.search_form.$invalid?$(".alert-danger:visible:first").offset()&&$("html, body").animate({scrollTop:$(".alert-danger:visible:first").offset().top-60},750):r.createMember()}),r.requestToCreateMember=!1)});r.$watch("additionalSearchCriteriaRequired",function(){var n=r.searchData.SUBSCRIBER_ID&&r.searchData.LAST_NAME&&r.searchData.FIRST_NAME&&r.searchData.DOB&&r.searchData.LAST_SSN;r.additionalSearchCriteriaRequired&&r.searchCriteriaSessions.SEARCH_LIMIT_RESULTS_TO_1&&n?r.MultpleResultsBanner="Member could not be found. Please contact Customer Service.":r.additionalSearchCriteriaRequired&&r.searchCriteriaSessions.SEARCH_LIMIT_RESULTS_TO_1&&(r.MultpleResultsBanner="Please provide additional criteria.",r.showAdditionalSearchCriteria())});r.showAdditionalSearchCriteria=function(){r.additonalSearchFields={SUBSCRIBER_ID:!0,LAST_NAME:!0,FIRST_NAME:!0,DOB:!0,LAST_SSN:!0};var n=parseInt(r.searchData.MemberInfoSelect);switch(n){case 1:r.additonalSearchFields.SUBSCRIBER_ID=!1;break;case 2:r.additonalSearchFields.SUBSCRIBER_ID=!1;r.additonalSearchFields.DOB=!1;break;case 3:r.additonalSearchFields.LAST_NAME=!1;r.additonalSearchFields.FIRST_NAME=!1;break;case 4:r.additonalSearchFields.LAST_NAME=!1;r.additonalSearchFields.DOB=!1;break;case 5:r.additonalSearchFields.LAST_NAME=!1;r.additonalSearchFields.FIRST_NAME=!1;r.additonalSearchFields.DOB=!1;break;case 6:r.additonalSearchFields.LAST_SSN=!1;r.additonalSearchFields.DOB=!1;break;case 7:r.additonalSearchFields.SUBSCRIBER_ID=!1;r.additonalSearchFields.LAST_NAME=!1;r.additonalSearchFields.FIRST_NAME=!1;r.additonalSearchFields.DOB=!1;break;default:r.additonalSearchFields={SUBSCRIBER_ID:!0,LAST_NAME:!0,FIRST_NAME:!0,DOB:!0,LAST_SSN:!0}}}}],link:function(n,t,i,r){n.search_form=r}}}]);app.directive("wbxUsernamePasswordPin",["$http","$q","$timeout",function(){return{restrict:"E",template:"<div ng-include='usernamePasswordTemplate'><\/div>",require:"^form",scope:{registrationData:"=",clearFields:"=",isEdit:"=",showRequired:"=?"},controller:["$scope",function(n){n.clearFields=!1;n.clearUserNameInfo=function(){n.registrationData.USER_NAME=null;n.registrationData.PASSWORD=null;n.registrationData.CONFIRM_PASSWORD=null};n.$watch("clearFields",function(t){t!=null&&t&&(n.clearUserNameInfo(),n.clearFields=!1)});n.$watch("isPasswordValid",function(t,i){t==i||n.isEdit||n.registration_form.passwordTextBox.$setValidity("notvalid",n.isPasswordValid)})}],link:function(n,t,i,r){n.usernamePasswordTemplate="/Templates/UsernamePasswordPIN?showRequired="+(n.showRequired?"true":"false");n.registration_form=r}}}]);app.directive("wbxPasswordStrength",function(){return{template:"<div class='wbx-progress'><div class='progress-bar progress-bar-{{color}}' role='progressbar' ng-style='width'><\/div><\/div><span class='pull-right {{messageColor}}'>{{message}}<\/span><span aria-live='polite' role='{{pwd.length === 0 ? '' : 'alert'}}' class='sr-only'>{{message}} password<\/span>",restrict:"A",scope:{pwd:"=wbxPasswordStrength"},link:function(n){var t=function(n){var i={pos:{},neg:{}},t={pos:{},neg:{seqLetter:0,seqNumber:0,seqSymbol:0}},o,r=0,h="abcdefghijklmnopqrstuvwxyz",c="01234567890",l="!#$%*~",e,f,u,s;if(n){for(i.pos.lower=n.match(/[a-z]/g),i.pos.upper=n.match(/[A-Z]/g),i.pos.numbers=n.match(/\d/g),i.pos.symbols=n.match(/[!#$%*~]+/g),i.pos.middleNumber=n.slice(1,-1).match(/\d/g),i.pos.middleSymbol=n.slice(1,-1).match(/[!#$%*~]+/g),t.pos.lower=i.pos.lower?i.pos.lower.length:0,t.pos.upper=i.pos.upper?i.pos.upper.length:0,t.pos.numbers=i.pos.numbers?i.pos.numbers.length:0,t.pos.symbols=i.pos.symbols?i.pos.symbols.length:0,o=_.reduce(t.pos,function(n,t){return n+Math.min(1,t)},0),t.pos.numChars=n.length,o+=t.pos.numChars>=8?1:0,t.pos.requirements=o>=3?o:0,t.pos.middleNumber=i.pos.middleNumber?i.pos.middleNumber.length:0,t.pos.middleSymbol=i.pos.middleSymbol?i.pos.middleSymbol.length:0,i.neg.consecLower=n.match(/(?=([a-z]{2}))/g),i.neg.consecUpper=n.match(/(?=([A-Z]{2}))/g),i.neg.consecNumbers=n.match(/(?=(\d{2}))/g),i.neg.onlyNumbers=n.match(/^[0-9]*$/g),i.neg.onlyLetters=n.match(/^([a-z]|[A-Z])*$/g),t.neg.consecLower=i.neg.consecLower?i.neg.consecLower.length:0,t.neg.consecUpper=i.neg.consecUpper?i.neg.consecUpper.length:0,t.neg.consecNumbers=i.neg.consecNumbers?i.neg.consecNumbers.length:0,u=0;u<h.length-2;u++)s=n.toLowerCase(),f=h.substring(u,parseInt(u+3)),e=_.str.reverse(f),(s.indexOf(f)!==-1||s.indexOf(e)!==-1)&&t.neg.seqLetter++;for(u=0;u<c.length-2;u++)f=c.substring(u,parseInt(u+3)),e=_.str.reverse(f),(n.indexOf(f)!==-1||n.toLowerCase().indexOf(e)!==-1)&&t.neg.seqNumber++;for(u=0;u<l.length-2;u++)f=l.substring(u,parseInt(u+3)),e=_.str.reverse(f),(n.indexOf(f)!==-1||n.toLowerCase().indexOf(e)!==-1)&&t.neg.seqSymbol++;t.neg.repeated=_.chain(n.toLowerCase().split("")).countBy(function(n){return n}).reject(function(n){return n===1}).reduce(function(n,t){return n+t},0).value();r+=t.pos.numChars*4;t.pos.upper&&(r+=(t.pos.numChars-t.pos.upper)*2);t.pos.lower&&(r+=(t.pos.numChars-t.pos.lower)*2);(t.pos.upper||t.pos.lower)&&(r+=t.pos.numbers*4);r+=t.pos.symbols*6;r+=(t.pos.middleSymbol+t.pos.middleNumber)*2;r+=t.pos.requirements*2;r-=t.neg.consecLower*2;r-=t.neg.consecUpper*2;r-=t.neg.consecNumbers*2;r-=t.neg.seqNumber*3;r-=t.neg.seqLetter*3;r-=t.neg.seqSymbol*3;i.neg.onlyNumbers&&(r-=t.pos.numChars);i.neg.onlyLetters&&(r-=t.pos.numChars);t.neg.repeated&&(r-=t.neg.repeated/t.pos.numChars*10)}return Math.max(0,Math.min(100,Math.round(r)))},i=function(n){switch(Math.round(n/33)){case 0:return"default";case 1:return"danger";case 2:return"warning";case 3:return"success"}},r=function(n){switch(Math.round(n/33)){case 0:return"No Strength";case 1:return"Weak";case 2:return"Medium";case 3:return"Very Strong"}},u=function(n){switch(Math.round(n/33)){case 0:return"wbx-text-grey";case 1:return"wbx-progress-danger-color";case 2:return"wbx-progress-warning-color";case 3:return"wbx-progress-success-color"}},f=function(n){switch(Math.round(n/33)){case 0:return{width:"5%"};case 1:return{width:"33%"};case 2:return{width:"66%"};case 3:return{width:"100%"}}};n.$watch("pwd",function(){n.value=t(n.pwd);n.color=i(n.value);n.message=r(n.value);n.messageColor=u(n.value);n.width=f(n.value)})}}});app.directive("wbxPasswordStrengthDisplay",function(){return{templateUrl:"/Templates/PasswordStrengthDisplay",restrict:"A",scope:{pwd:"=wbxPsdPassword",userName:"=wbxPsdUserName",isPasswordValid:"=wbxPsdIsValid"},controller:["$scope","$http","$location",function(n,t){n.rules=[];n.Init=function(i){(i==undefined||i==null)&&(i="");t({url:"/AccountManagement/GetPasswordRules",method:"GET",params:{userName:i}}).then(function(t){t.data.length==0?n.ExceptionDialogControl!=null?n.ExceptionDialogControl.showDialog("Error with getting password rules."):bootbox.alert("Could not retrieve password rules."):n.rules=t.data},function(t){console.error(t.data.Message);console.error(t);n.ExceptionDialogControl!=null?n.ExceptionDialogControl.showDialog("Error with getting password rules."):bootbox.alert("Could not retrieve password rules.")})}}],link:function(n){var i=[],t=[],r=[],u=[],f=0;n.Init(n.userName);var s=function(){},e=function(n){if(n==undefined){i=null;t=null;r=null;u=null;f=0;return}i=n.match(/[a-z]/g);t=n.match(/[A-Z]/g);r=n.match(/\d/g);u=n.match(/[!#$%*~]+/g);f=n.length},o=function(){for(var h,c,l,s=n.rules.length,o=0,e=0;e<s;e++){if(n.rules[e].character=="s"){u!=null?(n.rules[e].requirementMet=!0,o++):n.rules[e].requirementMet=!1;continue}if(n.rules[e].character=="u"){t!=null?(n.rules[e].requirementMet=!0,o++):n.rules[e].requirementMet=!1;continue}if(n.rules[e].character=="n"){r!=null?(n.rules[e].requirementMet=!0,o++):n.rules[e].requirementMet=!1;continue}if(n.rules[e].character=="l"){i!=null||t!=null?(n.rules[e].requirementMet=!0,o++):n.rules[e].requirementMet=!1;continue}if(n.rules[e].character=="g"){f>=n.rules[e].passwordLength?(n.rules[e].requirementMet=!0,o++):n.rules[e].requirementMet=!1;continue}if(n.rules[e].character=="r"){h=new String(n.pwd);c=n.userName!=""&&n.userName!=undefined?n.userName:new String(n.rules[e].userName);n.pwd!=""&&n.pwd!=undefined?(l=h.toLowerCase().indexOf(c.toLowerCase()),l==-1?(n.rules[e].requirementMet=!0,o++):n.rules[e].requirementMet=!1):n.rules[e].requirementMet=!1;continue}}n.isPasswordValid=s==o};n.$watchCollection("[userName, pwd]",function(t,i){(t[0]!=i[0]||t[1]!=i[1])&&(e(n.pwd),o())})}}});app.directive("wbxMemberAction",["$window","$timeout","$http","$location","$q","$sce",function(n,t,i,r,u,f){return{restrict:"E",templateUrl:"/Templates/MemberAction",scope:{selectedItem:"=",productLevelResults:"=?",openClose:"=",pageSource:"=",isCalendar:"=?",isDental:"=?",isAddedToRoster:"=?",isAddedToCalendar:"=?",closeMemberAction:"&?"},controller:["$scope","ImpersonateService","GoogleTagManagerService","FeatureFlagService",function(e,o,s,h){e.$watch("openClose",function(n,t){n!=t&&n!=null&&n&&(e.evaluateStartClaimButtonForTherapy(),$("#MemberAction"+e.MemberActionId+"Dialog").modal({backdrop:"static"}),$("#MemberAction"+e.MemberActionId+"Dialog").modal("show"),e.openClose=!1)});e.init=function(){o.getImpersonateSessionInfo().then(function(n){e.isImpersonation=n.IsImpersonation;e.impersonatedName=n.ImpersonatedName});h.getFeatureFlagsForPWPDentalBenefitSummaryReport().then(function(n){e.isPwpDentalBenefitSummaryReportEnabled=n.IsPwpDentalBenefitSummaryReportEnabled;e.showBenefitSummaryLink=n.ShowBenefitSummaryLink})};e.modalActionClass=function(n){return n?"modal-lg":""};e.startClaimAuth=function(t,u){var f="";t==1&&(f="a claim");t==2&&(f="an authorization");s.setClickInfo("click","verify member eligibility / start claim or authorization","patient selected - start "+f+" button","field_interaction","","button","start "+f);$("#MemberAction"+e.MemberActionId+"Dialog").modal("hide");i({url:"/Welcome/SetHomePageData",method:"PUT",data:{LOCATION_ID:e.selectedItem.LOCATION_ID,PROVIDER_ID:e.selectedItem.PROVIDER_ID,DATE_OF_SERVICE:e.selectedItem.DATE_OF_SERVICE,SUBSCRIBER_ID:e.selectedItem.SUBSCRIBER_ID,FIRST_NAME:e.selectedItem.FIRST_NAME,LAST_NAME:e.selectedItem.LAST_NAME,DOB:e.selectedItem.DOB,DATA_SOURCE:e.pageSource,MEMBER_ID:e.selectedItem.MEMBER_ID,PRODUCT_ID:e.selectedItem.PRODUCT_ID,INSURER_ID:e.selectedItem.INSURER_ID,ENROLLEE_ID:e.selectedItem.ENROLLEE_ID,AUTHORIZATION_NUMBER:u!=null?u.AUTHORIZATION_NUMBER:null}}).then(function(i){if(i.data.Status){s.setClickInfo("success","verify member eligibility / start claim or authorization","patient selected - start "+f+" button","field_interaction","start "+f+" generated successfully","button","start "+f);var o=r.absUrl().indexOf("/PatientManagement"),u="";u=o>0?r.absUrl().substr(0,o):r.absUrl();o=u.indexOf("#");o>0&&(u=u.substr(0,o));n.location.href=t==1?u+"/ClaimEntry":u+"/AuthEntry"}else console.error(i.data.Message),console.error(i),e.ExceptionDialogControl!=null?(s.setClickInfo("error","verify member eligibility / start claim or authorization","patient selected - start "+f+" button","field_interaction","error with setting homepage data","button","start "+f),e.ExceptionDialogControl.showDialog("Error with setting homepage data.")):(s.setClickInfo("error","verify member eligibility / start claim or authorization","patient selected - start "+f+" button","field_interaction",i.data.Message?i.data.Message.toLowerCase():"an error has occurred","button","start "+f),bootbox.alert(i.data.Message))},function(n){console.error(n.data.Message);console.error(n);e.ExceptionDialogControl!=null?(s.setClickInfo("error","verify member eligibility / start claim or authorization","patient selected - start "+f+" button","field_interaction","error with setting homepage data","button","start "+f),e.ExceptionDialogControl.showDialog("Error with setting homepage data.")):(s.setClickInfo("error","verify member eligibility / start claim or authorization","patient selected - start "+f+" button","field_interaction",n.data.Message?n.data.Message.toLowerCase():"an error has occurred","button","start "+f),bootbox.alert(n.data.Message))})};e.closeMemberActionDialog=function(){s.setClickInfo("click","verify member eligibility / start claim or authorization","patient selected - close icon","close_modal","","icon","close icon");$("#MemberAction"+e.MemberActionId+"Dialog").modal("hide");e.closeMemberAction()};e.multiProductStartClaimAuth=function(n,t){e.selectedItem.SUBSCRIBER_ID=n.SUBSCRIBER_ID;e.selectedItem.INSURER_ID=n.INSURER_ID;e.selectedItem.PRODUCT_ID=n.PRODUCT_ID;e.selectedItem.MEMBER_ID=n.MEMBER_ID;e.startClaimAuth(t)};e.showEligibilityReport=function(){s.setClickInfo("click","verify member eligibility / start claim or authorization","patient selected - view eligibility report button","field_interaction","","button","view eligibility report");var n=e.setSessionPropertiesForEligibilityReport();e.openTab("/Areas/PWP/Reports/PortalEligibility.aspx",n,{attribute1:"verify member eligibility / start claim or authorization",attribute2:"patient selected - view eligibility report button",attribute3:"field_interaction",attribute4:"eligibility report generated successfully",category:"button",label:"view eligibility report"})};e.setSessionPropertiesForEligibilityReport=function(){var t=[],n={SESSION_NAME:"REPORT_PORTAL_ELIGIBILITY_ENROLLEE_ID",SESSION_VALUE:e.selectedItem.ENROLLEE_ID};return t.push(n),n={SESSION_NAME:"REPORT_PORTAL_ELIGIBILITY_SUBSCRIBER_ID",SESSION_VALUE:e.selectedItem.SUBSCRIBER_ID},t.push(n),n={SESSION_NAME:"REPORT_PORTAL_ELIGIBILITY_PROVIDER_ID",SESSION_VALUE:e.selectedItem.PROVIDER_ID},t.push(n),n={SESSION_NAME:"REPORT_PORTAL_ELIGIBILITY_LOCATION_ID",SESSION_VALUE:e.selectedItem.LOCATION_ID},t.push(n),n={SESSION_NAME:"REPORT_PORTAL_ELIGIBILITY_PRODUCT_ID",SESSION_VALUE:e.selectedItem.PRODUCT_ID},t.push(n),n={SESSION_NAME:"REPORT_PORTAL_ELIGIBILITY_STATUS",SESSION_VALUE:e.selectedItem.STATUS},t.push(n),n={SESSION_NAME:"REPORT_PORTAL_ELIGIBILITY_DATE_OF_SERVICE",SESSION_VALUE:e.selectedItem.DATE_OF_SERVICE},t.push(n),t};e.multiProdutShowEligibilityReport=function(n){e.selectedItem.SUBSCRIBER_ID=n.SUBSCRIBER_ID;e.selectedItem.PRODUCT_ID=n.PRODUCT_ID;e.selectedItem.STATUS=n.STATUS;e.showEligibilityReport()};e.displayBenefitSummaryRdl=function(n){var i=e.setSessionPropertiesForPortalBenefitSummaryReport();t(function(){e.openTab("/Areas/PWP/Reports/PortalBenefitSummaryReport.aspx",i,n)},250)};e.setSessionPropertiesForPortalBenefitSummaryReport=function(){var t=[],n={SESSION_NAME:"REPORT_PORTAL_BENEFIT_SUMMARY_DATE_OF_SERVICE",SESSION_VALUE:e.selectedItem!=undefined?e.selectedItem.DATE_OF_SERVICE:""};return t.push(n),n={SESSION_NAME:"REPORT_PORTAL_BENEFIT_SUMMARY_PRODUCT_ID",SESSION_VALUE:e.selectedItem!=undefined?e.selectedItem.PRODUCT_ID:""},t.push(n),n={SESSION_NAME:"REPORT_PORTAL_BENEFIT_SUMMARY_ENROLLEE_ID",SESSION_VALUE:e.selectedItem!=undefined?e.selectedItem.ENROLLEE_ID:""},t.push(n),t};e.showPortalBenefitSummaryReport=function(){s.setClickInfo("click","verify member eligibility / start claim or authorization","patient selected - view benefits link","field_interaction","","link","view benefits");var n={attribute1:"verify member eligibility / start claim or authorization",attribute2:"patient selected - view benefits link",attribute3:"field_interaction",attribute4:"benefits summary generated successfully",category:"link",label:"view benefits"};if(e.isDental&&e.isPwpDentalBenefitSummaryReportEnabled&&e.showBenefitSummaryLink)e.loadBenefitSummaryReportData(n),$("#BenefitSummaryReportModal").modal("show");else{e.displayBenefitSummaryRdl(n);return}};e.setInitalSessionValues=function(n){n[0].SESSION_VALUE==undefined?n[0].SESSION_VALUE=null:n[0].SESSION_VALUE;n[1].SESSION_VALUE==undefined?n[1].SESSION_VALUE=0:n[1].SESSION_VALUE;n[2].SESSION_VALUE==undefined?n[2].SESSION_VALUE=0:n[2].SESSION_VALUE};e.loadBenefitSummaryReportData=function(n){e.loadingCoinsurance=!0;e.loadingForPrint=!1;let r=e.setSessionPropertiesForPortalBenefitSummaryReport();e.setInitalSessionValues(r);let t=parseInt(r[1].SESSION_VALUE),i=parseInt(r[2].SESSION_VALUE);e.currentProductPeriod=e.currentProductPeriod==undefined?0:e.currentProductPeriod;t=isNaN(t)?0:t;i=isNaN(i)?0:i;let u=e.getBenefitSummaryreportData(t,i);u.then(function(){let r=e.getBenefitSummaryreportMemberHeaderData(t,i,n);r.then(function(){let n=e.getBenefitSummaryCoinsurance(e.currentProductPeriod,t);n.then(function(){let n=e.getBenefitSummaryCopayAmounts(e.currentProductPeriod,t);n.then(function(){e.resetBenefitSummaryModal();e.loadingCoinsurance=!1})})})})};e.resetBenefitSummaryModal=function(){document.getElementById("#BenefitSummaryReportTabsgeneralInfoTabTab").className="active active";document.getElementById("BenefitSummaryReportTabsgeneralInfoTabPanel").className="active tab-pane";document.getElementById("#BenefitSummaryReportTabsserviceLimitationsTabTab").className="";document.getElementById("BenefitSummaryReportTabsserviceLimitationsTabPanel")!=null&&(document.getElementById("BenefitSummaryReportTabsserviceLimitationsTabPanel").className="tab-pane");document.getElementById("#BenefitSummaryReportTabscoveredServicesTabTab").className="";document.getElementById("BenefitSummaryReportTabscoveredServicesTabPanel")!=null&&(document.getElementById("BenefitSummaryReportTabscoveredServicesTabPanel").className="tab-pane")};e.getBenefitSummaryreportData=function(n,t){e.benefitSummaryDataOON=[];var r=u.defer(),f=e.setSessionPropertiesForPortalBenefitSummaryReport();return e.setInitalSessionValues(f),i({method:"GET",url:"/PWP/BenefitSummaryReport/GetBenefitSummaryReport",params:{productId:n,enrolleeId:t}}).then(function(n){e.benefitSummaryData=n.data;e.benefitSummaryData.length>0&&(angular.copy(e.benefitSummaryData,e.benefitSummaryDataOON),e.benefitSummaryDataOON=e.benefitSummaryDataOON.filter(function(n){return n.OON_FLAG==1}),e.benefitSummaryData=e.benefitSummaryData.filter(function(n){return n.OON_FLAG==0}));r.resolve(!0)}),r.promise};e.getBenefitSummaryreportMemberHeaderData=function(n,t,r){var f,o;return r=r||"notag",e.ELIGIBLE=1,e.NOT_ELIGIBLE=2,e.ELIGIBLE_STARTING=3,e.ELIGIBLE_ENDING=4,f=u.defer(),e.benefitSummaryMemberHeaderData=[],o=e.setSessionPropertiesForPortalBenefitSummaryReport(),n=isNaN(n)?0:n,i({method:"GET",url:"/PWP/BenefitSummaryReport/GetBenefitSummaryReportMemberData",params:{productId:n,enrolleeId:parseInt(t),dateOfService:o[0].SESSION_VALUE}}).then(function(n){r!="notag"&&s.setClickInfo("success",r.attribute1,r.attribute2,r.attribute3,r.attribute4,r.category,r.label);e.benefitSummaryMemberHeaderData=n.data;e.currentProductPeriod=e.benefitSummaryMemberHeaderData.PRODUCT_PERIOD;f.resolve(!0)},function(){r!="notag"&&s.setClickInfo("error",r.attribute1,r.attribute2,r.attribute3,"error geeting benefits summary report",r.category,r.label)}),e.clearCodeSearchResults(),f.promise};e.getCoveredServices=function(){var r=u.defer(),t,n;return e.benefitSummaryCoveredServicesData=[],t=e.setSessionPropertiesForPortalBenefitSummaryReport(),n=parseInt(t[1].SESSION_VALUE),n=isNaN(n)?0:n,i({method:"GET",url:"/PWP/BenefitSummaryReport/GetBenefitSummaryCoveredServices",params:{productId:n,enrolleeId:parseInt(t[2].SESSION_VALUE),dateOfService:t[0].SESSION_VALUE}}).then(function(n){e.benefitSummaryCoveredServicesData=n.data;r.resolve(!0)}),r.promise};e.closeBenefitSummaryModal=function(){e.clearCodeSearchResults();$("#BenefitSummaryReportModal").modal("hide")};e.getBenefitSummaryCoinsurance=function(n,t){e.benefitSummaryCoinsuranceData=[];e.benefitSummaryCoinsuranceDataOON=[];e.coinsuranceCodeGroups=[];e.coinsuranceCodeGroupsOOA=[];e.hasCoinsurance=!1;e.hasCoinsuranceOON=!1;let f=e.setSessionPropertiesForPortalBenefitSummaryReport();e.setInitalSessionValues(f);var r=u.defer();return i({method:"GET",url:"/PWP/BenefitSummaryReport/GetBenefitSummaryReportCoinsuranceData",params:{productId:t,productPeriod:n}}).then(function(n){e.benefitSummaryCoinsuranceData=n.data;e.benefitSummaryCoinsuranceData.length>0&&(angular.copy(e.benefitSummaryCoinsuranceData,e.benefitSummaryCoinsuranceDataOON),e.benefitSummaryCoinsuranceDataOON=e.benefitSummaryCoinsuranceDataOON.filter(function(n){return n.OON_FLAG==1}),e.benefitSummaryCoinsuranceData=e.benefitSummaryCoinsuranceData.filter(function(n){return n.OON_FLAG==0}),e.benefitSummaryCoinsuranceData.length>0&&(e.coinsuranceCodeGroups=e.benefitSummaryCoinsuranceData.reduce((n,t)=>[...n.filter(n=>n.CODE_GROUP!==t.CODE_GROUP),t],[])),e.benefitSummaryCoinsuranceDataOON.length>0&&(e.coinsuranceCodeGroupsOOA=e.benefitSummaryCoinsuranceDataOON.reduce((n,t)=>[...n.filter(n=>n.CODE_GROUP!==t.CODE_GROUP),t],[])));e.hasCoinsurance=e.benefitSummaryCoinsuranceData.length>0;e.hasCoinsuranceOON=e.benefitSummaryCoinsuranceDataOON.length>0;r.resolve(!0)}),r.promise};e.getServiceLimitations=function(){var n=e.getServiceLimitationsData();n.then(function(){e.getBenefitSummaryWaitingPeriods()})};e.getServiceLimitationsData=function(){var r=u.defer(),f=1,o=3,t,n;return e.benefitSummaryServiceLimitations=[],e.serviceLimitationsByCode=[],e.serviceLimitationsByCodeSet=[],e.serviceLimitationsByAge=[],r=u.defer(),t=e.setSessionPropertiesForPortalBenefitSummaryReport(),e.setInitalSessionValues(t),n=parseInt(t[1].SESSION_VALUE),n=isNaN(n)?0:n,i({method:"GET",url:"/PWP/BenefitSummaryReport/GetBenefitSummaryServiceLimitationsData",params:{productId:n,enrolleeId:parseInt(t[2].SESSION_VALUE)}}).then(function(n){e.benefitSummaryServiceLimitations=n.data;angular.copy(e.benefitSummaryServiceLimitations,e.serviceLimitationsByCode);angular.copy(e.benefitSummaryServiceLimitations,e.serviceLimitationsByCodeSet);e.serviceLimitationsByCode=e.serviceLimitationsByCode.filter(function(n){return n.LIMITATION_TYPE==f});e.serviceLimitationsByCodeSet=e.serviceLimitationsByCodeSet.filter(function(n){return n.LIMITATION_TYPE==o});e.serviceLimitationsByCodeSet.sort(function(n,t){return parseFloat(n.AGE_MIN)-parseFloat(t.AGE_MIN)});e.serviceLimitationsByAge=e.serviceLimitationsByCodeSet.reduce((n,t)=>[...n.filter(n=>n.FREQUENCY!=t.FREQUENCY||n.DESCRIPTION_SHORT!=t.DESCRIPTION_SHORT),t],[]);r.resolve(!0)}),r.promise};e.getBenefitSummaryWaitingPeriods=function(){var r,t,n;return e.loadingWaitingPeriods=!1,e.waitingPeriodCodesets=[],e.waitingPeriodsCodesByCodeSet=[],e.benefitSummaryWaitingPeriods=[],r=u.defer(),t=e.setSessionPropertiesForPortalBenefitSummaryReport(),e.setInitalSessionValues(t),n=parseInt(t[1].SESSION_VALUE),n=isNaN(n)?0:n,e.loadingWaitingPeriods=!0,i({method:"GET",url:"/PWP/BenefitSummaryReport/GetBenefitSummaryWaitingPeriods",params:{productId:n,enrolleeId:parseInt(t[2].SESSION_VALUE)}}).then(function(n){e.benefitSummaryWaitingPeriods=n.data;e.hasWaitingPeriods=e.benefitSummaryWaitingPeriods.length>0;angular.copy(e.benefitSummaryWaitingPeriods,e.waitingPeriodCodesets);angular.copy(e.benefitSummaryWaitingPeriods,e.waitingPeriodsCodesByCodeSet);e.waitingPeriodCodesets=e.waitingPeriodCodesets.reduce((n,t)=>[...n.filter(n=>n.CODESET_ID!==t.CODESET_ID),t],[]);r.resolve(!0)}),e.loadingWaitingPeriods=!1,r.promise};e.getBenefitSummaryCopayAmounts=function(n,t){e.benefitSummaryCopays=[];e.benefitSummaryCopaysOOA=[];e.hasCopays=!1;e.hasCopaysOON=!1;var r=u.defer(),f=e.setSessionPropertiesForPortalBenefitSummaryReport(n);return i({method:"GET",url:"/PWP/BenefitSummaryReport/GetBenefitSummaryReportCopayData",params:{productId:t,productPeriod:n}}).then(function(n){e.benefitSummaryCopays=n.data;e.benefitSummaryCopays.length>0&&(angular.copy(e.benefitSummaryCopays,e.benefitSummaryCopaysOOA),e.benefitSummaryCopaysOOA=e.benefitSummaryCopaysOOA.filter(function(n){return n.OON_FLAG==1}),e.benefitSummaryCopays=e.benefitSummaryCopays.filter(function(n){return n.OON_FLAG==0}),e.hasCopays=e.benefitSummaryCopays.length>0,e.hasCopaysOON=e.benefitSummaryCopaysOOA.length>0);r.resolve(!0)}),e.loadingCoinsurance=!1,r.promise};e.printDownloadSummary=function(){var i="",n,r;e.loadingForPrint=!1;n="<style>.generalInfoResultsTable td {";n+="line-height: 25px;";n+="padding: 10px;";n+="border-style: solid;";n+="border-width: thin;";n+="border-color: #9d9696;";n+="}";n+=".generalInfoResults{";n+="height:35px;";n+="}";n+=".itemAmount{";n+="color:#334CA0FD";n+="}";n+=" html, body {";n+="max-width: 100%;";n+="} ";n+="@media print {";n+="body {";n+="margin-top: 5px";n+="margin-left: 0px";n+="transform: scale(0.0)";n+="}<\/style>  <br> ";r=e.getCoveredServices();e.loadingForPrint=!0;r.then(function(){var r=e.getBenefitSummaryWaitingPeriods();r.then(function(){var r=e.getServiceLimitationsData();r.then(function(){t(function(){var t="",u=document.getElementById("BenefitSummaryPanelHeading").innerHTML,o=document.getElementById("memberHeaderInformation").innerHTML,s=document.getElementById("generalInformationResultsInNetwork").innerHTML,h=document.getElementById("generalInformationResultsOutOfNetwork").innerHTML,c=document.getElementById("serviceLimitationsResults").innerHTML,l=document.getElementById("serviceLimitationsCodesetsResults").innerHTML,a=document.getElementById("waitingPeriodResults").innerHTML,v=document.getElementById("coveredServicesResults").innerHTML,r;t=n;t+=u;t+=o;t+=s;t+=h;t+=c;t+=l;t+=a;t+=v;i=f.trustAsHtml(t);r=window.open("","","width=900, height=500");r.document.write(i);r.print();r.document.close();r.focus();e.loadingForPrint=!1},3e3)})})})};e.getMemberHeaderDataForPrint=function(){var n="<div class='resultsContainer'>";return n+="<table>",n+="<tr><td>Insurer:<\/td><td>"+e.benefitSummaryMemberHeaderData.INSURER_NAME+"<\/td><\/tr>",n+="<tr><td>Member ID:<\/td><td>"+e.benefitSummaryMemberHeaderData.MEMBER_ID+"<\/td><\/tr>",n+="<tr><td>Benefit Plan Eligibility:<\/td><td>"+e.benefitSummaryMemberHeaderData.ELIGIBILITY_STATUS.STATUS_DESCRIPTION+"<\/td><\/tr>",n+="<tr><td>Benefit Plan:<\/td><td>"+e.benefitSummaryMemberHeaderData.BENEFIT_PLAN_NAME+"<\/td><\/tr>",n+="<tr><td>Plan/Group Number:<\/td><td>"+e.benefitSummaryMemberHeaderData.GROUP_NUMBER+"<\/td><\/tr>",n+="<tr><td>Benefit Plan Period:<\/td><td>"+e.benefitSummaryMemberHeaderData.BENEFIT_PLAN_PERIOD+"<\/td><\/tr>",n+"<\/table>"};e.getServiceLimitationCodesetsForPrint=function(){return document.getElementById("generalInfoResultsTable").innerHTML};e.procedureCodeSearch=function(n){var t=e.setSessionPropertiesForPortalBenefitSummaryReport();if(e.codeSearchResult=[],e.invalidCode=!1,e.hasSearchResults=!1,e.hasCodesets=!1,e.codeSearchForm.$submitted=!0,e.codeSearchForm.$invalid||n.length<5)return e.searchCode="",!1;i({method:"GET",url:"/PWP/BenefitSummaryReport/BenefitSummaryCodeSearch",params:{productId:parseInt(t[1].SESSION_VALUE),benefitLevel:null,enrolleeId:e.selectedItem.ENROLLEE_ID,dateOfService:t[0].SESSION_VALUE,code:n}}).then(function(n){e.codeSearchResult=n.data;e.hasSearchResults=e.codeSearchResult.length>0;e.hasCodesets=!1;var t=e.codeSearchResult.map(function(n){n.CODESET_DESCRIPTION.length>0&&(e.hasCodesets=!0);n.DESCRIPTION=="- Invalid Code -"&&(e.invalidCode=!0)})})};e.clearCodeSearchResults=function(){e.searchCode="";e.codeSearchForm.$invalid=!1;e.codeSearchForm.$submitted=!1;e.codeSearchResult=[];e.hasCodesets=!1;e.hasSearchResults=!1};$("#procedureCodeSearch").keydown(function(n){n.which==13&&e.procedureCodeSearch(e.searchCode)});e.changeIconOnClick=function(n){n.collapsed=!n.collapsed;$("#"+this.id).on("shown.bs.collapse",function(){$(this).parent().find(".panel-heading").addClass("panel-heading-opened");$(this).parent().find(".fa-caret-right").removeClass("fa-caret-right").addClass("fa-caret-up")}).on("hidden.bs.collapse",function(){$(this).parent().find(".panel-heading").removeClass("panel-heading-opened");$(this).parent().find(".fa-caret-up").removeClass("fa-caret-up").addClass("fa-caret-right")})};e.formatBenefitMaximumData=function(n){var t="";return t=n.ANNUAL_IND_MAX_LIMIT===0?"N/A/":n.ANNUAL_IND_MAX_USED+" used of"+n.ANNUAL_IND_MAX_LIMIT,n.ANNUAL_IND_MAX_LIMIT-n.ANNUAL_IND_MAX_USED==0?"":ANNUAL_IND_MAX_LIMIT-ANNUAL_IND_MAX_USED+" remains"};e.multiProductShowPortalBenefitSummaryReport=function(n){e.selectedItem.PRODUCT_ID=n.PRODUCT_ID;e.showPortalBenefitSummaryReport()};e.showPatientHistory=function(){var i,n,t;s.setClickInfo("click","verify member eligibility / start claim or authorization","patient selected - view patient history button","field_interaction","","button","view patient history");i={attribute1:"verify member eligibility / start claim or authorization",attribute2:"patient selected - view patient history button",attribute3:"field_interaction",attribute4:"patient history generated successfully",category:"button",label:"view patient history"};e.selectedItem.ENROLLEE_ID!=null&&e.selectedItem.SUBSCRIBER_ID.length>0&&(n=[],t={SESSION_NAME:"REPORT_SERVICE_HISTORY_ENROLLEE_ID",SESSION_VALUE:e.selectedItem.ENROLLEE_ID},n.push(t),t={SESSION_NAME:"REPORT_SERVICE_HISTORY_SUBSCRIBER_ID",SESSION_VALUE:e.selectedItem.SUBSCRIBER_ID},n.push(t),e.openTab("/Areas/PWP/Reports/ServiceHistory.aspx",n,i))};e.multiProdutShowPatientHistory=function(n){e.selectedItem.ENROLLEE_ID=n.ENROLLEE_ID;e.selectedItem.SUBSCRIBER_ID=n.SUBSCRIBER_ID;e.selectedItem.STATUS=n.STATUS;e.showPatientHistory()};e.addToRoster=function(n,t){t=t||"notag";var r=u.defer();return i({url:"/PatientManagement/AddMembers",method:"PUT",data:{ROSTER_ID:null,LOCATION_ID:n.LOCATION_ID,IS_LOCATION_ROSTER:!0,EnrolleeIds:n.ENROLLEE_ID}}).then(function(n){t!="notag"&&s.setClickInfo("success",t.attribute1,t.attribute2,t.attribute3,t.attribute4,t.category,t.label);e.isAddedToRoster=n.data.INSERTED_ROW_COUNT==1;r.resolve(!0)},function(n){console.error(n.data.Message);console.error(n);e.ExceptionDialogControl!=null?(t!="notag"&&s.setClickInfo("error",t.attribute1,t.attribute2,t.attribute3,"error with adding member to roster",t.category,t.label),e.ExceptionDialogControl.showDialog("Error with adding member to roster.")):(t!="notag"&&s.setClickInfo("error",t.attribute1,t.attribute2,t.attribute3,n.data.Message?n.data.Message.toLowerCase():"an error has occurred",t.category,t.label),bootbox.alert(n.data.Message))}),r.promise};e.addToCalendar=function(n){i({url:"/PatientManagement/AddCalendarMembers/",method:"PUT",data:{LOCATION_ID:n.LOCATION_ID,PROVIDER_ID:n.PROVIDER_ID,DATE_OF_SERVICE:n.DATE_OF_SERVICE,EnrolleeIds:n.ENROLLEE_ID}}).then(function(n){e.isAddedToCalendar=n.data==1},function(n){console.error(n.data.Message);console.error(n);e.ExceptionDialogControl!=null?e.ExceptionDialogControl.showDialog("Error with adding member to calendar."):bootbox.alert(n.data.Message)})};e.addToPatientManagement=function(n,t){var i,r;s.setClickInfo("click","verify member eligibility / start claim or authorization","patient selected - add to patient management button","field_interaction","","button","add to patient management");i={attribute1:"verify member eligibility / start claim or authorization",attribute2:"patient selected - add to patient management button",attribute3:"field_interaction",attribute4:"added to patient management successfully",category:"button",label:"add to patient management"};t!=null&&(n.INSURER_ID=t.INSURER_ID,n.INSURER_NAME=t.INSURER_NAME,n.MEMBER_ID=t.MEMBER_ID,n.PRODUCT_ID=t.PRODUCT_ID,n.PRODUCT_NAME=t.PRODUCT_NAME,n.ENROLLEE_ID=t.ENROLLEE_ID);r=e.addToRoster(n,i);r.then(function(){e.addToCalendar(n)});e.pageSource!=7&&$("#MemberAction"+e.MemberActionId+"Dialog").modal("hide")};e.setSessionProperties=function(n,t){var r=u.defer();return i({url:"/PortalWebSession/SetWebSessionProperties",method:"PUT",data:{SESSION_PROPERTIES:n}}).then(function(n){n.data.Status?(t!="notag"&&s.setClickInfo("success",t.attribute1,t.attribute2,t.attribute3,t.attribute4,t.category,t.label),r.resolve(!0)):(console.error(n.data.Message),console.error(n),e.ExceptionDialogControl!=null?(t!="notag"&&s.setClickInfo("error",t.attribute1,t.attribute2,t.attribute3,"error with setting web session properties",t.category,t.label),e.ExceptionDialogControl.showDialog("Error with setting web session properties.")):(t!="notag"&&s.setClickInfo("error",t.attribute1,t.attribute2,t.attribute3,n.data.Message?n.data.Message.toLowerCase():"an error has occurred",t.category,t.label),bootbox.alert(n.data.Message)),r.reject(!1))},function(n){console.error(n.data.Message);console.error(n);e.ExceptionDialogControl!=null?(t!="notag"&&s.setClickInfo("error",t.attribute1,t.attribute2,t.attribute3,"error with setting web session properties",t.category,t.label),e.ExceptionDialogControl.showDialog("Error with setting web session properties.")):(t!="notag"&&s.setClickInfo("error",t.attribute1,t.attribute2,t.attribute3,n.data.Message?n.data.Message.toLowerCase():"an error has occurred",t.category,t.label),bootbox.alert(n.data.Message));r.reject(!1)}),r.promise};e.openTab=function(t,i,r){var f=Math.floor(Math.random()*100+1),o=n.open("","PopUpWindow"+f,"scrollbars=1,menubar=0,resizable=1,width=920,height=850"),u;r=r||"notag";u=e.setSessionProperties(i,r);u.then(function(){o.location=t},function(){})};e.evaluateStartClaimButtonForTherapy=function(){var n=moment(e.selectedItem.DATE_OF_SERVICE,"MM/DD/YYYY").startOf("day"),t=moment().startOf("day");e.IsFutureDate=n>t};e.showSelectedItemInfo=function(){console.log(e.selectedItem)}}],link:function(n,t,i){n.MemberActionId=i.name!=null?i.name.replace(/ /g,"").replace(/-/g,""):"";n.init()}}}]);app.directive("wbxEligibilityResults",["$timeout","$http",function(n,t){return{restrict:"E",templateUrl:"/Templates/EligibilityResults",scope:{eligibilityResults:"=",dateOfService:"=",locationId:"=",locationName:"=",providerId:"=",providerName:"=",isVision:"=?",isTherapy:"=?",showMemberOnTheFlyRow:"=?",requestToCreateMember:"=?",requestToCreatePrimary:"=?",resultSelect:"&"},controller:["$scope","FeatureFlagService",function(i,r){i.init=function(){i.isVision&&r.getFeatureFlagsForPWPVisionMedicaid().then(function(n){i.isPWPVisionMedicaidEnabled=n.IsVisionMedicaidEnabled})};i.$watchCollection("eligibilityResults",function(t,r){t===r||t==null||(i.isVision&&i.evaluateDateOfService(),i.isVision||i.isTherapy||i.eligibilityResults.length!=1||i.ResultSelect(i.eligibilityResults[0]),n(function(){$("html, body").animate({scrollTop:$("#search-results").offset().top},750)},250))});i.ResultSelect=function(n,t,r,u){if(i.selectedResult=angular.copy(n),i.selectedResult.DATE_OF_SERVICE=i.dateOfService,i.selectedResult.LOCATION_ID=i.locationId,i.selectedResult.LOCATION_NAME=i.locationName,i.selectedResult.PROVIDER_ID=i.providerId,i.selectedResult.PROVIDER_NAME=i.providerName,i.selectedResult.isClaim=r,i.selectedResult.IS_AUTHORIZATION_FLAG=i.selectedResult.isClaim?!1:!0,i.selectedResult.STATUS=n.STATUS,n.PRODUCTS!=null&&n.PRODUCTS.length>1?i.productLevelResults=n.PRODUCTS:(i.selectedResult.INSURER_ID=n.INSURER_ID,i.selectedResult.INSURER_NAME=n.INSURER_NAME,i.selectedResult.MEMBER_ID=n.MEMBER_ID,i.selectedResult.PRODUCT_ID=n.PRODUCT_ID,i.selectedResult.PRODUCT_NAME=n.PRODUCT_NAME,i.productLevelResults=null),i.isVision){if(i.visionInfo.IS_HOLD_MODE=t,(!i.selectedResult.isClaim&&i.selectedResult.IS_AUTHORIZATION_FLAG||i.selectedResult.isClaim&&!i.selectedResult.IS_AUTHORIZATION_FLAG)&&(i.visionInfo.PRICING_REQUEST_ID=u),i.visionInfo.IS_EDIT_MODE=(i.isPastDateOfService||i.isPresentDateOfService)&&!i.visionInfo.IS_HOLD_MODE,i.visionInfo.IS_CLAIM=r,n.PRICING_REQUEST_DATE!=null&&!i.visionInfo.IS_HOLD_MODE&&i.selectedResult.isClaim){var f=moment(n.PRICING_REQUEST_DATE,"MM/DD/YYYY").startOf("day"),e=moment(i.dateOfService,"MM/DD/YYYY").startOf("day");if(e.toString()!=f.toString()){$("#VisionExistingPricingRequestDialog").modal({backdrop:"static"});$("#VisionExistingPricingRequestDialog").modal("show");return}}else i.visionInfo.IsResume=!1;i.visionResultSelect()}else i.resultSelect({selectedResult:i.selectedResult,productLevelResults:i.productLevelResults,visionInfo:null})};i.visionInfo={};i.visionResultSelect=function(){i.ShowStartPricingRequestProcess=!0;i.resultSelect({selectedResult:i.selectedResult,productLevelResults:i.productLevelResults,visionInfo:i.visionInfo})};i.evaluateDateOfService=function(){var n=moment(i.dateOfService,"MM/DD/YYYY").startOf("day"),t=moment().startOf("day");i.isPastDateOfService=t>n;i.isPresentDateOfService=t.toString()==n.toString();i.isFutureDateOfService=t<n};i.cancelExistingPricingRequestDialog=function(){$("#VisionExistingPricingRequestDialog").modal("hide")};i.resumePricingRequest=function(){i.selectedResult.DATE_OF_SERVICE=i.selectedResult.PRICING_REQUEST_DATE;i.visionInfo.IsResume=!0;i.visionInfo.IS_EDIT_MODE=!0;i.visionResultSelect()};i.newPricingRequest=function(){i.visionInfo.IsResume=!1;i.ShowStartPricingRequestProcess=!0;t({url:"/Vision/DeletePricingRequests",method:"PUT",data:{ENROLLEE_ID:i.selectedResult.ENROLLEE_ID,LOCATION_ID:i.selectedResult.LOCATION_ID,PROVIDER_ID:i.selectedResult.PROVIDER_ID}}).then(function(n){n.data.Status?(i.visionInfo.PRICING_REQUEST_ID=null,i.selectedResult.DATE_OF_SERVICE=i.dateOfService,i.visionResultSelect()):(console.error(n.data.Message),console.error(n),i.ExceptionDialogControl!=null?i.ExceptionDialogControl.showDialog("Error with deleting pricing requests."):bootbox.alert(n.data.Message))},function(n){console.error(n.data.Message);console.error(n);i.ExceptionDialogControl!=null?i.ExceptionDialogControl.showDialog("Error with deleting pricing requests."):bootbox.alert(n.data.Message)})};i.createMember=function(){i.requestToCreateMember=!0}}]}}]);app.directive("wbxCalendar",["$filter","$http","$timeout","$q","$window",function(n,t,i,r,u){return{restrict:"E",templateUrl:"/Templates/Calendar",scope:{currentDay:"=",calendarEvents:"=",inputInfo:"=",calendarActionInfo:"=",displayMemberAction:"=",displayMemberLevelResults:"=",selectedItem:"=",memberLevelResults:"=",productLevelResults:"=",isDragAndDropOn:"=",calendarControl:"=",addToCalendarDate:"=",isTherapy:"="},controller:["$scope",function(f){f.timer=null;f.view="month";f.openDay={};f.isISOWeek=function(){return moment().startOf("week").day()===1};f.eventIsInPeriod=function(n,t){return moment(n,"MM/DD/YYYY").isSame(moment(t,"MM/DD/YYYY"))};f.getWeekDayNames=function(t){for(var u=t?"EEE":"EEEE",r=[],e=f.isISOWeek()?22:21,i=0;i<=6;i++)r.push(n("date")(new Date(2014,8,e+i),u));return r};f.getMonthView=function(n,t){function h(){var n=i.day()-a;return n<0&&(n=6),n}for(var o,r,s,a=f.isISOWeek()?1:0,i=moment(new Date(t)).startOf("month"),c=moment(new Date(t)).endOf("month").date(),l=[],u=new Array(7),v=n.map(function(n,t){return n.$id=t,n}),e=1;e<=c;e++){if(e==1)for(r=h(i),o=i.clone();r>0;)r--,o=o.subtract(1,"day"),u[r]={label:o.date(),date:o.clone(),inMonth:!1,events:[]};if(u[h(i)]={label:i.date(),inMonth:!0,isToday:moment().startOf("day").isSame(i),date:i.clone(),events:v.filter(function(n){return f.eventIsInPeriod(n.DATE_OF_SERVICE,i.clone().startOf("day"))})},e==c)for(r=h(i),s=i.clone();r<6;)r++,s=s.add(1,"day"),u[r]={label:s.date(),date:s.clone(),inMonth:!1,events:[]};(h(i)===6||e==c)&&(l.push(u),u=new Array(7));i=i.add(1,"day")}return l};f.toggleEventBreakdown=function(n,t,i){var r=[],e=n[t][i].isOpened,u=null,f=null;return n=n.map(function(n){return n.isOpened=!1,n.map(function(n){return n.isOpened=!1,n})}),n[t][i].events.length>0&&(n[t][i].isOpened=!e,n[t].isOpened=!e,n[t][i].isOpened?(r=n[t][i].events,u=t,f=i):(r=[],u=null,f=null)),{view:n,openEvents:r,selectedRowIndex:u,selectedCellIndex:f}};f.setNoProviderFlag=function(){f.calendarActionInfo.noProvider=!0};f.showMemberAction=function(n,t){f.displayMemberAction=!0;f.selectedItem=n;f.productLevelResults=t;i.cancel(f.timer);f.timer=i(function(){f.displayMemberAction=!1},1e3)};f.showMemberLevelResults=function(n,t){f.memberLevelResults=n;f.memberLevelResults.DATE_OF_SERVICE=t;f.displayMemberLevelResults=!0;i.cancel(f.timer);f.timer=i(function(){f.displayMemberLevelResults=!1},1e3)};f.updateView=function(){f.calendarEvents!=null&&(f.calendarView=f.getMonthView(f.calendarEvents,f.currentDay,f.useIsoWeek))};f.updateDayView=function(){f.openDay.rowIndex!=null&&f.openDay.cellIndex!=null&&(f.openDay.rowIndex!=f.selectedRowIndex||f.openDay.cellIndex!=f.selectedCellIndex)&&f.dayClicked(f.openDay.rowIndex,f.openDay.cellIndex)};f.$watchCollection("[openDay.rowIndex, openDay.cellIndex]",f.updateDayView);f.$watch("calendarEvents",f.updateView);f.weekDays=f.getWeekDayNames(!0);f.dayClicked=function(t,i){var r=f.toggleEventBreakdown(f.calendarView,t,i);f.calendarView=r.view;f.openEvents=r.openEvents;f.openEvents.calendarMemberSearchText="";f.openEvents.sortColumn="LAST_NAME";f.openEvents.reverse=!1;f.selectedRowIndex=r.selectedRowIndex;f.selectedCellIndex=r.selectedCellIndex;f.currentDay=n("date")(f.calendarView[t][i].date._d,"MM/dd/yyyy");f.addToCalendarDate=f.currentDay};f.calendarControl.dropCallBack=function(n,t,i){var r=null,u=null;i&&(f.calendarView=f.getMonthView(f.calendarEvents,f.currentDay,f.useIsoWeek));angular.forEach(f.calendarView,function(n,i){angular.forEach(n,function(n,f){n.inMonth&&moment(new Date(t)).startOf("day").isSame(n.date.startOf("day"))&&(r=i,u=f)})});f.calendarDropCallback(n,r,u)};f.calendarDropCallback=function(t,i,r){if(t.DATE_OF_SERVICE==n("date")(f.calendarView[i][r].date._d,"MM/dd/yyyy"))return!1;if(f.inputInfo.PROVIDER_ID==-1)return f.setNoProviderFlag(),!1;var u=!1,e=f.calendarView[i][r].events;return e.length>0&&angular.forEach(e,function(n){n.LAST_NAME==t.LAST_NAME&&n.FIRST_NAME==t.FIRST_NAME&&n.DOB==t.DOB&&(u=!0)}),u?f.actionStatus(null,0,1,i,r):(t.bucketIndex=null,f.addCalendarMembers(t,i,r)),!1};f.calendarEventsDropCallback=function(t){if(t.DATE_OF_SERVICE==n("date")(f.calendarView[f.selectedRowIndex][f.selectedCellIndex].date._d,"MM/dd/yyyy"))return!1;if(f.inputInfo.PROVIDER_ID==-1)return f.setNoProviderFlag(),!1;if(f.selectedRowIndex==null||f.selectedCellIndex==null)return!1;var i=!1;return f.openEvents=f.calendarView[f.selectedRowIndex][f.selectedCellIndex].events,f.openEvents.length>0&&angular.forEach(f.openEvents,function(n){n.LAST_NAME==t.LAST_NAME&&n.FIRST_NAME==t.FIRST_NAME&&n.DOB==t.DOB&&(i=!0)}),i?f.actionStatus(null,0,1,f.selectedRowIndex,f.selectedCellIndex):(t.bucketIndex=null,f.addCalendarMembers(t,f.selectedRowIndex,f.selectedCellIndex)),!1};f.addCalendarMembers=function(i,r,u){var o=[],e;i.LOCATION_ID=f.inputInfo.LOCATION_ID;i.LOCATION_NAME=f.inputInfo.selectedLocation.NAME;i.PROVIDER_ID=f.inputInfo.PROVIDER_ID;i.PROVIDER_NAME=f.inputInfo.selectedProvider.NAME;i.DATE_OF_SERVICE=n("date")(f.calendarView[r][u].date._d,"MM/dd/yyyy");o.push(i);e="";angular.forEach(o,function(n){e!=""&&(e+="|");e+=n.ENROLLEE_ID});t({url:"/PatientManagement/AddCalendarMembers/",method:"PUT",data:{LOCATION_ID:f.inputInfo.LOCATION_ID,PROVIDER_ID:f.inputInfo.PROVIDER_ID,DATE_OF_SERVICE:i.DATE_OF_SERVICE,EnrolleeIds:e}}).then(function(n){f.actionStatus(o,n.data,1-n.data,r,u)},function(n){console.error(n.data.Message);console.error(n);f.ExceptionDialogControl!=null?f.ExceptionDialogControl.showDialog("Error with adding member to calendar."):bootbox.alert(n.data.Message)})};f.actionStatus=function(t,r,u,e,o){f.calendarActionInfo.addedCount=r;f.calendarActionInfo.existCount=u;f.calendarActionInfo.addedDate=n("date")(f.calendarView[e][o].date._d,"MM/dd/yyyy");r>0&&t!=null&&t.length>0&&(f.openDay={rowIndex:e,cellIndex:o},angular.forEach(t,function(n){f.calendarView[e][o].events.push(n)}));i.cancel(f.timer);f.timer=i(function(){f.calendarActionInfo.addedCount=0;f.calendarActionInfo.existCount=0;f.calendarActionInfo.addedDate=null},3e3)};f.deleteCalendarMembers=function(n){f.$parent.isImpersonation||t({url:"/PatientManagement/DeleteCalendarMembers",method:"PUT",data:{LOCATION_ID:n.LOCATION_ID,PROVIDER_ID:n.PROVIDER_ID,DATE_OF_SERVICE:n.DATE_OF_SERVICE,EnrolleeIds:n.ENROLLEE_ID}}).then(function(){var t=f.openEvents.indexOf(n);f.openEvents.splice(t,1);f.openEvents.length<=0&&f.dayClicked(f.selectedRowIndex,f.selectedCellIndex)},function(n){console.error(n.data.Message);console.error(n);f.ExceptionDialogControl!=null?f.ExceptionDialogControl.showDialog("Error with deleting member from calendar."):bootbox.alert(n.data.Message)})};f.sort=function(n){f.openEvents.reverse=f.openEvents.sortColumn!=n?!1:!f.openEvents.reverse;f.openEvents.sortColumn=n};f.select=function(n){f.selectedItem=null;f.productLevelResults=null;f.memberLevelResults=null;t({cache:!1,url:"/Welcome/MemberEligibilitySearch/",method:"POST",data:{LAST_NAME:n.LAST_NAME,FIRST_NAME:n.FIRST_NAME,DOB:n.DOB,SUBSCRIBER_ID:null,DATE_OF_SERVICE:n.DATE_OF_SERVICE,LOCATION_ID:n.LOCATION_ID,PROVIDER_ID:n.PROVIDER_ID,SSN:null,ENROLLEE_ID:f.isTherapy||f.isShowingLimitSearchResultsTo1?n.ENROLLEE_ID:null,Log:!1}}).then(function(t){if(t.data.EligibilityResultList.length==1){var i=t.data.EligibilityResultList[0];i.PROVIDER_ID=n.PROVIDER_ID;i.PROVIDER_NAME=n.PROVIDER_NAME;i.LOCATION_ID=n.LOCATION_ID;i.LOCATION_NAME=n.LOCATION_NAME;i.DATE_OF_SERVICE=n.DATE_OF_SERVICE;i.PRODUCTS!=null&&i.PRODUCTS.length>1?f.productLevelResults=i.PRODUCTS:(i.INSURER_ID=i.INSURER_ID,i.INSURER_NAME=i.INSURER_NAME,i.MEMBER_ID=i.MEMBER_ID,i.PRODUCT_ID=i.PRODUCT_ID,i.PRODUCT_NAME=i.PRODUCT_NAME,f.productLevelResults=null);f.showMemberAction(i,f.productLevelResults)}else f.showMemberLevelResults(t.data.EligibilityResultList,n.DATE_OF_SERVICE)},function(n){console.error(n.data.Message);console.error(n);f.ExceptionDialogControl!=null?f.ExceptionDialogControl.showDialog("Error with deleting member from calendar."):bootbox.alert(n.data.Message)})};f.verifyEligibilityBulk=function(){f.showBulkLoading=!0;t({method:"POST",url:"/PatientManagement/VerifyEligibilityBulk",params:{LOCATION_ID:f.inputInfo.LOCATION_ID,DATE_OF_SERVICE:n("date")(f.calendarView[f.selectedRowIndex][f.selectedCellIndex].date._d,"MM/dd/yyyy")}}).then(function(n){f.showBulkLoading=!1;n.data.length>0?angular.forEach(f.openEvents,function(t){var i=_.find(n.data,function(n){return t.LAST_NAME==n.LAST_NAME&&t.FIRST_NAME==n.FIRST_NAME&&t.DOB==n.DOB});t.STATUS=i.ENROLLEE_COUNT>1?3:i.STATUS}):(console.error(n.data.Message),console.error(n),f.ExceptionDialogControl!=null?f.ExceptionDialogControl.showDialog("Error with bulk verifying eligibility."):bootbox.alert(n.data.Message))},function(n){console.error(n.data.Message);console.error(n);f.ExceptionDialogControl!=null?f.ExceptionDialogControl.showDialog("Error with bulk verifying eligibility."):bootbox.alert(n.data.Message)})};f.openTab=function(n,t,i){var o=Math.floor(Math.random()*100+1),r,e;r=i?u.open(""):u.open("","PopUpWindow"+o,"scrollbars=1,menubar=0,resizable=1,width=920,height=850");e=f.setSessionProperties(t);e.then(function(){r.location=n},function(){})};f.printCalendarRoster=function(t){var u=n("date")(f.calendarView[f.selectedRowIndex][f.selectedCellIndex].date._d,"MM/dd/yyyy"),r=[],i={SESSION_NAME:"REPORT_PATIENT_CALENDAR_ROSTER_LOCATION_ID",SESSION_VALUE:f.inputInfo.LOCATION_ID};r.push(i);i={SESSION_NAME:"REPORT_PATIENT_CALENDAR_ROSTER_PROVIDER_ID",SESSION_VALUE:f.inputInfo.PROVIDER_ID!=-1?f.inputInfo.PROVIDER_ID:""};r.push(i);i={SESSION_NAME:"REPORT_PATIENT_CALENDAR_ROSTER_DATE_OF_SERVICE",SESSION_VALUE:u};r.push(i);i={SESSION_NAME:"REPORT_PATIENT_CALENDAR_ROSTER_IS_EXCEL",SESSION_VALUE:t};r.push(i);f.openTab("/Areas/PWP/Reports/PatientCalendarRoster.aspx",r,t)};f.setSessionProperties=function(n){var i=r.defer();return t({url:"/PortalWebSession/SetWebSessionProperties",method:"PUT",data:{SESSION_PROPERTIES:n}}).then(function(n){n.data.Status?i.resolve(!0):(console.error(n.data.Message),console.error(n),f.ExceptionDialogControl!=null?f.ExceptionDialogControl.showDialog("Error with setting web session properties."):bootbox.alert(n.data.Message),i.reject(!1))},function(n){console.error(n.data.Message);console.error(n);f.ExceptionDialogControl!=null?f.ExceptionDialogControl.showDialog("Error with setting web session properties."):bootbox.alert(n.data.Message);i.reject(!1)}),i.promise}}]}}]);app.directive("wbxAddressFields",["$http","$timeout",function(n){return{restrict:"E",templateUrl:"/Templates/AddressFields",require:"^form",scope:{data:"=",control:"=",formType:"=?",stateList:"=?"},controller:["$scope",function(){}],link:function(t,i,r,u){t.address_form=u;t.control=t.control||{};t.control.populateStateList=function(){t.stateList==null&&(t.LoadingStateList=!0,n({method:"GET",url:"/PortalDropList/GetStates"}).then(function(n){t.stateList=n.data;t.LoadingStateList=!1},function(n){console.error(n.data.Message);console.error(n);$scope.ExceptionDialogControl!=null?$scope.ExceptionDialogControl.showDialog("Error with populating state dropdown."):bootbox.alert(n.data.Message);t.LoadingStateList=!1}))}}}}]);app.directive("wbxPayeeLocationForm",["$http","$timeout",function(n,t){return{restrict:"E",templateUrl:"/Templates/PayeeLocationForm",scope:{data:"=",formType:"=",isVision:"=?",cancelButton:"&",submitButton:"&"},controller:["$scope",function(i){i.init=function(){i.populateStateList()};i.populateStateList=function(){i.stateList=null;n({method:"GET",url:"/PortalDropList/GetStates"}).then(function(n){i.stateList=n.data},function(n){console.error(n.data.Message);console.error(n);i.ExceptionDialogControl!=null?i.ExceptionDialogControl.showDialog("Error with populating state dropdown."):bootbox.alert(n.data.Message)})};i.submit=function(){if(i.payee_location_form.$invalid)return!1;i.payee_location_form.$setPristine();i.isVision&&i.formType!="shipping"&&(i.data.LOCATION_HOURS=[],_.each(i.data.HOURS,function(n,t){i.data.LOCATION_HOURS.push({DAY:t,HR_END1:n.HR_END1,HR_END2:n.HR_END2,HR_START1:n.HR_START1,HR_START2:n.HR_START2})}));i.submitButton({data:i.data})};i.cancel=function(){i.payee_location_form.emailTextBox.$invalid&&($("#emailTextBox")[0].value="");i.payee_location_form.$setPristine();i.cancelButton()};i.remove=function(){i.payee_location_form.$setPristine();i.submitButton({data:null})};i.getLanguages=function(){i.loadingLanguagesDropDown=!0;n({method:"GET",url:"/DropList/GetLanguages"}).then(function(n){i.loadingLanguagesDropDown=!1;i.languageList=n.data;i.setSelect2_Language()},function(n){console.error(n.data.Message);console.error(n);i.ExceptionDialogControl!=null?i.ExceptionDialogControl.showDialog("Error with populating language dropdown."):bootbox.alert(n.data.Message);i.loadingLanguagesDropDown=!1})};i.setSelect2_Language=function(){$(".wbx-select2-language").select2()};i.$watchCollection("isVision + formType",function(){i.isVision&&i.formType=="location"&&i.formType!="shipping"&&i.getLanguages()});i.$watchCollection("data.LANGUAGES",function(){t(function(){i.setSelect2_Language()},100)})}]}}]);app.directive("wbxProviderForm",["$http","$timeout",function(n,t){return{restrict:"E",templateUrl:"/Templates/ProviderForm",scope:{providerData:"=",isVision:"=",cancelButton:"&",submitButton:"&"},controller:["$scope",function(i){i.submit=function(){if(i.provider_form.$invalid)return!1;i.provider_form.$setPristine();i.submitButton({data:i.providerData})};i.cancel=function(){i.provider_form.emailTextBox.$invalid&&($("#emailTextBox")[0].value="");i.provider_form.$setPristine();i.cancelButton()};i.getSpecialties=function(){i.loadingSpecialtiesDropDown=!0;n({method:"GET",url:"/DropList/GetSpecialties"}).then(function(n){i.loadingSpecialtiesDropDown=!1;i.specialtyList=n.data;i.setSelect2_Specialty()},function(n){console.error(n.data.Message);console.error(n);i.ExceptionDialogControl!=null?i.ExceptionDialogControl.showDialog("Error with populating specialty dropdown."):bootbox.alert(n.data.Message);i.loadingSpecialtiesDropDown=!1})};i.setSelect2_Specialty=function(){$(".wbx-select2-specialty").select2({tags:!0})};i.$watch("isVision",function(n){n&&i.getSpecialties()});i.$watchCollection("providerData.SPECIALTIES",function(){t(function(){i.setSelect2_Specialty()},100)})}]}}]);app.directive("wbxOfficeContactFormDialog",["$http","$timeout",function(n){return{restrict:"E",templateUrl:"/Templates/OfficeContactFormDialog",scope:{control:"=",officeContactData:"=",isEdit:"=",isImpersonation:"=",submitButton:"&",cancelButton:"&?"},controller:["$scope",function(t){t.submit=function(){if(!t.isImpersonation){if(t.office_contact_form.$invalid)return!1;t.ShowCreatingOfficeContactProcessingMsg=!0;t.officeContactData.EMAIL!=null&&t.officeContactData.EMAIL.trim()==""&&(t.officeContactData.EMAIL=null);t.isEdit?n({url:"/EntityManagement/UpdateOfficeContact",method:"PUT",data:{OFFICE_CONTACT_ID:t.officeContactData.OFFICE_CONTACT_ID,FIRST_NAME:t.officeContactData.FIRST_NAME,LAST_NAME:t.officeContactData.LAST_NAME,VOICE_PHONE:t.officeContactData.VOICE_PHONE,FAX_PHONE:t.officeContactData.FAX_PHONE,EMAIL:t.officeContactData.EMAIL}}).then(function(n){t.ShowCreatingOfficeContactProcessingMsg=!1;n.data.Status?t.control.hideDialog():(console.error(n.data.Message),console.error(n),t.ExceptionDialogControl!=null?t.ExceptionDialogControl.showDialog("Error with updating office contact."):bootbox.alert(n.data.Message));t.submitButton({data:t.officeContactData})},function(n){console.error(n.data.Message);console.error(n);t.ExceptionDialogControl!=null?t.ExceptionDialogControl.showDialog("Error with updating office contact."):bootbox.alert(n.data.Message);t.ShowCreatingOfficeContactProcessingMsg=!1}):n({url:"/EntityManagement/CreateOfficeContact",method:"PUT",data:{LOCATION_ID:t.officeContactData.LOCATION_ID,FIRST_NAME:t.officeContactData.FIRST_NAME,LAST_NAME:t.officeContactData.LAST_NAME,VOICE_PHONE:t.officeContactData.VOICE_PHONE,FAX_PHONE:t.officeContactData.FAX_PHONE,EMAIL:t.officeContactData.EMAIL}}).then(function(n){t.ShowCreatingOfficeContactProcessingMsg=!1;n.data.Status?(t.officeContactData.OFFICE_CONTACT_ID=n.data.Data.OFFICE_CONTACT_ID,t.control.hideDialog()):(console.error(n.data.Message),console.error(n),t.ExceptionDialogControl!=null?t.ExceptionDialogControl.showDialog("Error with creating office contact."):bootbox.alert(n.data.Message));t.submitButton({data:t.officeContactData})},function(n){console.error(n.data.Message);console.error(n);t.ExceptionDialogControl!=null?t.ExceptionDialogControl.showDialog("Error with creating office contact."):bootbox.alert(n.data.Message);t.ShowCreatingOfficeContactProcessingMsg=!1});t.office_contact_form.$setPristine()}};t.cancel=function(){t.office_contact_form.emailTextBox.$invalid&&($("#emailTextBox")[0].value="");t.ShowCreatingOfficeContactProcessingMsg=!1;t.office_contact_form.$setPristine();t.control.hideDialog();t.cancelButton!=null&&t.cancelButton()}}],link:function(n){n.control=n.control||{};n.control.showDialog=function(){$("#office-contact-dialog").modal({backdrop:"static"});$("#office-contact-dialog").modal("show")};n.control.hideDialog=function(){$("#office-contact-dialog").modal("hide")}}}}]);app.directive("wbxSelectGroupDialog",["$http","$timeout","$window",function(n,t,i){return{restrict:"E",templateUrl:"/Templates/SelectGroupDialog",scope:{selectgroupData:"=",alerts:"=",alertMessages:"=",openClose:"=",redirect:"=",cancelButton:"&",submitButton:"&"},controller:["$scope",function(r){r.submit=function(){if(r.selectgroup_form.$invalid)return!1;r.selectgroup_form.$setPristine();r.submitButton({data:r.selectgroupData})};r.cancel=function(){};r.setgroup=function(u,f){t(function(){n({method:"PUT",url:"/MWP/EnrollmentSummary/SetGroup",params:{groupId:u,planId:f}}).then(function(n){n=n.data;r.cancel();r.openClose=!1;r.redirect!=""&&(i.location=r.redirect)},function(n){bootbox.alert(n)})})};r.$watch("selectgroup_form.$pristine",function(n,t){n==t||n||(r.alerts={},r.alertMessages={})});r.$watch("openClose",function(t){t!=null&&(t?($("#selectgroup-dialog").modal({keyboard:!1,backdrop:"static"}),n({method:"GET",url:"/MWP/EnrollmentSummary/GetGroups"}).then(function(n){r.groupsList=n.data},function(n){bootbox.alert(n)}),$("#selectgroup-dialog").modal("show")):$("#selectgroup-dialog").modal("hide"))})}]}}]);app.directive("wbxClaimAuthSearchCriteria",["$location",function(){return{restrict:"E",templateUrl:"/Templates/ClaimAuthSearchCriteria",scope:{statusList:"=",isClaim:"=",searchResults:"=",showSearchResultsLoading:"=",searchText:"=",sessions:"="},controller:["$scope","$http","$location","$timeout","GoogleTagManagerService",function(n,t,i,r,u){n.searchCriteria={};n.collapsePanels={isCollapsed:!1};n.init=function(t){n.ShowSearchCriteria=!0;n.clearSearchCriteria();n.searchResults=null;n.searchText="";t?(n.isClaim?u.setPageInfo("Claim Search"):u.setPageInfo("Authorization Search"),r(function(){n.sessions.IS_FACILITY_SUBTYPE?$(".wbx-select2-facility").select2():($(".wbx-select2-location").select2(),$(".wbx-select2-provider").select2())}),n.populateStatusList(),n.populateSearchCriteriaList()):(n.sessions.IS_FACILITY_SUBTYPE?n.autoSetFacility():(n.autoSetLocation(),n.autoSetProvider()),n.autoSetInsurer(),n.autoSetProcessingStatus())};n.autoSetLocation=function(){n.searchCriteria.LOCATION_ID=n.LocationList.length==2?n.LocationList[1].LOCATION_ID:-1;n.setSelect2_Location();n.IsLocationSet=!0};n.autoSetProvider=function(){n.searchCriteria.PROVIDER_ID=n.ProviderList.length==2?n.ProviderList[1].PROVIDER_ID:-1;n.setSelect2_Provider();n.IsProviderSet=!0};n.autoSetFacility=function(){n.searchCriteria.FACILITY_ID=n.FacilityList.length==2?n.FacilityList[1].FACILITY_ID:-1;n.setSelect2_Facility();n.IsFacilitySet=!0};n.autoSetInsurer=function(){n.InsurerList.length==1&&angular.forEach(n.InsurerList,function(t){t.INSURER_ID==n.InsurerList[0].INSURER_ID&&(n.searchCriteria.insurer=t)});n.IsInsurerSet=!0};n.autoSetProcessingStatus=function(){n.statusList.length==1&&angular.forEach(n.statusList,function(t){t.PORTAL_STATUS==n.statusList[0].PORTAL_STATUS&&(n.searchCriteria.Status=t)});n.IsProcessingStatusSet=!0};n.setSelect2_Location=function(){r(function(){$(".wbx-select2-location").select2({escapeMarkup:function(n){return n},templateResult:function(t){if(t.text!=""){if(t.id==-1)return $("<span><b>"+t.text+"<\/b> <br /><\/span>");var r="",i=_.findWhere(n.LocationList,{LOCATION_ID:parseInt(t.id)});return i!=null&&(r=$("<span><b>"+i.NAME+"<\/b> <br />"+i.ADDRESS1+", "+i.CITY+", "+i.STATE+" "+i.ZIP+"<\/span>")),r}},templateSelection:function(){var i="",t=_.findWhere(n.LocationList,{LOCATION_ID:n.searchCriteria.LOCATION_ID});return t!=null&&(i=t.LOCATION_ID==-1?t.NAME:$('<span title="'+t.NAME+"&#10;"+t.ADDRESS1+" "+t.CITY+" "+t.STATE+","+t.ZIP+'"><b>'+t.NAME+"<\/b> ("+t.CITY+", "+t.STATE+", "+t.ZIP+")<\/span>")),i}})})};n.setSelect2_Provider=function(){r(function(){$(".wbx-select2-provider").select2({escapeMarkup:function(n){return n},templateResult:function(n){if(n.text!="")return n.text},templateSelection:function(){var i="",t=_.findWhere(n.ProviderList,{PROVIDER_ID:n.searchCriteria.PROVIDER_ID});return t!=null&&(i=$('<span title="'+t.FIRST_NAME+" "+t.LAST_NAME+'">'+t.FIRST_NAME+" "+t.LAST_NAME+"<\/span>")),i}})})};n.setSelect2_Facility=function(){r(function(){$(".wbx-select2-facility").select2({escapeMarkup:function(n){return n},templateResult:function(t){if(t.text!=""){if(t.id==-1)return $("<span><b>"+t.text+"<\/b> <br /><\/span>");var r="",i=_.findWhere(n.FacilityList,{FACILITY_ID:parseInt(t.id)});return i!=null&&(r=$("<span><b>"+i.NAME+"<\/b> <br />"+i.ADDRESS1+", "+i.CITY+", "+i.STATE+" "+i.ZIP+"<\/span>")),r}},templateSelection:function(){var i="",t=_.findWhere(n.FacilityList,{FACILITY_ID:n.searchCriteria.FACILITY_ID});return t!=null&&(i=t.FACILITY_ID==-1?t.NAME:$('<span title="'+t.NAME+"&#10;"+t.ADDRESS1+" "+t.CITY+" "+t.STATE+","+t.ZIP+'"><b>'+t.NAME+"<\/b> ("+t.CITY+", "+t.STATE+", "+t.ZIP+")<\/span>")),i}})})};n.showResults=function(){console.log(n.searchResults)};n.formErrors=function(n,t,i){for(var r=0;r<i.length;r++)t.push({"form field":n,name:i[r].$name,untouched:i[r].$untouched,touched:i[r].$touched,pristine:i[r].$pristine,dirty:i[r].$dirty,valid:i[r].$valid,invalid:i[r].$invalid,error:i[r].$error,success:i[r].$success});return t};n.performSearch=function(){if(u.setClickInfo("click","claim search","search button","field_interaction","","button","search"),n.search_form.$invalid){var i=[];return n.search_form.$error.hasOwnProperty("isAfter")&&n.formErrors("isAfter",i,n.search_form.$error.isAfter),n.search_form.$error.hasOwnProperty("isNotFuture")&&n.formErrors("isNotFuture",i,n.search_form.$error.isNotFuture),u.setClickInfo("error","claim search","search button","field_interaction",i,"button","search"),!0}n.searchResults=[];n.showSearchResultsLoading=!0;n.isClaim?t({method:"GET",url:"/ClaimAuthSearch/SearchClaims",params:{PORTAL_STATUS:n.searchCriteria.Status!=null?n.searchCriteria.Status.PORTAL_STATUS:null,ENCOUNTER_ID:n.searchCriteria.ENCOUNTER_ID,SERVICE_DATE_FROM:n.searchCriteria.SERVICE_DATE_FROM,SERVICE_DATE_TO:n.searchCriteria.SERVICE_DATE_TO,ENTERED_DATE_FROM:n.searchCriteria.ENTERED_DATE_FROM,ENTERED_DATE_TO:n.searchCriteria.ENTERED_DATE_TO,DATE_PAID_FROM:n.searchCriteria.DATE_PAID_FROM,DATE_PAID_TO:n.searchCriteria.DATE_PAID_TO,FIRST_NAME:n.searchCriteria.FIRST_NAME,LAST_NAME:n.searchCriteria.LAST_NAME,SUBSCRIBER_ID:n.searchCriteria.SUBSCRIBER_ID,MEMBER_ID:n.searchCriteria.MEMBER_ID,INSURER_ID:n.searchCriteria.insurer!=null?n.searchCriteria.insurer.INSURER_ID:null,LOCATION_ID:n.searchCriteria.LOCATION_ID!=-1?n.searchCriteria.LOCATION_ID:null,PROVIDER_ID:n.searchCriteria.PROVIDER_ID!=-1?n.searchCriteria.PROVIDER_ID:null,FACILITY_ID:n.searchCriteria.FACILITY_ID!=-1?n.searchCriteria.FACILITY_ID:null}}).then(function(t){u.setClickInfo("success","claim search","search button","field_interaction","search generated successfully","button","search");t.data.length>0&&(n.searchResults=t.data);r(function(){$("html, body").animate({scrollTop:$("#claim-auth-results").offset().top},750)},250);n.showSearchResultsLoading=!1;n.search_form.$setPristine()},function(t){console.error(t.data.Message);console.error(t);n.ExceptionDialogControl!=null?(u.setClickInfo("error","claim search","search button","field_interaction","error with claim search","button","search"),n.ExceptionDialogControl.showDialog("Error with claim search.")):(u.setClickInfo("error","claim search","search button","field_interaction",t.data.Message?t.data.Message.toLowerCase():"an error has occurred","button","search"),bootbox.alert(t.data.Message));n.showSearchResultsLoading=!1;n.search_form.$setPristine()}):t({method:"GET",url:"/ClaimAuthSearch/SearchAuths",params:{AUTHORIZATION_STATUS_ID:n.searchCriteria.Status!=null?n.searchCriteria.Status.PORTAL_STATUS:null,AUTHORIZATION_NUMBER:n.searchCriteria.AUTHORIZATION_NUMBER,SERVICE_DATE_FROM:n.searchCriteria.ANTICIPATED_SERVICE_DATE_FROM,SERVICE_DATE_TO:n.searchCriteria.ANTICIPATED_SERVICE_DATE_TO,ENTERED_DATE_FROM:n.searchCriteria.ENTERED_DATE_FROM,ENTERED_DATE_TO:n.searchCriteria.ENTERED_DATE_TO,DETERMINATION_DATE_FROM:n.searchCriteria.DETERMINATION_DATE_FROM,DETERMINATION_DATE_TO:n.searchCriteria.DETERMINATION_DATE_TO,FIRST_NAME:n.searchCriteria.FIRST_NAME,LAST_NAME:n.searchCriteria.LAST_NAME,SUBSCRIBER_ID:n.searchCriteria.SUBSCRIBER_ID,MEMBER_ID:n.searchCriteria.MEMBER_ID,INSURER_ID:n.searchCriteria.insurer!=null?n.searchCriteria.insurer.INSURER_ID:null,LOCATION_ID:n.searchCriteria.LOCATION_ID!=-1?n.searchCriteria.LOCATION_ID:null,PROVIDER_ID:n.searchCriteria.PROVIDER_ID!=-1?n.searchCriteria.PROVIDER_ID:null}}).then(function(t){t.data.length>0&&(u.setClickInfo("success","claim search","search button","field_interaction","search generated successfully","button","search"),n.searchResults=t.data,n.sessions.IS_THERAPY&&angular.forEach(n.searchResults,function(n){n.IS_MULTIPLE_SERVICE_LINES?(n.Italicize={"font-style":"italic"},n.TREATMENT_TYPE="(Multiple)",n.TT_SORT="Multiple",n.TT_SEARCH="(Multiple)"):n.TREATMENT_TYPE=="SP"&&(n.TREATMENT_TYPE="Splint",n.TT_SORT="Splint",n.TT_SEARCH="Splint");var t=moment().startOf("day"),i=moment(n.DATE_OF_SERVICE_FROM,"MM/DD/YYYY").startOf("day");n.EnableStartClaim=i<=t}));r(function(){$("html, body").animate({scrollTop:$("#claim-auth-results").offset().top},750)},250);n.showSearchResultsLoading=!1;n.search_form.$setPristine()},function(t){console.error(t.data.Message);console.error(t);n.ExceptionDialogControl!=null?(u.setClickInfo("error","claim search","search button","field_interaction","error with auth search","button","search"),n.ExceptionDialogControl.showDialog("Error with auth search.")):(u.setClickInfo("error","claim search","search button","field_interaction",t.data.Message?t.data.Message.toLowerCase():"an error has occurred","button","search"),bootbox.alert(t.data.Message));n.showSearchResultsLoading=!1;n.search_form.$setPristine()})};n.clear=function(){u.setClickInfo("click","claim search","clear filters button","field_interaction","","button","clear filters");n.init(!1);n.search_form.$setPristine()};n.populateStatusList=function(){n.StatusesToLoad=n.isClaim?[{PORTAL_PROCESSING_TYPE:1,TITLE:"Claim Status"}]:[{PORTAL_PROCESSING_TYPE:2,TITLE:"Authorization Status"}]};n.clearSearchCriteria=function(){n.searchCriteria.Status=null;n.InsurerList!=null&&n.InsurerList.length>1&&(n.searchCriteria.insurer=null);n.searchCriteria.ENCOUNTER_ID="";n.searchCriteria.AUTHORIZATION_NUMBER="";n.searchCriteria.SERVICE_DATE_FROM="";n.searchCriteria.SERVICE_DATE_TO="";n.searchCriteria.ANTICIPATED_SERVICE_DATE_FROM="";n.searchCriteria.ANTICIPATED_SERVICE_DATE_TO="";n.searchCriteria.ENTERED_DATE_FROM="";n.searchCriteria.ENTERED_DATE_TO="";n.searchCriteria.DATE_PAID_FROM="";n.searchCriteria.DATE_PAID_TO="";n.searchCriteria.DETERMINATION_DATE_FROM="";n.searchCriteria.DETERMINATION_DATE_TO="";n.searchCriteria.FIRST_NAME="";n.searchCriteria.LAST_NAME="";n.searchCriteria.SUBSCRIBER_ID="";n.searchCriteria.MEMBER_ID="";n.sessions.IS_FACILITY_SUBTYPE?n.FacilityList!=null&&n.FacilityList.length>2&&n.searchCriteria.FACILITY_ID!=-1&&(n.searchCriteria.FACILITY_ID=-1,n.setSelect2_Facility()):n.searchCriteria.LOCATION_ID!=null&&n.searchCriteria.PROVIDER_ID!=null&&(n.searchCriteria.LOCATION_ID==-1&&(n.ProviderList.length==2&&n.searchCriteria.PROVIDER_ID!=n.ProviderList[1].PROVIDER_ID||n.ProviderList.length!=2&&n.searchCriteria.PROVIDER_ID!=-1)?(n.searchCriteria.PROVIDER_ID=n.ProviderList.length==2?n.ProviderList[1].PROVIDER_ID:-1,n.setSelect2_Provider()):(n.LocationList.length==2&&n.searchCriteria.LOCATION_ID!=n.LocationList[1].LOCATION_ID||n.LocationList.length!=2&&n.searchCriteria.LOCATION_ID!=-1)&&(n.searchCriteria.LOCATION_ID=-1,n.setSelect2_Location(),n.populateProviderList()))};n.populateSearchCriteriaList=function(){var i={};n.sessions.IS_FACILITY_SUBTYPE?(n.FacilityList=null,n.LoadingFacilityDropDown=!0,i={GET_FACILITY:!0,INCLUDE_FACILITY_OPTION_ALL:!0}):(n.LocationList=null,n.ProviderList=null,n.LoadingLocationDropDown=!0,n.LoadingProviderDropDown=!0,i={GET_LOCATION:!0,INCLUDE_LOCATION_OPTION_ALL:!0,GET_PROVIDER:!0,INCLUDE_PROVIDER_OPTION_ALL:!0});n.InsurerList=null;n.LoadingInsurerDropDown=!0;i.GET_INSURER=!0;t({method:"GET",url:"/DropList/GetSearchCriteriaDropdowns",params:{GET_LOCATION:i.GET_LOCATION,INCLUDE_LOCATION_OPTION_ALL:i.INCLUDE_LOCATION_OPTION_ALL,GET_PROVIDER:i.GET_PROVIDER,INCLUDE_PROVIDER_OPTION_ALL:i.INCLUDE_PROVIDER_OPTION_ALL,GET_FACILITY:i.GET_FACILITY,INCLUDE_FACILITY_OPTION_ALL:i.INCLUDE_FACILITY_OPTION_ALL,GET_INSURER:i.GET_INSURER}}).then(function(t){n.sessions.IS_FACILITY_SUBTYPE?(n.FacilityList=t.data.FacilitiesList,n.autoSetFacility(),n.LoadingFacilityDropDown=!1):(n.LocationList=t.data.LocationsList,n.ProviderList=t.data.ProvidersList,n.autoSetLocation(),n.autoSetProvider(),n.LoadingLocationDropDown=!1,n.LoadingProviderDropDown=!1);n.InsurerList=t.data.InsurerList;n.autoSetInsurer();n.LoadingInsurerDropDown=!1},function(t){console.error(t.data.Message);console.error(t);n.ExceptionDialogControl.showDialog("Error with populating Search Criteria dropdowns.");n.LoadingLocationDropDown=!1;n.LoadingProviderDropDown=!1;n.LoadingFacilityDropDown=!1;n.LoadingInsurerDropDown=!1})};n.locationListOnChange=function(){n.populateProviderList()};n.populateProviderList=function(){n.LoadingProviderDropDown=!0;t({method:"GET",url:"/DropList/GetProviders",params:{locationId:n.searchCriteria.LOCATION_ID!=-1?n.searchCriteria.LOCATION_ID:null,includeOptionAll:!0}}).then(function(t){n.ProviderList=t.data;n.LoadingProviderDropDown=!1;n.autoSetProvider()},function(t){console.error(t.data.Message);console.error(t);n.ExceptionDialogControl!=null?n.ExceptionDialogControl.showDialog("Error with populating provider dropdown."):bootbox.alert(t.data.Message);n.LoadingProviderDropDown=!1})};n.$watch("search_form.$pristine",function(t,i){t==i||t||n.searchResults==null||(n.searchResults=null,n.searchText="")});n.showProcessingStatusDescription=function(){var t="claim status modal";i.absUrl().indexOf("/ClaimDashboard")>-1&&(t="dashboard");i.absUrl().indexOf("/ClaimSearch")>-1&&(t="claim search");u.setClickInfo("click",t,"claim status link","open_modal","","link","what does the claim status mean?");n.StatusTypeToShow=n.isClaim?1:2;n.ShowStatusDescriptionDialog=!0};n.statusListOnChange=function(){n.isClaim&&n.searchCriteria.Status!=null&&n.searchCriteria.Status.PORTAL_STATUS<2?(n.searchCriteria.DATE_PAID_FROM=null,n.searchCriteria.DATE_PAID_TO=null):n.isClaim||n.searchCriteria.Status==null||n.searchCriteria.Status.PORTAL_STATUS!=0||(n.searchCriteria.DETERMINATION_DATE_FROM=null,n.searchCriteria.DETERMINATION_DATE_TO=null)};n.$watchCollection("[IsProcessingStatusSet, IsInsurerSet, IsLocationSet, IsProviderSet, IsFacilitySet, PerformAutoSearch]",function(t,i){t[0]!=null&&t[1]!=null&&t[2]!=null&&t[3]!=null&&t[4]!=null&&t[5]!=null&&(t[0]!=i[0]||t[1]!=i[1]||t[2]!=i[2]||t[3]!=i[3]||t[4]!=i[4]||t[5]!=i[5])&&(n.performSearch(),n.PerformAutoSearch=!1)});n.$watch("AreStatusListLoaded",function(t){var r,f,u;if(t&&(n.statusList=n.StatusDescriptionLists[0].List,n.autoSetProcessingStatus(),!n.isClaim&&(r=i.search(),r!=null)))try{r.searchType!=""&&r.searchType!=null&&(parseInt(r.searchType)<n.statusList.length&&(n.searchCriteria.Status=n.statusList[parseInt(r.searchType)]),r.searchType=="1"&&(f=new Date,u=new Date,u.setDate(u.getDate()-30),n.searchCriteria.DETERMINATION_DATE_FROM=("0"+(u.getMonth()+1)).slice(-2)+"/"+("0"+u.getDate()).slice(-2)+"/"+u.getFullYear(),n.searchCriteria.DETERMINATION_DATE_TO=("0"+(f.getMonth()+1)).slice(-2)+"/"+("0"+f.getDate()).slice(-2)+"/"+f.getFullYear()),n.PerformAutoSearch=!0)}catch(e){}});n.toggleSearchCriteriaPanel=function(){n.collapsePanels.isCollapsed=!n.collapsePanels.isCollapsed;$("#SearchCriteriaBody").collapse("toggle")}}]}}]);app.directive("wbxClaimAuthResults",["$window","$location","$http","$q",function(n,t,i,r){return{restrict:"E",templateUrl:"/Templates/ClaimAuthResults",scope:{statusList:"=",results:"=",isClaim:"=",isSearch:"=",showResultsLoading:"=",searchText:"=",sessions:"="},controller:["$scope","GoogleTagManagerService",function(u,f){u.init=function(){u.sortObject=u.isClaim?{sortColumn:"ENCOUNTER_ID",reverse:!1}:{sortColumn:"AUTHORIZATION_NUMBER",reverse:!0};u.historySortObject={sortColumn:"ENCOUNTER_ID",reverse:!1}};u.sort=function(n){u.sortObject.reverse=u.sortObject.sortColumn!=n?!1:!u.sortObject.reverse;u.sortObject.sortColumn=n};u.sortHistory=function(n){u.historySortObject.reverse=u.historySortObject.sortColumn!=n?!1:!u.historySortObject.reverse;u.historySortObject.sortColumn=n};u.viewClaim=function(n){var i="view claim action",r,e;t.absUrl().indexOf("/ClaimDashboard")>-1&&(i="dashboard");t.absUrl().indexOf("/ClaimSearch")>-1&&(i="claim search");f.setClickInfo("click",i,"view claim icon","field_interaction","","icon","view claim");r={attribute1:i,attribute2:"view claim icon",attribute3:"field_interaction",attribute4:"claim generated successfully",category:"icon",label:"view claim"};e=u.setSessionPropertiesForClaimReport(n);u.openTab("/Areas/PWP/Reports/PortalClaimReport.aspx",e,r)};u.viewAuth=function(n){var i="view auth action",r,e;t.absUrl().indexOf("/ClaimDashboard")>-1&&(i="dashboard");t.absUrl().indexOf("/ClaimSearch")>-1&&(i="claim search");f.setClickInfo("click",i,"view auth icon","field_interaction","","icon","view auth");r={attribute1:i,attribute2:"view auth icon",attribute3:"field_interaction",attribute4:"authorization generated successfully",category:"icon",label:"view auth"};e=u.setSessionPropertiesForAuthReport(n);u.openTab("/Areas/PWP/Reports/PortalAuthReport.aspx",e,r)};u.setSessionPropertiesForClaimReport=function(n){var t=[],i={SESSION_NAME:"REPORT_PORTAL_CLAIM_CLAIM_ID",SESSION_VALUE:n.CLAIM_ID};return t.push(i),i={SESSION_NAME:"REPORT_PORTAL_CLAIM_SERVER_SOURCE",SESSION_VALUE:n.SERVER_SOURCE==undefined?3:n.SERVER_SOURCE},t.push(i),t};u.setSessionPropertiesForAuthReport=function(n){var t=[],i={SESSION_NAME:"REPORT_PORTAL_AUTH_AUTHORIZATION_ID",SESSION_VALUE:n.AUTHORIZATION_ID};return t.push(i),i={SESSION_NAME:"REPORT_PORTAL_AUTH_DB_SOURCE",SESSION_VALUE:n.DB_SOURCE},t.push(i),t};u.setSessionProperties=function(n,t){var e=r.defer();return i({url:"/PortalWebSession/SetWebSessionProperties",method:"PUT",data:{SESSION_PROPERTIES:n}}).then(function(n){n.data.Status?(t!="notag"&&f.setClickInfo("success",t.attribute1,t.attribute2,t.attribute3,t.attribute4,t.category,t.label),e.resolve(!0)):(console.error(n.data.Message),console.error(n),u.ExceptionDialogControl!=null?(t!="notag"&&f.setClickInfo("error",t.attribute1,t.attribute2,t.attribute3,"error with setting web session properties",t.category,t.label),u.ExceptionDialogControl.showDialog("Error with setting web session properties.")):(t!="notag"&&f.setClickInfo("error",t.attribute1,t.attribute2,t.attribute3,n.data.Message?n.data.Message.toLowerCase():"an error has occurred",t.category,t.label),bootbox.alert(n.data.Message)),e.reject(!1))},function(n){t!="notag"&&f.setClickInfo("error",t.attribute1,t.attribute2,t.attribute3,"error with setting web session properties",t.category,t.label);console.error(n.data.Message);console.error(n);u.ExceptionDialogControl!=null?u.ExceptionDialogControl.showDialog("Error with setting web session properties."):bootbox.alert(n.data.Message);e.reject(!1)}),e.promise};u.openTab=function(t,i,r){var e=Math.floor(Math.random()*100+1);if(r=r||"notag",i!=null){var o=n.open("","PopUpWindow"+e,"scrollbars=1,menubar=0,resizable=1,width=920,height=850"),s=setInterval(function(){o.closed&&(clearInterval(s),f.setClickInfo("click","claim dashboard","close window","close_window","","button","close"))},1e3),h=u.setSessionProperties(i,r);h.then(function(){o.location=t},function(){})}else r!="notag"&&f.setClickInfo("success",r.attribute1,r.attribute2,r.attribute3,r.attribute4,r.category,r.label),window.open(t,"PopUpWindow"+e,"scrollbars=1,menubar=0,resizable=1,width=920,height=850")};u.gotoClaimSearch=function(){f.setClickInfo("click","dashboard","search historical claims button","field_interaction","","button","search historical claims");var i=t.absUrl().indexOf("/ClaimDashboard");n.location.href=t.absUrl().substr(0,i)+"/ClaimSearch"};u.startClaim=function(t){f.setClickInfo("click","dashboard","start claim button","field_interaction","","button","start claim");i({url:"/Welcome/SetHomePageData",method:"PUT",data:{AUTHORIZATION_NUMBER:t.AUTHORIZATION_NUMBER,DATA_SOURCE:8}}).then(function(t){t.data.Status?(f.setClickInfo("success","dashboard","start claim button","field_interaction","successful","button","start claim"),n.location.href="/PWP/Therapy/ClaimEntry"):(console.error(t.data.Message),console.error(t),u.ExceptionDialogControl!=null?(f.setClickInfo("error","dashboard","start claim button","field_interaction","error in setting homepage data","button","start claim"),u.ExceptionDialogControl.showDialog("Error in setting homepage data.")):(f.setClickInfo("error","dashboard","start claim button","field_interaction",t.data.Message?t.data.Message.toLowerCase():"an error has occurred","button","start claim"),bootbox.alert(t.data.Message)))},function(n){console.error(n.data.Message);console.error(n);u.ExceptionDialogControl!=null?(f.setClickInfo("error","dashboard","start claim button","field_interaction","error in setting homepage data","button","start claim"),u.ExceptionDialogControl.showDialog("Error in setting homepage data.")):(f.setClickInfo("error","dashboard","start claim button","field_interaction",n.data.Message?n.data.Message.toLowerCase():"an error has occurred","button","start claim"),bootbox.alert(n.data.Message))})};u.correctClaim=function(r){var e="correct claim";t.absUrl().indexOf("/ClaimDashboard")>-1&&(e="dashboard");t.absUrl().indexOf("/ClaimSearch")>-1&&(e="claim search");i({url:"/Welcome/SetHomePageData",method:"PUT",data:{ENCOUNTER_ID:r.ENCOUNTER_ID,claimId:r.CLAIM_ID}}).then(function(i){if(i.data.Status){f.setClickInfo("success",e,"correct claim icon","field_interaction","successful","icon","correct claim");var r=0;t.absUrl().indexOf("/ClaimDashboard")>-1?r=t.absUrl().indexOf("/ClaimDashboard"):t.absUrl().indexOf("/ClaimSearch")>-1&&(r=t.absUrl().indexOf("/ClaimSearch"));r>-1&&(n.location.href=t.absUrl().substr(0,r)+"/ClaimEntry")}else f.setClickInfo("error",e,"correct claim icon","field_interaction","error in setting homepage data","icon","correct claim"),console.error(i.data.Message),console.error(i),u.ExceptionDialogControl!=null?u.ExceptionDialogControl.showDialog("Error in setting homepage data."):bootbox.alert(i.data.Message)},function(n){console.error(n.data.Message);console.error(n);u.ExceptionDialogControl!=null?(f.setClickInfo("error",e,"correct claim icon","field_interaction","error in setting homepage data","icon","correct claim"),u.ExceptionDialogControl.showDialog("Error in setting homepage data.")):(f.setClickInfo("error",e,"correct claim icon","field_interaction",n.data.Message?n.data.Message.toLowerCase():"an error has occurred","icon","correct claim"),bootbox.alert(n.data.Message))})};u.viewClaimHistory=function(n){var r="view claim history action";t.absUrl().indexOf("/ClaimDashboard")>-1&&(r="dashboard");t.absUrl().indexOf("/ClaimSearch")>-1&&(r="claim search");f.setClickInfo("click",r,"view claim history icon","field_interaction","","icon","view claim history");(n.ORIGINAL_CLAIM_ID!=null||n.CLAIM_STATUS==7||n.SERVICE_RESUBMITTED)&&(u.claimHistorySelected=n,u.showClaimHistoryLoading=!0,$("#ClaimHistoryDialog").modal({backdrop:"static"}),$("#ClaimHistoryDialog").modal("show"),i({cache:!1,url:"/ClaimAuthSearch/GetClaimHistory",method:"GET",params:{claimId:n.CLAIM_ID}}).then(function(n){n.data!=null?(f.setClickInfo("success",r,"view claim history icon","field_interaction","view claim history successfully","icon","view claim history"),u.claimHistory=n.data):(console.error(n.data.Message),console.error(n),u.ExceptionDialogControl!=null?(f.setClickInfo("error",r,"view claim history icon","field_interaction","error in getting claim history.","icon","view claim history"),u.ExceptionDialogControl.showDialog("Error in getting claim history.")):(f.setClickInfo("error",r,"view claim history icon","field_interaction",n.data.Message?n.data.Message.toLowerCase():"an error has occurred","icon","view claim history"),bootbox.alert(n.data.Message)));u.showClaimHistoryLoading=!1},function(n){console.error(n.data.Message);console.error(n);u.ExceptionDialogControl!=null?(f.setClickInfo("error",r,"view claim history icon","field_interaction","error in getting claim history.","icon","view claim history"),u.ExceptionDialogControl.showDialog("Error in getting claim history.")):(f.setClickInfo("error",r,"view claim history icon","field_interaction",n.data.Message?n.data.Message.toLowerCase():"an error has occurred","icon","view claim history"),bootbox.alert(n.data.Message));u.showClaimHistoryLoading=!1}))};u.closeClaimHistory=function(){var n="close view claim history";t.absUrl().indexOf("/ClaimDashboard")>-1&&(n="dashboard");t.absUrl().indexOf("/ClaimSearch")>-1&&(n="claim search");f.setClickInfo("click",n,"close view claim history modal","close_modal","","button","close");$("#ClaimHistoryDialog").modal("hide")};u.correctClaimCheck=function(n){var r="correct claim action",e;t.absUrl().indexOf("/ClaimDashboard")>-1&&(r="dashboard");t.absUrl().indexOf("/ClaimSearch")>-1&&(r="claim search");f.setClickInfo("click",r,"correct claim icon","field_interaction","","icon","correct claim");e=n.ROWVERSION;i({cache:!1,url:"/ClaimAuthSearch/GetClaimRowVersion",method:"GET",params:{claimId:n.CLAIM_ID}}).then(function(t){t.data!=null&&t.data[0]==e?(f.setClickInfo("error",r,"correct claim icon","field_interaction","error in getting claim row version","icon","correct claim"),u.ConcurrencyCheckFailedDialogControl.showDialog()):u.correctClaim(n)},function(n){console.error(n.data.Message);console.error(n);u.ExceptionDialogControl!=null?(f.setClickInfo("error",r,"correct claim icon","field_interaction","error in getting claim row version","icon","correct claim"),u.ExceptionDialogControl.showDialog("Error in getting claim row version.")):(f.setClickInfo("error",r,"correct claim icon","field_interaction",n.data.Message?n.data.Message.toLowerCase():"an error has occurred","icon","correct claim"),bootbox.alert(n.data.Message));u.ConcurrencyCheckFailedDialogControl.showDialog()})};u.gotoClaimSearchPage=function(){u.ConcurrencyCheckFailedDialogControl.hideDialog()};u.showInstantEOB=function(n,t){i({url:"/Dental/ViewInstantEOB",method:"POST",data:{DOCUMENT_ID:n,PRECLAIM_ID:t,IS_LOG:!0}}).then(function(n){n.data.Status?u.openTab(n.data.Data.Url):(console.error(n.data.Message),console.error(n),u.ExceptionDialogControl.showDialog("Unexpected error with showing Instant EOB."))},function(n){console.error(n.data.Message);console.error(n);u.ExceptionDialogControl.showDialog("Unexpected error with showing Instant EOB.")})}}]}}]);app.directive("wbxStatusDescriptionDialog",["$http","$window","$timeout","$location",function(n,t,i,r){return{restrict:"E",templateUrl:"/Templates/StatusDescriptionDialog",scope:{statusesToLoad:"=",statusDescriptionLists:"=",statusTypeToShow:"=",showDialog:"=",areStatusListLoaded:"=",sortDescending:"=?"},controller:["$scope","GoogleTagManagerService",function(t,i){t.sortDescending=t.sortDescending||!1;t.getStatusList=function(i){n({method:"GET",url:"/PortalDropList/GetPortalProcessingStatuses",params:{PORTAL_PROCESSING_TYPE:i.PORTAL_PROCESSING_TYPE}}).then(function(n){n.data.length>0&&(i.ColorList!=null&&(i.ColorList.Green!=null&&angular.forEach(i.ColorList.Green,function(t){angular.forEach(n.data,function(n){n.PORTAL_STATUS==t&&(n.IsGreen=!0)})}),i.ColorList.Gold!=null&&angular.forEach(i.ColorList.Gold,function(t){angular.forEach(n.data,function(n){n.PORTAL_STATUS==t&&(n.IsGold=!0)})}),i.ColorList.Red!=null&&angular.forEach(i.ColorList.Red,function(t){angular.forEach(n.data,function(n){n.PORTAL_STATUS==t&&(n.IsRed=!0)})})),t.statusDescriptionLists==null&&(t.statusDescriptionLists=[]),t.statusDescriptionLists.push({TITLE:i.TITLE,PORTAL_PROCESSING_TYPE:i.PORTAL_PROCESSING_TYPE,List:n.data}));t.StatusListLoaded=!0},function(n){console.error(n.data.Message);console.error(n);t.ExceptionDialogControl!=null?t.ExceptionDialogControl.showDialog("Error in getting portal processing statuses."):bootbox.alert(n.data.Message)})};t.showStatusDescription=function(){$("#StatusDescriptionDialog").modal({backdrop:"static"});$("#StatusDescriptionDialog").modal("show")};t.closeStatusDescriptionDialog=function(){var n="claim status modal";r.absUrl().indexOf("/ClaimDashboard")>-1&&(n="dashboard");r.absUrl().indexOf("/ClaimSearch")>-1&&(n="claim search");i.setClickInfo("click",n,"close claim status icon","close_modal","","icon","close icon");$("#StatusDescriptionDialog").modal("hide")};t.$watchCollection("statusesToLoad",function(n){n!=null&&n.length>0&&angular.forEach(t.statusesToLoad,function(n){t.getStatusList(n)})});t.$watch("StatusListLoaded",function(n){n&&(t.statusDescriptionLists!=null&&t.statusesToLoad!=null&&t.statusDescriptionLists.length==t.statusesToLoad.length&&(t.areStatusListLoaded=!0),t.StatusListLoaded=!1)});t.$watchCollection("[showDialog,areStatusListLoaded]",function(n){n[0]&&n[1]&&(t.Status=_.findWhere(t.statusDescriptionLists,{PORTAL_PROCESSING_TYPE:t.statusTypeToShow}),t.showStatusDescription(),t.showDialog=!1)})}]}}]);app.directive("wbxCapApplicationDetails",["$window","$http",function(n,t){return{restrict:"E",templateUrl:"/Templates/CAPApplicationDetails",scope:{providerId:"=",credentialingApplicationId:"=",showDialog:"=",hideStatus:"="},controller:["$scope",function(n){n.init=function(){n.getStatuses()};n.showApplicationDetails=function(){$("#ApplicationDetailsTab a:first").tab("show");$("#application-details").modal({backdrop:"static"});$("#application-details").modal("show")};n.closeApplicationDetails=function(){$("#application-details").modal("hide");n.ShowDialogContent=!1;n.ErrorLoadingOverviewInfo=!1};n.getStatuses=function(){t({method:"GET",url:"/PortalDropList/GetPortalProcessingStatuses",params:{PORTAL_PROCESSING_TYPE:5}}).then(function(t){n.DownloadStatusList=t.data;n.StatusListLoaded=!0},function(n){bootbox.alert(n)});t({method:"GET",url:"/PortalDropList/GetPortalProcessingStatuses",params:{PORTAL_PROCESSING_TYPE:6}}).then(function(t){n.SubscriptionStatusList=t.data;n.SubscriptionListLoaded=!0},function(n){bootbox.alert(n)})};n.getProviderInfo=function(){t({cache:!1,url:"/CAP/ApplicationDetails/GetProviderInfo",method:"GET",params:{PROVIDER_ID:n.providerId}}).then(function(t){t=t.data;t.error?bootbox.alert(t.message):t!=null&&t.length!=0&&(n.ProviderInfo=t,n.ProviderInfoLoaded=!0)},function(n){bootbox.alert(n)})};n.getOverviewInfo=function(){n.ShowDetailsDialogLoading=!0;t({cache:!1,url:"/CAP/ApplicationDetails/GetOverviewInfo",method:"GET",params:{CREDENTIALING_APPLICATION_ID:n.credentialingApplicationId}}).then(function(t){t=t.data;n.ShowDetailsDialogLoading=!1;t.Status==!1?n.ErrorLoadingOverviewInfo=!0:(n.OverviewDetails=t,n.OverviewDetails.PERSONAL_INFO_UPDATED=(n.OverviewDetails.SECTIONS_UPDATED&15)>0?!0:!1,n.OverviewDetails.PRACTICE_INFO_UPDATED=(n.OverviewDetails.SECTIONS_UPDATED&16)>0?!0:!1,n.OverviewDetails.STATE_DOCUMENTS_UPDATED=(n.OverviewDetails.SECTIONS_UPDATED&32)>0?!0:!1,n.OverviewDetails.ANESTHESIA_DOCUMENTS_UPDATED=(n.OverviewDetails.SECTIONS_UPDATED&64)>0?!0:!1,n.OverviewDetails.DEA_DOCUMENTS_UPDATED=(n.OverviewDetails.SECTIONS_UPDATED&128)>0?!0:!1,n.OverviewDetails.CDS_DOCUMENTS_UPDATED=(n.OverviewDetails.SECTIONS_UPDATED&256)>0?!0:!1,n.OverviewDetails.MEDICARE_UPDATED=(n.OverviewDetails.SECTIONS_UPDATED&512)>0?!0:!1,n.OverviewDetails.MEDICAID_UPDATED=(n.OverviewDetails.SECTIONS_UPDATED&1024)>0?!0:!1,n.OverviewDetails.BLS_UPDATED=(n.OverviewDetails.SECTIONS_UPDATED&2048)>0?!0:!1,n.OverviewDetails.ACLS_UPDATED=(n.OverviewDetails.SECTIONS_UPDATED&4096)>0?!0:!1,n.OverviewDetails.DEGREE_UPDATED=(n.OverviewDetails.SECTIONS_UPDATED&8192)>0?!0:!1,n.OverviewDetails.RESIDENCY_INTERNSHIP_UPDATED=(n.OverviewDetails.SECTIONS_UPDATED&16384)>0?!0:!1,n.OverviewDetails.BOARD_CERTIFICATIONS_UPDATED=(n.OverviewDetails.SECTIONS_UPDATED&32768)>0?!0:!1,n.OverviewDetails.HOSPITAL_AFFILIATIONS_UPDATED=(n.OverviewDetails.SECTIONS_UPDATED&131072)>0?!0:!1,n.OverviewDetails.PROFESSIONAL_INSURANCE_UPDATED=(n.OverviewDetails.SECTIONS_UPDATED&262144)>0?!0:!1,n.OverviewDetails.ATTACHMENTS_DOO_DOCUMENTS_UPDATED=(n.OverviewDetails.SECTIONS_UPDATED&4194304)>0?!0:!1,n.OverviewDetails.ATTACHMENTS_OTHER_DOCUMENTS_UPDATED=(n.OverviewDetails.SECTIONS_UPDATED&8388608)>0?!0:!1,!n.hideStatus!=null&&n.hideStatus==1&&(n.OverviewDetails.APPLICATION_STATUS=-1),n.OverviewInfoLoaded=!0)},function(n){bootbox.alert(n)})};n.getLocationsList=function(){n.ShowLoadingLocationList=!0;t({cache:!1,url:"/CAP/ApplicationDetails/GetLocationsList",method:"GET",params:{CREDENTIALING_APPLICATION_ID:n.credentialingApplicationId}}).then(function(t){n.LocationsList=t.data;n.LocationsListLoaded=!0;n.ShowLoadingLocationList=!1},function(t){n.ShowLoadingLocationList=!1;bootbox.alert(t)})};n.getOtherInformationInfo=function(){n.ShowLoadingOtherInfo=!0;t({cache:!1,url:"/CAP/ApplicationDetails/GetOtherInformationInfo",method:"GET",params:{CREDENTIALING_APPLICATION_ID:n.credentialingApplicationId}}).then(function(t){n.OtherInformationDetails=t.data;n.OtherInformationDetailsLoaded=!0;n.ShowLoadingOtherInfo=!1},function(t){n.ShowLoadingOtherInfo=!1;bootbox.alert(t)})};n.$watchCollection("[StatusListLoaded, OverviewInfoLoaded]",function(t,i){t[0]!=null&&t[1]!=null&&(t[0]!=i[0]||t[1]!=i[1])&&(n.OverviewDetails.STATUS_NAME=_.findWhere(n.DownloadStatusList,{PORTAL_STATUS:n.OverviewDetails.APPLICATION_STATUS}).NAME)});n.$watchCollection("[SubscriptionListLoaded, OverviewInfoLoaded]",function(t,i){if(t[0]!=null&&t[1]!=null&&(t[0]!=i[0]||t[1]!=i[1])){var r=n.OverviewDetails.SUBSCRIPTION_ACTIVE_FLAG?1:0;n.OverviewDetails.SUBSCRIPTION_STATUS_NAME=_.findWhere(n.SubscriptionStatusList,{PORTAL_STATUS:r}).NAME}});n.$watch("showDialog",function(t){t&&(n.showApplicationDetails(),n.getProviderInfo(),n.getOverviewInfo(),n.showDialog=!1)});n.$watchCollection("[ProviderInfoLoaded, OverviewInfoLoaded]",function(t){t[0]&&t[1]&&(n.ShowDialogContent=!0,n.getLocationsList(),n.getOtherInformationInfo(),n.ProviderInfoLoaded=!1,n.OverviewInfoLoaded=!1)})}]}}]);app.directive("wbxCapApplicationDownload",["$window","$http","$timeout","WBXBatchAppCountService","bowser",function(n,t,i,r,u){return{restrict:"E",templateUrl:"/Templates/CAPApplicationDownload",scope:{selectedProvider:"=",displayPurchase:"=",downloadNow:"=",addToBatch:"=",removeFromBatch:"=",downloadStatus:"=?",packageType:"="},controller:["$scope",function(n){n.init=function(){};n.showPurchaseDialog=function(){$("#confirm-purchase").modal({backdrop:"static"});$("#confirm-purchase").modal("show")};n.cancelConfirmPurchase=function(){$("#confirm-purchase").modal("hide")};n.showFailedDownloadDialog=function(){$("#failed-download").modal({backdrop:"static"});$("#failed-download").modal("show")};n.closeFailedDownload=function(){$("#failed-download").modal("hide")};n.showIncompleteDownloadDialog=function(){$("#incomplete-download").modal({backdrop:"static"});$("#incomplete-download").modal("show")};n.closeIncompleteDownloadDialog=function(){$("#incomplete-download").modal("hide")};n.subscribe=function(){$("#confirm-purchase").modal("hide");t({url:"/CAP/Download/Subscribe",method:"PUT",data:{providerId:n.selectedProvider.PROVIDER_ID}}).then(function(t){if(t=t.data,t.Status){n.selectedProvider.IS_SUBSCRIPTION_EXPIRED=!1;var r=new Date;n.selectedProvider.SUBSCRIPTION_START_DATE=r.getDate()+"/"+(r.getMonth()+1)+"/"+r.getFullYear();n.selectedProvider.SUBSCRIPTION_STATUS=1;n.clearBanners();n.ShowSubscriptionActivatedBanner=!0;i.cancel(n.SubscribeTimer);n.SubscribeTimer=i(function(){n.ShowSubscriptionActivatedBanner=!1},1e4)}else bootbox.alert(t.Message)},function(n){bootbox.alert(n)})};n.closeSubscriptionActivatedBanner=function(){n.ShowSubscriptionActivatedBanner=!1};n.closeDownloadNowInitiatedBanner=function(){n.ShowDownloadNowInitiatedBanner=!1};n.closeAppAddedToBatchBanner=function(){n.ShowAppAddedToBatchBanner=!1};n.closeAppRemovedFromBatchBanner=function(){n.ShowAppRemovedFromBatchBanner=!1};n.clearBanners=function(){n.ShowSubscriptionActivatedBanner=!1;n.ShowDownloadNowInitiatedBanner=!1;n.ShowAppAddedToBatchBanner=!1;n.ShowAppRemovedFromBatchBanner=!1};n.$watch("displayPurchase",function(t){t&&(n.showPurchaseDialog(),n.displayPurchase=!1)});n.$watch("downloadNow",function(r){if(r){if(n.clearBanners(),n.ShowDownloadNowInitiatedBanner=!0,i.cancel(n.DownloadNowTimer),n.DownloadNowTimer=i(function(){n.ShowDownloadNowInitiatedBanner=!1},1e4),u.safari)n.selectedProvider!=null?window.open("/CAP/Download/Download?appId="+n.selectedProvider.PROVIDER_CREDENTIALING_APPLICATION_ID+"&packageType="+n.packageType,"_self",""):(window.open("/CAP/Download/Download?packageType="+n.packageType,"_self",""),n.downloadStatus="200");else try{var f=!!new Blob;t({method:"GET",url:"/CAP/Download/Download",responseType:"arraybuffer",params:{providerId:n.selectedProvider!=null?n.selectedProvider.PROVIDER_ID:null,appId:n.selectedProvider!=null?n.selectedProvider.PROVIDER_CREDENTIALING_APPLICATION_ID:null,packageType:n.packageType}}).then(function(t){var r=t.headers("content-type"),i=t.headers("content-disposition"),u=i.indexOf("filename="),f=u+9,e=i.substr(f),o=new Blob([t.data],{type:r});saveAs(o,e);t.status=="206"?n.showIncompleteDownloadDialog():n.selectedProvider!=null&&(n.selectedProvider.DOWNLOAD_STATUS=3);n.downloadStatus=t.status},function(t){n.downloadStatus=t.status;n.showFailedDownloadDialog()})}catch(s){n.selectedProvider!=null?window.open("/CAP/Download/Download?appId="+n.selectedProvider.PROVIDER_CREDENTIALING_APPLICATION_ID+"&packageType="+n.packageType,"_self",""):window.open("/CAP/Download/Download?packageType="+n.packageType,"_self","")}n.downloadNow=!1}});n.$watch("addToBatch",function(u){u&&(t({url:"/CAP/Download/AddToBatch",method:"PUT",data:{providerId:n.selectedProvider.PROVIDER_ID,appId:n.selectedProvider.PROVIDER_CREDENTIALING_APPLICATION_ID}}).then(function(t){t=t.data;t.Status?(r.addApplication(),n.selectedProvider.IS_IN_BATCH=!0,n.clearBanners(),n.ShowAppAddedToBatchBanner=!0,i.cancel(n.AppAddedToBatchTimer),n.AppAddedToBatchTimer=i(function(){n.ShowAppAddedToBatchBanner=!1},1e4)):bootbox.alert(t.Message)},function(n){bootbox.alert(n)}),n.addToBatch=!1)});n.$watch("removeFromBatch",function(u){u&&(t({url:"/CAP/Download/RemoveFromBatch",method:"PUT",data:{appId:n.selectedProvider.PROVIDER_CREDENTIALING_APPLICATION_ID}}).then(function(t){t=t.data;t.Status?(n.selectedProvider.IS_IN_BATCH=!1,r.delApplication(),n.clearBanners(),n.ShowAppRemovedFromBatchBanner=!0,i.cancel(n.AppRemovedFromBatchTimer),n.AppRemovedFromBatchTimer=i(function(){n.ShowAppRemovedFromBatchBanner=!1},1e4)):bootbox.alert(t.Message)},function(n){bootbox.alert(n)}),n.removeFromBatch=!1)})}]}}]);app.directive("wbxModalDialog",["$parse","$compile","$timeout","$filter",function(n,t,i,r){return{restrict:"E",templateUrl:"/Templates/ModalDialog",transclude:!0,scope:{control:"=",headerText:"=",subHeaderText:"=?",bodyTextArray:"=",buttonsArray:"<?",btnWidth:"=?",isEscDisabled:"=?",cancelOnClick:"&?"},controller:["$scope",function(n){n.XButtonxOnClick=function(){n.control.hideDialog();n.cancelOnClick()}}],link:function(u,f,e,o,s){s(function(){u.HasTransclude=!0});u.AriaLabel=e.ariaLabelledby;u.ModalId=e.name!=null?e.name.replace(/ /g,"").replace(/-/g,""):"GenericModalDialog";u.Size=e.size;u.control=u.control||{};u.control.showDialog=function(){u.isEscDisabled?$("#"+u.ModalId).modal({backdrop:"static",keyboard:!1}):$("#"+u.ModalId).modal({backdrop:"static"});$("#"+u.ModalId).modal("show")};u.control.hideDialog=function(){$("#"+u.ModalId).modal("hide")};var h=0;i(function(){if(u.buttonsArray!=null){var i=r("orderBy")(u.buttonsArray,"IsPrimary");i!=null&&i.forEach(function(i){var s=i.Text!=null?i.Text.replace(/ /g,"").replace(/-/g,""):"GenericButton",e="",o,r,c,l,a,v;e+='style="min-width:60px';u.btnWidth!=null&&u.btnWidth!=""&&(e+=";width:"+u.btnWidth);h>0&&(e+=";margin-left:10px");e+='"';o="btn-default";i.IsPrimary&&(o="btn-primary");r="";i.OnClick==null||i.OnClick==""?(i.OnClick=u.ModalId+s+h,r=i.OnClick,h++):r="$parent."+i.OnClick;c='<button type="button" class="btn '+o+' btn-xs"'+e+' id="'+u.ModalId+s+'Button" ng-click="'+r+'()">'+i.Text+"<\/button>";l=t(c)(u);angular.element(document.getElementById(u.ModalId+"ButtonsPlaceHolder")).append(l);i.OnClick&&(a=r+"()",v=n(a),u[r]=function(n){return i.IsClosingDialog&&u.control.hideDialog(),v(f.scope(),n)})})}})}}}]);app.directive("wbxExceptionDialog",["$parse","$compile","$timeout","$filter",function(n,t,i){return{restrict:"E",templateUrl:"/Templates/ModalDialog",scope:{control:"="},link:function(n){n.AriaLabel="Error";n.ModalId="ErrorDialog";n.headerText="Error";n.control=n.control||{};n.control.showDialog=function(t){n.bodyTextArray=[t];$("#"+n.ModalId).modal({backdrop:"static"});$("#"+n.ModalId).modal("show")};n.control.hideDialog=function(){$("#"+n.ModalId).modal("hide")};i(function(){var i=t('<button type="button" class="btn btn-primary btn-xs" style="width:60px" id="ErrorOKButton" ng-click="ErrorOKButton()">OK<\/button>')(n);angular.element(document.getElementById(n.ModalId+"ButtonsPlaceHolder")).append(i);n.ErrorOKButton=function(){n.control.hideDialog()}})}}}]);app.directive("wbxVerificationStatus",["$http",function(n){return{restrict:"E",templateUrl:"/Templates/VerificationStatus",scope:{name:"@",status:"=",verifiedBy:"=?",validationDate:"=?",dueDate:"=?",verificationId:"=?",daysToExpire:"=?",expiredDate:"=?",statusList:"=",icons:"="},controller:["$scope",function(t){t.StatusObject={VERIFICATION_STATUS_NAME:null,VERIFICATION_STATUS_COLOR:{IsRed:!1,IsGreen:!1,IsGold:!1},SingleMargin:null,Tooltip:null};t.$watchCollection("[statusList, status]",function(n){if(n[0]!=null){t.status==null&&(t.status=0);t.status==0?(t.StatusObject.Tooltip="Verification not required.",t.TextPosition={"vertical-align":"text-top"}):t.status==1?(t.StatusObject.Tooltip="Verified by "+t.verifiedBy+" on "+t.validationDate+".",t.TextPosition={"vertical-align":"text-bottom"}):t.status==2?(t.StatusObject.Tooltip="Pending administrator approval.",t.TextPosition={"vertical-align":"text-bottom"}):t.status==3?(t.StatusObject.Tooltip="Due on "+t.dueDate+".",t.TextPosition={"vertical-align":"text-top"}):t.status==4?(t.StatusObject.Tooltip="Denied - See notes for more information.",t.TextPosition={"vertical-align":"text-top"}):t.status==5?(t.StatusObject.Tooltip="Remove from directory in "+t.daysToExpire+" days.",t.TextPosition={"vertical-align":"text-top"}):t.status==6&&(t.StatusObject.Tooltip="Expired on "+t.expiredDate+".",t.StatusObject.SingleMargin={"margin-right":"1px"},t.TextPosition={"vertical-align":"text-top"});var i=_.findWhere(t.statusList,{PORTAL_STATUS:t.status});t.StatusObject.ICON=i.ICON;t.StatusObject.VERIFICATION_STATUS_NAME=i.NAME;t.StatusObject.VERIFICATION_STATUS_COLOR.IsGreen=i.IsGreen;t.StatusObject.VERIFICATION_STATUS_COLOR.IsGold=i.IsGold;t.StatusObject.VERIFICATION_STATUS_COLOR.IsRed=i.IsRed}});t.showDenialNotes=function(i){t.LoadingDenialInfo=!0;n({method:"GET",url:"/EntityManagement/GetDenialInfo",params:{VERIFICATION_ID:i}}).then(function(n){n.data!=null&&(t.DenialInfo={REASON:n.data.DESCRIPTION,NOTES:n.data.VERIFICATION_DENIAL_NOTES});t.LoadingDenialInfo=!1},function(n){console.error(n.data.Message);console.error(n);t.ExceptionDialogControl!=null?t.ExceptionDialogControl.showDialog("Error in retrieving verification denial information."):bootbox.alert(n.data.Message);t.LoadingDenialInfo=!1});$("#DenialNotes"+t.name+"Dialog").modal({backdrop:"static"});$("#DenialNotes"+t.name+"Dialog").modal("show")};t.closeDenialNotesDialog=function(){$("#DenialNotes"+t.name+"Dialog").modal("hide")}}]}}]);app.directive("wbxVerificationButton",[function(){return{restrict:"E",templateUrl:"/Templates/VerificationButton",scope:{data:"=",submitFunction:"&"},controller:["$scope",function(n){n.submit=function(t,i){n.submitFunction({entity:t,isVerify:i})}}]}}]);app.directive("wbxMemberInfoFields",["$http","$q","$timeout",function(n){return{restrict:"E",templateUrl:"/Templates/MemberInfoFields",require:"^form",scope:{memberData:"=",fieldsReady:"=",enrolleeId:"=?",isDependent:"=?",isEdit:"=?",fullGender:"=?"},controller:["$scope",function(t){t.init=function(){t.getStateList();t.isEdit||t.getMaritalStatuses()};t.fieldsReady=!(t.loadingMaritalStatusesList||t.loadingStateList);t.getStateList=function(){t.LoadingStateList=!0;n({method:"GET",url:"/PortalDropList/GetStates"}).then(function(n){t.stateList=n.data;t.LoadingStateList=!1},function(n){console.error(n.data.Message);console.error(n);t.ExceptionDialogControl!=null?t.ExceptionDialogControl.showDialog("Error with populating state dropdown."):bootbox.alert(n.data.Message);t.LoadingStateList=!1})};t.getMaritalStatuses=function(){t.maritalStatusesList=null;t.loadingMaritalStatusesList=!0;n({method:"GET",url:"/Enrollee/GetMaritalStatuses"}).then(function(n){t.maritalStatusesList=n.data;t.loadingMaritalStatusesList=!1},function(n){t.loadingMaritalStatusesList=!1;console.error(n.data.Message);console.error(n);t.ExceptionDialogControl!=null?t.ExceptionDialogControl.showDialog("Error with populating marital statuses."):bootbox.alert(n.data.Message)})};t.getSubscriberInfo=function(){t.loadingSubscriberInfo=!0;n({method:"GET",url:"/MAP/AddMember/GetSubscriberInfo",params:{enrolleeId:t.enrolleeId}}).then(function(n){t.subscriber=n.data;t.memberData.ADDRESS1=t.subscriber.ADDRESS1;t.memberData.ADDRESS2=t.subscriber.ADDRESS2;t.memberData.CITY=t.subscriber.CITY;t.memberData.STATE=t.subscriber.STATE;t.memberData.ZIP=t.subscriber.ZIP;t.loadingSubscriberInfo=!1},function(n){t.loadingSubscriberInfo=!1;console.error(n.data.Message);console.error(n);t.ExceptionDialogControl!=null?t.ExceptionDialogControl.showDialog("Error populating subscriber information."):bootbox.alert(n.data.Message)})};t.GenderList=[{VALUE:"F",DESCRIPTION:"Female"},{VALUE:"M",DESCRIPTION:"Male"},{VALUE:"U",DESCRIPTION:"Unknown"}];t.$watch("isDependent",function(n){n==!0&&t.getSubscriberInfo()});t.$watch("fullGender.GENDER",function(n){n!=null&&(t.fullGender.GENDER_FULL=_.findWhere(t.GenderList,{VALUE:t.fullGender.GENDER}).DESCRIPTION)});t.useSubscriberInfo_onclick=function(){t.memberData.UseSubscriberAddress?(t.memberData.ADDRESS1=t.subscriber.ADDRESS1,t.memberData.ADDRESS2=t.subscriber.ADDRESS2,t.memberData.CITY=t.subscriber.CITY,t.memberData.STATE=t.subscriber.STATE,t.memberData.ZIP=t.subscriber.ZIP):(t.memberData.ADDRESS1=null,t.memberData.ADDRESS2=null,t.memberData.CITY=null,t.memberData.STATE=null,t.memberData.ZIP=null,t.memberData.ZIP_4=null)}}],link:function(n,t,i,r){n.member_form=r}}}]);app.directive("wbxAdditionalInsuranceFields",["$http","$q","$timeout","$window",function(n,t,i,r){return{restrict:"E",templateUrl:"/Templates/AdditionalInsuranceFields",require:"^form",scope:{policyData:"=",fieldsReady:"="},controller:["$scope",function(t){t.init=function(){t.getRelationshipCodes()};t.fieldsReady=!t.loadingRelationshipCodesList;t.getRelationshipCodes=function(){t.relationshipCodesList=null;t.loadingRelationshipCodesList=!0;n({method:"GET",url:"/Enrollee/GetRelationshipCodes"}).then(function(n){t.relationshipCodesList=n.data;var i=r.location.pathname;if(i=="/MAP/EnrollmentSummary")return t.colName=4,t.colInput=8,t.OtherInsuranceModal=!0,t.OtherInsuranceModal;t.colName=3;t.colInput=8;t.loadingRelationshipCodesList=!1},function(n){t.loadingRelationshipCodesList=!1;console.error(n.data.Message);console.error(n);t.ExceptionDialogControl!=null?t.ExceptionDialogControl.showDialog("Error with populating relationship codes."):bootbox.alert(n.data.Message)})};t.GenderList=[{VALUE:"F",DESCRIPTION:"Female"},{VALUE:"M",DESCRIPTION:"Male"},{VALUE:"U",DESCRIPTION:"Unknown"}];t.PolicyTypeList=[{VALUE:7,DESCRIPTION:"Unknown"},{VALUE:6,DESCRIPTION:"Group Dental"},{VALUE:5,DESCRIPTION:"Group Medical"},{VALUE:1,DESCRIPTION:"Medicare Part A"},{VALUE:2,DESCRIPTION:"Medicare Part B"},{VALUE:3,DESCRIPTION:"Medicare Part C"},{VALUE:4,DESCRIPTION:"Medicare Part D"}]}],link:function(n,t,i,r){n.add_member_form=r}}}]);app.directive("wbxMemberGridButtons",[function(){return{restrict:"E",templateUrl:"/Templates/MemberGridButtons",scope:{control:"=",permissions:"=",data:"=",dialogData:"=",isGrid:"=",isAddDependent:"=?",isEnrollmentSummary:"=?",isEnrollmentSummaryInfo:"=?"},controller:["$scope","$window","ImpersonateService",function(n,t,i){n.filter={benefitLvl:1,locationId:-1,providerId:-1};n.gotoEnrollmentSummaryPage=function(n,t,i,r,u){window.location.href="/MAP/EnrollmentSummary/SelectEnrollee?InsuredEnrolleeId="+n+"&EnrolleeId="+t+"&GroupId="+r+"&PlanId="+i+"&SubscriberId="+u};n.gotoAddDependent=function(n,i,r){t.location.href="/MAP/AddMember/Index?EnrolleeId="+n+"&GroupId="+r+"&PlanId="+i};n.showBenefitSummaryReport=function(t,i,r){var u={enrolleeId:t,productId:i,premiumGroupId:r,benefitLvl:n.filter.benefitLvl,locationId:n.filter.locationId,providerId:n.filter.providerId},f="/Areas/MAP/Reports/BenefitSummary.aspx?"+jQuery.param(u);window.open(f,"BenefitSummary","resizable,scrollbars,width=1000,height=900",!0)};n.showRequestIdCardDialog=function(t,r,u,f,e,o,s,h,c,l){n.dialogData.RequestIdInfo={ENROLLEE_ID:t,PRODUCT_ID:r,FIRST_NAME:u,LAST_NAME:f,ADDRESS:e,CITY:o,STATE:s,ZIP:h,GROUP_INDEX:c,PLAN_INDEX:l};n.determineWhereToShowAlert();i.getImpersonateSessionInfo().then(function(t){n.control.isImpersonation=t.IsImpersonation;n.control.impersonatedName=t.ImpersonatedName;n.control.showRequestIdDialog()})};n.showIdCardReport=function(t,i,r){var u={enrolleeId:t,productId:i,premiumGroupId:r,benefitLvl:n.filter.benefitLvl,locationId:n.filter.locationId,providerId:n.filter.providerId},f="/Areas/MAP/Reports/MemberIDCard.aspx?"+jQuery.param(u);window.open(f,"GetIDCard","resizable,scrollbars,width=1000,height=900",!0)};n.showEligibilityHistoryReport=function(n){var t={enrolleeId:n},i="/Areas/MAP/Reports/EligibilityHistory.aspx?"+jQuery.param(t);window.open(i,"ViewEligbility","resizable,scrollbars,width=1000,height=900",!0)};n.gotoOtherInsurance=function(n,t,i,r,u){window.location.href="/MAP/EnrollmentSummary/SelectEnrollee?InsuredEnrolleeId="+n+"&EnrolleeId="+t+"&GroupId="+r+"&PlanId="+i+"&SubscriberId="+u+"#bottom"};n.showTerminatePolicyDialog=function(t,r,u,f,e,o,s,h,c){n.dialogData.TerminateMemberInfo={ENROLLEE_ID:t,PRODUCT_ID:r,PREMIUM_GROUP_ID:u,FIRST_NAME:f,LAST_NAME:e,BENEFIT_PLAN:o,GROUP_INDEX:s,PLAN_INDEX:h,DEPENDENT_INDEX:c,TYPE:1};n.determineWhereToShowAlert();i.getImpersonateSessionInfo().then(function(t){n.control.isImpersonation=t.IsImpersonation;n.control.impersonatedName=t.ImpersonatedName;n.control.showTerminateMemberDialog()})};n.showDropDependentDialog=function(t,i,r,u,f,e,o,s,h){n.dialogData.TerminateMemberInfo={ENROLLEE_ID:t,PRODUCT_ID:i,PREMIUM_GROUP_ID:r,FIRST_NAME:u,LAST_NAME:f,BENEFIT_PLAN:e,GROUP_INDEX:o,PLAN_INDEX:s,DEPENDENT_INDEX:h,TYPE:2};n.determineWhereToShowAlert();n.control.showTerminateMemberDialog()};n.determineWhereToShowAlert=function(){n.isEnrollmentSummary&&(n.dialogData.IsAlertShownOnDependentLevel=n.isGrid)}}]}}]);app.directive("wbxMemberGridModalDialogs",[function(){return{restrict:"E",templateUrl:"/Templates/MemberGridModalDialogs",scope:{control:"=",data:"=",isSuccess:"=",message:"=",submit:"&"},controller:["$scope","$http","$window","$timeout","ImpersonateService",function(n,t,i,r,u){n.$watch("data.TerminateMemberInfo.TYPE",function(t,i){t!=null&&t!=i&&n.getTermReasonCodes(n.data.TerminateMemberInfo.TYPE)});n.initTerminateMember=function(){r(function(){n.ShowErrorBanner=!1;n.data.TerminateMemberInfo.TERM_REASON_CODE=null;n.data.TerminateMemberInfo.TERM_REASON_EVENT_DATE=moment().startOf("day").format("MM/DD/YYYY");u.getImpersonateSessionInfo().then(function(t){n.control.isImpersonation=t.IsImpersonation;n.control.impersonatedName=t.ImpersonatedName})})};n.getTermReasonCodes=function(i){n.LoadingTermCodesList=!0;t({method:"GET",url:"/Enrollee/getTermReasonCodes",params:{type:i}}).then(function(t){n.TermCodesList=t.data;n.LoadingTermCodesList=!1}),function(t){console.error(t.data.Message);console.error(t);n.ExceptionDialogControl.showDialog("Error with populating Termination Reason codes.");n.LoadingTermCodesList=!1}};n.submitTermination=function(){if(n.control.isImpersonation||n.terminate_member_form.$invalid)return!1;n.ShowTerminationProcessingBanner=!0;n.data.TerminateMemberInfo.TYPE==1?n.submitTerminatePolicy():n.data.TerminateMemberInfo.TYPE==2&&n.submitDropDependent()};n.submitTerminatePolicy=function(){t({method:"POST",url:"/Enrollee/TerminatePolicy",data:{enrolleeId:n.data.TerminateMemberInfo.ENROLLEE_ID,groupId:n.data.TerminateMemberInfo.PREMIUM_GROUP_ID,productId:n.data.TerminateMemberInfo.PRODUCT_ID,termReasonCode:n.data.TerminateMemberInfo.TERM_REASON_CODE,termReasonEventDate:n.data.TerminateMemberInfo.TERM_REASON_EVENT_DATE}}).then(function(t){n.ShowTerminationProcessingBanner=!1;t.data.Status==!1?(n.ErrorBannerMessage=t.data.Message,n.ShowErrorBanner=!0):(n.isSuccess=t.data.Status,n.message=t.data.Message!=null?"The policy has been terminated successfully with a termination date of "+t.data.Message+".":"The policy has been terminated successfully.",n.control.hideTerminateMemberDialog(),n.submit())},function(t){console.error(t.data.Message);console.error(t);n.ExceptionDialogControl.showDialog("Error in terminating policy.");n.ShowTerminationProcessingBanner=!1;n.control.hideTerminateMemberDialog()})};n.submitDropDependent=function(){t({method:"POST",url:"/Enrollee/DropDependent",data:{enrolleeId:n.data.TerminateMemberInfo.ENROLLEE_ID,groupId:n.data.TerminateMemberInfo.PREMIUM_GROUP_ID,productId:n.data.TerminateMemberInfo.PRODUCT_ID,termReasonCode:n.data.TerminateMemberInfo.TERM_REASON_CODE,termReasonEventDate:n.data.TerminateMemberInfo.TERM_REASON_EVENT_DATE}}).then(function(t){n.ShowTerminationProcessingBanner=!1;t.data.Status==!1?(n.ErrorBannerMessage=t.data.Message,n.ShowErrorBanner=!0):(n.isSuccess=t.data.Status,n.message="The dependent has been terminated successfully with a termination date of "+t.data.Message+".",n.control.hideTerminateMemberDialog(),n.submit())},function(t){console.error(t.data.Message);console.error(t);n.ExceptionDialogControl.showDialog("Error in Dropping Dependent.");n.ShowTerminationProcessingBanner=!1;n.control.hideTerminateMemberDialog()})};n.submitRequestIdCard=function(){n.control.isImpersonation||(n.ShowRequestIdProcessing=!0,t({method:"PUT",url:"/Enrollee/RequestIDCard",params:{enrolleeId:n.data.RequestIdInfo.ENROLLEE_ID,productId:n.data.RequestIdInfo.PRODUCT_ID}}).then(function(t){n.ShowRequestIdProcessing=!1;n.isSuccess=t.data.Status;n.message=t.data.Message;n.control.hideRequestIdDialog();n.submit()},function(t){console.error(t.data.Message);console.error(t);n.ExceptionDialogControl.showDialog("Error with requesting id card.");n.control.hideRequestIdDialog();n.submit();n.ShowRequestIdProcessing=!1}))}}],link:function(n){n.control=n.control||{};n.control.showRequestIdDialog=function(){$("#RequestIDCard").modal({backdrop:"static",keyboard:!1});$("#RequestIDCard").modal("show")};n.control.hideRequestIdDialog=function(){$("#RequestIDCard").modal("hide")};n.control.showTerminateMemberDialog=function(){n.initTerminateMember();$("#TerminateMember").modal({backdrop:"static",keyboard:!1});$("#TerminateMember").modal("show")};n.control.hideTerminateMemberDialog=function(){n.terminate_member_form.$setPristine();$("#TerminateMember").modal("hide")}}}}]),function(){"use strict";function n(n,t,i){function r(){return n.get("/GoogleTagManager/GetGoogleTagManagerPageInfo").then(function(n){return n})}function u(n,u){r().then(r=>{const f={event:"custom_pageview",env:r.Environment?r.Environment.toLowerCase():r.Environment,app_source:"web",digital_asset:r.PortalType?r.PortalType.toLowerCase():r.PortalType,portal_sub_type:r.PortalSubType?r.PortalSubType.toLowerCase():r.PortalSubType,line_of_business:r.LineOfBusiness?r.LineOfBusiness.toLowerCase():r.LineOfBusiness,page_location:i.absUrl()?i.absUrl().toLowerCase():i.absUrl(),page_title:n?n.toLowerCase():n,page_referrer:u?(r.PageReferrer?r.PageReferrer.toLowerCase():r.PageReferrer)+u.toLowerCase():r.PageReferrer?r.PageReferrer.toLowerCase():r.PageReferrer,entity_id:r.EntityId,entity_type:r.EntityType?r.EntityType.toLowerCase():r.EntityType,entity_name:r.EntityName?r.EntityName.toLowerCase():r.EntityName,entity_state:r.EntityState?r.EntityState.toLowerCase():r.EntityState,user_id:r.DomainSourceId,network_name:r.NetworkNames?r.NetworkNames.toLowerCase():r.NetworkNames,network_id:r.NetworkIds};t.dataLayer=t.dataLayer||[];t.dataLayer.push(f)})}function f(n,i,r,u,f,e,o){const s={event:"custom_event",action:n?n.toLowerCase():n,attribute1:i?i.toLowerCase():i,attribute2:r?r.toLowerCase():r,attribute3:u?u.toLowerCase():u,attribute4:f?angular.isString(f)?f.toLowerCase():f:f,category:e?e.toLowerCase():e,label:o?o.toLowerCase():o};t.dataLayer=t.dataLayer||[];t.dataLayer.push(s)}let e=this;return{setPageInfo:u,setClickInfo:f}}app.service("GoogleTagManagerService",n);n.$inject=["API","$window","$location"]}(),function(){"use strict";function n(n,t,i,r,u){n.verificationCount=0;n.$watch(function(){return r.getVerificationCount()},function(t){n.verificationCount=t},!0);n.entityMngmtClick=function(){u.setClickInfo("click","navigation bar","entity management","field_interaction","","list item","entity management");t.location.href="/EntityManagement"};$(document).ready(function(){n.verificationCount==0&&n.getVerificationCount()});n.getVerificationCount=function(){n.LoadingInfoCenterCount=!0;i({cache:!1,url:"/EntityManagement/GetVerificationCount",method:"GET"}).then(function(t){t=t.data;t==null?n.verificationCount=0:(n.verificationCount=t.VerificationCount,r.setVerificationCount(n.verificationCount))},function(n,t,i,r){r=n.config;i=n.headers;t=n.status;n=n.data})}}angular.module("PWPApp").controller("PWPVerificationCountCtrl",n);n.$inject=["$scope","$window","$http","WBXVerificationCountService","GoogleTagManagerService"]}(),function(){"use strict";function n(n,t){n.init=function(){t.setPageInfo("Landing")}}angular.module("PWPApp").controller("LandingCtrl",n);n.$inject=["$scope","GoogleTagManagerService"]}(),function(){"use strict";function n(n,t,i,r,u,f,e,o){function h(){u.getUserData().then(function(n){s.maskedData=n.data})}var s=this;s.PasswordInfo={USER_NAME:"",NEW_PASSWORD:"",CONFIRM_PASSWORD:"",RESETPASS_VID:""};s.isPasswordValid=!1;s.showPasswordExpired=!0;s.displayVerifyYourIdentity=!1;s.IsMWP=r.IsMWP;s.methodTypes=u.getMethodsEnum();s.isAuthenticatorAppEnabled=s.isAuthenticatorAppEnabled!=null?s.isAuthenticatorAppEnabled:r.Is2FAAuthenticatorAppEnabled;s.isAuthenticatorAppVerified=r.IsAuthenticatorAppVerified;s.$onInit=function(){s.isForgotPassword!==!0&&h();s.isEmailOn=r.IsEmailOn;s.isSmsOn=r.IsSmsOn;s.isAuthenticatorAppOn=r.IsAuthenticatorAppOn;s.isEmailOn?s.selectedMethod=s.methodTypes.email:s.isSmsOn?s.selectedMethod=s.methodTypes.sms:s.isAuthenticatorAppOn&&(s.selectedMethod=s.methodTypes.authenticator)};s.submit=function(){if(!s.isImpersonation){if(s.showUnsuccessfulPasswordChange=!1,s.password_form.$invalid){s.errors=o.getErrorListForBanner(s.password_form);return}var t=s.isForgotPassword?n.validateResetPasswordInfo(s.passwordInfo):s.isPasswordTab?n.validateChangePasswordInfo(s.passwordInfo):n.validateExpiredPasswordInfo(s.passwordInfo);t.then(function(n){n.Error?(s.passwordChangeMessage=n.Message,s.transKey=n.TranslationKey,s.showUnsuccessfulPasswordChange=s.passwordChangeMessage===undefined?!1:!0):s.verifyUserIdentity();s.password_form.$setPristine()})}};s.verifyUserIdentity=function(){s.displayVerifyYourIdentity=!0;s.hideHeader()};s.submitCodeAndChangePassword=function(n,t){return s.passwordInfo.CODE=n,s.passwordInfo.METHOD=t,s.loginInfo={UserName:s.passwordInfo.USER_NAME,Password:s.passwordInfo.NewPassword,RememberMe:!1},s.isPasswordTab?s.changePasswordTab():s.resetPasswordBtn?s.resetPassword():s.changePassword()};s.verifyYourIdentitySuccessCallback=function(){s.showUnsuccessfulPasswordChange===!1&&angular.isFunction(s.successCallback)&&s.successCallback(s.loginInfo)};s.changePasswordTab=function(){if(!s.isImpersonation){s.showUnsuccessfulPasswordChange=!1;s.showPasswordUpdated=!1;var t=n.changePasswordWithCurrentPassword(s.passwordInfo);return t.then(function(n){return n.Error?(s.passwordChangeMessage=n.Message,s.transKey=n.TranslationKey,s.showUnsuccessfulPasswordChange=s.passwordChangeMessage===undefined?!1:!0):(s.showPasswordUpdated=!0,s.clearPasswordForm()),s.password_form.$setPristine(),s.displayVerifyYourIdentity=!1,s.showHeader(),n}),t}};s.resetPassword=function(){var t=n.changeExpiredPasswordWithCurrentPassword(s.passwordInfo);return t.then(function(n){return n.Error?(s.showPasswordExpired=!0,s.passwordChangeMessage=n.Message,s.transKey=n.TranslationKey,s.showUnsuccessfulPasswordChange=s.passwordChangeMessage===undefined?!1:!0):(s.showPasswordExpired=!1,s.showPasswordUpdated=!1,i.location.href=r.mulipleGroupsPlans>1?"/MWP/SelectGroup/Index":"/MWP/Home/Index",s.clearPasswordForm()),s.password_form.$setPristine(),s.displayVerifyYourIdentity=!1,s.showHeader(),n},function(n){throw n;}).finally(function(){}),t};s.changePassword=function(){var t=n.changePassword(s.passwordInfo);return t.then(function(n){return n.Error?(s.passwordChangeMessage=n.Message,s.transKey=n.TranslationKey,s.showUnsuccessfulPasswordChange=s.passwordChangeMessage===undefined?!1:!0):s.showPasswordUpdated=!0,s.password_form.$setPristine(),s.displayVerifyYourIdentity=!1,s.showHeader(),n},function(n){throw n;}).finally(function(){}),t};s.clearPasswordForm=function(){s.passwordInfo.OldPassword=null;s.passwordInfo.NewPassword=null;s.passwordInfo.ConfirmPassword=null;s.showUnsuccessfulPasswordChange=!1;s.verificationEmailError=!1;s.passwordChangeMessage="";s.verificationEmailErrorMessage="";s.showPasswordExpired=!1;s.password_form.$setPristine();s.isPasswordValid=!1;s.displayVerifyYourIdentity=!1};s.validateForm=function(){f(function(){s.errors=o.getErrorListForBanner(s.password_form)},0)};t.$watch("vm.password_form.$pristine",function(n,t){n==t||n||(s.showPasswordUpdated=!1,s.showUnsuccessfulPasswordChange=!1,s.verificationEmailError=!1,s.passwordChangeMessage="",s.verificationEmailErrorMessage="")});s.goBack=function(){s.displayVerifyYourIdentity=!1;s.showHeader()};s.showHeader=function(){(s.isForgotPassword||s.resetPasswordBtn)&&s.clickBackButton()};s.hideHeader=function(){(s.isForgotPassword||s.resetPasswordBtn)&&s.hideParentHeader()}}app.component("wbxChangePassword",{templateUrl:"/Templates/Password",controller:n,controllerAs:"vm",bindings:{passwordInfo:"=",changePasswordBtn:"@",currentPassword:"=",resetPasswordBtn:"=",submitButton:"&",isPasswordTab:"=",isForgotPassword:"=?",successCallback:"=?",isImpersonation:"=?",isAuthenticatorAppEnabled:"=?",clickBackButton:"&?",hideParentHeader:"&?"}});n.$inject=["wbxChangePasswordService","$scope","$window","DataService","MultifactorService","$timeout","API","wbxListErrorsService"]}(),function(){"use strict";function n(n){function i(){t.knownErrors={}}function r(i){t.knownErrors[i.wbxName]=n.get(i.overrideValidationsText)}function u(n,t){return _.find(t,function(t){return t.Name==n}).Text}function f(n,t){return _.find(t,function(t){return t.Name==n}).Params}var t=this;t.$onInit=i;t.getErrorKey=u;t.getErrorParams=f;t.initErrorMessages=r}app.component("wbxListErrors",{templateUrl:"/Templates/ListErrors",controller:n,controllerAs:"vm",bindings:{errorList:"="}});n.$inject=["wbxValidationService"]}(),function(){"use strict";function n(){var n=this;n.isReadOnly=!0;n.days=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"];n.dayOrder={Monday:1,Tuesday:2,Wednesday:3,Thursday:4,Friday:5,Saturday:6,Sunday:7};n.$onInit=function(){n.setDefaultOperationHours();n.sortDays()};n.setDefaultOperationHours=function(){if(n.operationHours!==null&&n.operationHours!==undefined&&n.operationHours!==""&&angular.isArray(n.operationHours)&&n.operationHours.length!=0)n.days.map(function(t){var i=n.operationHours.some(function(n){return n.DAY===t});i||n.operationHours.push({DAY:t,HR_START1:null,HR_END1:null,HR_START2:null,HR_END2:null,IS_CLOSED:!0})});else{n.operationHours=[];for(var t=0;t<7;t++)n.operationHours.push({DAY:n.days[t],HR_START1:null,HR_END1:null,HR_START2:null,HR_END2:null})}};n.sortDays=function(){n.operationHours.sort(function(t,i){return n.dayOrder[t.DAY]-n.dayOrder[i.DAY]})};n.officeClosedCheckboxOnChange=function(){for(var t=0;t<7;t++)n.operationHours[t].IS_CLOSED&&(n.operationHours[t].HR_START1=null,n.operationHours[t].HR_END1=null,n.operationHours[t].HR_START2=null,n.operationHours[t].HR_END2=null)}}app.component("wbxOperationHoursReadOnlyWrapper",{templateUrl:"/Templates/OperationHoursWrapper",controller:n,controllerAs:"vm",bindings:{operationHours:"=?"}});n.$inject=[]}(),function(){"use strict";function n(){var n=this;n.isReadOnly=!1;n.days=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"];n.dayOrder={Monday:1,Tuesday:2,Wednesday:3,Thursday:4,Friday:5,Saturday:6,Sunday:7};n.$onInit=function(){n.setDefaultOperationHours();n.sortDays()};n.setDefaultOperationHours=function(){if(n.operationHours!==null&&n.operationHours!==undefined&&n.operationHours!==""&&angular.isArray(n.operationHours)&&n.operationHours.length!=0)n.days.map(function(t){var i=n.operationHours.some(function(n){return n.DAY===t});i||n.operationHours.push({DAY:t,HR_START1:null,HR_END1:null,HR_START2:null,HR_END2:null,IS_CLOSED:!0})});else{n.operationHours=[];for(var t=0;t<7;t++)n.operationHours.push({DAY:n.days[t],HR_START1:null,HR_END1:null,HR_START2:null,HR_END2:null})}};n.sortDays=function(){n.operationHours.sort(function(t,i){return n.dayOrder[t.DAY]-n.dayOrder[i.DAY]})};n.officeClosedCheckboxOnChange=function(){for(var t=0;t<7;t++)n.operationHours[t].IS_CLOSED&&(n.operationHours[t].HR_START1=null,n.operationHours[t].HR_END1=null,n.operationHours[t].HR_START2=null,n.operationHours[t].HR_END2=null)}}app.component("wbxOperationHoursWrapper",{templateUrl:"/Templates/OperationHoursWrapper",require:{form:"^^form"},controller:n,controllerAs:"vm",bindings:{operationHours:"=?"}});n.$inject=[]}(),function(){"use strict";function n(n,t){function r(){i.getSessionInfo()}var i=this;i.$onInit=r;i.routeToChangePassword=function(){n.location.href="/AccountManagement#/Password"};i.getSessionInfo=function(){t({method:"GET",url:"/Account/GetSessionInfo"}).then(function(n){i.populateSessionInfo(n.data)},function(){})};i.populateSessionInfo=function(n){i.showPasswordAboutToExpire=n.IS_PASSWORD_ABOUT_TO_EXPIRE;i.daysPasswordAboutToExpire=n.DAYS_PASSWORD_ABOUT_TO_EXPIRE}}app.component("wbxPasswordAboutToExpire",{templateUrl:"/Templates/PasswordAboutToExpire",controller:n,controllerAs:"vm"});n.$inject=["$window","$http"]}();app.component("wbxStepper",{templateUrl:"/Templates/wbxStepper",controllerAs:"vm",controller:stepperCtrl,transclude:!0,bindings:{steps:"@",stepNames:"=",fixed:"@",showButtonNavigation:"@"}});app.filter("range",function(){return function(n,t){t=parseInt(t);for(var i=0;i<t;i++)n.push(i);return n}});stepperCtrl.$inject=["$scope","$timeout","$rootScope","$window"],function(){"use strict";function n(){var n=this}app.component("wbxValidationAsterisk",{templateUrl:"/Templates/ValidationAsterisk",require:{form:"^^form"},controller:n,controllerAs:"vm",bindings:{controlName:"@",isRequired:"<"}});n.$inject=[]}(),function(){"use strict";function n(n,t,i,r){var u=this,f=[];u.errorCount=0;u.$onInit=function(){var e,o,s;u.errorList=r.get(u.overrideErrorList);e='<ul class="list-unstyled ng-scope">';o="";angular.forEach(u.errorList,function(n){n.Params&&(o=' translate-values="'+angular.toJson(n.Params).replace(/"/g,"")+'"');e+='<li ng-if="vm.form.'+u.controlName+".$error."+n.Name+'" translate="'+n.Text+'"'+o+"><\/li>"});e+='<li ng-if="vm.isRequired && !vm.form.'+u.controlName+'.$invalid" translate="Inline_Validation_Required"><\/li>';e+="<\/ul>";s=t(e)(i);n(function(){$("#"+u.controlName+"Caret").tooltip({placement:"right",html:!0,title:s,container:"body"})});u.errorCount=f.length}}app.component("wbxValidationCaret",{templateUrl:"/Templates/ValidationCaret",require:{form:"^^form"},controller:n,controllerAs:"vm",bindings:{controlName:"@",isRequired:"<",overrideErrorList:"@"}});n.$inject=["$timeout","$compile","$scope","wbxValidationService"]}(),function(){"use strict";function n(n){var t=this;t.controlName=t.controlName.replace(/\s/g,"");t.controlNameArray=t.controlName.split(",");t.$onInit=function(){t.errorList=n.get(t.overrideErrorList)}}app.component("wbxValidationText",{templateUrl:"/Templates/ValidationText",require:{form:"^^form"},controller:n,controllerAs:"vm",bindings:{controlName:"@",overrideErrorList:"@"}});n.$inject=["wbxValidationService"]}(),function(){"use strict";function n(n,t,i){var r=this;r.changePasswordWithCurrentPassword=function(t){var r=i.defer();return n.put("/AccountManagement/ChangePassword",{CODE:t.CODE,METHOD:t.METHOD,USER_NAME:t.USER_NAME,CURRENT_PASSWORD:t.OldPassword,NEW_PASSWORD:t.NewPassword,CONFIRM_PASSWORD:t.ConfirmPassword}).then(function(n){r.resolve(n)},function(n){r.reject(n)}),r.promise};r.changeExpiredPasswordWithCurrentPassword=function(t){var r=i.defer();return n.put("/ResetPassword/ResetPassword",{CODE:t.CODE,METHOD:t.METHOD,USER_NAME:t.USER_NAME,CURRENT_PASSWORD:t.OldPassword,NEW_PASSWORD:t.NewPassword,CONFIRM_PASSWORD:t.ConfirmPassword}).then(function(n){r.resolve(n)},function(n){r.reject(n)}),r.promise};r.changePassword=function(t){var r=i.defer();return n.put("/Account/ChangePassword",{CODE:t.CODE,METHOD:t.METHOD,USER_NAME:t.USER_NAME,NEW_PASSWORD:t.NewPassword,CONFIRM_PASSWORD:t.ConfirmPassword,RESETPASS_VID:t.RESETPASS_VID}).then(function(n){r.resolve(n)},function(n){r.reject(n)}),r.promise};r.sendCodeByUserName=function(t){return n.put("/Account/SendCodeByUserName",{USER_NAME:t.USER_NAME})};r.validateResetPasswordInfo=function(t){return n.post("/Account/ValidateResetPasswordInfo",{CODE:t.CODE,METHOD:t.METHOD,USER_NAME:t.USER_NAME,NEW_PASSWORD:t.NewPassword,CONFIRM_PASSWORD:t.ConfirmPassword,RESETPASS_VID:t.RESETPASS_VID})};r.validateChangePasswordInfo=function(t){return n.post("/AccountManagement/ValidateChangePasswordInfo",{CODE:t.CODE,METHOD:t.METHOD,USER_NAME:t.USER_NAME,CURRENT_PASSWORD:t.OldPassword,NEW_PASSWORD:t.NewPassword,CONFIRM_PASSWORD:t.ConfirmPassword})};r.validateExpiredPasswordInfo=function(t){return n.post("/ResetPassword/ValidateExpiredPasswordInfo",{CODE:t.CODE,METHOD:t.METHOD,USER_NAME:t.USER_NAME,CURRENT_PASSWORD:t.OldPassword,NEW_PASSWORD:t.NewPassword,CONFIRM_PASSWORD:t.ConfirmPassword})}}app.service("wbxChangePasswordService",n);n.$inject=["API","$window","$q"]}(),function(){"use strict";function n(){function n(n){if(n.controlsList===undefined)return[];var t=[];return n.controlsList.forEach(function(i){if(n[i]!==undefined){const r=Object.keys(n[i].$error);r.length!==0&&t.push({wbxName:i,labelKey:n[i].wbxLabelKey,inputErrors:r,overrideValidationsText:n[i].wbxOverrideValidations})}}),t}function t(n,t){n!=null&&(n.wbxLabelKey=t)}return{getErrorListForBanner:n,updateFormWithLabels:t}}app.service("wbxListErrorsService",n);n.$inject=[]}(),function(){"use strict";function n(n){function t(){n.$broadcast("stepperCompletedStep")}function i(){n.$broadcast("stepperNextStep")}function r(){n.$broadcast("stepperBackStep")}function u(t){n.$broadcast("stepperSelectNewStep",t)}function f(){n.$broadcast("stepperReConfirmCurrentStep")}function e(){n.$broadcast("stepperFinishSteps")}function o(){n.$broadcast("stepperResetWizard")}return{CompleteStep:t,NextStep:i,BackStep:r,SelectNewStep:u,ReconfirmCurrentStep:f,FinishSteps:e,ResetStepper:o}}app.service("WbxStepperService",n);n.$inject=["$rootScope"]}(),function(){"use strict";function n(n){var t=this;t.SubSectionList=[];t.isReadOnly=!0;t.setFormLevelInfo=function(n){n.LabelWidth=t.labelWidth};n.$watchCollection("vm.fieldList",function(n){var i,r;n!==null&&(i=[],t.SubSectionList=[],t.fieldList==null||t.fieldList[0]==null||t.fieldList[0].hasOwnProperty("DynamicFieldList")?i=n:(r={Label:null,DynamicFieldList:n},i.push(r)),angular.forEach(i,function(n){var i={Label:n.Label,DynamicFieldList:[]};angular.forEach(n.DynamicFieldList,function(n){t.setFormLevelInfo(n);i.DynamicFieldList.push(n)});t.SubSectionList.push(i)}))})}app.component("wbxDynamicFormFieldReadOnly",{templateUrl:"/WrapperTemplates/DynamicFormField",controller:n,controllerAs:"vm",bindings:{formId:"@",labelWidth:"=",isReadOnlyShowingDash:"=",fieldList:"=",isDangerColor:"=",isSuccessColor:"=",isWarningColor:"=",isInfoColor:"="}});n.$inject=["$scope"]}(),function(){"use strict";function n(n){var t=this;t.SubSectionList=[];t.isReadOnly=!1;t.setFormLevelInfo=function(n){n.LabelWidth=t.labelWidth};t.setFieldTypeInfo=function(n){t.fieldTypeInfo.IsAlphaNumeric?(n.Type="text",n.IsRequired=!1,n.IsDisabled=!1,n.HasSSNMask=!1,n.MaxLength=t.fieldTypeInfo.FieldMaxLength,n.InputWidth=t.fieldTypeInfo.IsMaxWidth?null:4):(n.Type="text",n.IsRequired=!1,n.IsDisabled=!1,n.HasSSNMask=!1)};n.$watchCollection("[vm.fieldTypeInfo, vm.fieldList]",function(n){var i,r;n!==null&&n[0]!==null&&n[1]!=null&&(i=[],t.SubSectionList=[],t.fieldList==null||t.fieldList[0]==null||t.fieldList[0].hasOwnProperty("DynamicFieldList")?i=t.fieldList:(r={Label:null,DynamicFieldList:t.fieldList},i.push(r)),angular.forEach(i,function(n){var i={Label:n.Label,DynamicFieldList:[]};angular.forEach(n.DynamicFieldList,function(n){t.setFormLevelInfo(n);t.setFieldTypeInfo(n);i.DynamicFieldList.push(n)});t.SubSectionList.push(i)}))})}app.component("wbxDynamicFormField",{templateUrl:"/WrapperTemplates/DynamicFormField",require:{form:"^^form"},controller:n,controllerAs:"vm",bindings:{formId:"@",labelWidth:"=",fieldList:"=",isSideLabel:"=",isOldValidation:"=",isReadOnlyShowingDash:"=",fieldTypeInfo:"="}});n.$inject=["$scope"]}(),function(){"use strict";function n(){var n=this,t=[{Name:"required",Text:"Required."},{Name:"incomplete",Text:"Incomplete."},{Name:"incompleteZip",Text:"Incomplete, zip code must be 5 digits."},{Name:"email",Text:"Invalid email format."},{Name:"PasswordNotValid",Text:"Failed password criteria."},{Name:"notMatched",Text:"Not matched."},{Name:"isBefore",Text:"Dates must be in chronological order."},{Name:"isBeforeTime",Text:"Times must be in chronological order."},{Name:"isAfter",Text:"Dates must be in chronological order."},{Name:"isAfterTime",Text:"Times must be in chronological order."},{Name:"isNotFuture",Text:"Date cannot be in the future."},{Name:"noValue",Text:"No Value."},{Name:"wbxDateRange",Text:"The date range cannot be more than {{dateRange}}."},{Name:"npi",Text:"Invalid NPI number."},{Name:"routingNumber",Text:"Invalid Routing Number."},{Name:"ADA_AccountNumber",Text:"Must be between 4-17 digits."},{Name:"isBeforeInt",Text:"Numbers must be in chronological order."},{Name:"isAfterInt",Text:"Numbers must be in chronological order."},{Name:"minValue",Text:"Minimum amount is {{minValue}}."},{Name:"maxValue",Text:"Maximum amount is {{maxValue}}."},{Name:"minAge",Text:"You must be at least {{minAge}} years old."},{Name:"minCharactersVariableLength",Text:"Enter at least {{minLength}} characters."}];n.get=function(n){var r=angular.copy(t),i,u;if(n!=null&&n!=""){i=null;u=n.replace(/'/g,'"');try{i=JSON.parse(u)}catch(f){console.error(u);i=null}angular.forEach(i,function(n,t){var i,f,u;if(n){if(n.indexOf("((")!=-1){i=n.substring(0,n.indexOf("((")).trim();var e=n.substring(n.indexOf("((")+2,n.indexOf("))")).trim(),o=e.substring(0,e.indexOf(":")).trim(),s=e.substring(e.indexOf(":")+1,e.length).trim();f={};f[o]=s}else i=n,f=null;u=_.findWhere(r,{Name:t});(i==null||i=="")&&(i=u.Text);u?(u.Text=i,u.Params=f):(u={Name:t,Text:i,Params:f},r.push(u))}})}return r}}app.service("wbxValidationService",n);n.$inject=[]}()