!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("../../../../common/v1/src")):"function"==typeof def&&def.amd?def("pcs-global-search-v3",["vue","../../../../common/v1/src"],t):((e=e||self).phw=e.phw||{},e.phw.PcsGlobalSearchV3=t(e.Vue,e.PcsCommon))}(this,function(u,i){"use strict";u=u&&u.hasOwnProperty("default")?u.default:u,i=i&&i.hasOwnProperty("default")?i.default:i;var o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(e,t)};var b="undefined"!=typeof Reflect&&Reflect.defineMetadata&&Reflect.getOwnMetadataKeys;function g(o,i,s){(s?Reflect.getOwnMetadataKeys(i,s):Reflect.getOwnMetadataKeys(i)).forEach(function(e){var t=s?Reflect.getOwnMetadata(e,i,s):Reflect.getOwnMetadata(e,i);s?Reflect.defineMetadata(e,t,o,s):Reflect.defineMetadata(e,t,o)})}var p={__proto__:[]}instanceof Array;function f(e){"undefined"!=typeof console&&console.warn("[vue-class-component] "+e)}var y=["data","beforeCreate","created","beforeMount","mounted","beforeDestroy","destroyed","beforeUpdate","updated","activated","deactivated","render","errorCaptured","serverPrefetch"];function s(e,i){void 0===i&&(i={}),i.name=i.name||e._componentTag||e.name;var s=e.prototype;Object.getOwnPropertyNames(s).forEach(function(t){if("constructor"!==t)if(-1=o.length?o[0]&&o[0].focus():o[t+1]&&o[t+1].focus())})},t=0;t=o.length?o[0]&&o[0].focus():o[t+1]&&o[t+1].focus(),e.preventDefault())})};for(t=0;ts.menuClientWidth&&(s.tabScrolling=!0),s.redirectedUrl.includes(s.activeTab)&&(s.scrolledWidth=parseInt(s.localStorage.getItem("scrolledWidth")),e.style.transform="translateX("+-s.scrolledWidth+"px)",s.setTabScrollingButtons()))})}if(this.handleTabsAccessibility(this.wgtElem),this.isDisabled=!!this.isMilitarySearch||this.bindableModel.checkValidation,this.bindableModel.preFillSearchedKey&&(this.bindableModel.searchValue=this.getSearchKeyword()||""),this.bindableModel.isLandingPage&&(this.bindableModel.rk=this.bindableModel.rk?this.bindableModel.rk:this.phenomAppManager.getSessionParams("rk"),this.bindableModel.rk&&0s.menuClientWidth&&(s.tabScrolling=!0))}),this.handleTabsAccessibility(this.wgtElem)},E.prototype.setActiveTab=function(e){var o=this;this.activeTab=e||this.defaultTab,this.tabs.get("category")&&this.tabs.get("category").includes(this.activeTab)?this.categoryTab=!0:this.categoryTab=!1,this.tabs.forEach(function(e,t){o.activeTab==o.defaultTab?o.tabCondition="":e.includes(o.activeTab)&&(o.tabCondition=t+"."+t+'_sort:("'+o.activeTab+'")')})},E.prototype.fetchAgpFilterBasedJobs=function(){var e=this.commonService.fetchCachedDdo(a.v3.ddoKeyAgp),t=this.commonService.fetchCachedDdo(a.v3.ddoKeyEagerLoad);if(e&&e.data&&e.data.lpKeyData&&t){this.agpData={totalHits:t.totalHits,bannerText:e.data.lpKeyData.bannerText};var o=window.location.pathname;o&&(this.bindableModel.searchUrl=o.replace("/",""))}},E.prototype.getAllJobSuggestions=function(){var o=this.isFull;return{show:null,updateShow:function(){var e={jobs:o(this.jobs),locations:o(this.locations),categories:o(this.categories),keywords:o(this.keywords),searched:o(this.searched),all:!1};for(var t in e)if(e.hasOwnProperty(t)&&!0===e[t]){e.all=!0;break}return e},jobs:null,locations:null,categories:null,keywords:null,searched:null,boundaries:null}},E.prototype.fetchResultsConfig=function(){var t=this;this.globalSearchService.makeDDOrequest(a.v3.ddoKeyGlobalSearchConfig,{}).then(function(e){e&&e.data&&e.data.configured?t.enableSuggestionResults=e.data.data||[]:t.enableSuggestionResults=C},function(e){t.enableSuggestionResults=C})},E.prototype.isSuggestionVisible=function(e){return-1===this.enableSuggestionResults.indexOf(e)},E.prototype.handleSearchOnWindowResize=function(){if(this.element){var e=this.element.querySelector(w),t=window.innerWidth;if(e&&this.gsFeature&&this.gsFeature.mobileSearchWithHeaderIcon)this.isMobileEnabled=!0,t<=767?e.addEventListener("click",this.handleInputFocus):(this.isMobileEnabled=!1,e.removeEventListener("click",this.handleInputFocus),this.clearBackdrop());else if(t<=767){this.isMobileEnabled=!0;for(var o=this.element.querySelectorAll("input.ph-input-search")||[],i=0;i/g,"");o=o.replace(/<\/em>/g,"")}if(e.jobLocations&&e.jobLocations.locations&&!s.bindableModel.locationSearch){if(s.suggestedLocations=[],e.jobLocations.locations.city)for(var i=0;i/gm,""),this.mosCode=e.mos_code}},E.prototype.setMOSFocusField=function(e){-1===e&&(e=0);var t=!1;if(!this.isMOSClick&&this.bindableModel.searchValue.length&&this.suggestedMOSKeywords&&this.suggestedMOSKeywords.length){this.showDropDown=!1;for(var o=0;oi&&(this.scrolledWidth=i),e.style.transform="translateX("+-this.scrolledWidth+"px)",this.setTabScrollingButtons()}},E.prototype.scrollLeftTrig=function(){var e=this.element.querySelector(".tab-menu"),t=this.element.querySelector(".tab-menu-outer-cntr"),o=t&&t.offsetWidth;e&&(this.scrolledWidth-=o||100,this.scrolledWidth<0&&(this.scrolledWidth=0),e.style.transform="translateX("+-this.scrolledWidth+"px)",this.setTabScrollingButtons())},E.prototype.setTabScrollingButtons=function(){var e=this.menuScrollWidth-this.menuClientWidth+150;this.scrolledWidth<=0?this.tabScrollingLeft=!1:this.tabScrollingLeft=!0,this.scrolledWidth>=e?this.tabScrollingRight=!1:this.tabScrollingRight=!0},E.prototype.showMobileDropDown=function(){var e=this.element.querySelector('[data-mobile-search="true"]'),t=this.element.querySelector(k);e&&("block"===e.style.display?(e.style.display="none",this.mobileViewButtonExpanded=!1):(e.style.display="block",this.mobileViewButtonExpanded=!0,setTimeout(function(){t&&t.focus()},10))),document.body.style.overflow="hidden",document.addEventListener("mouseup",this.handleMobileBlur)},E.prototype.hideMobileDropDown=function(){var e=this.element.querySelector('[data-mobile-search="true"]');e&&(e.style.display="none",this.mobileViewButtonExpanded=!1);var t=this.element.querySelector(".global-search-mobile-button");setTimeout(function(){t&&t.focus()},10),document.body.style.overflow="",document.removeEventListener("mouseup",this.handleMobileBlur)},E.prototype.handleMobileBlur=function(e){var t=this.element.querySelector(".global-search-mobile-button");this.element.contains(e.target)||t.contains(e.target)||this.hideMobileDropDown()},E.prototype.onEnterCallBack=function(e,t){switch(e){case"typehead":this.handleSubmitClick();break;case"location":-1===t&&(this.allLocations.length&&this.locationValue?this.setLocation(this.allLocations[0]):this.bindableModel.dataMode===L&&(this.locationValue="")),this.handleSubmitClick()}},E=function(e,t,o,i){var s,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,i);else for(var l=e.length-1;0<=l;l--)(s=e[l])&&(n=(a<3?s(n):3