define("ph-common/ph-faq-attribute/ph-faq-attribute",["exports","aurelia-framework"],function(e,t){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.FaqButtonAttribute=void 0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n=function(e,t,i,n){var r,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===("undefined"==typeof Reflect?"undefined":o(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},r=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":o(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=e.FaqButtonAttribute=function(){function e(t){i(this,e),this.element=t,this.iconDownArrow="icon-down-arrow",this.iconUpArrow="icon-arrow-up",this.widgetElement=t.closest("[as-element]"),this.hideSingleAccordian()}return e.prototype.hideSingleAccordian=function(){var e=this.element.nextElementSibling;e&&e.classList.add("hide");var t=this.element.querySelector("i");this.element.setAttribute("aria-expanded","false"),t&&t.classList.remove(this.iconUpArrow),t&&t.classList.add(this.iconDownArrow)},e.prototype.hideAllAccordians=function(){var e=this;this.widgetElement.querySelectorAll(".ph-accordian-content").forEach(function(e){e.classList.add("hide")}),this.widgetElement.querySelectorAll("[ph-accordian-button]").forEach(function(t){t.setAttribute("aria-expanded","false");var i=t.querySelector("i");i.classList.remove(e.iconUpArrow),i.classList.add(e.iconDownArrow)})},e.prototype.toggleFaq=function(){var e=this.element.nextElementSibling,t=this.element.querySelector("i");e&&e.classList.contains("hide")?(this.hideAllAccordians(),this.element.setAttribute("aria-expanded","true"),e.classList.remove("hide"),t.classList.remove(this.iconDownArrow),t.classList.add(this.iconUpArrow)):this.hideAllAccordians()},e.prototype.attached=function(){var e=this;this.element.addEventListener("click",function(){e.toggleFaq()})},e}();e.FaqButtonAttribute=a=n([(0,t.customAttribute)("ph-accordian-button"),(0,t.autoinject)(),r("design:paramtypes",[Element])],a)})
define("ph-common/ph-page-state-attribute/ph-page-state-attribute",["exports","aurelia-framework","aurelia-event-aggregator","./../index"],function(e,t,i,o){"use strict"
;function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.PhPageStateAttribute=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=function(e,t,i,o){var n,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"===("undefined"==typeof Reflect?"undefined":r(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},s=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":r(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},l=e.PhPageStateAttribute=function(){function e(t,i,o){n(this,e),this.element=t,this.commonService=i,this.eventAggregator=o}return e.prototype.valueChanged=function(e,t){var i=this;this.showOnState=e,this.eventAggregator.subscribe("pageState",function(e){i.checkAndRemoveElement(e.pageState)}),this.commonService.getPageState()},e.prototype.checkAndRemoveElement=function(e){e&&e!==this.showOnState?this.element.parentElement&&this.element.parentElement.removeChild(this.element):e&&this.element.classList.remove("hide")},e}();e.PhPageStateAttribute=l=a([(0,t.customAttribute)("ph-page-state"),(0,t.autoinject)(),s("design:paramtypes",[Element,o.CommonService,i.EventAggregator])],l)})
define("ph-common/ph-slider/v1/ph-card-slider",["exports","aurelia-framework","aurelia-event-aggregator","./../../app-constants","./../../ph-widget-attr","./../../index"],function(e,t,i,o,n,r){"use strict";function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(e,"__esModule",{value:!0}),e.CardSliderAttribute=void 0;var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p=function(e,t,i,o){var n,r=arguments.length,a=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"===("undefined"==typeof Reflect?"undefined":c(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},d=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":c(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},u="ph-card-slider-v1",h=window,f=e.CardSliderAttribute=function(e){function t(i,n,r,l){a(this,t);var c=s(this,e.call(this,i,r,u));c.element=i,c.eventAggregator=n,c.commonService=r,c.templatingEngine=l,c.containerClass=o.AppConstants.CLASS_SLIDER_CONTAINER,c.loadOnEvent=!1,c.sliderOptions={},c.slickInited=!1,c.currentSlide=1,c.dependentScripts=[],c.loadDependenciesPromise=Promise.resolve({}),c.initiateSliderPlayer=function(){if(1==c.totalSlidesCount&&c.sliderOptions.ignoreSlider){c.element.classList.remove("ph-slide-loader"),c.element.querySelector(c.containerClass);var e=c.element.querySelector(".ph-card"),t=e&&e.parentElement&&e.parentElement.offsetWidth;if(t)return void(t&&(e.style.width=t+"px"))}if(1===c.totalSlidesCount&&Array.isArray(c.sliderOptions.responsive))for(var i=0;i<c.sliderOptions.responsive.length;i++){var o=c.sliderOptions.responsive[i];o.breakpoint<=768&&(o.settings=o.settings||{},o.settings.centerMode="false")}c.loadDependenciesPromise=c.loadDependencies().then(function(){c.loadOnEvent||(c.slickOverrideFun(),c.initSlick())}),"true"==c.element.getAttribute("pha-phslide-sync-slider")&&c.handleSyncSlider()},c.slickOverrideFun=function(){var e="button",t=c;c.phslideCustomPaging&&(e=$(c.phslideCustomPaging)[0].nodeName.toLowerCase()),Slick.prototype.buildDots=function(){var t,i,o=this;if(!0===o.options.dots&&o.slideCount>o.options.slidesToShow){for(o.$slider.addClass("slick-dotted"),i="li"==e?$("<ul />").addClass(o.options.dotsClass):$("<div />").addClass(o.options.dotsClass),t=0;t<=o.getDotCount();t+=1)i.append(o.options.customPaging.call(this,o,t));o.$dots=i.appendTo(o.options.appendDots),o.$dots.find(e).first().addClass("slick-active")}},Slick.prototype.buildOut=function(){var e=this;e.$slides=e.$slider.children(e.options.slide+":not(.slick-cloned)").addClass("slick-slide"),e.slideCount=e.$slides.length,e.$slides.each(function(e,t){$(t).attr("data-slick-index",e).data("originalStyling",$(t).attr("style")||"")}),e.$slider.addClass("slick-slider"),e.$slideTrack=0===e.slideCount?$('<div class="slick-track"/>').appendTo(e.$slider):e.$slides.wrapAll('<div class="slick-track"/>').parent(),e.$list=e.$slideTrack.wrap('<div aria-live="assertive" aria-atomic="true" class="slick-list"/>').parent(),e.$slideTrack.css("opacity",0),(!0===e.options.centerMode||!0===e.options.swipeToSlide)&&(e.options.slidesToScroll=1),$("img[data-lazy]",e.$slider).not("[src]").addClass("slick-loading"),e.setupInfinite(),e.buildArrows(),e.buildDots(),e.updateDots(),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),!0===e.options.draggable&&e.$list.addClass("draggable")},Slick.prototype.buildRows=function(){var e,i,o,n,r,a,s,l=this,c=1;if(t.sliderOptions.rowsEnabled&&(c=0),n=document.createDocumentFragment(),a=l.$slider.children(),l.options.rows>c){for(s=l.options.slidesPerRow*l.options.rows,r=Math.ceil(a.length/s),e=0;r>e;e++){var p=document.createElement("div");for(i=0;i<l.options.rows;i++){var d=document.createElement("div");for(o=0;o<l.options.slidesPerRow;o++){var u=e*s+(i*l.options.slidesPerRow+o);a.get(u)&&d.appendChild(a.get(u))}p.appendChild(d)}n.appendChild(p)}l.$slider.empty().append(n),l.$slider.children().children().children().css({width:100/l.options.slidesPerRow+"%",display:"inline-block"})}},Slick.prototype.cleanUpRows=function(){var e,i=this,o=1;t.sliderOptions.rowsEnabled&&(o=0),i.options.rows>o&&(e=i.$slides.children().children(),e.removeAttr("style"),i.$slider.empty().append(e))},Slick.prototype.initADA=function(){var e=this,t=(Math.ceil(e.slideCount/e.options.slidesToShow),e.getNavigableIndexes().filter(function(t){return t>=0&&t<e.slideCount}));e.$slides&&e.$slides.add(e.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),e.$slides&&e.$slides.not(e.$slideTrack.find(".slick-cloned")).each(function(i){var o=t.indexOf(i);if(e.$dots&&"tablist"==e.$dots.attr("role")?$(this).attr({role:"tabpanel",id:"slick-slide"+e.instanceUid+i,tabindex:-1}):$(this).attr({id:"slick-slide"+e.instanceUid+i,tabindex:-1}),-1!==o){var n="slick-slide-control"+e.instanceUid+o;$("#"+n).length&&$(this).attr({"aria-describedby":n})}});for(var i=e.currentSlide,o=i+e.options.slidesToShow;i<o;i++)e.options.focusOnChange||e.options.dotNavArrows?e.$slides&&e.$slides.eq(i).attr({tabindex:"0"}):e.$slides&&e.$slides.eq(i).removeAttr("tabindex");e.activateADA()},Slick.prototype.activateADA=function(){var e=this;e.$slideTrack&&e.$slideTrack.find(".slick-active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"}),e.$slideTrack&&e.$slideTrack.find(".slick-current").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})},Slick.prototype.keyHandler=function(e){var t=this,i=t.$slider.context||t.$slider[0];e.target.tagName.match("TEXTAREA|INPUT|SELECT")||i.hasAttribute("disable-navigation")||(37===e.keyCode?t.changeSlide({data:{message:!0===t.options.rtl?"next":"previous"}}):39===e.keyCode&&t.changeSlide({data:{message:!0===t.options.rtl?"previous":"next"}}))},Slick.prototype.swipeHandler=function(e){var t=this;if(!(t.$slider.context||t.$slider[0]).hasAttribute("disable-navigation")&&!(!1===t.options.swipe||"ontouchend"in document&&!1===t.options.swipe||!1===t.options.draggable&&-1!==e.type.indexOf("mouse")))switch(t.touchObject.fingerCount=e.originalEvent&&void 0!==e.originalEvent.touches?e.originalEvent.touches.length:1,t.touchObject.minSwipe=t.listWidth/t.options.touchThreshold,!0===t.options.verticalSwiping&&(t.touchObject.minSwipe=t.listHeight/t.options.touchThreshold),e.data.action){case"start":t.swipeStart(e);break;case"move":t.swipeMove(e);break;case"end":t.swipeEnd(e)}},Slick.prototype.updateDots=function(){this.$dots},Slick.prototype.initDotEvents=function(){var t=this;!0===t.options.dots&&t.slideCount>t.options.slidesToShow&&($(e,t.$dots).on("click.slick",{message:"index"},t.changeSlide),!0===t.options.accessibility&&t.$dots.on("keydown.slick",t.keyHandler)),!0===t.options.dots&&!0===t.options.pauseOnDotsHover&&t.slideCount>t.options.slidesToShow&&$(e,t.$dots).on("mouseenter.slick",$.proxy(t.interrupt,t,!0)).on("mouseleave.slick",$.proxy(t.interrupt,t,!1)).on("focus.slick",$.proxy(t.interrupt,t,!0)).on("blur.slick",$.proxy(t.interrupt,t,!1))},Slick.prototype.cleanUpEvents=function(){var t=this;t.options.dots&&null!==t.$dots&&($(e,t.$dots).off("click.slick",t.changeSlide).off("mouseenter.slick",$.proxy(t.interrupt,t,!0)).off("mouseleave.slick",$.proxy(t.interrupt,t,!1)),!0===t.options.accessibility&&t.$dots.off("keydown.slick",t.keyHandler)),t.$slider.off("focus.slick blur.slick"),!0===t.options.arrows&&t.slideCount>t.options.slidesToShow&&(t.$prevArrow&&t.$prevArrow.off("click.slick",t.changeSlide),t.$nextArrow&&t.$nextArrow.off("click.slick",t.changeSlide),!0===t.options.accessibility&&(t.$prevArrow&&t.$prevArrow.off("keydown.slick",t.keyHandler),t.$nextArrow&&t.$nextArrow.off("keydown.slick",t.keyHandler))),t.$list&&t.$list.off("touchstart.slick mousedown.slick",t.swipeHandler),t.$list&&t.$list.off("touchmove.slick mousemove.slick",t.swipeHandler),t.$list&&t.$list.off("touchend.slick mouseup.slick",t.swipeHandler),t.$list&&t.$list.off("touchcancel.slick mouseleave.slick",t.swipeHandler),t.$list&&t.$list.off("click.slick",t.clickHandler),$(document).off(t.visibilityChange,t.visibility),t.$list&&t.cleanUpSlideEvents(),!0===t.options.accessibility&&t.$list&&t.$list.off("keydown.slick",t.keyHandler),!0===t.options.focusOnSelect&&$(t.$slideTrack).children().off("click.slick",t.selectHandler),$(window).off("orientationchange.slick.slick-"+t.instanceUid,t.orientationChange),$(window).off("resize.slick.slick-"+t.instanceUid,t.resize),$("[draggable!=true]",t.$slideTrack).off("dragstart",t.preventDefault),$(window).off("load.slick.slick-"+t.instanceUid,t.setPosition)},Slick.prototype.changeSlide=function(t,i){var o,n,r,a=this,s=$(t.currentTarget);switch(s.is("a")&&t.preventDefault(),s.is(e)||(s=s.closest(e)),r=a.slideCount%a.options.slidesToScroll!=0,o=r?0:(a.slideCount-a.currentSlide)%a.options.slidesToScroll,t.data.message){case"previous":n=0===o?a.options.slidesToScroll:a.options.slidesToShow-o,a.slideCount>a.options.slidesToShow&&a.slideHandler(a.currentSlide-n,!1,i);break;case"next":n=0===o?a.options.slidesToScroll:o,a.slideCount>a.options.slidesToShow&&a.slideHandler(a.currentSlide+n,!1,i);break;case"index":var l=0===t.data.index?0:t.data.index||s.index()*a.options.slidesToScroll;a.slideHandler(a.checkNavigable(l),!1,i),s.children().trigger("focus");break;default:return}}},c.isScriptAvailable=function(e,t){var i=!1;return h?(e&&h[o.AppConstants.JQUERY]&&(h[o.AppConstants.JQUERY][t]?i=!0:h[o.AppConstants.JQUERY]()[t]&&(i=!0)),h[t]&&(i=!0)):h.require&&h.require.defined&&h.require.defined(t)&&(i=!0),i},c.constructDependentScripts();var p=c.element.parentElement.querySelector(".ph-a11y-readable-content");if(p&&p.parentNode.removeChild(p),c.parseBindableAttributes(),-1!=c.element.className.indexOf(c.containerClass))c.totalSlidesCount=c.element.children.length;else{var d=c.element.querySelector("."+c.containerClass);d?c.totalSlidesCount=d.children.length:(c.totalSlidesCount=c.element.children.length,c.element.classList.remove("slick-prev"),c.element.classList.remove("slick-arrow"))}return c.element.classList.contains("ph-slide-loader")||c.element.classList.add("ph-slide-loader"),c.element.classList.add("ph-slide-count-"+c.totalSlidesCount),c.initiateSliderPlayer(),c.loadOnEvent&&(c.subscribeToEvent(o.AppConstants.EVENT_LOAD_POPUP_SLIDER,function(e){if(e&&e.targetId==c.element.getAttribute(o.AppConstants.ATTR_AU_TARGET_ID)){var t=e.itemIdx||0;c.sliderOptions.initialSlide=t,c.slickOverrideFun(),c.initSlick()}}),c.subscribeToEvent(o.AppConstants.EVENT_UNLOAD_POPUP_SLIDER,function(e){e&&e.targetId==c.element.getAttribute(o.AppConstants.ATTR_AU_TARGET_ID)&&c.slickElem.slick("slickPause")})),c}return l(t,e),t.prototype.constructDependentScripts=function(){var e=this.commonService.getSiteSettings("vendorScripts")||{},t=e.jquery||"jquery-3.6.0.min.js",i=e.slickJs||"slick-v3.min.js";this.dependentScripts=["/common/js/vendor/"+t,"/common/js/vendor/"+i]},t.prototype.attached=function(){this.handleWidgetTheme();var e=document.querySelector("html");"rtl"==(this.element.getAttribute("dir")||e.getAttribute("dir"))&&(this.sliderOptions.rtl=!0)},t.prototype.handleSyncSlider=function(){var e=this.element.cloneNode(!0),t="slider-sync-primary-"+Math.floor(1e3*Math.random()),i="slider-sync-cloned-"+Math.floor(1e3*Math.random()),o=document.createElement("div");o.appendChild(e),o.classList.add("slider-sync-cntr"),o.classList.add(i),e.setAttribute("data-primary-slider-selector",t),e.setAttribute("data-cloned-slider-selector",i),e.removeAttribute("pha-phslide-sync-slider"),e.removeAttribute("au-target-id"),e.classList.remove("au-target"),e.setAttribute("pha-phslide-issync-cloned-slider","true"),e.removeAttribute("pha-phslide-ally-hide-selectors");var n=this.element.getAttribute("pha-phslide-ally-hide-selectors");try{n=JSON.parse(n);for(var r=n.join(","),a=e.querySelectorAll(r),s=0;s<a.length;s++)a[s].setAttribute("aria-hidden","true")}catch(e){}this.element.classList.add(t),this.element.setAttribute("data-primary-slider-selector",t),this.element.setAttribute("data-cloned-slider-selector",i);var l=e.getAttribute("data-sync-slider-options")||"{}";try{l=JSON.parse(l);for(var p in l)"object"===c(l[p])&&(l[p]=JSON.stringify(l[p])),e.setAttribute(p,l[p]);e.removeAttribute("data-sync-slider-options")}catch(e){}for(var d=e.querySelectorAll(".ph-a11y-aria-live"),u=0;u<d.length;u++)d[u].classList.remove("ph-a11y-aria-live");this.element.parentElement.insertAdjacentElement("afterend",o),this.templatingEngine&&this.templatingEngine.enhance&&this.templatingEngine.enhance({element:e})},t.prototype.initiateCustomSyncSlider=function(){var e=this.element.getAttribute("data-cloned-slider-selector"),t=this.element.getAttribute("data-primary-slider-selector");e&&t&&$("."+e+" .slick-slide").click(function(e){var i=$(this).data("slick-index");$("."+t).slick("slickGoTo",i)})},t.prototype.videoPause=function(e,t,i){var n=e.querySelector("["+t+"]");if(n){var r=n.getAttribute(o.AppConstants.ATTR_AU_TARGET_ID);i&&n.classList&&!n.classList.contains("hide")&&(n.classList.add("hide"),this.eventAggregator.publish(o.AppConstants.EVENT_TRIGGER_CLOSE_POPUP,{targetId:r})),this.raiseEvent(o.AppConstants.EVENT_PAUSE_VIDEO,{targetId:r})}},t.prototype.detached=function(){this.eventSubs.forEach(function(e){e.dispose()})},t.prototype.initSlick=function(){var e=this;$=h.jQuery.noConflict(),this.slickElem||(this.slickElem=$(this.element.parentElement.querySelector(this.getContainerSelector())),this.slickElem.on("init",function(t,i){e.slickInited=!0,e.sliderOptions.issyncClonedSlider&&setTimeout(function(){e.initiateCustomSyncSlider()},150);var o=e.element.querySelector(".slick-dots");if(o&&o.children&&o.children.length&&(e.totalSlidesCount=e.element.querySelector(".slick-dots").children.length),e.sliderOptions.ariaText&&e.sliderOptions.ariaText.length>0){var n=e.sliderOptions.ariaText?e.sliderOptions.ariaText:"";e.element.setAttribute("aria-label",n+e.currentSlide+"  of "+e.totalSlidesCount)}if(e.addDynamicAccessiblityEle(e.element.querySelector('[ph-slide-num="1"]')),e.toCheckSliderWidth(),e.slickOverrideAccessbility(),setTimeout(function(){$(e.slickElem).resize()},150),e.attchSliderTrackingEvents(),e.addSlickPlayPauseEvents(),e.element.hasAttribute("dotsInsideNav")&&i.$dots&&i.$nextArrow&&i.$prevArrow){var r=void 0,a=void 0,s=void 0,l=void 0,c=void 0,p=void 0;r=getComputedStyle(i.$dots[0].querySelector("button")),a=parseInt(r.width)+parseInt(r.marginRight)+parseInt(r.marginLeft),s=parseInt(getComputedStyle(i.$prevArrow[0]).width),l=i.$slides.length*a,c=l%2==0?l/2:(l+1)/2,p=c+a+s+"px",i.$nextArrow[0].style.transform="translate("+p+",100%)",i.$prevArrow[0].style.transform="translate(-"+p+",100%)"}if(i.$slideTrack)for(var d=0;d<i.$slideTrack.find(".slick-cloned").length;d++)for(var u=i.$slideTrack.find(".slick-cloned")[d].querySelectorAll("img"),h=0;h<u.length;h++){var f=u[h].getAttribute("src"),g=u[h].getAttribute("data-src");g&&f!=g&&(u[h].setAttribute("src",g),u[h].previousElementSibling&&u[h].previousElementSibling.classList.contains("lqip-overlay")&&u[h].parentElement.removeChild(u[h].previousElementSibling))}}),this.slickElem.on("reInit",function(){e.slickInited=!0}),this.slickElem.on("beforeChange",function(t,i,n,r){if(e.checkVideoAsset(o.AppConstants.EVENT_PAUSE_VIDEO),e.sliderOptions.hasOwnProperty("dots")&&e.sliderOptions.dots){var a=" .slick-dots",s=void 0;if(e.sliderOptions.appendDots?(e.sliderOptions.appendDots&&(a=e.sliderOptions.appendDots+" .slick-dots"),s=e.element.querySelector(a),e.element.querySelector(e.sliderOptions.appendDots)):(a=" .slick-dots",s=e.element.querySelector(a),e.element.querySelector(e.sliderOptions.appendDots)),s&&s.children.length>0){var l="button";if(e.phslideCustomPaging&&(l=$(e.phslideCustomPaging)[0].nodeName.toLowerCase()),$(s).find(l).removeClass("slick-active").end(),r||0==r){var c=$(s).find(l)[r/i.options.slidesToScroll];$(c).addClass("slick-active"),e.sliderOptions.dotNavArrows&&$(c).focus()}}}for(var p=0;p<i.$slideTrack.find(".slick-slide").length;p++){var d=i.$slideTrack.find(".slick-slide")[p];e.videoPause(d,"ph-video-v1",!0)}}),this.slickElem.on("afterChange",function(t,i,n,r){if(e.currentSlide=n+1,e.sliderOptions.ariaText&&e.sliderOptions.ariaText.length>0){var a=e.sliderOptions.ariaText?e.sliderOptions.ariaText:"";e.element.setAttribute("aria-label",a+e.currentSlide+"  of "+e.totalSlidesCount)}if(e.sliderOptions.syncSlider){var s=e.element.getAttribute("data-cloned-slider-selector"),l=document.querySelector("."+s),c=void 0;c=l&&l.querySelector('.slick-slide[data-slick-index="'+n+'"]'),l&&l.querySelector(".slick-slide.is-active")&&l.querySelector(".slick-slide.is-active").classList.remove("is-active"),c&&$(c).addClass("is-active")}if(i){var p=i.$slideTrack&&i.$slideTrack.find(".slick-slide");if(p&&p.length)for(var d=0;d<p.length;d++){var u=p[d].querySelector("img");-1==p[d].className.indexOf("slick-active")?u&&u.setAttribute("aria-hidden",!0):u&&u.setAttribute("aria-hidden",!1)}for(var h=[],f=void 0,g=void 0,m=i.$slider&&i.$slider[0]&&i.$slider[0].getAttribute("phslide-number-slides-to-scroll")?i.$slider[0].getAttribute("phslide-number-slides-to-scroll"):i.$slideTrack.find(".slick-active").length,y=i.$slider&&i.$slider[0]&&i.$slider[0].getAttribute("phslide-number-slides-to-show")?i.$slider[0].getAttribute("phslide-number-slides-to-show"):i.$slideTrack.find(".slick-active").length,d=0;d<i.$slideTrack.find(".slick-slide").length;d++)if(-1!=i.$slideTrack.find(".slick-slide")[d].className.indexOf("slick-active")){i.$slideTrack.find(".slick-slide")[d].hasAttribute("tabindex")&&i.$slideTrack.find(".slick-slide")[d].removeAttribute("tabindex");for(var v=0;v<$(i.$slideTrack.find(".slick-slide")[d]).find("a, input, button, select").length;v++)$(i.$slideTrack.find(".slick-slide")[d]).find("a, input, button, select")[v].setAttribute("tabindex","0")}else{i.$slideTrack.find(".slick-slide")[d].hasAttribute("tabindex")&&i.$slideTrack.find(".slick-slide")[d].removeAttribute("tabindex");for(var b=0;b<$(i.$slideTrack.find(".slick-slide")[d]).find("a, input, button, select").length;b++)$(i.$slideTrack.find(".slick-slide")[d]).find("a, input, button, select")[b].setAttribute("tabindex","-1")}for(var S=0;S<i.$slideTrack.find(".slick-active").length;S++)if(S>=y-m&&y)for(var A=i.$slideTrack.find(".slick-active")[S],k=A.querySelectorAll(".ph-a11y-aria-live"),E=0;E<k.length;E++)h.push(k[E]),k[E].removeAttribute("aria-atomic"),k[E].removeAttribute("aria-live");i.$slides[n];if(e.element.parentElement&&!e.element.parentElement.querySelector(".ph-a11y-readable-content")){f=document.createElement("div");var w=e.element.classList.contains("ph-static-slider")?e.element:e.element.querySelector(".ph-static-slider");if(w){if("true"==w.getAttribute("pha-phslide-autoplay")){f.setAttribute("class","ph-a11y-readable-content hide");for(var T=e.element.querySelectorAll(".ph-static-slider .image"),d=0;d<T.length;d++)T[d].removeAttribute("aria-live")}else f.setAttribute("class","ph-a11y-readable-content sr-only")}else f.setAttribute("class","ph-a11y-readable-content sr-only");f.setAttribute("aria-live","assertive"),f.setAttribute("aria-atomic",!0),e.element.parentElement.appendChild(f)}if(g=e.element.parentElement&&e.element.parentElement.querySelector(".ph-a11y-readable-content"),g&&g.hasAttribute("aria-live")&&(g.removeAttribute("aria-live"),g.removeAttribute("aria-atomic")),!$(g)[0].querySelector("[role='presentation']")){var C=document.createElement("div");C.setAttribute("role","presentation"),g.appendChild(C)}$(g)[0]&&$(g)[0].querySelector("[role='presentation']")&&($(g)[0].querySelector("[role='presentation']").removeAttribute("aria-hidden"),$(g)[0].querySelector("[role='presentation']").hasAttribute("aria-live")||($(g)[0].querySelector("[role='presentation']").setAttribute("aria-live","assertive"),$(g)[0].querySelector("[role='presentation']").setAttribute("aria-atomic",!0))),e.checkVideoAsset(o.AppConstants.EVENT_START_VIDEO);for(var O=0;O<i.$slideTrack.find(".slick-active").length;O++){var R=i.$slideTrack.find(".slick-active")[O],P=R.querySelector("[ph-video-v1]"),j=R.querySelector("div[ph-video-v1]");P&&P.classList&&P.classList.contains("hide")&&(P.classList.remove("hide"),j&&j.classList.remove("hide"),j.parentElement&&j.parentElement.hasAttribute("aria-hidden")&&j.parentElement.setAttribute("aria-hidden","false"))}for(var D=0;D<i.$slideTrack.find(".slick-slide").length;D++){var I=i.$slideTrack.find(".slick-slide")[D];if(I.classList&&!I.classList.contains("slick-active")){var L=I.querySelector("div[ph-video-v1]");L&&!L.classList.contains("hide")&&L.classList.add("hide")}}var x="";if(h&&h.length){x="";for(var _=0;_<h.length;_++)if(h[_]){var M=h[_].innerText;M=M.replace(/\n/g," "),M=M.replace(/\r/g," "),x=x+" "+M}}setTimeout(function(){var t=Math.floor(n/i.options.slidesToShow)+1,o=(i.options.slidesToShow,i.options.rows,i.options.slidesPerRow,Math.ceil(e.totalSlidesCount));t>o&&(t=1),$(g)[0].querySelector("[role='presentation']").innerText="showing slide "+t+"  of "+o+" "+x},100),clearTimeout(e.toAccessAttrTimeout),e.toAccessAttrTimeout=setTimeout(function(){$(g)[0].querySelector("[role='presentation']")&&($(g)[0].querySelector("[role='presentation']").setAttribute("aria-hidden",!0),$(g)[0].querySelector("[role='presentation']").innerHTML="")},200);var N=e.slickElem[0].querySelector(".slick-list");if(N){var F=N.querySelectorAll(".slick-active")||[],V=e.slickElem[0].parentElement&&e.slickElem[0].parentElement.querySelector(".slick-list"),q=V&&V.getAttribute("role")||"";if(F.length>1&&"tabpanel"!=q){N.setAttribute("role","list"),e.slickElem[0].hasAttribute("role")&&e.slickElem[0].removeAttribute("role");for(var B=0;B<F.length;B++)F[B]&&F[B].setAttribute("role","listitem")}else"tabpanel"!=q&&(N.setAttribute("role","presentation"),e.slickElem[0].hasAttribute("role")&&e.slickElem[0].removeAttribute("role"),F&&F[0]&&F[0].removeAttribute("role"))}}e.slickOverrideAccessbility()})),this.slickInited?(this.slickElem.slick("unslick"),this.slickElem.slick(this.sliderOptions),this.slickElem.slick("slickGoTo",this.sliderOptions.initialSlide||0)):(this.slickElem.removeClass(o.AppConstants.CLASS_HIDE).slick(this.sliderOptions),this.slickElem.slick("slickGoTo",this.sliderOptions.initialSlide||0));var t=this.slickElem[0].querySelector(".slick-list");if(t){t.removeAttribute("aria-atomic"),t.removeAttribute("aria-live");var i=t.querySelectorAll(".slick-active")||[],n=this.slickElem[0].parentElement&&this.slickElem[0].parentElement.querySelector(".slick-list"),r=n&&n.getAttribute("role")||"";if(i.length>1&&"tabpanel"!=r){t.setAttribute("role","list"),this.slickElem[0].hasAttribute("role")&&this.slickElem[0].removeAttribute("role");for(var a=0;a<i.length;a++)i[a]&&i[a].setAttribute("role","listitem")}else"tabpanel"!=r&&(t.setAttribute("role","presentation"),this.slickElem[0].hasAttribute("role")&&this.slickElem[0].removeAttribute("role"),i&&i[0]&&i[0].removeAttribute("role"))}},t.prototype.checkVideoAsset=function(e){var t=$(this.slickElem).find(".slick-active");if(t&&t.length){var i=t?t[0].getAttribute(o.AppConstants.ATTR_WIDGET_REF):void 0;if(t&&i){var n=t[0].querySelector("["+i+"]");if(n){var r=n.getAttribute(o.AppConstants.ATTR_AU_TARGET_ID);this.eventAggregator.publish(e,{targetId:r})}}}},t.prototype.addDynamicAccessiblityEle=function(e){var t=void 0,i=void 0;if(this.element.parentElement&&!this.element.parentElement.querySelector(".ph-a11y-readable-content")&&(t=document.createElement("div"),t.setAttribute("class","ph-a11y-readable-content sr-only"),this.element.parentElement.appendChild(t)),i=this.element.parentElement&&this.element.parentElement.querySelector(".ph-a11y-readable-content"),i.innerHTML="",i.setAttribute("aria-live","assertive"),i.setAttribute("aria-atomic",!0),this.element.hasAttribute("pha-phslide-fade")){if("true"==this.element.getAttribute("pha-phslide-fade")&&!this.pageLoad){this.pageLoad=!0;var o=this.element.parentElement&&this.element.parentElement.querySelector(".ph-a11y-readable-content");return void(o&&o.parentNode.removeChild(o))}}if(!this.pageLoad&&!this.element.classList.contains("ph-gallery-container")){var n=this.element.parentElement&&this.element.parentElement.querySelector(".ph-a11y-readable-content");return void(n&&n.parentNode.removeChild(n))}var r=e&&e.querySelectorAll(".ph-a11y-aria-live");if(r&&r.length){for(var a="",s=0;s<r.length;s++)r[s]&&(a+=r[s].innerText);i.innerHTML='<div role="presentation"> slide '+this.currentSlide+"  of "+this.totalSlidesCount+a+"</div>"}$(i)[0]&&$(i)[0].querySelector("[role='presentation']")&&$(i)[0].querySelector("[role='presentation']").removeAttribute("aria-hidden");for(var l=this.element.querySelector(".slick-track"),c=0;c<$(l).find(".slick-slide").length;c++)if(-1!=$(l).find(".slick-slide")[c].className.indexOf("slick-active"))for(var p=0;p<$($(l).find(".slick-slide")[c]).find("a, input, button, select").length;p++)$($(l).find(".slick-slide")[c]).find("a, input, button, select")[p].setAttribute("tabindex","0");else{$(l).find(".slick-slide")[c].setAttribute("tabindex","-1");for(var d=0;d<$($(l).find(".slick-slide")[c]).find("a, input, button, select").length;d++)$($(l).find(".slick-slide")[c]).find("a, input, button, select")[d].setAttribute("tabindex","-1")}},t.prototype.toCheckSliderWidth=function(){var e=this;clearTimeout(this.toLoadTimeout),this.toLoadTimeout=setTimeout(function(){$&&$(e.element).find(".slick-track").length>0?("0px"==e.element.querySelectorAll(".slick-track")[0].style.width?($(e.element).trigger("resize"),e.goToActiveSlideChanged(e.sliderOptions.initialSlide||0),e.toCheckSliderWidth()):clearTimeout(e.toLoadTimeout),e.element.classList.contains("ph-slide-loader")&&(e.element.classList.remove("ph-slide-loader"),setTimeout(function(){$(e.element).trigger("resize")},150))):e.toCheckSliderWidth()},150)},t.prototype.goToActiveSlideChanged=function(e){var t=this.slickElem&&this.slickElem[0].classList.contains(this.containerClass),i=this.slickElem;!t&&this.element.querySelector("."+this.containerClass)&&$&&(i=$(this.element).find("."+this.containerClass)),i&&i.slick("slickGoTo",e)},t.prototype.slickOverrideAccessbility=function(){var e=this;if(this.sliderOptions.dots){var t=" .slick-dots";this.sliderOptions.appendDots&&(t=this.sliderOptions.appendDots+" .slick-dots");var i=this.element.querySelector(t);this.element.querySelector(this.sliderOptions.appendDots);i&&i.children.length>0&&(clearTimeout(this.toAccessbilityTimeout),this.toAccessbilityTimeout=setTimeout(function(){e.sliderOptions.dotNavArrows&&i.setAttribute("role","tablist");for(var t=0;t<=i.children.length-1;t++){var o=i.children[t],n="",r=e.element.getAttribute("phslide-dot-info-selector");if(r){var a=e.element.querySelectorAll(".slick-slide:not(.slick-cloned)"),s=a[t].querySelectorAll(r);s.length||(s=a[t].querySelectorAll('[component-content-key="heading"]'));for(var l=0;l<s.length;l++)n+=s[l].innerText.trim()}var c="aria-current";!o||"tab"!=o.getAttribute("role")&&"tablist"!=o.parentElement.getAttribute("role")||(c="aria-selected"),-1!=o.className.indexOf("slick-active")?("A"!=o.nodeName&&"BUTTON"!=o.nodeName&&"li"!=o.nodeName||o.setAttribute(c,"true"),"BUTTON"!=o.nodeName&&"li"!=o.nodeName||o.setAttribute(c,"true"),o.setAttribute("aria-label"," slide "+(t+1)+" of "+i.children.length),e.sliderOptions.dotNavArrows&&o.setAttribute("tabindex","0")):("A"==o.nodeName&&o.removeAttribute(c),"BUTTON"!=o.nodeName&&"li"!=o.nodeName||o.setAttribute(c,"false"),o.setAttribute("aria-label"," slide "+(t+1)+" of "+i.children.length),e.sliderOptions.dotNavArrows&&o.setAttribute("tabindex","-1"))}},100))}},t.prototype.attchSliderTrackingEvents=function(){var t=this,i=this.element.querySelector(".slick-next"),o=this.element.querySelector(".slick-prev"),n=this.element.querySelector(".slick-dots");if(this.sliderOptions&&this.sliderOptions.appendDots){var r=" .slick-dots";this.sliderOptions.appendDots&&(r=this.sliderOptions.appendDots+" .slick-dots");var a=this.element.querySelector(r);n=a||document.querySelector(r)}i&&i.addEventListener("click",function(i){e.prototype.trackWidgetClick.call(t,"next_slider_click",{})}),o&&o.addEventListener("click",function(i){e.prototype.trackWidgetClick.call(t,"previous_slider_click",{})}),n&&n.addEventListener("click",function(i){e.prototype.trackWidgetClick.call(t,"dot_slider_click",{})})},t.prototype.addSlickPlayPauseEvents=function(){var e=this,t=this.element.querySelector(".ph-play-pause-cntr-area");if(t){1==this.sliderOptions.autoplay?(t.classList.remove("slider-pause"),t.classList.add("slider-play")):(t.classList.remove("slider-play"),t.classList.add("slider-pause"));var i=t.querySelector(".slider-play-button"),o=t.querySelector(".slider-pause-button"),n=t.querySelector(".slider-play-pause-button");n&&n.addEventListener("click",function(i){t.classList.contains("slider-play")?e.sliderPause(t):t.classList.contains("slider-pause")&&e.sliderPlay(t)}),i&&i.addEventListener("click",function(i){e.sliderPlay(t)}),o&&o.addEventListener("click",function(i){e.sliderPause(t)})}},t.prototype.sliderPause=function(t){e.prototype.trackWidgetClick.call(this,"slider_pause_click",{}),this.slickElem.slick("slickPause"),t.classList.remove("slider-pause"),t.classList.remove("slider-play"),t.classList.add("slider-pause");var i=this.element.classList.contains("ph-static-slider")?this.element:this.element.querySelector("pha-phslide-autoplay");if(i){if("true"==i.getAttribute("pha-phslide-autoplay")){var o=this.element.parentElement&&this.element.parentElement.querySelector(".ph-a11y-readable-content");console.log(o),o.classList.remove("hide"),o.classList.add("sr-only")
;for(var n=this.element.querySelectorAll(".image"),r=0;r<n.length;r++)n[r].setAttribute("aria-live","assertive")}}},t.prototype.sliderPlay=function(t){e.prototype.trackWidgetClick.call(this,"slider_play_click",{}),this.slickElem.slick("slickPlay"),t.classList.remove("slider-pause"),t.classList.remove("slider-play"),t.classList.add("slider-play")},t.prototype.getContainerSelector=function(){return"."+this.containerClass},t.prototype.parseBindableAttributes=function(){var t=this;e.prototype.parseBindableAttributes.call(this);for(var i=this.element.attributes,n=0;n<i.length;n++){(function(e){var n=i[e],r=n.value,a=!1;if(!r||!r.length)return"continue";if(-1!=n.name.indexOf(o.AppConstants.ATTR_BINDABLE_PARSE_PREFIX))try{r=JSON.parse(r),a=!0}catch(e){}-1!=n.name.indexOf(o.AppConstants.ATTR_BINDABLE_NUMBER_PREFIX)?(r=parseInt(r),a=!0):o.AppConstants.ATTR_NUMBER_FIELDS.forEach(function(e){if(-1!=n.name.indexOf(e))try{r=parseInt(r),a=!0}catch(e){}});var s=t.kebabCaseToCameCase(n.name);if(r&&!a&&(r.toLowerCase()==o.AppConstants.TRUE?r=!0:r.toLowerCase()==o.AppConstants.FALSE&&(r=!1)),s.startsWith(o.AppConstants.ATTR_SLIDE_PREFIX)||s.startsWith(o.AppConstants.ATTR_BINDABLE_STANDARD_PREFIX+o.AppConstants.ATTR_SLIDE_PREFIX)){var l=s.replace(o.AppConstants.ATTR_BINDABLE_STANDARD_PREFIX+o.AppConstants.ATTR_SLIDE_PREFIX,"");l=s.replace(o.AppConstants.ATTR_BINDABLE_STANDARD_PREFIX+o.AppConstants.ATTR_SLIDE_PREFIX+o.AppConstants.ATTR_BINDABLE_PARSE_PREFIX,""),l=s.replace(o.AppConstants.ATTR_BINDABLE_STANDARD_PREFIX+o.AppConstants.ATTR_SLIDE_PREFIX+o.AppConstants.ATTR_BINDABLE_NUMBER_PREFIX,""),l=s.replace(o.AppConstants.ATTR_SLIDE_PREFIX+o.AppConstants.ATTR_BINDABLE_NUMBER_PREFIX,""),l=s.replace(o.AppConstants.ATTR_SLIDE_PREFIX+o.AppConstants.ATTR_BINDABLE_PARSE_PREFIX,""),l=s.replace(o.AppConstants.ATTR_SLIDE_PREFIX,""),l=l[0].toLowerCase()+l.substring(1),t.sliderOptions[l]=r}})(n)}if(this.sliderOptions&&this.sliderOptions.customPaging){var a=this.sliderOptions.customPaging,s=void 0;this.sliderOptions.customPaging=function(e,i){s=a;var o=t.element.querySelector('[ph-slide-num="'+(i+1)+'"]'),n=void 0,r=void 0,l=(e.slideCount,void 0);if(o&&o.attributes)for(var c=0;c<o.attributes.length;c++)l=o.attributes[c].name,-1!=l.indexOf("thumb")&&(n=o.getAttribute(o.attributes[c].name),r=l.replace("data-ph-thumb-",""),s=s.replace("#"+r+"#",n));return s}}r.logger.debug(this.sliderOptions),this.sliderOptions&&this.sliderOptions.appendDots&&(this.sliderOptions.appendDots="[data-ph-id="+this.element.getAttribute("data-ph-id")+"] "+this.sliderOptions.appendDots),this.sliderOptions&&this.sliderOptions.appendArrows&&(this.sliderOptions.appendArrows="[data-ph-id="+this.element.getAttribute("data-ph-id")+"] "+this.sliderOptions.appendArrows)},t.prototype.loadScript=function(e,t,i){var n=this;return new Promise(function(r,a){var s=!1;if(s=n.isScriptAvailable(i,t))r();else{var l=[],c=!1;if(window&&(window[o.AppConstants.SCRIPTCACHE]=window[o.AppConstants.SCRIPTCACHE]||[],l=window[o.AppConstants.SCRIPTCACHE]),-1!=l.indexOf(e)?c=!0:l.push(e),c)var p=setInterval(function(){(s=n.isScriptAvailable(i,t))&&(clearInterval(p),r())},100);else{var d=document.createElement("script");d.src=e,d.async=!0,d.defer=!0,d.onload=function(){r()};var u=document.getElementsByTagName("script")[0];u.parentNode.insertBefore(d,u.nextElementSibling)}}})},t.prototype.loadDependencies=function(){var e=this;return new Promise(function(t,i){var n=JSON.parse(JSON.stringify(e.dependentScripts)),r=e.commonService.getCdnUrl()+n.shift();e.loadScript(r,o.AppConstants.JQUERY).then(function(){var i=e.commonService.getCdnUrl()+n.shift();e.loadScript(i,"slick",!0).then(function(){t()})})})},t.prototype.handleWidgetTheme=function(){var e=this.commonService.getSiteSettings("siteWidgetThemeUrls");if(!document.querySelector("#sliderThemeUrl")&&e&&e.sliderThemeUrl){var t=document.querySelector("head"),i=document.createElement("link");i.setAttribute("href",e.sliderThemeUrl),i.setAttribute("rel","stylesheet"),i.setAttribute("type","text/css"),i.setAttribute("id","sliderThemeUrl"),t.appendChild(i)}},t}(n.PhenomWidgetAttribute);e.CardSliderAttribute=f=p([(0,t.customAttribute)(u),(0,t.autoinject)(),d("design:paramtypes",[Element,i.EventAggregator,r.CommonService,t.TemplatingEngine])],f)})
define("ph-common/app-constants",["exports"],function(e){"use strict";function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=e.AppConstants=function e(){t(this,e)};i.TRUE="true",i.FALSE="false",i.JQUERY="jQuery",i.SCRIPTCACHE="phAppScriptCache",i.MEDIA_TYPE_IMAGE="image",i.MEDIA_TYPE_VIDEO="video",i.ATTR_BINDABLE_STANDARD_PREFIX="data-",i.ATTR_BINDABLE_PREFIX="pha-",i.ATTR_BINDABLE_PARSE_PREFIX="parse-",i.ATTR_BINDABLE_NUMBER_PREFIX="number-",i.ATTR_NUMBER_FIELDS=["auto-play-speed","speed"],i.ATTR_AU_TARGET_ID="au-target-id",i.ATTR_SLIDE_PREFIX="phslide",i.ATTR_MEDIA_TYPE="data-media-type",i.ATTR_WIDGET_REF="data-widget-ref",i.ATTR_GALLERY_ITEM_TYPE="data-gallery-item-type",i.ATTR_VIDEO_PROVIDER="data-gallery-video-provider",i.ATTR_VIDEO_MOBILE_PROVIDER="pha-mobile-fullscreen",i.ATTR_VIDEO_ID="data-gallery-video-id",i.ATTR_SRC="src",i.ATTR_DATA_SRC="data-src",i.ATTR_ITEM_ID="data-item-id",i.ATTR_IS_GALLERY_ITEM="pha-gallery-item",i.EVENT_PLAY_VIDEO="PLAY_VIDEO",i.EVENT_PAUSE_VIDEO="PAUSE_VIDEO",i.EVENT_TRASCRIPT_VIDEO="EVENT_TRASCRIPT_VIDEO",i.EVENT_DESCRIPT_VIDEO="EVENT_DESCRIPT_VIDEO",i.EVENT_START_VIDEO="START_VIDEO",i.EVENT_LOAD_POPUP_SLIDER="load-popup-slider",i.EVENT_UNLOAD_POPUP_SLIDER="unload-popup-slider",i.EVENT_TRIGGER_CLOSE_POPUP="close_popup",i.PROVIDER_YOUTUBE="youtube",i.PROVIDER_VIMEO="vimeo",i.PROVIDER_VIDEO="video",i.PROVIDER_HTMLPlyr="native",i.PROVIDER_WISTIA="wistia",i.PROVIDER_PLYR="plyr",i.PROVIDER_BRIGHTCOVE="brightcove",i.PROVIDER_KALTURA_PLAYER="kaltura",i.PROVIDER_AWS_PLAYER="amazon",i.PROVIDER_MP4="mp4",i.CLASS_SLIDER_CONTAINER="ph-slider-container",i.CLASS_HIDE="hide",i.CLASS_VIDEOJS="ph-video-js",i.CLASS_ALLY_VIDEOJS="ph-a11y-video-js",i.CLASS_ABLE_VIDEOJS="ph-able-video-js",i.SELECTOR_GALLERY_ITEM=".ph-gallery-item",i.SELECTOR_GALLERY_ITEM_CTR=".ph-gallery-item-container",i.SELECTOR_GALLERY_ITEM_LINK=".ph-gallery-item-link",i.SELECTOR_GALLERY_CLOSE=".ph-gallery-close",i.SELECTOR_POPUP_CONTAINER=".popup-container",i.SELECTOR_GALLERY_CONTAINER=".ph-gallery-container"})
define("ph-common/ph-widget-attr",["exports","aurelia-dependency-injection","aurelia-event-aggregator","./ph-modal-dialog","./app-constants"],function(e,t,i,o,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.PhenomWidgetAttribute=void 0;var a=function(e){return e&&e.__esModule?e:{default:e}}(o);e.PhenomWidgetAttribute=function(){function e(o,n,a){r(this,e),this.commonService=n,this.attrName=a,this.eventSubs=[],this.widgetBundle={},this.element=o,this.eventAggregator=t.Container.instance.get(i.EventAggregator);this.eventAggregator}return e.prototype.kebabCaseToCameCase=function(e){return e=e.replace(n.AppConstants.ATTR_BINDABLE_STANDARD_PREFIX+n.AppConstants.ATTR_BINDABLE_PREFIX,""),e=e.replace(n.AppConstants.ATTR_BINDABLE_PREFIX,""),e=e.replace(n.AppConstants.ATTR_BINDABLE_PARSE_PREFIX,""),e=e.replace(n.AppConstants.ATTR_BINDABLE_NUMBER_PREFIX,""),e.replace(/(\-\w)/g,function(e){return e[1].toUpperCase()})},e.prototype.parseBindableAttributes=function(e){for(var t=this.element.attributes,i=0;i<t.length;i++){var o=t[i],r=o.value;if(r&&r.length){var a=!1;if(-1!=o.name.indexOf(n.AppConstants.ATTR_BINDABLE_PARSE_PREFIX))try{r=JSON.parse(r),a=!0}catch(e){}-1!=o.name.indexOf(n.AppConstants.ATTR_BINDABLE_NUMBER_PREFIX)&&(r=parseInt(r),a=!0);var s=this.kebabCaseToCameCase(o.name);r&&!a&&(r.toLowerCase()==n.AppConstants.TRUE?r=!0:r.toLowerCase()==n.AppConstants.FALSE&&(r=!1)),e&&(e[s]=r),this[s]=r}}},e.prototype.populateWidgetBundle=function(){var e=this;return this.commonService.getWidgetLangBundle(this.attrName,"","","","",this.getLocalWidgetBundle()).then(function(t){return e.widgetBundle=t})},e.prototype.getLocalWidgetBundle=function(){return null},e.prototype.raiseEvent=function(e,t){e&&e.trim().length>0&&t&&this.eventAggregator.publish(e,t)},e.prototype.subscribeToEvent=function(e,t){e&&e.trim().length>0&&t&&this.eventSubs.push(this.eventAggregator.subscribe(e,t))},e.prototype.openDialogPopup=function(e,t,i,o){"."!=e[0]&&(e="."+e);var n=this.element.querySelectorAll(e)[0];if(i){new a.default.Dialog(n,t,i)}else{new a.default.Dialog(n,t)}},e.prototype.closeDialogPopup=function(){a.default.closeCurrentDialog()},e.prototype.getView=function(e){if(e&&e.getAttribute("data-widget")&&"BODY"!=e.nodeName)return e.getAttribute("original-view")||"default";e&&this.getView(e.parentElement)},e.prototype.getWidgetName=function(e){return this.commonService.getWidgetName(e,this.attrName)},e.prototype.trackWidgetClick=function(e,t){var i={},o=this.commonService.fetchWidget(this.element);i.params={widgetId:this.attrName,widgetName:this.getWidgetName(this.element),widgetview:this.getView(this.element)},o&&(i.params.parentWidgetName=this.getWidgetName(o.elem),i.params.parentWidgetView=this.getView(o.elem),i.params.parentWidgetId=o.elemTag),this.commonService.processTrackingEvent(e,void 0,i,{},t)},e}()})
define("ph-common/ph-media-gallery/v1/ph-media-gallery",["exports","aurelia-framework","aurelia-event-aggregator","./../../ph-widget-attr","./../../app-constants","./../../index"],function(e,t,i,o,n,r){"use strict";function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(e,"__esModule",{value:!0}),e.MediaGallery=void 0;var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p=function(e,t,i,o){var n,r=arguments.length,a=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"===("undefined"==typeof Reflect?"undefined":c(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},d=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":c(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},u="ph-media-gallery-v1",h=e.MediaGallery=function(e){function t(i,o,l,c){a(this,t);var p=s(this,e.call(this,i,l,u));return p.element=i,p.eventAggregator=o,p.commonService=l,p.templatingEngine=c,p.items=[],p.enablepopup=!0,p.disableSlick=!1,p.handleVideoInlineItemClick=function(e,t){p.galleryPopup.classList.remove(n.AppConstants.CLASS_HIDE);var i=p.element.querySelector(".video-popup"),o=e&&e.target.getAttribute(n.AppConstants.ATTR_ITEM_ID)||t;if(i&&(document.addEventListener("keyup",p.closeGalleryItem),i.classList.add("hide")),p.items.length){var r=p.galleryPopup.querySelector("["+n.AppConstants.ATTR_IS_GALLERY_ITEM+"]");r&&(r.classList.remove("hide"),p.raiseEvent(n.AppConstants.EVENT_START_VIDEO,{targetId:p.getAttr(r,n.AppConstants.ATTR_AU_TARGET_ID),autoplay:"1"}))}p.raiseEvent(n.AppConstants.EVENT_LOAD_POPUP_SLIDER,{itemIdx:o,targetId:p.getAttr(p.element.querySelector(n.AppConstants.SELECTOR_GALLERY_CONTAINER),n.AppConstants.ATTR_AU_TARGET_ID)}),p.eventAggregator.subscribeOnce(n.AppConstants.EVENT_TRIGGER_CLOSE_POPUP,function(e){p.closeGallery()})},p.handleGalleryItemClick=function(e){if(p.galleryPopup.classList.remove(n.AppConstants.CLASS_HIDE),p.items.length){var t=p.galleryPopup.querySelector("["+n.AppConstants.ATTR_IS_GALLERY_ITEM+"]");t&&(t.classList.remove("hide"),p.raiseEvent(n.AppConstants.EVENT_START_VIDEO,{targetId:p.getAttr(t,n.AppConstants.ATTR_AU_TARGET_ID)}));var i=p.galleryPopup.querySelector(".ph-gallery-footer"),o=e.currentTarget?e.currentTarget.querySelector(n.AppConstants.SELECTOR_GALLERY_ITEM):void 0;if(o&&i){var r=p.element.querySelector(".ph-gallery-footer .ph-gallery-transcript"),a=p.element.querySelector(".ph-gallery-footer .ph-gallery-description"),s=o.getAttribute("pha-description-video-id")||o.getAttribute("data-pha-description-video-id"),l=o.getAttribute("pha-transcript-video-id")||o.getAttribute("data-pha-transcript-video-id");s||l?i.classList.remove("hide"):i.classList.add("hide"),a&&(s?a.classList.remove("hide"):a.classList.add("hide"),a.classList.contains("ph-description-audio")&&a.classList.remove("ph-description-audio")),r&&(l?r.classList.remove("hide"):r.classList.add("hide"))}}var c=p.galleryPopup.querySelector(n.AppConstants.SELECTOR_GALLERY_CLOSE);try{p.openDialogPopup(n.AppConstants.SELECTOR_POPUP_CONTAINER,e.currentTarget,c),document.addEventListener("keyup",p.closeGalleryItem)}catch(e){console.error(e)}var d=p.element.querySelector(".popup-container");d&&d.removeAttribute("role");for(var u=p.galleryPopup.querySelectorAll("img"),h=0;h<u.length;h++)u[h].setAttribute("aria-hidden","true");p.raiseEvent(n.AppConstants.EVENT_LOAD_POPUP_SLIDER,{itemIdx:e.target.getAttribute(n.AppConstants.ATTR_ITEM_ID),targetId:p.getAttr(p.element.querySelector(n.AppConstants.SELECTOR_GALLERY_CONTAINER),n.AppConstants.ATTR_AU_TARGET_ID)})},p.closeGalleryItem=function(e){"Escape"!=e.key&&27!==e.keyCode&&27!==e.which||p.closeGallery()},p.handleTranscriptvideo=function(e){if(p.items.length){var t=p.galleryPopup.querySelector("["+n.AppConstants.ATTR_IS_GALLERY_ITEM+"]");t&&p.raiseEvent(n.AppConstants.EVENT_TRASCRIPT_VIDEO,{targetId:p.getAttr(t,n.AppConstants.ATTR_AU_TARGET_ID),eventName:"transcript_click"})}},p.handleDescriptionVideo=function(e){if(p.items.length){var t=e.currentTarget,i=!0,o=void 0;t&&(t.querySelector(".disableDescripton"),t.querySelector(".enableDescripton")),t&&t.classList.contains("ph-description-audio")?(t.classList.remove("ph-description-audio"),i=!1,o="disable_description_video_click"):(t.classList.add("ph-description-audio"),i=!0,o="enable_description_video_click");var r=p.galleryPopup.querySelector("["+n.AppConstants.ATTR_IS_GALLERY_ITEM+"]");r&&p.raiseEvent(n.AppConstants.EVENT_DESCRIPT_VIDEO,{targetId:p.getAttr(r,n.AppConstants.ATTR_AU_TARGET_ID),isDescription:i,eventName:o})}},r.logger.debug("Loaded custom attribtue ... ",i),p}return l(t,e),t.prototype.attached=function(){var e=this;this.parseBindableAttributes(),this.prepareMediaGalleryViewer(),this.eventAggregator.subscribe("ph:video:exit_full_screen",function(t){e.closeGallery()})},t.prototype.prepareBindableAttributes=function(e,t,i){e=e||this.element;for(var o=e.attributes,r=0;r<o.length;r++){var a=o[r];if(!i||a.name.startsWith(n.AppConstants.ATTR_BINDABLE_PREFIX)||a.name.startsWith(n.AppConstants.ATTR_BINDABLE_STANDARD_PREFIX+n.AppConstants.ATTR_BINDABLE_PREFIX)){var s=a.name,l=a.value;l&&(l.toLowerCase()==n.AppConstants.TRUE?l=!0:l.toLowerCase()==n.AppConstants.FALSE&&(l=!1)),t&&(t[s]=a.value)}}},t.prototype.isImage=function(e){return e&&e.getAttribute(n.AppConstants.ATTR_GALLERY_ITEM_TYPE)===n.AppConstants.MEDIA_TYPE_IMAGE},t.prototype.isVideo=function(e){return e&&e.getAttribute(n.AppConstants.ATTR_GALLERY_ITEM_TYPE)===n.AppConstants.MEDIA_TYPE_VIDEO},t.prototype.getAttr=function(e,t){return e.getAttribute(t)},t.prototype.closeGallery=function(){if(this.disableSlick||this.raiseEvent(n.AppConstants.EVENT_UNLOAD_POPUP_SLIDER,{targetId:this.getAttr(this.element.querySelector(n.AppConstants.SELECTOR_GALLERY_CONTAINER),n.AppConstants.ATTR_AU_TARGET_ID)}),this.items.length){var e=this.galleryPopup.querySelector(".slick-track .slick-active")||this.element.querySelector(n.AppConstants.SELECTOR_GALLERY_ITEM_CTR),t=e?e.getAttribute(n.AppConstants.ATTR_WIDGET_REF):void 0;if(e&&t){var i=e.querySelector("["+t+"]");i&&(this.enablepopup&&i.classList&&!i.classList.contains("hide")&&i.classList.add("hide"),this.raiseEvent(n.AppConstants.EVENT_PAUSE_VIDEO,{targetId:this.getAttr(i,n.AppConstants.ATTR_AU_TARGET_ID)}))}}var o=this.galleryPopup.parentElement.parentElement.querySelector(".video-popup");o&&o.classList.remove("hide"),this.galleryPopup.classList.add(n.AppConstants.CLASS_HIDE),this.closeDialogPopup(),document.removeEventListener("keyup",this.closeGalleryItem)},t.prototype.handleVideoProvider=function(e){var t="mobile"==this.commonService.getDeviceType();if(e){var i=e.getAttribute(n.AppConstants.ATTR_VIDEO_PROVIDER),o=e.getAttribute(n.AppConstants.ATTR_VIDEO_MOBILE_PROVIDER)||e.getAttribute(n.AppConstants.ATTR_BINDABLE_STANDARD_PREFIX+n.AppConstants.ATTR_VIDEO_MOBILE_PROVIDER);if(t&&"1"==o){var r=void 0;r=this.element.classList.contains("video-popup-block")?this.element:this.element.closest("video-popup-block"),r&&(!this.element.classList.contains("inline-popup-container")&&this.element.classList.add("inline-popup-container"),this.enablepopup=!1)}var a=this.element.querySelector(n.AppConstants.SELECTOR_GALLERY_CONTAINER);a&&"kaltura"==i&&!a.classList.contains("kaltura-player-cntr")?a.classList.add("kaltura-player-cntr"):a&&a.classList.remove("kaltura-player-cntr")}},t.prototype.parseGalleryItems=function(){for(var e=this.element.querySelectorAll(n.AppConstants.SELECTOR_GALLERY_ITEM_LINK),t=this.element.querySelectorAll(".ph-slider-container"),i=void 0,o=0;o<e.length;o++){t.length&&(i=t[o]);var r=e[o];r.setAttribute(n.AppConstants.ATTR_ITEM_ID,o+"");var a=r.querySelector(n.AppConstants.SELECTOR_GALLERY_ITEM);if(this.handleVideoProvider(a),this.enablepopup?r.addEventListener("click",this.handleGalleryItemClick):(r.addEventListener("click",this.handleVideoInlineItemClick),setTimeout(function(){t.length&&i.classList.remove("ph-slide-loader")},100)),a){a.setAttribute(n.AppConstants.ATTR_ITEM_ID,o+"");var s={};this.isImage(a)?(s.type=n.AppConstants.MEDIA_TYPE_IMAGE,"true"!=a.getAttribute("data-ph-lazy")?s.src=this.getAttr(a,n.AppConstants.ATTR_SRC):s.src=this.getAttr(a,n.AppConstants.ATTR_DATA_SRC),s.alt=this.getAttr(a,"alt")):this.isVideo(a)&&(s.type=n.AppConstants.MEDIA_TYPE_VIDEO,s.widget=this.getAttr(a,n.AppConstants.ATTR_WIDGET_REF),s.provider=this.getAttr(a,n.AppConstants.ATTR_VIDEO_PROVIDER),s.mobileFullScreen=this.getAttr(a,n.AppConstants.ATTR_VIDEO_PROVIDER));var l={};this.prepareBindableAttributes(a,l,!0),l["pha-gallery-item"]=!0,s.attribs=l,this.items.push(s)}}},t.prototype.prepareMediaGalleryViewer=function(){var e=this,t=this.element.querySelector(n.AppConstants.SELECTOR_GALLERY_CLOSE),i="mobile"==this.commonService.getDeviceType();t&&t.addEventListener("click",function(){e.closeGallery()});var o=this.element.querySelector(".ph-gallery-footer .ph-gallery-transcript");o&&o.addEventListener("click",this.handleTranscriptvideo);var r=this.element.querySelector(".ph-gallery-footer .ph-gallery-description");r&&r.addEventListener("click",this.handleDescriptionVideo),this.galleryPopup=this.element.querySelector(n.AppConstants.SELECTOR_POPUP_CONTAINER),document.addEventListener("keyup",this.closeGalleryItem),this.parseGalleryItems();var a=this.element.querySelector(n.AppConstants.SELECTOR_GALLERY_ITEM_CTR);a&&(this.items.forEach(function(t,o){var r=a.cloneNode();if(r.setAttribute(n.AppConstants.ATTR_MEDIA_TYPE,t.type),t.type===n.AppConstants.MEDIA_TYPE_IMAGE){var s=document.createElement("img"),l=e.galleryLazyLoad?"data-lazy":"src";s.setAttribute(l,t.src),s.alt=t.alt,r.appendChild(s)}else if(t.type===n.AppConstants.MEDIA_TYPE_VIDEO){var c=document.createElement("div");if(c.setAttribute(t.widget,t.provider),c.setAttribute("data-pha-popup-video","1"),r.setAttribute(n.AppConstants.ATTR_WIDGET_REF,t.widget),t.attribs)for(var p in t.attribs)t.attribs.hasOwnProperty(p)&&c.setAttribute(p,t.attribs[p]);r.appendChild(c),e.templatingEngine&&e.templatingEngine.enhance&&e.templatingEngine.enhance({element:c})}a.parentElement.appendChild(r);var d=e.element.querySelector("[ph-video-v1]");!e.enablepopup&&d&&("1"!=d.getAttribute("pha-autoplay")||t.mobileFullScreen&&i||e.handleVideoInlineItemClick(void 0,o))}),a&&a.parentElement&&a.parentElement.removeChild(a))},t}(o.PhenomWidgetAttribute);p([t.bindable,d("design:type",Boolean)],h.prototype,"disableSlick",void 0),e.MediaGallery=h=p([(0,t.customAttribute)(u),(0,t.autoinject)(),d("design:paramtypes",[Element,i.EventAggregator,r.CommonService,t.TemplatingEngine])],h)})
define("ph-common/ph-video/v1/ph-video",["exports","aurelia-framework","./../../index","./../../app-constants","./../../ph-widget-attr","./video-player-factory"],function(e,t,i,o,n,r){"use strict";function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(e,"__esModule",{value:!0}),e.VideoAttribute=void 0;var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p=function(e,t,i,o){var n,r=arguments.length,a=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"===("undefined"==typeof Reflect?"undefined":c(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},d=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":c(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},u="ph-video-v1",h=(window,e.VideoAttribute=function(e){function t(n,r){a(this,t);var l=s(this,e.call(this,n,r,u));return l.element=n,l.commonService=r,l.playerOptions={},l.handleVideoPlayBroadcast=function(e){var t=l.element.getAttribute(o.AppConstants.ATTR_AU_TARGET_ID);if(e&&e.targetId!=t){var i=l.player&&l.player.playerOptions||{};1==i.loop&&"0"==i.volume||l.player.pause()}e&&e.targetId==t&&l.element&&l.element.classList&&l.element.classList.contains("hide")&&l.element.classList.remove("hide")},l.handleVideoPause=function(e){var t=l.element.getAttribute(o.AppConstants.ATTR_AU_TARGET_ID);e&&e.targetId==t&&l.player.pause()},l.handleLoadVideo=function(e){var t=l.element.getAttribute(o.AppConstants.ATTR_AU_TARGET_ID);if(e&&e.targetId==t){var i=e.autoplay;l.playerOptions.hasOwnProperty("autoplay")&&(i=l.playerOptions.autoplay),l.playerOptions.autoplay=i,l.player.load()}},l.initiateVideoPlayer=function(){l.playerOptions.galleryItem||l.player.load()},l.handleTranscriptVideo=function(e){var t=l.element.getAttribute(o.AppConstants.ATTR_AU_TARGET_ID);e&&e.targetId==t&&l.playerOptions.transcriptVideoId&&(l.trackEvent(e.eventName,l.playerOptions.transcriptVideoId),l.handleVideoPause(e),window.open(l.playerOptions.transcriptVideoId))},l.handleDescriptVideo=function(e){var t=l.element.getAttribute(o.AppConstants.ATTR_AU_TARGET_ID);if(e&&e.targetId==t){var i=void 0;i=e.isDescription&&l.playerOptions.descriptionVideoId?l.playerOptions.descriptionVideoId:"video"==l.provider||"amazon"==l.provider?l.playerOptions.videoUrl:l.playerOptions.videoId,l.player.changeVideo(i),l.trackEvent(e.eventName,i)}},l.trackEvent=function(t,o){var n={};n.videoid=o||l.playerOptions.videoId,n.videotype=l.provider,i.logger.debug(t,n),e.prototype.trackWidgetClick.call(l,t,n)},l}return l(t,e),t.prototype.valueChanged=function(e,t){this.provider=e},t.prototype.attached=function(){this.subscribeToEvent(o.AppConstants.EVENT_PLAY_VIDEO,this.handleVideoPlayBroadcast),this.subscribeToEvent(o.AppConstants.EVENT_PAUSE_VIDEO,this.handleVideoPause),this.subscribeToEvent(o.AppConstants.EVENT_START_VIDEO,this.handleLoadVideo),this.subscribeToEvent(o.AppConstants.EVENT_TRASCRIPT_VIDEO,this.handleTranscriptVideo),this.subscribeToEvent(o.AppConstants.EVENT_DESCRIPT_VIDEO,this.handleDescriptVideo),this.parseBindableAttributes(this.playerOptions),this.initPlayer()},t.prototype.detached=function(){this.eventSubs.forEach(function(e){e.dispose()})},t.prototype.initPlayer=function(){var e=this;"kaltura"==this.provider&&this.playerOptions&&this.playerOptions.videoId?this.commonService.getDDO("ph-vdieo-v1","getPlayerDetails",{videoId:this.playerOptions.videoId}).then(function(t){t=t.getPlayerDetails,t&&"success"==t.status&&t.data&&t.data.provider?(e.provider=t.data.provider,"amazon"==e.provider&&(e.element.setAttribute("ph-video-v1","amazon"),e.element.setAttribute("pha-video-url",t.data.embedurl),e.element.setAttribute("pha-video-id",t.data.videoId),e.playerOptions.videoUrl=t.data.embedurl,e.playerOptions.videoId=t.data.videoId,e.playerOptions.phVideoV1="amazon"),e.initPlayerAfterProviderDet()):e.initPlayerAfterProviderDet()}):this.initPlayerAfterProviderDet()},t.prototype.initPlayerAfterProviderDet=function(){this.player=r.VideoPlayerFactory.createPlayer(this.element,this.provider,this.playerOptions),this.player.setEventAggregator(this.eventAggregator),this.player.setCommonService(this.commonService),this.player.setTrackingManager(this.trackEvent),this.player.setTrackingManager(this.trackEvent),this.playerOptions.galleryItem||this.player.load()},t}(n.PhenomWidgetAttribute));e.VideoAttribute=h=p([(0,t.customAttribute)(u),(0,t.autoinject)(),d("design:paramtypes",[Element,i.CommonService])],h)})
define("ph-common/ph-video/v1/video-player-factory",["exports","./../../app-constants","./youtube-player","./vimeo-player","./video-player","./wistia-player","./ally-video-player","./brightcove-player","./kaltura-player"],function(e,t,i,o,n,r,a,s,l){"use strict";function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.VideoPlayerFactory=void 0;e.VideoPlayerFactory=function(){function e(){c(this,e)}return e.createPlayer=function(e,c,p){return c===t.AppConstants.PROVIDER_YOUTUBE?new i.YoutubePlayer(e,p):c===t.AppConstants.PROVIDER_VIMEO?new o.VimeoPlayer(e,p):c===t.AppConstants.PROVIDER_HTMLPlyr||c===t.AppConstants.PROVIDER_VIDEO||c===t.AppConstants.PROVIDER_AWS_PLAYER||c===t.AppConstants.PROVIDER_MP4?new n.VideoPlayer(e,p):c===t.AppConstants.PROVIDER_WISTIA?new r.WistiaPlayer(e,p):c===t.AppConstants.PROVIDER_PLYR?new a.AllyVideoPlayer(e,p):c===t.AppConstants.PROVIDER_BRIGHTCOVE?new s.BrightcovePlayer(e,p):c===t.AppConstants.PROVIDER_KALTURA_PLAYER?new l.KalturaPlayer(e,p):void 0},e}()})
define("ph-common/ph-video/v1/youtube-player",["exports","./base-video-player"],function(e,t){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function n(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(e,"__esModule",{value:!0}),e.YoutubePlayer=void 0;var r="onYouTubeIframeAPIReady";e.YoutubePlayer=function(e){function t(n,a){i(this,t);var s=o(this,e.call(this,n,a));return s.element=n,s.playerOptions={},s.playerLoaded=!1,s.onApiReady=function(){},s.onPlayerReady=function(e,t){s.player=t||e.target,s.pollingInterval=setInterval(function(e){var t=s.player.getPlayerState();s.onPlayerStateChange({data:t},!s.playerLoaded)},240),setTimeout(function(){s.player.addEventListener("onStateChange",function(e){s.onPlayerStateChange(e)})},500),s.playerOptions.volume<=0&&s.mute(),"1"==s.playerOptions.autoplay&&(s.play(),"1"==s.playerOptions.popupVideo&&setTimeout(function(){s.unMute()},250)),"1"==s.playerOptions.loop&&s.loop()},s.onPlayerStateChange=function(t,i){!i&&s.pollingInterval&&(clearInterval(s.pollingInterval),s.pollingInterval=void 0);var o=t.data;o==YT.PlayerState.PLAYING?e.prototype.play.call(s):o==YT.PlayerState.PAUSED&&e.prototype.pause.call(s)},s.playerOptions=a||{},window&&(window[r]=s.onApiReady),s.playerContainer=document.createElement("div"),s.element.innerHTML="",s.element.appendChild(s.playerContainer),s}return n(t,e),t.prototype.isApiRequested=function(){return window?window.YTSCRIPTADDED:void 0},t.prototype.isApiLoaded=function(){return window?window.YT:void 0},t.prototype.initPlayer=function(){var e=this;if(this.player)return this.playerLoaded=!0,void this.onPlayerReady(void 0,this.player);if(this.playerOptions.playerVars=this.playerOptions.playerVars||{},this.playerOptions.playerVars.rel=this.playerOptions.rel||0,isNaN(this.playerOptions.playerVars.rel)&&(this.playerOptions.playerVars.rel=parseInt(this.playerOptions.playerVars.rel,10)),this.playerOptions.loop&&(this.playerOptions.playerVars.loop=parseInt(this.playerOptions.loop,10)),this.playerOptions.width=this.playerOptions.width||"100%",this.playerOptions.height=this.playerOptions.height||"100%",this.playerOptions.playerVars.modestbranding=this.playerOptions.modestbranding||1,isNaN(this.playerOptions.playerVars.modestbranding)&&(this.playerOptions.playerVars.modestbranding=parseInt(this.playerOptions.playerVars.modestbranding,10)),this.playerOptions.events={onReady:this.onPlayerReady},this.playerOptions.host="https://www.youtube-nocookie.com",window.YT&&YT.Player){new YT.Player(this.playerContainer,this.playerOptions)}else setTimeout(function(){return e.initPlayer()},300)},t.prototype.load=function(){var e=this;if(!this.isApiRequested()){window.YTSCRIPTADDED=!0;var t=document.createElement("script");t.src="https://www.youtube.com/iframe_api",t.setAttribute("async",""),t.setAttribute("defer","");var i=document.getElementsByTagName("script")[0];i.parentNode.insertBefore(t,i)}this.isApiLoaded()?this.initPlayer():setTimeout(function(){return e.initPlayer()},300)},t.prototype.play=function(){this.player&&this.player.playVideo()},t.prototype.pause=function(){this.player&&this.player.pauseVideo()},t.prototype.stop=function(){e.prototype.stop.call(this),this.player&&this.player.stopVideo()},t.prototype.mute=function(){e.prototype.mute.call(this),this.player&&this.player.mute()},t.prototype.unMute=function(){this.player&&(this.player.volume=1,this.player.muted=!1)},t.prototype.loop=function(){e.prototype.loop.call(this),this.player&&this.player.setLoop(!0)},t.prototype.changeVideo=function(e){e?this.player.loadVideoById(e):this.player.loadVideoById(this.playerOptions.videoId)},t}(t.BaseVideoPlayer)})
define("ph-common/ph-video/v1/base-video-player",["exports","./../../app-constants"],function(e,t){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.BaseVideoPlayer=void 0;e.BaseVideoPlayer=function(){function e(t,o,n){i(this,e),this.element=t,this.eventAggregator=n}return e.prototype.setEventAggregator=function(e){this.eventAggregator=e},e.prototype.setCommonService=function(e){this.commonService=e},e.prototype.setTrackingManager=function(e){this.trackEvent=e},e.prototype.load=function(){},e.prototype.play=function(){this.eventAggregator.publish(t.AppConstants.EVENT_PLAY_VIDEO,{targetId:this.element.getAttribute(t.AppConstants.ATTR_AU_TARGET_ID)}),this.trackEvent("play_click")},
e.prototype.pause=function(){this.trackEvent("pause_click")},e.prototype.stop=function(){},e.prototype.mute=function(){},e.prototype.loop=function(){},e.prototype.controls=function(){},e.prototype.preload=function(e){},e.prototype.requestFullscreen=function(e,t){var i=e.querySelector("video");i&&(i.requestFullscreen?i.requestFullscreen():i.mozRequestFullScreen?i.mozRequestFullScreen():i.webkitRequestFullscreen?i.webkitRequestFullscreen():i.msRequestFullscreen?i.msRequestFullscreen():i.webkitEnterFullScreen&&i.webkitEnterFullScreen(),i.addEventListener("fullscreenchange",t.bind(this)),i.addEventListener("webkitfullscreenchange",t.bind(this)),i.addEventListener("mozfullscreenchange",t.bind(this)),i.addEventListener("MSFullscreenChange",t.bind(this)),i.addEventListener("webkitendfullscreen",t.bind(this)),i.addEventListener("ended",t.bind(this)),i.setAttribute("webkit-playsinline","true"),i.setAttribute("playsinline","true"),i.removeAttribute("controls"))},e}()})
define("ph-common/ph-video/v1/vimeo-player",["exports","./base-video-player"],function(e,t){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function n(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(e,"__esModule",{value:!0}),e.VimeoPlayer=void 0;e.VimeoPlayer=function(e){function t(n,r,a){i(this,t);var s=o(this,e.call(this,n,r));return s.element=n,s.commonService=a,s.playerOptions={},s.onApiReady=function(){},s.onPlayerReady=function(e){"1"==s.playerOptions.autoplay&&(s.play(),"1"==s.playerOptions.popupVideo&&setTimeout(function(){s.unMute()},250))},s.playerOptions=r||{},s.playerContainer=document.createElement("div"),s.element.innerHTML="",s.element.appendChild(s.playerContainer),s}return n(t,e),t.prototype.isApiRequested=function(){return window?window.VIMEOSCRIPTADDED:void 0},t.prototype.isApiLoaded=function(){return window?window.Vimeo:void 0},t.prototype.initPlayer=function(){var t=this,i=this.commonService.getSiteSettings("ignoreVimeoTracking");if(this.player)return void this.onPlayerReady(this.player);if(this.playerOptions.id=this.playerOptions.videoId,this.playerOptions.width=this.playerOptions.width||560,this.playerOptions.autopause=!0,this.playerOptions.dnt=!0,i&&(this.playerOptions.dnt=!1),("1"==this.playerOptions.autoplay||this.playerOptions.volume<=0)&&this.mute(),window.Vimeo&&Vimeo.Player){var o=new Vimeo.Player(this.playerContainer,this.playerOptions);o.ready().then(this.onPlayerReady),o.on("play",function(i){e.prototype.play.call(t)}),o.on("pause",function(i){e.prototype.pause.call(t)}),this.player=o}else setTimeout(function(){return t.initPlayer()},300)},t.prototype.load=function(){var e=this;if(!this.isApiRequested())if(window.VIMEOSCRIPTADDED=!0,window.require&&!window.requireOverLoaded)window.require(["https://player.vimeo.com/api/player.js"],function(e){window.Vimeo={Player:e}});else{var t=document.createElement("script");t.src="https://player.vimeo.com/api/player.js";var i=document.getElementsByTagName("script")[0];i.parentNode.insertBefore(t,i)}this.isApiLoaded()?this.initPlayer():setTimeout(function(){return e.initPlayer()},300)},t.prototype.play=function(){this.player&&this.player.play()},t.prototype.pause=function(){this.player&&this.player.pause()},t.prototype.stop=function(){e.prototype.stop.call(this)},t.prototype.mute=function(){e.prototype.mute.call(this),this.playerOptions.muted=!0},t.prototype.unMute=function(){this.player&&(this.player.setVolume(1),this.player.muted=!1)},t.prototype.loop=function(){e.prototype.loop.call(this),this.player},t.prototype.changeVideo=function(e){e?this.player.loadVideo(e):this.player.loadVideo(this.playerOptions.videoId)},t}(t.BaseVideoPlayer)})
define("ph-common/ph-video/v1/video-player",["exports","./../../app-constants","./base-video-player"],function(e,t,i){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(e,"__esModule",{value:!0}),e.VideoPlayer=void 0;e.VideoPlayer=function(e){function i(t,r){o(this,i);var a=n(this,e.call(this,t,r));return a.element=t,a.playerOptions={},a.onApiReady=function(){},a.onPlayerReady=function(e){a.playerOptions.volume<=0&&a.mute(),"1"==a.playerOptions.autoplay&&(a.trackEvent("play_click"),a.play(),"1"==a.playerOptions.popupVideo&&setTimeout(function(){a.unMute()},250)),"1"==a.playerOptions.loop&&a.loop(),"0"==a.playerOptions.controls&&a.controls(),a.playerOptions.preload&&a.preload(a.playerOptions.preload)},a.videoControlsHandler=function(){a.videoElem.setAttribute("controls","controls")},a.playerOptions=r||{},a.playerContainer=document.createElement("div"),a.element.innerHTML="",a.element.appendChild(a.playerContainer),a}return r(i,e),i.prototype.isApiRequested=function(){return window?window.VIDEOJSSCRIPTADDED:void 0},i.prototype.isApiLoaded=function(){return window?window.videojs:void 0},i.prototype.initPlayer=function(){var i=this,o={src:this.playerOptions.videoUrl,controlsList:"nodownload",disablepictureinpicture:!0};if(this.player)return void this.onPlayerReady({});if("0"==this.playerOptions.controls||"false"==this.playerOptions.controls?this.playerOptions.controls=!1:this.playerOptions.controls=!0,this.playerOptions.width=this.playerOptions.width||560,this.playerOptions.autopause=!0,this.playerOptions.preload=this.playerOptions.preload||"auto",this.videoElem=document.createElement("video"),this.videoElem.classList.add(t.AppConstants.CLASS_VIDEOJS),this.playerOptions.controls&&this.videoElem.addEventListener("timeupdate",this.videoControlsHandler,!1),"1"==this.playerOptions.autoplay&&(o.playsinline=!0,o.muted=!0),this.playerOptions.posterUrl&&(o.poster=this.playerOptions.posterUrl),Object.keys(o).forEach(function(e,t){i.videoElem.setAttribute(e,o[e])}),this.playerOptions.cclist&&"string"==typeof this.playerOptions.cclist){try{this.playerOptions.cclist=JSON.parse(this.playerOptions.cclist)||[]}catch(e){}this.playerOptions.cclist.length&&this.videoElem.setAttribute("crossOrigin","true"),this.playerOptions.cclist.forEach(function(e,t){var o=document.createElement("track");for(var n in e)o.setAttribute(n,e[n]);i.videoElem.appendChild(o);var r=i.videoElem.querySelector("track");r&&r.setAttribute("default","")})}this.playerOptions.controls&&this.videoElem.setAttribute("controls",""),this.player=this.videoElem,this.player.addEventListener("playing",function(){!i.isPlaying()&&e.prototype.play.call(i)}),this.player.addEventListener("pause",function(){i.isPlaying()&&e.prototype.pause.call(i)}),this.playerContainer.appendChild(this.videoElem),this.onPlayerReady({})},i.prototype.load=function(){this.initPlayer()},i.prototype.isPlaying=function(){if(this.player)return this.player.currentTime>0&&!this.player.paused&&!this.player.ended&&this.player.readyState>this.player.HAVE_CURRENT_DATA},i.prototype.play=function(){var e=this;setTimeout(function(){e.player&&!e.isPlaying()&&e.player.play()},10)},i.prototype.pause=function(){this.player&&this.isPlaying()&&this.player.pause()},i.prototype.stop=function(){e.prototype.stop.call(this)},i.prototype.mute=function(){e.prototype.mute.call(this),this.player&&(this.player.muted=!0)},i.prototype.unMute=function(){this.player&&(this.player.volume=1,this.player.muted=!1)},i.prototype.loop=function(){e.prototype.loop.call(this),this.player&&(this.player.loop=!0)},i.prototype.controls=function(){e.prototype.controls.call(this),this.player&&(this.player.controls=!1)},i.prototype.preload=function(t){e.prototype.preload.call(this,t),this.player&&(this.player.preload=t)},i.prototype.changeVideo=function(e){e?(this.player.setAttribute("src",e),this.player.load(),this.player.play()):(this.player.setAttribute("src",this.playerOptions.videoUrl),this.player.play())},i.prototype.detached=function(){this.videoElem.removeEventListener("timeUpdate",this.videoControlsHandler)},i}(i.BaseVideoPlayer)})
define("ph-common/ph-video/v1/wistia-player",["exports","./base-video-player"],function(e,t){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function n(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(e,"__esModule",{value:!0}),e.WistiaPlayer=void 0;e.WistiaPlayer=function(e){function t(n,r){i(this,t);var a=o(this,e.call(this,n,r));return a.element=n,a.playerOptions={},a.onApiReady=function(){},a.onPlayerReady=function(t,i,o){a.player=i||t,a.playerOptions.volume<=0&&a.mute(),"1"==a.playerOptions.autoplay&&a.play(),o||(a.player.bind("pause",function(){e.prototype.pause.call(a)}),a.player.bind("play",function(){e.prototype.play.call(a)}))},a.playerOptions=r||{},a.playerContainer=document.createElement("div"),a.element.innerHTML="",a.element.appendChild(a.playerContainer),a}return n(t,e),t.prototype.isApiRequested=function(){return window?window.WISTIASCRIPTADDED:void 0},t.prototype.isApiLoaded=function(){return window?window._wq:void 0},t.prototype.initPlayer=function(){if(this.player)return void this.onPlayerReady(void 0,this.player,!0);this.playerOptions.id=this.playerOptions.videoId,this.playerOptions.width=this.playerOptions.width||"100%",this.playerOptions.autopause=!0,window._wq=window._wq||[],window._wq.push({id:"_all",options:this.playerOptions,onReady:this.onPlayerReady})},t.prototype.load=function(){var e=this;if(!this.isApiRequested()){window.WISTIASCRIPTADDED=!0;var t=document.createElement("script");t.src="//fast.wistia.com/assets/external/E-v1.js";var i=document.getElementsByTagName("script")[0];i.parentNode.insertBefore(t,i)}this.playerContainer.classList.add("wistia_embed"),this.playerContainer.classList.add("wistia_async_"+this.playerOptions.videoId),this.isApiLoaded()?this.initPlayer():setTimeout(function(){return e.initPlayer()},300)},t.prototype.play=function(){this.player&&this.player.play()},t.prototype.pause=function(){this.player&&this.player.pause()},t.prototype.stop=function(){e.prototype.stop.call(this)},t.prototype.mute=function(){e.prototype.mute.call(this),this.player&&this.player.mute()},t.prototype.loop=function(){e.prototype.loop.call(this),this.player},t.prototype.changeVideo=function(e){e?this.player.replaceWith(e):this.player.replaceWith(this.playerOptions.id)},t}(t.BaseVideoPlayer)})
define("ph-common/ph-video/v1/ally-video-player",["exports","./../../index","./../../app-constants","./base-video-player"],function(e,t,i,o){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(e,"__esModule",{value:!0}),e.AllyVideoPlayer=void 0;var s=["play","rewind","fast-forward","progress","current-time","mute","volume","captions","settings","fullscreen"];e.AllyVideoPlayer=function(e){function o(t,i){n(this,o);var a=r(this,e.call(this,t,i));return a.element=t,a.playerOptions={},a.onPlayerReady=function(e){a.playerOptions.volume<=0&&a.mute(),"1"==a.playerOptions.autoplay&&a.play(),"1"==a.playerOptions.loop&&a.loop(),"0"==a.playerOptions.controls&&a.controls(),a.playerOptions.preload&&a.preload(a.playerOptions.preload)},a.playerOptions=i||{},a.element.innerHTML="",a}return a(o,e),o.prototype.isApiRequested=function(){return window?window.PLYRSCRIPTADDED:void 0},o.prototype.isApiLoaded=function(){return window?window.Plyr:void 0},o.prototype.load=function(){var e=this;if(!this.isApiRequested()){if(window.PLYRSCRIPTADDED=!0,window.require)window.require([this.commonService.getCdnUrl()+"/common/js/vendor/polyfill.min.js"],function(){window.require([e.commonService.getCdnUrl()+"/common/js/vendor/plyr.min.3.5.6.js"],function(e){})});else{var t=document.createElement("script");t.src=this.commonService.getCdnUrl()+"/common/js/vendor/plyr.min.3.5.6.js";var i=document.getElementsByTagName("script")[0];i.parentNode.insertBefore(t,i)}var o=document.createElement("link");o.setAttribute("rel","stylesheet"),o.setAttribute("type","text/css"),o.setAttribute("href",this.commonService.getCdnUrl()+"/common/js/vendor/plyr.3.5.6.css"),document.head.appendChild(o)}this.isApiLoaded()?this.initPlayer():setTimeout(function(){return e.initPlayer()},300)},o.prototype.initPlayer=function(){var o=this,n={src:this.playerOptions.videoUrl,controlsList:"nodownload",disablepictureinpicture:!0,controls:this.playerOptions.controls||!0,preload:this.playerOptions.preload||"auto",playsinline:"",autopause:!0};if(this.player)return void this.onPlayerReady({});if(window.Plyr){this.playerOptions.width=this.playerOptions.width||560;var r=document.createElement("video");if(r.classList.add(i.AppConstants.CLASS_ALLY_VIDEOJS),Object.keys(n).forEach(function(e,t){r.setAttribute(e,n[e])}),this.playerOptions.cclist&&"string"==typeof this.playerOptions.cclist){try{this.playerOptions.cclist=JSON.parse(this.playerOptions.cclist)||[]}catch(e){t.logger.error("Unable to parse captions")}this.playerOptions.cclist.length&&r.setAttribute("crossOrigin","true"),this.playerOptions.cclist.forEach(function(e,t){var i=document.createElement("track");for(var o in e)i.setAttribute(o,e[o]);r.appendChild(i)})}this.element.appendChild(r),this.player=new Plyr(r,{controls:s}),this.element.style.width=this.playerOptions.width,this.element.style.height=this.playerOptions.height,"absolute"==window.getComputedStyle(r).position&&(r.parentElement.style.paddingBottom="44.25%");var a=void 0,l=void 0,c=void 0,p=void 0;this.player&&this.player.elements&&this.player.elements.container&&(this.player.elements.container.setAttribute("role","region"),this.player.elements.container.setAttribute("type","region"),this.player.elements.container.setAttribute("aria-label","video player"),this.player.elements.container.removeAttribute("tabindex")),this.player&&this.player.elements&&this.player.elements.buttons&&(a=this.player.elements.buttons.play&&this.player.elements.buttons.play[0],l=this.player.elements.buttons.mute,c=this.player.elements.buttons.captions,p=this.player.elements.buttons.fullscreen);for(var d=document.querySelectorAll("button,input"),u=0;u<d.length;u++)d[u].hasAttribute("tabindex")||d[u].setAttribute("tabindex","0");var h=this.commonService.getTranslations(),f=void 0;h&&(f=JSON.parse(JSON.stringify(h.masterData||{})));var g=f.Pause||"Pause";"1"==this.playerOptions.autoplay&&a&&a.setAttribute("aria-label",g),r.addEventListener("playing",function(){a&&a.setAttribute("aria-label",g),e.prototype.play.call(o)}),r.addEventListener("pause",function(){var t=f.Play||"Play";a&&a.setAttribute("aria-label",t),e.prototype.pause.call(o)}),r.onvolumechange=function(){if(o.player.muted){var e=f.Unmute||"Unmute";l&&l.setAttribute("aria-label",e)}else{var t=f.Mute||"Mute";l&&l.setAttribute("aria-label",t)}},c.addEventListener("click",function(){if(c.pressed){var e=f["Disable captions"]||"Disable captions";c.setAttribute("aria-label",e)}else{var t=f["Enable captions"]||"Enable captions";c.setAttribute("aria-label",t)}}),p.addEventListener("click",function(){if(p.pressed){var e=f["Enter fullscreen"]||"Enter fullscreen";p.setAttribute("aria-label",e)}else{var t=f["Exit fullscreen"]||"Exit fullscreen";p.setAttribute("aria-label",t)}}),this.onPlayerReady({})}else setTimeout(function(){return o.initPlayer()},300)},o.prototype.mute=function(){e.prototype.mute.call(this),this.player&&(this.player.muted=!0)},o.prototype.play=function(){var e=this;setTimeout(function(){e.player&&e.player.play()},10)},o.prototype.pause=function(){this.player&&this.player.pause()},o.prototype.loop=function(){e.prototype.loop.call(this),this.player&&(this.player.loop=!0)},o.prototype.controls=function(){e.prototype.controls.call(this),this.player&&(this.player.controls=!1)},o.prototype.preload=function(t){e.prototype.preload.call(this,t),this.player&&(this.player.preload=t)},o}(o.BaseVideoPlayer)})
define("ph-common/ph-video/v1/brightcove-player",["exports","./base-video-player"],function(e,t){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function n(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(e,"__esModule",{value:!0}),e.BrightcovePlayer=void 0;e.BrightcovePlayer=function(e){function t(n,r){i(this,t);var a=o(this,e.call(this,n,r));return a.element=n,a.playerOptions={},a.videoQueue=[],a.initPlayer=function(){if(a.player)return void a.onPlayerReady({});a.player=videojs(a.bcplayerId),a.playerOptions.autoplay?a.play():a.pause();var e=a.element.querySelector("video");e.parentElement.style.width="100%",e.parentElement.style.height="100%","absolute"==window.getComputedStyle(e).position&&(e.parentElement.style.position="absolute"),setTimeout(function(){a.videoQueue.length&&a.videoQueue.forEach(function(e){a.bcplayerId==e.bcplayerId&&e.callback(e)})},300),a.onPlayerReady({})},a.onPlayerReady=function(e){a.playerOptions.volume<=0&&a.mute(),"1"==a.playerOptions.autoplay&&a.play(),"1"==a.playerOptions.loop&&a.loop(),"0"==a.playerOptions.controls&&a.controls(),a.playerOptions.preload&&a.preload(a.playerOptions.preload)},a.playerOptions=r||{},a.element.innerHTML="",a}return n(t,e),t.prototype.attached=function(){},t.prototype.load=function(){var e=this;if(this.bcplayerId="phBCVideo-"+(new Date).getMilliseconds(),this.player)this.initPlayer();else{this.loadVideoElem();var t="https://players.brightcove.net/"+this.playerOptions.accountId+"/"+this.playerOptions.playerId+"_default/index.min";if(window.require){window.require.config({paths:{bc:t},context:this.bcplayerId,waitSeconds:30})(["bc"],function(){e.initPlayer()})}else{var i=document.createElement("script");i.src=t;var o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(i,o),o.onload=function(){e.initPlayer()}}}},t.prototype.loadVideoElem=function(){var e='<video id="'+this.bcplayerId+'" \n                                data-video-id="'+this.playerOptions.videoId+'" \n                                data-account="'+this.playerOptions.accountId+'" \n                                data-player="'+this.playerOptions.playerId+'" \n                                data-embed="default" class="video-js" \n                                controls="'+(this.playerOptions.controls||!0)+'"\n                                preload="'+(this.playerOptions.preload||"auto")+'"\n                                poster="'+(this.playerOptions.poster||"")+'">\n                            </video>',t=document.createElement("div");t.setAttribute("id",this.bcplayerId),t.innerHTML=e,this.element.innerHTML=t.outerHTML},t.prototype.mute=function(){e.prototype.mute.call(this),this.player&&(this.player.muted=!0)},t.prototype.play=function(e){var t=this;setTimeout(function(){t.player&&(!t.player&&e?(e.callback=t.play,t.videoQueue.push(e)):t.player&&t.player.play())},10)},t.prototype.pause=function(e){!this.player&&e?(e.callback=this.pause,this.videoQueue.push(e)):this.player&&this.player.pause()},t.prototype.loop=function(){e.prototype.loop.call(this),this.player&&(this.player.loop=!0)},t.prototype.controls=function(){e.prototype.controls.call(this),this.player&&(this.player.controls=!1)},t.prototype.preload=function(t){e.prototype.preload.call(this,t),this.player&&(this.player.preload=t)},t}(t.BaseVideoPlayer)})
define("ph-common/ph-video/v1/kaltura-player",["exports","./base-video-player"],function(e,t){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function n(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(e,"__esModule",{value:!0}),e.KalturaPlayer=void 0;var r="getPlayerDetails",a=window;e.KalturaPlayer=function(e){function t(n,r){i(this,t);var a=o(this,e.call(this,n,r));return a.element=n,a.playerOptions={},a.playerOptions=r||{},a}return n(t,e),t.prototype.isApiRequested=function(){return a&&a.KALTURASCRIPTADDED},t.prototype.isApiLoaded=function(){return a&&a.kWidget},t.prototype.checkApiLoaded=function(e){var t=this;a&&a.kWidget?e&&e():setTimeout(function(){t.checkApiLoaded(e)},200)},t.prototype.raisePauseEvents=function(){var e=this;if(!this.playerOptions.allowMultiplePlay&&a&&a.KalturaPlayer){var t=a.KalturaPlayer.getPlayers();t&&Object.keys(t).forEach(function(i){var o=t[i];if(o&&o.getMediaInfo){var n=o.getMediaInfo();n&&n.entryId&&n.entryId!=e.playerDetails.providerReferenceId&&o.pause()}})}},t.prototype.prepareVideoContainer=function(){this.playerContainer=document.createElement("div"),this.playerContainer.id="kaltura-player-"+Date.now()+"-"+this.videoId,this.playerContainer.classList.add("kaltura-player"),this.playerContainer.style.display="none";var e=.8*window.innerHeight,t=this.playerOptions.playerDetails.height||this.playerOptions.height,i=this.playerOptions.playerDetails.width||this.playerOptions.width;"mobile"===this.commonService.getDeviceType()&&t&&i&&i>t&&(e=window.innerHeight*(t/i)),t&&(e=e<=t?e:t),this.playerOptions.externalEmbed||(this.playerContainer.style.height=e+"px");var o=this.playerOptions.selector||".ph-video-cntr",n=this.element.querySelector(o)||this.element;n.innerHTML="",n.appendChild(this.playerContainer)},t.prototype.loadKalturaApi=function(){var e=this;return new Promise(function(t,i){if(e.isApiRequested())e.checkApiLoaded(function(){t({})});else{a.KALTURASCRIPTADDED=!0;var o=document.createElement("script"),n=e.playerDetails.embedurl;o.src=n,o.onload=function(){!a.KalturaPlayer&&a.require?a.require(["KalturaPlayer"],function(e){a.kWidget=e,t({})}):(a.kWidget=a.KalturaPlayer,t({}))};var r=document.querySelector("head");r&&r.appendChild(o)}})},t.prototype.preparePlayerDetails=function(){var e=this;return new Promise(function(t,i){e.playerOptions.playerDetails?(e.playerDetails=e.playerOptions.playerDetails,t({})):e.commonService.getDDO("ph-vdieo-v1",r,{videoId:e.playerOptions.videoId}).then(function(o){o&&o[r]&&o[r].data?(e.playerDetails=o[r].data,e.playerOptions.playerDetails=e.playerOptions.playerDetails||e.playerDetails,t({})):i({})})})},t.prototype.load=function(){var e=this;return new Promise(function(t,i){e.videoId=e.playerOptions.kalturaEntryId||e.playerOptions.entryId||e.playerOptions.videoId,e.preparePlayerDetails().then(function(i){e.prepareVideoContainer(),e.loadKalturaApi().then(function(i){e.loadVideoAndSetupListeners().then(function(){t({})})})})})},t.prototype.loadVideoAndSetupListeners=function(){var e=this;return new Promise(function(t,i){var o="mobile"===e.commonService.getDeviceType(),n=e.playerOptions.playerId||e.playerOptions.playerDetails&&e.playerOptions.playerDetails.playerId,r=e.playerOptions.partnerId||e.playerOptions.playerDetails&&e.playerOptions.playerDetails.partnerId,s={targetId:e.playerContainer?e.playerContainer.id:void 0,provider:{partnerId:r,uiConfId:n},playback:{autoplay:!1,allowMutedAutoPlay:!1}};(1==e.playerOptions.autoplay||"1"==e.playerOptions.mobileFullscreen&&o)&&(s.playback.autoplay=!0),0==e.playerOptions.volume&&(s.playback.allowMutedAutoPlay=!0);var l=a.kWidget.setup(s);if(l){l.load(),l.ready().then(function(e){console.log("PLR READY ",e)}),l.addEventListener(l.Event.Core.PROGRESS,function(e){console.log("PROGRESS ",e.payload)}),l.addEventListener(l.Event.Core.PAUSE,function(t){e.pauseInternal()}),l.addEventListener(l.Event.Core.PLAY,function(t,i){e.playInternal(),o&&"1"==e.playerOptions.mobileFullscreen&&setTimeout(function(){e.requestFullscreen(e.element,e.handleFullScreen)},100),e.raisePauseEvents()});var c={entryId:e.playerDetails.providerReferenceId,ks:e.playerOptions.ks||e.playerOptions.playerDetails.ks||""};l.loadMedia(c).then(function(){if(e.playerOptions.externalEmbed&&e.playerOptions.playerDetails.externalEmbedItemId){var i=e.playerOptions.playerDetails.externalEmbedItemId,o=e.playerOptions.playerDetails.externalEmbedNamespace;a[o]&&a[o][i]&&a[o][i].embedPlayerReady&&a[o][i].embedPlayerReady(e)}e.playerContainer&&(e.playerContainer.style.display="block"),t({})},function(e){i({})})}e.player=l})},t.prototype.play=function(){var t=this;this.player&&setTimeout(function(){e.prototype.play.call(t),t.player.play?t.player.play():t.player.sendNotification&&t.player.sendNotification("doPlay")},100)},t.prototype.playInternal=function(){e.prototype.play.call(this)},t.prototype.pauseInternal=function(){this.pause()},t.prototype.pause=function(){this.player&&(e.prototype.pause.call(this),this.player.pause?this.player.pause():this.player.sendNotification&&this.player.sendNotification("doPause"))},t.prototype.stop=function(){e.prototype.stop.call(this)},t.prototype.mute=function(){e.prototype.mute.call(this),this.player.sendNotification&&this.player.sendNotification("changeVolume",0)},t.prototype.autoplay=function(){var e=this;this.player&&this.player.sendNotification&&(a.KWidget&&!a.KWidget.isChrome()&&!a.KWidget.isIOS()&&a.KWidget.isSafari()&&this.player.sendNotification("changeVolume",0),setTimeout(function(){e.player.sendNotification("doPlay")},100))},t.prototype.changeVideo=function(e){this.player.sendNotification&&(e?this.player.sendNotification("changeMedia",{entryId:e}):this.player.sendNotification("changeMedia",{entryId:this.playerOptions.videoId}))},t.prototype.handleFullScreen=function(){document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||(this.pause(),this.eventAggregator.publish("ph:video:exit_full_screen",{}))},t}(t.BaseVideoPlayer)})
define("ph-common/ph-job-count/v1/ph-job-count",["exports","aurelia-framework","aurelia-event-aggregator","./../../index","./../../ph-widget-attr","./../../ph-translation/ph-translation-service"],function(e,t,i,o,n,r){"use strict";function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(e,"__esModule",{value:!0}),e.JobCountAttribute=void 0;var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p=function(e,t,i,o){var n,r=arguments.length,a=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"===("undefined"==typeof Reflect?"undefined":c(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},d=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":c(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},u="ph-job-count-v1",h=e.JobCountAttribute=function(e){function t(i,o,n,r){a(this,t);var l=s(this,e.call(this,i,o,u));return l.element=i,l.commonService=o,l.eventAggregator=n,l.translationService=r,l.subscriptions=[],l}return l(t,e),t.prototype.attached=function(){var e=this;this.populateWidgetBundle().then(function(t){var i=e.fetchJobCountData();e.commonService.prepareMultiSearchJobCountObj(i,e.element),e.commonService.fetchMultiJobCount(u)}),this.subscriptions.push(this.eventAggregator.subscribe("ph:jobCount:set",function(t){var i=e.element.getAttribute("data-pha-count-idfr"),o=e.element.querySelector("[tkey]"),n=o&&o.getAttribute("tkey")||"multiJobCountTotalHits";t&&t[i]&&t[i].counts&&(t[i].counts.totalHits=t[i].counts.totalHits||0,0==t[i].counts.totalHits?n+="NoResults":1==t[i].counts.totalHits?n+="Singular":t[i].counts.totalHits>1&&(n+="Plural"),e.widgetBundle[n]||(n="multiJobCountTotalHits"),o.setAttribute("tkey",n),e.translationService.parseTemplateAndApplyBundle({totalHits:t[i].counts.totalHits.toString()},e.element,e.widgetBundle),e.element.style.setProperty("display","block"))}))},t.prototype.fetchJobCountData=function(){var t={},i=void 0,o=void 0,n=void 0,r=this.element.attributes;for(i=0;i<r.length;i++)o=r[i],o.name&&o.name.startsWith("data-pha-")&&(n=e.prototype.kebabCaseToCameCase.call(this,o.name),t[n]=o.value);return t},t.prototype.getLocalWidgetBundle=function(){return{multiJobCountTotalHits:"{{totalHits}} jobs",multiJobCountTotalHitsSingular:"{{totalHits}} job",multiJobCountTotalHitsPlural:"{{totalHits}} jobs",multiJobCountTotalHitsNoResults:"No results"}},t.prototype.detached=function(){this.subscriptions.forEach(function(e){e.dispose()})},t}(n.PhenomWidgetAttribute);e.JobCountAttribute=h=p([(0,t.customAttribute)(u),(0,t.autoinject)(),d("design:paramtypes",[Element,o.CommonService,i.EventAggregator,r.TranslationService])],h)})
define("ph-common/ph-nav/ph-nav-item",["exports","aurelia-framework","./../common-service"],function(e,t,i){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.PhNavItem=void 0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o
;if("object"===("undefined"==typeof Reflect?"undefined":n(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},a=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":n(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=e.PhNavItem=function(){function e(t,i){o(this,e),this.element=t,this.commonService=i,this.toggle="show"}return e.prototype.propertyChanged=function(e,t,i){var o=this.element.getAttribute("ph-nav-item-type"),n=this.commonService.getSiteSettings("navItems"),r=n&&n.navMenuItems,a=n&&n.navMenuItemsData,s=this.element;r&&-1!=r.indexOf(o)||!this.element||!this.element.parentElement?r&&-1!=r.indexOf(o)&&this.element.classList.remove("hide"):this.element.parentElement.removeChild(this.element);var l=a&&a[o];l&&l.url&&("A"!=this.element.nodeName&&(s=this.element.querySelector("a")),s.setAttribute("href",l.url))},e}();r([(0,t.bindable)({primaryProperty:!0}),a("design:type",Object)],s.prototype,"toggle",void 0),e.PhNavItem=s=r([(0,t.customAttribute)("ph-nav-item"),(0,t.autoinject)(),a("design:paramtypes",[Element,i.CommonService])],s)})
define("ph-common/ph-onetrust/ph-onetrust-action",["exports","aurelia-framework","./../common-service"],function(e,t,i){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.PhOneTrustAction=void 0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"===("undefined"==typeof Reflect?"undefined":n(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},a=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":n(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=e.PhOneTrustAction=function(){function e(t,i){o(this,e),this.element=t,this.commonService=i}return e.prototype.propertyChanged=function(e,t,i){var o=this.element;if(this.element){var n=this.commonService.getSiteSettings("oneTrust");if("A"!=this.element.nodeName&&(o=this.element.querySelector("a")),n&&o&&"one-trust-enabled"===o.getAttribute("ph-external-link-enabled")){for(var r in n.attr)o.setAttribute(r,n.attr[r]);for(var a=0;a<n.class.length;a++)o.classList.add(n.class[a])}}},e}();e.PhOneTrustAction=s=r([(0,t.customAttribute)("ph-external-link-enabled"),(0,t.autoinject)(),a("design:paramtypes",[Element,i.CommonService])],s)})
define("ph-common/ph-a11y/ph-a11y-autocomplete-attribute",["exports","aurelia-framework","../index"],function(e,t,i){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.A11yAutoCompleteAttribute=void 0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"===("undefined"==typeof Reflect?"undefined":n(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},a=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":n(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s={BACKSPACE:8,TAB:9,RETURN:13,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,SHIFT:16},l=e.A11yAutoCompleteAttribute=function(){function e(t,i){var n=this;o(this,e),this.element=t,this.commonService=i,this.activeIndex=-1,this.results=[],this.isShowResultsOnFocus="true",this.isShowNoResults="true",this.isHideListBox="true",this.ignoreExpanded="false",this.debounceTimer=100,this.validationInfo={listbox:{},input:{},widget:{}},this.keyupHandler=function(e){var t=e.which||e.keyCode;e.target.name;switch(t){case s.UP:case s.DOWN:case s.ESC:case s.RETURN:return void e.preventDefault()}var i=-1;if(i=Object.keys(s).findIndex(function(e){return t==s[e]}),("true"==n.isShowResultsOnFocus||n.element.value&&n.element.value.length&&-1==i)&&n.updateResults(),"both"==n.validationInfo.input.ariaAutocomplete)switch(t){case s.BACKSPACE:return;default:n.widgetViewModel&&n.widgetViewModel.setFieldValue&&n.widgetViewModel.setFieldValue(n.element.name,n.activeIndex)}else s.BACKSPACE==t&&n.updateResults()},this.keydownHandler=function(e){if(e.target)switch(e.which||e.keyCode){case s.DOWN:n.isListboxHidden()?n.updateResults().then(function(e){n.moveDown()}):n.moveDown();break;case s.UP:n.isListboxHidden()?n.updateResults().then(function(e){n.moveUp()}):n.moveUp();break;case s.ESC:n.clearFieldAndCloseListbox();break;case s.RETURN:return-1!=n.activeIndex&&e.preventDefault(),void n.onEnter()}return!0},this.focusHandler=function(e){"true"==n.isShowResultsOnFocus&&n.updateResults().then(function(e){if(n.listBoxElement)for(var t=n.listBoxElement.querySelectorAll('[role="option"]'),i=n.element.name+"-result-item-",o=0;o<t.length;o++){var r=t[o],a=i+o;r.setAttribute("id",a)}})},this.listBoxClickHandler=function(e){if(e.target){var t=n.getLIElement(e.target),i=-1;t&&t.id&&(i=parseInt(t.id.split(n.element.name+"-result-item-")[1]),n.activeIndex=i,n.onEnter(),n.hideListbox())}},this.getLIElement=function(e){for(var t=e,i=t?"LI"==t.nodeName:void 0;t&&!i;)t=t.parentElement,i=t?"LI"==t.nodeName:void 0;return i?t:void 0},this.blurHandler=function(e,t){t?e.target&&"LI"!=e.target.nodeName&&(clearTimeout(n.clearTimer),n.showListbox()):n.clearTimer=setTimeout(function(){n.widgetViewModel.getActiveIndexOnBlur&&n.widgetViewModel.getActiveIndexOnBlur(n.activeIndex,n.element.name),n.widgetViewModel&&n.widgetViewModel.focusedField==n.element.name?(n.widgetViewModel.focusedField=void 0,n.activeIndex=-1):n.hideListbox()},300)};var r=this.commonService.getSiteSettings("debounceTimer");r&&(this.debounceTimer=r)}return e.prototype.getWigdetViewModel=function(e){if(e&&e.au)return e.au.controller?e.au.controller.viewModel:{}},e.prototype.init=function(){this.element.type;this.comboBoxElement=this.element.parentElement;var e=void 0,t=void 0,i=void 0,o=void 0,n=void 0,r=void 0;this.comboBoxElement&&(this.comboBoxElement.hasAttribute("aria-haspopup")&&(this.element.setAttribute("aria-haspopup",this.comboBoxElement.getAttribute("aria-haspopup")),this.comboBoxElement.removeAttribute("aria-haspopup")),this.comboBoxElement.hasAttribute("aria-owns")&&(this.element.setAttribute("aria-owns",this.comboBoxElement.getAttribute("aria-owns")),this.comboBoxElement.removeAttribute("aria-owns")),this.comboBoxElement.hasAttribute("role")&&(this.element.setAttribute("role",this.comboBoxElement.getAttribute("role")),this.comboBoxElement.removeAttribute("role"))),t=this.element.getAttribute("aria-haspopup"),i=this.element.getAttribute("aria-owns"),e=this.element.getAttribute("role"),this.validationInfo.input.ariaHaspopup=t,this.validationInfo.input.ariaOwns=t,this.validationInfo.input.role=e,o=this.element.getAttribute("aria-autocomplete"),n=this.element.getAttribute("aria-controls"),this.isHideListBox=this.element.getAttribute("data-show-listbox")?this.element.getAttribute("data-show-listbox"):"true",this.isShowResultsOnFocus=this.element.getAttribute("showResultsOnFocus")||this.isShowResultsOnFocus,this.isShowNoResults=this.element.getAttribute("showNoResults")||this.isShowNoResults,this.ignoreExpanded=this.element.getAttribute("ignoreExpanded"),this.validationInfo.input.ariaAutocomplete=o,this.validationInfo.input.ariaControls=n,this.listBoxElement=this.comboBoxElement.querySelector("[aria-labelledby="+i+"]"),this.listBoxElement||(this.listBoxElement=this.comboBoxElement.parentElement&&this.comboBoxElement.parentElement.querySelector("[aria-labelledby="+i+"]")||document.querySelector("[aria-labelledby="+i+"]")),this.listBoxElement&&(this.validationInfo.listbox.exists=!0,r=this.listBoxElement.getAttribute("aria-labelledby"),this.validationInfo.listbox.ariaLabelledby=r),this.widgetElement=this.findWidget(),this.validationInfo.widget.exists=this.widgetElement,this.widgetViewModel=this.getWigdetViewModel(this.widgetElement);var a=this.widgetElement&&this.widgetElement.getAttribute("data-widget");this.widgetViewModel&&a&&a.startsWith("ph-global-search")&&(this.widgetViewModel.searchValueChanged=function(){}),this.validationInfo.widget.viewModelExist=this.widgetViewModel,this.validationInfo.widget.getFieldOptions=this.widgetViewModel?this.widgetViewModel.getFieldOptions:void 0,this.validationInfo.widget.setFieldValue=this.widgetViewModel?this.widgetViewModel.setFieldValue:void 0,this.validationInfo.widget.clearFieldValue=this.widgetViewModel?this.widgetViewModel.clearFieldValue:void 0,this.validationInfo.widget.getActiveIndex=this.widgetViewModel?this.widgetViewModel.getActiveIndex:void 0,this.validationInfo.widget.getActiveIndexOnBlur=this.widgetViewModel?this.widgetViewModel.getActiveIndexOnFocusOut:void 0},e.prototype.validate=function(){var e=[];return this.validationInfo.input.ariaHaspopup||e.push("Missing aria-haspopup attribute on parent div"),this.validationInfo.input.ariaOwns||e.push("Missing  aria-owns attribute on parent div"),this.validationInfo.input.ariaAutocomplete||e.push("Missing aria-autocomplete attribute on input elem"),this.validationInfo.input.ariaControls||e.push("Missing aria-controls attribute on input elem"),this.validationInfo.listbox.ariaLabelledby||e.push("Missing aria-labelledby attribute on listbox elem"),this.validationInfo.widget.exists||e.push("Missing widget elem"),this.validationInfo.widget.viewModelExist||e.push("Missing widget viewmodel on widget elem"),this.validationInfo.widget.getFieldOptions||e.push("Missing getFieldOptions(fieldName) fn on widget elem"),this.validationInfo.widget.setFieldValue||e.push("Missing setFieldValue(fieldName, selectedItemIndex) fn on widget elem"),this.validationInfo.widget.clearFieldValue||e.push("Missing clearFieldValue(fieldName) fn on widget elem"),this.validationInfo.widget.getActiveIndex||e.push("Missing getActiveIndex(fieldName) fn on widget elem"),this.validationInfo.widget.getActiveIndexOnBlur,e},e.prototype.showListbox=function(){if(this.setActiveListItem(),this.listBoxElement&&(this.listBoxElement.classList.remove("aurelia-hide"),"true"!=this.ignoreExpanded&&this.listBoxElement.setAttribute("aria-expanded","true")),this.element){"combobox"==(this.validationInfo&&this.validationInfo.input&&this.validationInfo.input.role||"")&&this.element.setAttribute("aria-expanded","true")}},e.prototype.hideListbox=function(){if("true"==this.isHideListBox){if(this.listBoxElement&&(this.activeIndex=-1,this.listBoxElement.classList.add("aurelia-hide"),"true"!=this.ignoreExpanded&&this.listBoxElement.setAttribute("aria-expanded","false")),this.element){"combobox"==(this.validationInfo&&this.validationInfo.input&&this.validationInfo.input.role||"")&&this.element.setAttribute("aria-expanded","false")}this.clearActiveListItem()}},e.prototype.isListboxHidden=function(){if(this.listBoxElement)return this.listBoxElement.classList.contains("aurelia-hide")},e.prototype.setActiveListItem=function(e){if(this.listBoxElement){for(var t=this.listBoxElement.querySelectorAll('[role="option"]'),i=this.listBoxElement.querySelectorAll(".ph-a11y-header"),o=this.element.name+"-result-item-",n=0;n<t.length;n++){var r=t[n],a=o+n;r.setAttribute("id",a),e||n!=this.activeIndex?(r.removeAttribute("aria-selected"),r.classList.remove("listitem-focused")):(r.setAttribute("aria-selected","true"),r.classList.add("listitem-focused"),this.element.setAttribute("aria-activedescendant",a))}-1==this.activeIndex&&this.element.setAttribute("aria-activedescendant","");var s=this.listBoxElement,l=this.activeIndex;if(s&&s.querySelector("#"+this.element.name+"-result-item-"+this.activeIndex)){var c=s.querySelector("#"+this.element.name+"-result-item-"+this.activeIndex),p=i.length-1;if(s&&s.offsetHeight-c.offsetHeight<c.offsetTop&&c.offsetTop<s.scrollHeight){var d=0;p>0&&(d=i[0].offsetHeight);var u=c.scrollHeight-(c.offsetHeight*l+d*p);s.scrollTop=u<0?-1*u:u}else s.scrollTop=0}"both"==this.validationInfo.input.ariaAutocomplete&&this.widgetViewModel&&this.widgetViewModel.setFieldValue&&this.widgetViewModel.setFieldValue(this.element.name,this.activeIndex,this.validationInfo.input.ariaAutocomplete)}},e.prototype.clearActiveListItem=function(){this.setActiveListItem(!0)},e.prototype.updateResults=function(){var e=this,t=this.widgetViewModel;return new Promise(function(i,o){if(t&&t.getFieldOptions){var n=t.getFieldOptions(e.element.name);n||n.then?n.then?n.then(function(t){i(t),e.results=t,e.activeIndex=e.widgetViewModel.getActiveIndex(e.element.name),"false"==e.isShowResultsOnFocus&&0==e.element.value.length?e.hideListbox():document.activeElement===e.element&&e.showListbox(),"false"!=e.isShowNoResults||e.results.length||e.hideListbox()}):(i(n||[]),e.results=n,e.activeIndex=e.widgetViewModel.getActiveIndex(e.element.name),"false"==e.isShowResultsOnFocus&&0==e.element.value.length?e.hideListbox():document.activeElement===e.element&&e.showListbox(),"false"!=e.isShowNoResults||e.results.length||e.hideListbox()):(console.warn("getFieldOptions(fieldName) is neither returning anything nor defined as a promise"),i([]))}i([])})},e.prototype.findWidget=function(){for(var e=this.element.parentElement,t=e?e.getAttribute("as-element"):void 0;e&&!t;)e=e.parentElement,t=e?e.getAttribute("as-element"):void 0;return t?e:void 0},e.prototype.moveDown=function(){this.activeIndex=this.activeIndex+1,this.activeIndex>this.results.length-1&&(this.activeIndex=0),this.setActiveListItem()},e.prototype.moveUp=function(){this.activeIndex=this.activeIndex-1,this.activeIndex<0&&(this.activeIndex=this.results.length-1),this.setActiveListItem()},e.prototype.onEnter=function(){var e=this;return this.widgetViewModel&&this.widgetViewModel.setFieldValue&&this.widgetViewModel.setFieldValue(this.element.name,this.activeIndex),this.widgetViewModel.onEnterCallBack&&this.widgetViewModel.onEnterCallBack(this.element.name,this.activeIndex),setTimeout(function(){e.hideListbox()},100),!1},e.prototype.clearFieldAndCloseListbox=function(){this.widgetViewModel&&this.widgetViewModel.clearFieldValue&&this.widgetViewModel.clearFieldValue(this.element.name),this.hideListbox()},e.prototype.setupEventListeners=function(){var e=this,t=this.element;this.keyupDebounceHandler=this.commonService.debounce(this.keyupHandler,this.debounceTimer),this.keydownDebounceHandler=this.commonService.debounce(this.keydownHandler,this.debounceTimer),t.addEventListener("keyup",this.keyupDebounceHandler),t.addEventListener("keydown",this.keydownDebounceHandler),t.addEventListener("focus",this.focusHandler),t.addEventListener("blur",this.blurHandler),this.listBoxElement&&(this.listBoxElement.addEventListener("click",this.listBoxClickHandler),this.listBoxElement.addEventListener("focus",function(t){e.blurHandler(t,!0)}),this.listBoxElement.addEventListener("blur",this.blurHandler))},e.prototype.attached=function(){this.init();var e=this.validate();e&&e.length&&console.warn("A11y autocomplete setup is improper.Check errors ",e),this.setupEventListeners()},e.prototype.detached=function(){var e=this.element;e.removeEventListener("keyup",this.keyupDebounceHandler),e.removeEventListener("keydown",this.keydownDebounceHandler),e.removeEventListener("focus",this.focusHandler),e.removeEventListener("blur",this.blurHandler),this.listBoxElement&&this.listBoxElement.removeEventListener("click",this.listBoxClickHandler)},e}();r([t.bindable,a("design:type",String)],l.prototype,"isShowResultsOnFocus",void 0),e.A11yAutoCompleteAttribute=l=r([(0,t.customAttribute)("ph-a11y-autocomplete"),(0,t.autoinject)(),a("design:paramtypes",[Element,i.CommonService])],l)})
define("ph-common/ph-a11y/ph-a11y-listbox-attribute",["exports","aurelia-framework","../index"],function(e,t,i){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.A11yListboxAttribute=void 0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"===("undefined"==typeof Reflect?"undefined":n(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},a=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":n(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s={BACKSPACE:8,TAB:9,RETURN:13,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},l=e.A11yListboxAttribute=function(){function e(t,i){var n=this;o(this,e),this.element=t,this.commonService=i,this.activeIndex=-1,this.results=[],this.isToggleVar="",this.validationInfo={span:{},listbox:{},button:{},widget:{}},this.keyupHandler=function(e){var t=e.which||e.keyCode;e.target.name;switch(t){case s.UP:case s.DOWN:case s.ESC:case s.RETURN:return void e.preventDefault()}n.updateResults()},this.keydownHandler=function(e){if(e.target)switch(e.which||e.keyCode){case s.DOWN:e.preventDefault(),n.isListboxHidden()?n.updateResults().then(function(e){n.moveDown()}):n.moveDown();break;case s.UP:e.preventDefault(),n.isListboxHidden()?n.updateResults().then(function(e){n.moveUp()}):n.moveUp();break;case s.ESC:n.clearFieldAndCloseListbox();break;case s.RETURN:return e.preventDefault(),void(n.isListboxHidden()?n.updateResults().then(function(e){n.showListbox()}):n.onEnter())}return!0},this.focusHandler=function(e){n.updateResults()},this.listBoxClickHandler=function(e){if(e.target&&("LI"==e.target.nodeName||e.target.parentElement&&"LI"==e.target.parentElement.nodeName)){var t=-1,i=void 0;"LI"==e.target.nodeName?i=e.target:"LI"==e.target.parentElement.nodeName&&(i=e.target.parentElement),i.id&&(t=parseInt(i.id.split(n.name+"-result-item-")[1])),n.activeIndex=t,n.onEnter()}},this.blurHandler=function(e){setTimeout(function(){!n.listBoxElement.contains(e.relatedTarget)&&n.hideListbox()},300)}}return e.prototype.getWigdetViewModel=function(e){if(e&&e.au)return e.au.controller?e.au.controller.viewModel:{}},e.prototype.init=function(){var e=(this.element.type,void 0),t=void 0,i=void 0;if(i=this.element.getAttribute("aria-labelledby")){var o=i.split(" ");o&&o.length>1&&(this.spanElement=document.getElementById(o[0]),this.validationInfo.span.exists=!0)}e=this.element.getAttribute("aria-haspopup"),this.isToggleVar=this.element.getAttribute("is-toggle")||"",this.validationInfo.button.ariaHaspopup=e,this.validationInfo.button.ariaLabelledby=i,this.spanElement&&(this.listBoxElement=document.querySelector("[aria-labelledby="+this.spanElement.getAttribute("id")+"]"),this.listBoxElement&&(this.validationInfo.listbox.exists=!0,t=this.listBoxElement.getAttribute("aria-labelledby"),this.validationInfo.listbox.ariaLabelledby=t)),this.widgetElement=this.findWidget(),this.validationInfo.widget.exists=this.widgetElement,this.widgetViewModel=this.getWigdetViewModel(this.widgetElement),this.validationInfo.widget.viewModelExist=this.widgetViewModel,this.validationInfo.widget.getFieldOptions=this.widgetViewModel?this.widgetViewModel.getFieldOptions:void 0,this.validationInfo.widget.setFieldValue=this.widgetViewModel?this.widgetViewModel.setFieldValue:void 0,this.validationInfo.widget.clearFieldValue=this.widgetViewModel?this.widgetViewModel.clearFieldValue:void 0,this.validationInfo.widget.getActiveIndex=this.widgetViewModel?this.widgetViewModel.getActiveIndex:void 0},e.prototype.validate=function(){var e=[];return this.validationInfo.span.exists||e.push("Missing span"),this.validationInfo.widget.exists||e.push("Missing widget elem"),this.validationInfo.widget.viewModelExist||e.push("Missing widget viewmodel on widget elem"),this.validationInfo.widget.getFieldOptions||e.push("Missing getFieldOptions(fieldName) fn on widget elem"),this.validationInfo.widget.setFieldValue||e.push("Missing setFieldValue(fieldName, selectedItemIndex) fn on widget elem"),this.validationInfo.widget.clearFieldValue||e.push("Missing clearFieldValue(fieldName) fn on widget elem"),e},e.prototype.showListbox=function(){var e=this;this.listBoxElement&&this.listBoxElement.classList.remove("aurelia-hide"),this.element&&this.element.setAttribute("aria-expanded","true"),this.setActiveListItem(),this.isToggleVar.length&&(this.widgetViewModel[this.isToggleVar]=!0),setTimeout(function(){e.listBoxElement&&e.listBoxElement.focus()},100)},e.prototype.hideListbox=function(){this.listBoxElement&&(this.activeIndex=-1,this.listBoxElement.classList.add("aurelia-hide")),this.element&&this.element.removeAttribute("aria-expanded"),this.clearActiveListItem(),this.isToggleVar.length&&(this.widgetViewModel[this.isToggleVar]=!1)},e.prototype.isListboxHidden=function(){if(this.listBoxElement)return this.listBoxElement.classList.contains("aurelia-hide")},e.prototype.handleListboxClick=function(){var e=this;this.isListboxHidden()?(this.updateResults(),this.setActiveListItem(),setTimeout(function(){e.listBoxElement&&e.listBoxElement.focus()},100)):this.hideListbox()},e.prototype.setActiveListItem=function(e){if(this.listBoxElement){for(var t=this.listBoxElement.querySelectorAll('[role="option"]'),i=this.name+"-result-item-",o=0;o<t.length;o++){var n=t[o],r=i+o;n.setAttribute("id",r),e||o!=this.activeIndex?(n.removeAttribute("aria-selected"),n.classList.remove("listitem-focused")):(n.classList.add("listitem-focused"),n.setAttribute("aria-selected","true"),this.listBoxElement.setAttribute("aria-activedescendant",r))}var a=this.listBoxElement,s=this.activeIndex;if(a&&a.querySelector("#"+this.name+"-result-item-"+this.activeIndex)){var l=a.querySelector("#"+this.name+"-result-item-"+this.activeIndex);if(a&&a.offsetHeight-l.offsetHeight<l.offsetTop&&l.offsetTop<a.scrollHeight){var c=l.scrollHeight-l.offsetHeight*s;a.scrollTop=c<0?-1*c:c}else a.scrollTop=0}}},e.prototype.clearActiveListItem=function(){this.setActiveListItem(!0)},e.prototype.updateResults=function(){var e=this,t=this.widgetViewModel;return new Promise(function(i,o){if(t&&t.getFieldOptions){var n=t.getFieldOptions(e.name);n||n.then?n.then?n.then(function(t){i(t),e.results=t,e.activeIndex=e.widgetViewModel.getActiveIndex&&e.widgetViewModel.getActiveIndex(e.name),e.showListbox()}):(i(n||[]),e.results=n,e.activeIndex=e.widgetViewModel.getActiveIndex&&e.widgetViewModel.getActiveIndex(e.name),e.showListbox()):(console.warn("getFieldOptions(fieldName) is neither returning anything nor defined as a promise"),i([]))}i([])})},e.prototype.findWidget=function(){for(var e=this.element.parentElement,t=e?e.getAttribute("as-element"):void 0;e&&!t;)e=e.parentElement,t=e?e.getAttribute("as-element"):void 0;return t?e:void 0},e.prototype.moveDown=function(){this.activeIndex=this.activeIndex+1,this.activeIndex>this.results.length-1&&(this.activeIndex=this.results.length-1),this.setActiveListItem()},e.prototype.moveUp=function(){this.activeIndex=this.activeIndex-1,this.activeIndex<0&&(this.activeIndex=0),this.setActiveListItem()},e.prototype.onEnter=function(){this.widgetViewModel&&this.widgetViewModel.setFieldValue&&(this.widgetViewModel.setFieldValue(this.name,this.activeIndex),this.element.focus()),this.hideListbox()},e.prototype.clearFieldAndCloseListbox=function(){this.widgetViewModel&&this.widgetViewModel.clearFieldValue&&this.widgetViewModel.clearFieldValue(this.name),this.hideListbox()},e.prototype.setupEventListeners=function(){this.element&&(this.element.addEventListener("keydown",this.keydownHandler),this.element.addEventListener("click",this.handleListboxClick.bind(this)),this.listBoxElement&&(this.listBoxElement.addEventListener("click",this.listBoxClickHandler),this.listBoxElement.addEventListener("blur",this.blurHandler),this.listBoxElement.addEventListener("keydown",this.keydownHandler)))},e.prototype.attached=function(){this.init();var e=this.validate();e&&e.length&&console.warn("A11y autocomplete setup is improper.Check errors ",e),this.element.name&&(this.name=this.element.name),this.setupEventListeners()},e}();r([(0,t.bindable)({primaryProperty:!0}),a("design:type",Object)],l.prototype,"name",void 0),e.A11yListboxAttribute=l=r([(0,t.customAttribute)("ph-a11y-listbox"),(0,t.autoinject)(),a("design:paramtypes",[Element,i.CommonService])],l)})
define("ph-common/ph-a11y/ph-a11y-listrole-attribute",["exports","aurelia-framework","../index"],function(e,t,i){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.A11yListroleAttribute=void 0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"===("undefined"==typeof Reflect?"undefined":n(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},a=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":n(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=e.A11yListroleAttribute=function(){function e(t,i){o(this,e),this.element=t,this.commonService=i}return e.prototype.dataChanged=function(e,t){this.setAttributes()},e.prototype.attached=function(){this.setAttributes()},e.prototype.setAttributes=function(){var e=this;setTimeout(function(){if(e.listItems=e.element&&e.element.children,e.listItems&&1===e.listItems.length){e.element.setAttribute("role","presentation");var t=e.element.firstElementChild&&e.element.firstElementChild.getAttribute("role");e.element.firstElementChild&&"presentation"!=t&&e.element.firstElementChild.removeAttribute("role")}else if(e.listItems&&e.listItems.length>=1){e.element.setAttribute("role","list");for(var i=0;i<e.listItems.length;i++){var o=e.listItems[i]&&e.listItems[i].getAttribute("role");e.listItems[i]&&"presentation"!=o&&e.listItems[i].setAttribute("role","listitem")}}},50)},e}();r([t.bindable,a("design:type",Object)],s.prototype,"data",void 0),e.A11yListroleAttribute=s=r([(0,t.customAttribute)("ph-role"),(0,t.autoinject)(),a("design:paramtypes",[Element,i.CommonService])],s)})
define("ph-common/ph-a11y/ph-a11y-radio-attribute",["exports","aurelia-framework","../index"],function(e,t,i){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.A11yRadioAttribute=void 0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"===("undefined"==typeof Reflect?"undefined":n(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},a=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":n(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s={BACKSPACE:8,TAB:9,RETURN:13,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,SHIFT:16},l=e.A11yRadioAttribute=function(){function e(t,i){var n=this;o(this,e),this.element=t,this.commonService=i,this.radioButtons=[],this.validationInfo={widget:{}},this.handleKeydown=function(e){var t=(e.currentTarget,!1),i=e.which||e.keyCode,o=n.getCurrentRadioButton();switch(i){case s.SPACE:case s.RETURN:n.setChecked(o),t=!0;break;case s.UP:n.setCheckedToPreviousItem(o),t=!0;break;case s.DOWN:n.setCheckedToNextItem(o),t=!0;break;case s.LEFT:n.setCheckedToPreviousItem(o),t=!0;break;case s.RIGHT:n.setCheckedToNextItem(o),t=!0}t&&(e.stopPropagation(),e.preventDefault())},this.handleFocus=function(e){n.getCurrentRadioButton().classList.add("ph-focus")},this.handleBlur=function(e){n.getCurrentRadioButton().classList.remove("ph-focus")},this.setChecked=function(e){e=e instanceof HTMLElement?e:e.currentTarget;for(var t=n.widgetViewModel,i=0;i<n.radioButtons.length;i++){var o=n.radioButtons[i];o.setAttribute("aria-checked","false"),o.classList.remove("ph-focus")}e.setAttribute("aria-checked","true"),e.classList.add("ph-focus"),n.element.setAttribute("aria-activedescendant",e.id),n.element.focus();for(var r=-1,i=0;i<n.radioButtons.length;i++){var o=n.radioButtons[i];o.id===e.id&&"true"==e.getAttribute("aria-checked")&&(r=i)}t.setRadioCheked(r)},this.setCheckedToPreviousItem=function(e){var t;e.id===n.firstRadioButton.id?n.setChecked(n.lastRadioButton):(t=n.getActiveIndex(e),n.setChecked(n.radioButtons[t-1]))},this.setCheckedToNextItem=function(e){var t;e.id===n.lastRadioButton.id?n.setChecked(n.firstRadioButton):(t=n.getActiveIndex(e),n.setChecked(n.radioButtons[t+1]))},this.getCurrentRadioButton=function(){var e=n.element.getAttribute("aria-activedescendant");if(!e)return n.element.setAttribute("aria-activedescendant",n.firstRadioButton.id),n.firstRadioButton;for(var t=0;t<n.radioButtons.length;t++){var i=n.radioButtons[t];if(i.id===e)return i}return n.element.setAttribute("aria-activedescendant",n.firstRadioButton.id),n.firstRadioButton}}return e.prototype.attached=function(){this.init();var e=this.validate();if(e&&e.length&&console.warn("A11y autocomplete setup is improper.Check errors ",e),this.widgetViewModel){var t=this.widgetViewModel.setActiveRadioChecked(this.element.getAttribute("name"));-1!=t&&this.setChecked(this.radioButtons[t])}this.setupEventListeners()},e.prototype.init=function(){if(this.element){this.element.getAttribute("role")||this.element.setAttribute("role","radiogroup"),this.validationInfo.widget.name=this.element.getAttribute("name");var e=this.element.getAttribute("name")+"-result-item-";this.radioButtons=this.element.querySelectorAll("[role=radio]");for(var t=0;t<this.radioButtons.length;t++){var i=this.radioButtons[t],o=e+t;i.setAttribute("aria-checked","false"),i.setAttribute("id",o),i.addEventListener("click",this.setChecked)}this.radioButtons.length&&(this.firstRadioButton=this.radioButtons[0],this.lastRadioButton=this.radioButtons[this.radioButtons.length-1])}this.widgetElement=this.findWidget(),this.validationInfo.widget.exists=this.widgetElement,this.widgetViewModel=this.getWigdetViewModel(this.widgetElement),this.validationInfo.widget.viewModelExist=this.widgetViewModel,this.validationInfo.widget.setRadioCheked=this.widgetViewModel?this.widgetViewModel.setRadioCheked:void 0,this.validationInfo.widget.setActiveRadioChecked=this.widgetViewModel?this.widgetViewModel.setActiveRadioChecked:void 0},e.prototype.findWidget=function(){for(var e=this.element.parentElement,t=e?e.getAttribute("as-element"):void 0;e&&!t;)e=e.parentElement,t=e?e.getAttribute("as-element"):void 0;return t?e:void 0},
e.prototype.getWigdetViewModel=function(e){if(e&&e.au)return e.au.controller?e.au.controller.viewModel:{}},e.prototype.radioButtonInit=function(e){e.setAttribute("aria-checked","false"),e.addEventListener("click",this.setChecked)},e.prototype.validate=function(){var e=[];return this.validationInfo.widget.setRadioCheked||e.push("Missing setRadioCheked(fieldName) fn on widget elem"),this.validationInfo.widget.exists||e.push("Missing widget elem"),this.validationInfo.widget.name||e.push("Missing ridio group name"),this.validationInfo.widget.setActiveRadioChecked||e.push("Missing setActiveRadioChecked(fieldName) fn on widget elem"),e},e.prototype.setupEventListeners=function(){this.element.addEventListener("keydown",this.handleKeydown),this.element.addEventListener("focus",this.handleFocus),this.element.addEventListener("blur",this.handleBlur)},e.prototype.getActiveIndex=function(e){for(var t=-1,i=0;i<this.radioButtons.length;i++){this.radioButtons[i].id===e.id&&(t=i)}return t},e.prototype.detached=function(){this.element.removeEventListener("keydown",this.handleKeydown),this.element.removeEventListener("focus",this.handleFocus),this.element.removeEventListener("blur",this.handleBlur)},e}();e.A11yRadioAttribute=l=r([(0,t.customAttribute)("ph-a11y-radio"),(0,t.autoinject)(),a("design:paramtypes",[Element,i.CommonService])],l)})
define("ph-common/ph-a11y/ph-a11y-tooltip-attribute",["exports","aurelia-framework"],function(e,t){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.A11yTooltipAttribute=void 0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n=function(e,t,i,n){var r,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===("undefined"==typeof Reflect?"undefined":o(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},r=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":o(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=e.A11yTooltipAttribute=function(){function e(t){i(this,e),this.element=t,this.mode="",this.cache="false"}return e.prototype.attached=function(){this.element&&this.init()},e.prototype.init=function(){if("multiline"===this.mode&&this.handleMultiLineText(),"singleline"===this.mode)try{this.handleSingleLineText()}catch(e){console.error(e)}},e.prototype.handleSingleLineText=function(){var e=this;setTimeout(function(){e.element.scrollWidth>e.element.offsetWidth?e.element.classList.add("elipsis-text"):e.element.classList.remove("elipsis-text")},1e3)},e.prototype.handleMultiLineText=function(){try{if("true"===this.cache&&this.element.hasAttribute("ph-a11y-trimmed-text")){var e=this.element.getAttribute("ph-a11y-trimmed-text");this.element.childNodes[0].nodeValue=e}else this.cropTextToFit(this.element)}catch(e){console.error(e)}},e.prototype.cropTextToFit=function(e){var t=void 0,i=e.childNodes[0].nodeValue;for(e.scrollHeight>e.clientHeight&&e.classList.add("ph-a11y-elipsis-text");e.scrollHeight>e.clientHeight;){if(-1==(t=i.lastIndexOf(" ")))return;i=i.substring(0,t),e.childNodes[0].nodeValue=i+"..."}"true"===this.cache&&e.setAttribute("ph-a11y-trimmed-text",i+"...")},e.prototype.contentChanged=function(e,t){this.element&&this.init()},e}();n([t.bindable,r("design:type",String)],a.prototype,"content",void 0),n([t.bindable,r("design:type",String)],a.prototype,"mode",void 0),n([t.bindable,r("design:type",String)],a.prototype,"cache",void 0),e.A11yTooltipAttribute=a=n([(0,t.customAttribute)("ph-a11y-tooltip"),(0,t.autoinject)(),r("design:paramtypes",[Element])],a)})
define("ph-common/ph-scroll/ph-scroll-attribute",["exports","aurelia-framework","../index"],function(e,t,i){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.PhScrollAttribute=void 0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"===("undefined"==typeof Reflect?"undefined":n(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},a=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":n(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=window,l=e.PhScrollAttribute=function(){function e(t,i){var n=this;o(this,e),this.speedInPixels=30,this.scrollAlign="top",this.elementClickHandler=function(){if(!n.targetEle)return!0;var e=n.commonService.getSiteSettings("smoothAnchorSettings")||{},t=n.checkWidgetEnhanced(n.targetEle);e&&e.ignore?(n.targetEle.scrollIntoView(!0),setTimeout(function(){n.targetEle.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"})},325)):n.triggerScroll(t)},this.element=t,this.commonService=i,this.init()}return e.prototype.valueChanged=function(e,t){this.selector=e},e.prototype.init=function(){var e=this,t=this.commonService.getSiteSettings("smoothAnchorSettings")||{},i=this.element.getAttribute("ph-scroll-speed")||t.scrollSpeed,o=this.element.getAttribute("ph-scroll-align")||t.scrollAlign,n=document.querySelector("[ph-scroll]");s.KeyboardEvent&&t.isLazyIgnored&&(window.location.hash||n)&&document.dispatchEvent(new KeyboardEvent("keyup",{key:"ArrowUp"})),i&&i.length&&(this.speedInPixels=parseInt(i)),o&&o.length&&(this.scrollAlign=o),this.element.addEventListener("click",function(t){return e.targetEle=document.querySelector(e.selector),e.targetEle&&(t.preventDefault(),e.elementClickHandler()),!0})},e.prototype.triggerScroll=function(e){var t=this,i=window.pageYOffset,o=this.commonService.getNearestSectionElemOffsetTop(this.targetEle,this.scrollAlign);i<o?this.commonService.smoothScroll(i,o,!0,this.speedInPixels):this.commonService.smoothScroll(i,o,!1,this.speedInPixels),e&&setTimeout(function(){t.triggerScroll(!1)},o/this.speedInPixels*15);var n=setTimeout(function(){t.targetEle.focus(),clearTimeout(n)},350)},e.prototype.checkWidgetEnhanced=function(e){try{var t=e.nodeName,i=e;"SECTION"==t&&(i=e.firstElementChild);var o=i&&i.getAttribute("as-element");if(o&&"ph-html-v1"!==o&&i&&!i.au)return i}catch(e){}},e}();e.PhScrollAttribute=l=r([(0,t.customAttribute)("ph-scroll"),(0,t.autoinject)(),a("design:paramtypes",[Element,i.CommonService])],l)})
define("ph-common/ph-object-fit/ph-object-fit-attribute",["exports","aurelia-framework","../index"],function(e,t,i){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.PhObjectFitAttribute=void 0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"===("undefined"==typeof Reflect?"undefined":n(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},a=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":n(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=e.PhObjectFitAttribute=function(){function e(t,i){var r=this;o(this,e),this.objectFitPolyfill=function(e){if(void 0===e||e instanceof Event)e=document.querySelectorAll("[data-object-fit]");else if(e&&e.nodeName)e=[e];else{if("object"!==(void 0===e?"undefined":n(e))||!e.length||!e[0].nodeName)return!1;e=e}for(var t=0;t<e.length;t++)if(e[t].nodeName){var i=e[t].nodeName.toLowerCase();"img"!==i||r.edgePartialSupport?"video"===i?e[t].readyState>0?r.objectFit(e[t]):e[t].addEventListener("loadedmetadata",function(){r.objectFit(e[0])}):r.objectFit(e[t]):e[t].complete?r.objectFit(e[t]):e[t].addEventListener("load",function(){r.objectFit(e[0])})}return!0},this.element=t,this.commonService=i,this.init()}return e.prototype.valueChanged=function(e,t){},e.prototype.attached=function(){},e.prototype.init=function(){var e=this,t=window.navigator.userAgent.match(/Edge\/(\d{2})\./);this.edgePartialSupport=!!t&&parseInt(t[1],10)>=16,"objectFit"in document.documentElement.style!=!1&&!this.edgePartialSupport||(clearTimeout(this.timer),this.timer=setTimeout(function(){e.objectFitPolyfill(e.element),clearTimeout(e.timer)},3e3))},e.prototype.checkParentContainer=function(e){var t=window.getComputedStyle(e,null),i=t.getPropertyValue("position"),o=t.getPropertyValue("overflow"),n=t.getPropertyValue("display");i&&"static"!==i||(e.style.position="relative"),"hidden"!==o&&(e.style.overflow="hidden"),n&&"inline"!==n||(e.style.display="block"),0===e.clientHeight&&(e.style.height="100%"),-1===e.className.indexOf("object-fit-polyfill")&&(e.className=e.className+" object-fit-polyfill")},e.prototype.checkMediaProperties=function(e){var t=window.getComputedStyle(e,null),i={"max-width":"none","max-height":"none","min-width":"0px","min-height":"0px",top:"auto",right:"auto",bottom:"auto",left:"auto","margin-top":"0px","margin-right":"0px","margin-bottom":"0px","margin-left":"0px"};for(var o in i){t.getPropertyValue(o)!==i[o]&&(e.style[o]=i[o])}},e.prototype.setPosition=function(e,t,i){var o=void 0,n=void 0,r=void 0,a=void 0,s=void 0;if(i=i.split(" "),i.length<2&&(i[1]=i[0]),"x"===e)o=i[0],n=i[1],r="left",a="right",s=t.clientWidth;else{if("y"!==e)return;o=i[1],n=i[0],r="top",a="bottom",s=t.clientHeight}return o===r||n===r?void(t.style[r]="0"):o===a||n===a?void(t.style[a]="0"):"center"===o||"50%"===o?(t.style[r]="50%",void(t.style["margin-"+r]=s/-2+"px")):o.indexOf("%")>=0?(o=parseInt(o),void(o<50?(t.style[r]=o+"%",t.style["margin-"+r]=s*(o/-100)+"px"):(o=100-o,t.style[a]=o+"%",t.style["margin-"+a]=s*(o/-100)+"px"))):void(t.style[r]=o)},e.prototype.objectFit=function(e){var t=e.dataset?e.dataset.objectFit:e.getAttribute("data-object-fit"),i=e.dataset?e.dataset.objectPosition:e.getAttribute("data-object-position");t=t||"cover",i=i||"50% 50%";var o=e.parentNode;return this.checkParentContainer(o),this.checkMediaProperties(e),e.style.position="absolute",e.style.width="auto",e.style.height="auto","scale-down"===t&&(t=e.clientWidth<o.clientWidth&&e.clientHeight<o.clientHeight?"none":"contain"),"none"===t?(this.setPosition("x",e,i),void this.setPosition("y",e,i)):"fill"===t?(e.style.width="100%",e.style.height="100%",this.setPosition("x",e,i),void this.setPosition("y",e,i)):(e.style.height="100%",void("cover"===t&&e.clientWidth>o.clientWidth||"contain"===t&&e.clientWidth<o.clientWidth?(e.style.top="0",e.style.marginTop="0",this.setPosition("x",e,i)):(e.style.width="100%",e.style.height="auto",e.style.left="0",e.style.marginLeft="0",this.setPosition("y",e,i))))},e}();e.PhObjectFitAttribute=s=r([(0,t.customAttribute)("ph-object-fit"),(0,t.autoinject)(),a("design:paramtypes",[Element,i.CommonService])],s)})
define("ph-common/ph-sticky/ph-sticky-attribute",["exports","aurelia-framework","./../common-service"],function(e,t,i){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.PhStickyAttribute=void 0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"===("undefined"==typeof Reflect?"undefined":n(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},a=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":n(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=e.PhStickyAttribute=function(){function e(t,i){o(this,e),this.element=t,this.commonService=i,this.selector=""}return e.prototype.attached=function(){this.commonService.getSiteSettings("jobPageHeaderSticky")||(document.addEventListener("scroll",this.initiateScrollSticky.bind(this)),window.addEventListener("resize",this.setBodyHeight.bind(this)))},e.prototype.initiateScrollSticky=function(){var e=this.element.offsetTop||0;this.element.offsetTop||(e=this.element.offsetParent&&this.element.offsetParent.offsetTop||0),this.element&&window.pageYOffset>e?this.element.classList.contains("ph-sticky-block-fixed")||(this.currentStickyHeight=this.element.offsetHeight,this.element.classList.add("ph-sticky-block-fixed"),this.setBodyHeight(!0)):(this.element.classList.remove("ph-sticky-block-fixed"),this.element.style.top=null,this.nextElementSibling&&this.nextElementSibling.style&&this.nextElementSibling.style.paddingTop&&(this.nextElementSibling.style.paddingTop=null))},e.prototype.setBodyHeight=function(e){if(this.element.classList.contains("ph-sticky-block-fixed")||e){var t=this.fetchPosition();if(t&&(this.element.style.top=t+"px"),!this.nextElementSibling){var i=this.element;for(this.nextElementSibling=i.nextElementSibling;i&&"BODY"!=i.nodeName&&!this.nextElementSibling;)i=i.parentElement,this.nextElementSibling=i&&i.nextElementSibling}this.nextElementSibling&&(this.nextElementSibling.style.paddingTop=this.element.offsetHeight+t+"px")}},e.prototype.fetchPosition=function(){for(var e=document.querySelectorAll(".pcs-sticky-header, .ph-sticky-header, .ph-sticky-block-fixed"),t=0,i=0;i<e.length;i++)this.element!==e[i]&&(t+=e[i].offsetHeight);return t},e.prototype.detached=function(){document.removeEventListener("scroll",this.initiateScrollSticky),window.removeEventListener("resize",this.setBodyHeight)},e}();r([t.bindable,a("design:type",String)],s.prototype,"selector",void 0),e.PhStickyAttribute=s=r([(0,t.customAttribute)("ph-sticky"),(0,t.autoinject)(),a("design:paramtypes",[Element,i.CommonService])],s)})
define("ph-common/ph-settings/ph-settings-directive",["exports","aurelia-framework","../common-service"],function(e,t,i){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.DataPsAtribute=void 0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"===("undefined"==typeof Reflect?"undefined":n(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},a=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":n(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=[/phw-grid-[0-9]/,/phw-grid-xxl-[0-9]/,/phw-grid-xl-[0-9]/,/phw-grid-lg-[0-9]/,/phw-grid-md-[0-9]/,/phw-grid-sm-[0-9]/,/g-col-[0-9]/,/g-col-xxl-[0-9]/,/g-col-xl-[0-9]/,/g-col-lg-[0-9]/,/g-col-md-[0-9]/,/g-col-sm-[0-9]/],l={desktop:{enable:"phw-img-overlay",disable:"phw-img-overlay-none"},largeDesktop:{enable:"phw-xxl-img-overlay",disable:"phw-xxl-img-overlay-none"},tab:{enable:"phw-lg-img-overlay",disable:"phw-lg-img-overlay-none"},mobile:{enable:"phw-sm-img-overlay",disable:"phw-sm-img-overlay-none"}},c=window.mcsCmsMapping||{},p=e.DataPsAtribute=function(){function e(t,i){o(this,e),this.element=t,this.commonService=i}return e.prototype.valueChanged=function(e,t){var i=this;setTimeout(function(){i.handleInitialCls(i.element,e)},0)},e.prototype.handleInitialCls=function(e,t){if(e){this.handleBindVal(e,t);var i=e.closest("[data-func-widget-id]");if(i){var o=i.getAttribute("instance-id"),n=i.getAttribute("data-func-widget-id"),r=this.commonService.getSettings(o,n);this.initiateSettings(e,r,i)}}},e.prototype.handleBindVal=function(e,t){if(e&&t&&t.class)for(var i=0;i<t.class.length;i++)e.classList.add(t.class[i]);this.applyMappingForCMSSettings(e)},e.prototype.initiateSettings=function(e,t,i){var o=this,n=e.getAttribute("data-ps")||"",r=i&&i.querySelectorAll('[data-ps="'+n+'"]'),a=0;r&&r.length>1&&(a=Array.from(r).indexOf(e));var s=t&&t.cards&&t.cards[a]&&t.cards[a][n]||t&&t[n];s=this.formatSettings(s,e);for(var l in s)!function(t){var i=s[t];switch(t){case"hidden":setTimeout(function(){o.applyVisibleToggle(e,i)},50);break;case"class":o.applyClassesToElem(e,i);break;case"attrs":o.applyAttrsToElem(e,i)}}(l)},e.prototype.applyClassesToElem=function(e,t){e&&(t.remove.forEach(function(t,i){e.classList.remove(t)}),t.add.forEach(function(t,i){e.classList.contains(t)||e.classList.add(t)}))},e.prototype.applyAttrsToElem=function(e,t){e&&t&&Object.keys(t).length&&Object.keys(t).forEach(function(i,o){e.setAttribute(i,t[i])})},e.prototype.applyVisibleToggle=function(e,t){e&&void 0!==t&&(!1===t||"false"===t?(e.classList.remove("phw-d-block"),e.classList.remove("phw-d-none")):!0!==t&&"true"!==t||(!this.isClassExists("phw-d-none",e)&&e.classList.add("phw-d-none"),e.classList.remove("show")))},e.prototype.isClassExists=function(e,t){return t.classList.contains(e)},e.prototype.fetchPhwGclass=function(e){for(var t=[],i=0;i<e.classList.length;i++)e.classList[i].startsWith("phw-g-")&&t.push(e.classList[i]);return t},e.prototype.handleWidgetClasses=function(e,t){try{var i={remove:[],add:[]},o=t.className;return e.forEach(function(e){i.add.push(e),s.forEach(function(t){var n=o.match(t);n&&e.match(t)&&i.remove.push(n)})}),i}catch(e){console.error("Error while handling widget classes",e,t)}},e.prototype.formatSettings=function(e,t){var i=this,o={class:{add:[],remove:[]},attr:{}};if(e)if("string"==typeof e)o.class.remove=o.class.remove.concat(this.fetchPhwGclass(t)),o.class.add.push(e);else if(e&&e.class&&e.class.length){var r=this.handleWidgetClasses(e.class,t);r&&(o.class.add=o.class.add.concat(r.add),o.class.remove=o.class.remove.concat(r.remove),o.class.remove=o.class.remove.concat(this.fetchPhwGclass(t)))}else if("object"===(void 0===e?"undefined":n(e)))for(var a=Object.keys(e),s=0;s<a.length;s++)!function(n){var r=a[n];switch(r){case"elementVisibility":e[r]&&e[r].desktop||e[r]&&e[r].mobile?o.hidden=!0:o.hidden=!1;break;case"styleId":o.class.remove=o.class.remove.concat(i.fetchPhwGclass(t)),o.class.add.push(e[r]);break;case"additionalSettings":if(e[r]&&e[r].cardColumnWidth&&e[r].cardColumnWidth.classes&&e[r].cardColumnWidth.classes.length){var s=i.handleWidgetClasses(e[r].cardColumnWidth.classes,t);s&&(o.class.add=o.class.add.concat(s.add),o.class.remove=o.class.add.concat(s.remove))}if(e[r]&&e[r].itemsPerRow&&e[r].itemsPerRow.classes&&e[r].itemsPerRow.classes.length){var c=i.handleWidgetClasses(e[r].cardColumnWidth.classes,t);c&&(o.class.add=o.class.add.concat(c.add),o.class.remove=o.class.add.concat(c.remove))}break;case"iconData":e[r]&&e[r].value&&(o.attr.href=e[r]&&e[r].value);break;case"buttonSize":"large"===e[r]?(o.class.remove=o.class.remove.concat(["phw-btn-sm"]),o.class.add.push("phw-btn-lg")):"small"===e[r]&&(o.class.remove=o.class.remove.concat(["phw-btn-lg"]),o.class.add.push("phw-btn-sm"));break;case"inputSize":"large"===e[r]?(o.class.remove=o.class.remove.concat(["phw-f-c-sm"]),o.class.add.push("phw-f-c-lg")):"small"===e[r]&&(o.class.remove=o.class.remove.concat(["phw-f-c-lg"]),o.class.add.push("phw-f-c-sm"));break;case"overlaySettings":e[r]&&e[r].overlayClass&&o.class.add.push(e[r].overlayClass);["desktop","largeDesktop","mobile","tab"].forEach(function(t){!0===e[r][t]?(o.class.add.push(l[t].enable),o.class.remove.push(l[t].disable)):!1===e[r][t]&&(o.class.remove.push(l[t].enable),o.class.add.push(l[t].disable),o.class.add=o.class.add.filter(function(t){return t!==e[r].overlayClass}))})}}(s);return o},e.prototype.applyMappingForCMSSettings=function(e){e&&Object.keys(c).forEach(function(t){try{if(e.matches(t)){var i=c[t],o=i.classes,n=i.attrs,r=i.classesToRemove;o&&o.forEach(function(t){e.classList.add(t)}),r&&r.forEach(function(t){e.classList.remove(t)}),n&&Object.keys(n).forEach(function(t){e.setAttribute(t,n[t])})}}catch(e){console.error("Error while applying mapping values",e)}})},e}();e.DataPsAtribute=p=r([(0,t.customAttribute)("data-ps"),(0,t.autoinject)(),a("design:paramtypes",[Element,i.CommonService])],p)})
define("ph-common/ph-value-converters/facet-filter-value-converter",["exports"],function(e){"use strict";function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});e.FacetFilterValueConverter=function(){function e(){t(this,e)}return e.prototype.toView=function(e,t,i,o,n,r,a){if(e&&e.length&&t&&t.trim().length>0){var s=e.filter(function(i){var o="string"==typeof i,r=i;return o||n?(i.topResult=!1,!o&&n&&(r=i[n]||""),r=r.toLowerCase(),a?r.startsWith(t.toLowerCase()):-1!=r.indexOf(t.toLowerCase())):e});if(i&&!i[o]&&i.all&&(i[o]=i.all),i&&i[o]){var l=[],c=[];return s.forEach(function(e,t){e&&t<i[o]&&c.push(e),e&&e.checked&&t>i[o]&&l.push(e)}),r&&l.push({separator:!0}),c=l.concat(c)}return s}if(i&&!i[o]&&i.all&&(i[o]=i.all),e&&e.length&&i&&i[o]){var p=[],d=[];return e.forEach(function(e,t){e&&t<i[o]&&(e.topResult=!0,d.push(e)),e&&e.checked&&t>i[o]&&p.push(e)}),r&&p.push({separator:!0}),d=p.concat(d)}return e||[]},e}()})
define("ph-common/ph-value-converters/data-validate-value-converter",["exports"],function(e){"use strict";function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});e.DataValidateValueConverter=function(){function e(){t(this,e)}return e.prototype.toView=function(e,t,i){if(e&&e.trim().length&&t&&t.length&&i&&i.trim().length>0){return t.filter(function(t){return t&&t[i]&&t[i]===e}).length?e:void 0}},e}()})
define("ph-common/ph-job-widget",["exports","aurelia-framework","./index"],function(e,t,i){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(e,"__esModule",{value:!0}),e.PhenomJobWidget=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s="none";e.PhenomJobWidget=function(e){function l(r,a,c){o(this,l);var p=n(this,e.call(this,r,a,c));return p.element=r,p.commonService=a,p.elementTag=c,p.jobFields=[],p.jobActions=[],p.jobTags=[],p.jobTagsConfig={},p.jobFitsSettConfig={},p.jobFits={},p.deviceType=p.commonService.getDeviceType(),p.isErrorMsgReqd=!1,p.bulkcart=!1,p.jobsDisplayMode="seeMore",p.slideMode=!1,p.seemoretext=!0,p.showErrorMsg=!1,p.maxDisplayCount=5,p.showExpiredJobs=!1,p.jobsPerSlide=5,p.maxJobs=18,p.clickTojd=!1,p.isBulkcartEnable=!1,p.showTitle=!0,p.showSubTitle=!1,p.showMore=null,p.isKeyPress=!1,p.jobResults=[],p.jobList=[],p.showReferView=!1,p.referMode="hidePopup",p.referJob={},p.enabledFields={},p.enabledActions={},p.enabledTags={},p.enabledFits={},p.jobTagsData={},p.questionnaireMode=s,p.referralSteps=[{stepName:"referForm"}],p.referralId="",p.newReferFlow=!1,p.jobAdded=!1,p.jobRemoved=!1,p.jobFitPromise=!1,p.bindableValues=[{attrKey:"is-error-msg-reqd",actualKey:"isErrorMsgReqd",type:"boolean"},{attrKey:"bulkcart",actualKey:"bulkcart",type:"boolean"},{attrKey:"jobs-display-mode",actualKey:"jobsDisplayMode",type:"string"},{attrKey:"slide-mode",actualKey:"slideMode",type:"boolean"},{attrKey:"show-error-msg",actualKey:"showErrorMsg",type:"boolean"},{attrKey:"show-expired-jobs",actualKey:"showExpiredJobs",type:"boolean"},{attrKey:"jobs-per-slide",actualKey:"jobsPerSlide",type:"number"},{attrKey:"max-jobs",actualKey:"maxJobs",type:"number"},{attrKey:"click-tojd",actualKey:"clickTojd",type:"boolean"},{attrKey:"max-display-count",actualKey:"maxDisplayCount",type:"number"},{attrKey:"show-title",actualKey:"showTitle",type:"boolean"},{attrKey:"show-sub-title",actualKey:"showSubTitle",type:"boolean"},{attrKey:"questionnaire-mode",actualKey:"questionnaireMode",type:"string"},{attrKey:"new-refer-flow",actualKey:"newReferFlow",type:"boolean"}],p.viewEvenMoreCount=2,p.viewEvenMoreClickcounter=1,p.latLong={},p.subscriptions=[],p.appliedJobs=[],p.appliedJobsMap={},p.siteType="",p.applyParams=[],p.setReferralId=function(e){p.referralId=e},p.geoLocationService=t.Container.instance.get(i.GeoLocationService),p}return r(l,e),l.prototype.attached=function(){this.isJobWidget=!0,e.prototype.attached.call(this),this.getGeoLocationData(),this.fetchBindableValues(),this.jobWidgetSettingsPromise=this.fetchJobWidgetSettings(),this.siteType=this.commonService.getParam("siteType"),"internal"===this.siteType&&this.prepareImApply()},l.prototype.prepareImApply=function(){try{var e=this.commonService.getSiteSettings("imApplyParams");e&&e.length&&(this.applyParams=e),this.applyParams=JSON.parse(this.element.getAttribute("apply-params"))||this.applyParams}catch(e){i.logger.error(e)}},l.prototype.addJobContext=function(){if(i.logger.warn("called no-op implementation of addJobContext.If the widget holds jobs data, provide an implementation"),this.addEidForWidgetImpression(),this.jobResults&&this.jobResults.length?this.commonService.addJobContext(this.elementTag,this.jobResults):this.commonService.addJobContext(this.elementTag,this.jobList),this.jobResults&&this.jobResults.length||this.jobList&&this.jobList.length){this.element.removeAttribute("data-ignore-widget-impression");var e=[];(this.jobResults||this.jobList).forEach(function(t){e.push(t.jobSeqNo)});try{this.element.setAttribute("data-event-jobseqno",JSON.stringify(e))}catch(e){}!this.isWdgtImpressionRaised&&this.commonService.raiseCustomEvent("ph:ex:widgetLoaded",{elem:this.element}),this.isWdgtImpressionRaised=!0}},l.prototype.addEidForWidgetImpression=function(){var e=this.fetchEid();e&&"object"===(void 0===e?"undefined":a(e))&&(e=JSON.stringify(e)),e&&this.element.setAttribute("data-event-eid",e)},l.prototype.checkBulkcartStatus=function(){if(this.bulkcart)this.isBulkcartEnable=!0;else for(var e=0;e<this.jobActions.length;e++)if("addToCart"==this.jobActions[e].name||"removeFromCart"==this.jobActions[e].name){this.isBulkcartEnable=!0;break}},l.prototype.decodeStringQuotes=function(e){return e?e.replace(/\\"/g,'"'):e},l.prototype.fetchBindableValues=function(){var e=this;this.bindableValues.forEach(function(t,i){var o=e.element.getAttribute(t.attrKey);o&&("boolean"==t.type?o="true"==o:"number"==t.type&&(o=parseInt(o)),e[t.actualKey]=o)})},l.prototype.fetchJobWidgetSettings=function(){var e=this,t={},i={},o=void 0,n=void 0;return this.commonService.getDDO(this.elementTag,"jobwidgetsettings",{}).then(function(r){if(t=r.jobwidgetsettings,t&&t.data&&(t.data.widgets&&t.data.widgets[e.elementTag]&&(i=t.data.widgets[e.elementTag],o=i.fields,n=i.actions),e.jobFields=o||t.data.fields||[],e.jobActions=n||t.data.actions||[]),e.getJobFields(),e.getJobActions(),"internal"===e.siteType){e.jobFields.some(function(e){return"appliedDate"===e.name&&e.checked})&&e.getIMAppliedJobs()}e.checkBulkcartStatus(),e.getReferralSteps(),e.commonService.isCrawlerUserAgent()||(e.jobFitSettingsPromise=e.fetchFitScoreConfig(),e.jobTagSettingsPromise=e.fetchJobTagsConfig()),e.getShowMoreCount=e.maxDisplayCount})},l.prototype.fetchSmartHighlights=function(){this.enabledFields.hasOwnProperty("pjfSmartHighlights")&&this.jobResults&&this.jobResults.length&&this.jobResults.forEach(function(e){if(e.hasOwnProperty("ml_job_parser")&&e.ml_job_parser.hasOwnProperty("ml_job_cards")){var t=e.ml_job_parser.ml_job_cards,i=[];for(var o in t)i.push(o);e.smartHighlightsKeys=i,e.smartHighlights=t}})},l.prototype.fetchJobImages=function(){var e=this;if(this.enabledFields.hasOwnProperty("pjfJobImages")){var t=this.enabledFields.pjfJobImages,i=t.settings&&t.settings.jobTagValue||"category",o=void 0,n={jobField:i,tags:[],jobWidget:this.elementTag,imageType:"jobImage"};return this.jobResults&&this.jobResults.length&&this.jobResults.forEach(function(e){e.hasOwnProperty(i)&&!n.tags.includes("jobImage#"+e[i])&&n.tags.push("jobImage#"+e[i])}),this.commonService.getDDO(this.elementTag,"jobImageBasedOnTags",n).then(function(t){o=t&&t.jobImageBasedOnTags&&t.jobImageBasedOnTags.data||{},e.jobResults.forEach(function(e){if(o.hasOwnProperty("jobImage#"+e[i])){var t=o["jobImage#"+e[i]];e.image=t&&t.length>0&&t[0]&&t[0]}})})}},l.prototype.fetchJobBadges=function(){var e=this;if(this.enabledFields.hasOwnProperty("pjfJobBadges")){var t=this.enabledFields.pjfJobBadges,i=t.settings&&t.settings.jobTagValue||"category",o=this.getJobFieldMapper(i)||i,n=void 0,r={jobField:o,tags:[],jobWidget:this.elementTag,imageType:"jobBadge"};return this.jobResults&&this.jobResults.length&&this.jobResults.forEach(function(e){e.hasOwnProperty(o)&&!r.tags.includes("jobBadge#"+e[o])&&r.tags.push("jobBadge#"+e[o])}),this.commonService.getDDO(this.elementTag,"jobImageBasedOnTags",r).then(function(t){n=t&&t.jobImageBasedOnTags&&t.jobImageBasedOnTags.data||{},e.jobResults.forEach(function(e){if(n.hasOwnProperty("jobBadge#"+e[o])){var t=n["jobBadge#"+e[o]];e.badgeImage=t&&t.length>0&&t[0]&&t[0]}})})}},l.prototype.getJobFieldMapper=function(e){switch(e){case"companyLogo":return"companyName";case"countryFlag":return"country";case"categoryIcon":return"category";case"default":return e}},l.prototype.fetchFitScoreConfig=function(){var e=this,t=this.commonService.getSiteSettings("navItems");if(t&&t.fitScore){var i={},o={},n=void 0,r={feature:"fitScore",fieldMap:{fieldName:"jobFits",finalFieldName:"jobWidgetFits"},avoidWidgetHideOnFail:!0},a="internal"===this.siteType?"fitScoreSettingsIM":"fitScoreSettings";return this.commonService.getDDO(this.elementTag,a,r).then(function(t){i=t&&t[a]&&t[a].data&&t[a].data.jobWidgetFits,i&&(e.jobFitsSettConfig=i.settings||{},i.widgets&&i.widgets[e.elementTag]&&(o=i.widgets[e.elementTag],n=o.jobFits),e.jobFits=n||i.jobFits||{}),e.getJobFits()})}return new Promise(function(e,t){e({enabled:!1})})},l.prototype.fetchJobTagsConfig=function(){var e=this,t=this.commonService.getSiteSettings("navItems");if(t&&t.jobTags){var i={},o={},n=void 0,r={feature:"jobTags",fieldMap:{fieldName:"jobTags",finalFieldName:"jobWidgetTags"},avoidWidgetHideOnFail:!0};return this.commonService.getDDO(this.elementTag,"jobTagSettings",r).then(function(t){i=t&&t.jobTagSettings&&t.jobTagSettings.data&&t.jobTagSettings.data.jobWidgetTags,i&&(i.widgets&&i.widgets[e.elementTag]&&(o=i.widgets[e.elementTag],n=o.jobTags),e.jobTagsConfig=n||i.jobTags||{}),e.getJobTags()})}return new Promise(function(e,t){e({enabled:!1})})},l.prototype.getGeoLocationData=function(){var e=this,t=this.commonService.getLocalStorageContext("userLocation")||"";t?(t=JSON.parse(t),this.geoLongitude=t.longitude,
this.geoLatitude=t.latitude):this.subscriptions.push(this.eventAggregator.subscribe("GeoLocationDetails",function(t){i.logger.debug("payload location ::"+t),e.geoLongitude=t.coords.longitude,e.geoLatitude=t.coords.latitude}))},l.prototype.getJobFieldDrivingTime=function(t,i){var o=this,n=this.commonService.getSiteSettings("maps"),r=n?n.mapbox||{}:{},a=r&&r.apiKey;if(a&&!window.mapboxSdk){var s=this.commonService.getPlatformAssetsBaseUrl(),l=s+"mapbox-sdk.js";e.prototype.loadScript.call(this,l,function(){o.mapboxClient=window.mapboxSdk({accessToken:a}),o.mapboxClient&&o.checkForDuplicateCoordinates(t,i)},["mapboxSdk"])}else a&&(this.mapboxClient=window.mapboxSdk({accessToken:a}),this.mapboxClient&&this.checkForDuplicateCoordinates(t,i))},l.prototype.checkForDuplicateCoordinates=function(e,t){var i=this;this.jobResults.forEach(function(e){if(e.isWellformedAddress&&e.multi_location_array&&e.multi_location_array.length&&e.multi_location_array.length>1)for(var t=0;t<e.multi_location_array.length;t++){var o=e.multi_location_array[t].latlong;o.lat=o.lat||e.multi_location_array[t].latitude,o.lon=o.lon||e.multi_location_array[t].longitude,o&&o.lat&&o.lon&&(i.latLong[o.lat+"_"+o.lon]={})}else if(e.isWellformedAddress){var n=e.latlong||{};n.lat=n.lat||e.latitude,n.lon=n.lon||e.longitude,n&&n.lat&&n.lon&&(i.latLong[n.lat+"_"+n.lon]={})}});var o=Object.keys(this.latLong);o.length?o.forEach(function(o,n){var r=o.split("_"),a=parseFloat(r[0]),s=parseFloat(r[1]);i.makeReqForDrivingTimeToMapBox(e,t,s,a,o,n)}):this.assignDrivingTimeToDuplicateCoords()},l.prototype.makeReqForDrivingTimeToMapBox=function(e,t,o,n,r,a){var s=this;return new Promise(function(l,c){s.mapboxClient.directions.getDirections({profile:"driving-traffic",waypoints:[{coordinates:[e,t],approach:"unrestricted"},{coordinates:[o,n]}]}).send().then(function(e){l(e);var t=e.body&&e.body.routes&&e.body.routes[0]&&e.body.routes[0].duration;if(t){t=Number(t);var i={};i.inHours=Math.floor(t/3600),i.inMinutes=Math.floor(t%3600/60),i.inHours||i.inMinutes||(i.inMinutes=5),s.latLong[r]=i||{}}else if(0==t){var o={};o.inMinutes=5,s.latLong[r]=o}else s.latLong[r]={};a==Object.keys(s.latLong).length-1&&s.assignDrivingTimeToDuplicateCoords()},function(e){s.latLong[r]={},a==Object.keys(s.latLong).length-1&&s.assignDrivingTimeToDuplicateCoords(),i.logger.debug(e),c()})})},l.prototype.assignDrivingTimeToDuplicateCoords=function(){var e=this;this.jobResults.forEach(function(t){if(t.multi_location_array&&t.multi_location_array.length&&t.multi_location_array.length>1)for(var i=0;i<t.multi_location_array.length;i++){var o=t.multi_location_array[i].latlong||{},n=o.lat+"_"+o.lon;t.multi_location_array[i].drivingTime=e.latLong[n]||{}}else{var r=t.latlong||{},a=r.lat+"_"+r.lon;t.drivingTime=e.latLong[a]||{}}})},l.prototype.getJobFields=function(){var e=this;try{this.jobFields=JSON.parse(this.element.getAttribute("job-fields"))||this.jobFields}catch(e){i.logger.error(e)}this.jobFields.forEach(function(t){if(e.enabledFields[t.name]=t,"teamList"===t.name&&"internal"===e.siteType){"ALUMNI"===e.commonService.getUserProfileType()&&delete e.enabledFields.teamList}})},l.prototype.getJobActions=function(){var e=this;try{this.jobActions=JSON.parse(this.element.getAttribute("job-actions"))||this.jobActions}catch(e){i.logger.error(e)}this.jobActions.forEach(function(t){e.enabledActions[t.name]=t}),"internal"==this.siteType&&(this.getImconfigurations(this.elementTag,"getIMConfigurations").then(function(t){var i=[];if(t&&t.modules){i=t.modules.filter(function(e){return e.value});if(-1==i.findIndex(function(e){return"referrals"==e.key})){e.enabledActions&&e.enabledActions.refer&&delete e.enabledActions.refer;var o=e.jobActions.findIndex(function(e){return"refer"==e.name});-1!=o&&e.jobActions.splice(o,1)}}},function(e){console.info(e),new Error(e)}),this.getModuleSpecificSettings(this.elementTag,"getIMConfigurations").then(function(t){if(t&&t.referrals&&"boolean"==typeof t.referrals.allowCreateReferral&&!t.referrals.allowCreateReferral){e.enabledActions&&e.enabledActions.refer&&delete e.enabledActions.refer;var i=e.jobActions.findIndex(function(e){return"refer"==e.name});-1!=i&&e.jobActions.splice(i,1)}},function(e){console.info(e),new Error(e)}))},l.prototype.getImconfigurations=function(e,t){return this.commonService.getDDO(e,t,{}).then(function(e){return e[t]&&e[t].data&&e[t].data.imTenant?e[t].data.moduleConfig:e[t]},function(e){console.info(e),new Error(e)})},l.prototype.getModuleSpecificSettings=function(e,t){return this.commonService.getDDO(e,t,{}).then(function(e){return e[t]&&e[t].data&&e[t].data.imTenant?e[t].data.moduleSpecificSettings||{}:e[t]},function(e){console.info(e),new Error(e)})},l.prototype.getJobTags=function(){var e=this;try{this.jobTagsConfig=JSON.parse(this.element.getAttribute("job-tags"))||this.jobTagsConfig||{}}catch(e){i.logger.error(e)}this.jobTagsConfig.tags=this.jobTagsConfig.tags||[],this.jobTags=this.jobTagsConfig.tags,this.jobTags.forEach(function(t){e.enabledTags[t.name]=t})},l.prototype.getJobFits=function(){var e=this;try{this.jobFits=JSON.parse(this.element.getAttribute("job-fits"))||this.jobFits||{}}catch(e){i.logger.error(e)}this.jobFits.fits=this.jobFits.fits||[],this.jobFits.fits.forEach(function(t){e.enabledFits[t.name]=t})},l.prototype.getReferralSteps=function(){try{this.referralSteps=JSON.parse(this.element.getAttribute("referral-steps"))||this.referralSteps}catch(e){i.logger.error(e)}},l.prototype.seemore=function(){var t=this;e.prototype.trackWidgetClick.call(this,"see_more_click",{});var i=this.maxDisplayCount;setTimeout(function(){t.element.querySelector('[data-access-list-item="'+i+'"]')&&t.element.querySelector('[data-access-list-item="'+i+'"]').focus()},150),this.maxDisplayCount=this.jobResults.length,this.showMore=!1},l.prototype.seeLess=function(){var t=this;e.prototype.trackWidgetClick.call(this,"see_less_click",{}),this.maxDisplayCount=this.getShowMoreCount,this.showMore=!0,setTimeout(function(){t.element.querySelector('[data-access="showMore"]')&&t.element.querySelector('[data-access="showMore"]').focus(),t.element.querySelector('[data-access="seeNext"]')&&t.element.querySelector('[data-access="seeNext"]').focus(),t.element.querySelector('[data-access="seeEvenMore"]')&&t.element.querySelector('[data-access="seeEvenMore"]').focus()},350)},l.prototype.seeNext=function(){var t=this;e.prototype.trackWidgetClick.call(this,"see_next_click",{});var i=this.maxDisplayCount;this.maxDisplayCount+this.getShowMoreCount<this.jobResults.length?(this.enabledFields.teamList&&this.fetchTeamData(this.jobResults.slice(this.maxDisplayCount,this.maxDisplayCount+this.getShowMoreCount)),this.showMore=!0,this.maxDisplayCount+=this.getShowMoreCount):(this.enabledFields.teamList&&this.fetchTeamData(this.jobResults.slice(this.maxDisplayCount,this.jobResults.length)),this.maxDisplayCount=this.jobResults.length,this.showMore=!1),setTimeout(function(){t.element.querySelector('[data-access-list-item="'+i+'"]')&&t.element.querySelector('[data-access-list-item="'+i+'"]').focus()},150)},l.prototype.seeEvenMore=function(){var t=this;e.prototype.trackWidgetClick.call(this,"see_even_more_click",{});var i=this.viewEvenMoreCount>this.viewEvenMoreClickcounter;this.viewEvenMoreClickcounter++;var o=this.maxDisplayCount;i&&this.maxDisplayCount+this.getShowMoreCount<=this.jobResults.length?(this.showMore=!0,this.maxDisplayCount+=this.getShowMoreCount):(this.maxDisplayCount=this.jobResults.length,this.viewEvenMoreClickcounter=1,this.showMore=!1),setTimeout(function(){t.element.querySelector('[data-access-list-item="'+o+'"]')&&t.element.querySelector('[data-access-list-item="'+o+'"]').focus()},150)},l.prototype.seemoreOnKeyUp=function(e){return 13===e.keyCode&&(this.isKeyPress=!0,this.seeNext()),!0},l.prototype.handleError=function(t){e.prototype.hideLoader.call(this),this.isErrorMsgReqd?this.showErrorMsg=!0:e.prototype.onError.call(this,"")},l.prototype.onDataChange=function(e,t){var i=this;if(!this.jobResults.length)return void this.handleError("");if(this.jobWidgetSettingsPromise.then(function(e){i.commonService.isCrawlerUserAgent()||(i.fetchJobFitWeightage(),i.fetchSmartHighlights(),i.fetchJobImages(),i.fetchJobBadges())}),this.jobResults=this.commonService.populateJobResults(this.jobResults,this.clickTojd,e),!this.isGeoLocationSubscribed&&this.jobFields.length&&this.enabledFields.drivingTime)if(this.geoLongitude&&this.geoLatitude)this.getJobFieldDrivingTime(this.geoLongitude,this.geoLatitude);else{var o=function(e){i.geoLongitude=e&&e.coords&&e.coords.longitude,i.geoLatitude=e&&e.coords&&e.coords.latitude,i.geoLongitude&&i.geoLatitude&&i.getJobFieldDrivingTime(i.geoLongitude,i.geoLatitude)},n=this.geoLocationService.askForLocation();n?o(n):this.geoLocationService.getGeoLocation().then(function(e){o(e)},function(e){})}"all"==this.jobsDisplayMode?(this.maxDisplayCount=this.jobResults.length,this.seemoretext=this.seemoretext&&this.jobResults.length>this.maxDisplayCount):(this.seemoretext=this.seemoretext&&this.jobResults.length>this.getShowMoreCount,"ph-targeted-jobs-v2"==this.elementTag&&this.totalCount&&(this.seemoretext=this.totalCount>this.maxDisplayCount)),this.seemoretext&&(null==this.showMore||this.showMore)?this.showMore=!0:(this.showMore=!1,this.maxDisplayCount=this.jobResults.length),this.fetchJobStatus(),this.enabledFields.teamList&&this.fetchTeamData(this.jobResults.slice(0,this.maxDisplayCount))},l.prototype.fetchJobFitWeightage=function(){var e=this,t={jobSeqNo:[],requiredTags:[],size:this.jobResults.length,avoidWidgetHideOnFail:!0},i={jobIdentifierList:[],outputFields:[],size:this.jobResults.length,avoidWidgetHideOnFail:!0};this.jobResults.forEach(function(o){t.jobSeqNo.push(o.jobSeqNo),i.jobIdentifierList.push(o.jobSeqNo);for(var n=e.appliedJobs,r=Array.isArray(n),a=0,n=r?n:n[Symbol.iterator]();;){var s;if(r){if(a>=n.length)break;s=n[a++]}else{if(a=n.next(),a.done)break;s=a.value}var l=s;l.jobId==o.jobId&&(o.alreadyApplied=!0,o.appliedTimeStamp=l.appliedTimeStamp)}o.exApplyUrl=e.imApplyUrl(o)}),this.jobTagSettingsPromise.then(function(i){i&&!i.enabled||(t.tagLimit=e.jobTagsConfig.layout&&e.jobTagsConfig.layout.maxDisplayCount||1,e.fetchJobTags(t))}),this.jobFitSettingsPromise.then(function(t){t&&!t.enabled||e.fetchFitScore(i)})},l.prototype.fetchJobTags=function(t){var i=this;this.jobTags&&this.jobTags.length&&(this.jobTags.forEach(function(e){t.requiredTags.push(e.name)}),this.commonService.getDDO(this.elementTag,"smartJobTags",t).then(function(t){t&&t.smartJobTags&&t.smartJobTags.data&&t.smartJobTags.data.jobTags&&function(){var o=t.smartJobTags.data.jobTags,n=[],r={},a=0;i.jobTagsData={};for(var s in o)!function(e){o[e].length&&o[e].forEach(function(t){i.jobTagsData[e]=i.jobTagsData[e]||{},i.jobTagsData[e][t.tag]=t,-1===n.indexOf(t.tag)&&n.push(t.tag)})}(s);i.jobResults.forEach(function(e){if(e.jobTagEnabled=!0,e.smartTagsAvailable=!1,e.tagsForOtherJobs=n,i.jobTagsData[e.jobSeqNo]){e.smartTagsAvailable=!0,e.tagsForTheJob=Object.keys(i.jobTagsData[e.jobSeqNo]);var t=n.slice();e.tagsForTheJob.forEach(function(e){var i=t.indexOf(e);t.splice(i,1)}),e.tagsForOtherJobs=t,r[e.jobSeqNo]=e.tagsForTheJob,a++}}),e.prototype.trackWidgetClick.call(i,"smart_tags_loaded",{smartJobTags:r,totalJobs:i.jobResults.length,availableJobTagCount:a})}()}))},l.prototype.fetchFitScore=function(t){var i=this;if(this.jobFits&&this.jobFits.fits&&this.jobFits.fits.length&&this.jobFitsSettConfig.allowedWidgets&&-1!=this.jobFitsSettConfig.allowedWidgets.indexOf(this.elementTag)){this.jobFits&&this.jobFits.requiredFields&&this.jobFits.requiredFields.length&&this.jobFits.requiredFields.forEach(function(e){t.outputFields.push(e)});var o="internal"===this.siteType?"fetchFitScoreIM":"fetchFitScore";"internal"===this.siteType&&(t.useCase="jobFitScore"),this.commonService.getDDO(this.elementTag,o,t).then(function(t){if(t&&t[o]&&t[o].data&&t[o].data.jobFitScores){var n=t[o].data.jobFitScores,r=[],a={},s=0;for(var l in n)n[l]&&n[l].fitLevel&&-1===r.indexOf(n[l].fitLevel)&&r.push(n[l].fitLevel);if(i.jobResults.forEach(function(e){if(e.fitEnabled=!0,e.fitLevelAvailable=!1,e.fitsForOtherJobs=r,n[e.jobSeqNo]&&n[e.jobSeqNo].data&&(e.fitLevel=n[e.jobSeqNo].data.fitLevel,"internal"===i.siteType&&i.commonService.getSiteSettings("isImFitScore")&&(e.fitLevelData=n[e.jobSeqNo].data,e.jobFitsSettConfig=i.jobFitsSettConfig,e.jobFits=i.jobFits),n[e.jobSeqNo].data.skillGap&&(e.matchingSkills=n[e.jobSeqNo].data.skillGap),e.fitLevel)){e.fitLevelAvailable=!0,e.fitForTheJob=e.fitLevel;var t=r.slice(),o=t.indexOf(e.fitLevel);t.splice(o,1),e.fitsForOtherJobs=t,a[e.jobSeqNo]=e.fitForTheJob,s++}}),"internal"===i.siteType){var c=JSON.parse(JSON.stringify(i.jobResults));i.jobResults=c,i.jobList=c}e.prototype.trackWidgetClick.call(i,"fit_level_loaded",{jobsFitLevel:a,totalJobs:i.jobResults.length,availableFitLevelCount:s}),i.jobFitPromise=!0}})}else this.jobFitPromise=!0,this.checkAndContructFitLevelTrack()},l.prototype.checkAndContructFitLevelTrack=function(){if(this.jobResults.length){var t={},i=[],o=0;this.jobResults.forEach(function(e){e.fitLevel&&i.push(e.fitLevel)}),i.length&&this.jobResults.forEach(function(e){if(e.fitLevel){e.fitLevelAvailable=!0,e.fitForTheJob=e.fitLevel;var n=i.slice(),r=n.indexOf(e.fitLevel);n.splice(r,1),e.fitsForOtherJobs=n,t[e.jobSeqNo]=e.fitForTheJob,o++}}),e.prototype.trackWidgetClick.call(this,"fit_level_loaded",{jobsFitLevel:t,totalJobs:this.jobResults.length,availableFitLevelCount:o})}},l.prototype.fetchJobStatus=function(){var t=this;if(this.isBulkcartEnable&&!this.commonService.isCrawlerUserAgent()){for(var i=[],o=this.jobResults,n=Array.isArray(o),r=0,o=n?o:o[Symbol.iterator]();;){var a;if(n){if(r>=o.length)break;a=o[r++]}else{if(r=o.next(),r.done)break;a=r.value}var s=a;this.jobResults.isJobSaved=null,this.jobResults.saveJobInterState=null,this.jobResults.inProgress=!1,i.push(s.jobSeqNo)}var l={jobSeqNos:i};this.commonService.getDDO(this.elementTag,"getJobStatusListV2",l).then(function(i){if(e.prototype.hideLoader.call(t),i&&i.getJobStatusListV2)for(var o=i.getJobStatusListV2.data,n=t.jobResults,r=Array.isArray(n),a=0,n=r?n:n[Symbol.iterator]();;){var s;if(r){if(a>=n.length)break;s=n[a++]}else{if(a=n.next(),a.done)break;s=a.value}var l=s;l.isJobSaved=o[l.jobSeqNo]||!1,l.saveJobInterState=o[l.jobSeqNo]||!1}})}},l.prototype.handleSaveJob=function(e){this.isBulkcartEnable&&!e.inProgress&&(e.inProgress=!0,e.saveJobInterState?this.deleteJobFromCart(e):this.addToJobCart(e))},l.prototype.addToJobCart=function(t){var i=this,o={jobSeqNo:t.jobSeqNo};this.commonService.getDDO(this.elementTag,"addToCartV2",o).then(function(o){var n=o.addToCartV2;if(t.inProgress=!1,"602"==n.status){var r={jobSeqNo:t.jobSeqNo,category:t.category};t.saveJobInterState=!0,i.eventAggregator.publish("jobCartCount","+1"),i.eventAggregator.publish("jobCartUpdatedCount",""),i.commonService.raiseCustomEvent("ph:ex:jobCartUpdatedCount",""),e.prototype.trackWidgetClick.call(i,"job_added_to_jobcart",r),i.commonService.getDDO(i.elementTag,"jobCartCountV2",{}).then(function(e){i.jobCartCount=e&&e.jobCartCountV2&&e.jobCartCountV2.result,i.jobAdded=!0,i.jobRemoved=!1,setTimeout(function(){i.jobAdded=!1,i.jobRemoved=!1},100)})}else t.isJobSaved=!1,t.saveJobInterState=!1})},l.prototype.deleteJobFromCart=function(t,i){var o=this;i||(i={jobSeqNo:t.jobSeqNo}),this.commonService.getDDO(this.elementTag,"deleteFromCartV2",i).then(function(i){var n=i.deleteFromCartV2;if(t.inProgress=!1,"605"==n.status){var r={jobSeqNo:t.jobSeqNo,category:t.category};t.isJobSaved=!1,t.saveJobInterState=!1,o.eventAggregator.publish("jobCartCount","-1"),o.eventAggregator.publish("jobCartUpdatedCount",""),o.commonService.raiseCustomEvent("ph:ex:jobCartUpdatedCount",""),e.prototype.trackWidgetClick.call(o,"job_unfavorited",r),o.commonService.getDDO(o.elementTag,"jobCartCountV2",{}).then(function(e){o.jobCartCount=e&&e.jobCartCountV2&&e.jobCartCountV2.result,o.jobRemoved=!0,o.jobAdded=!1,setTimeout(function(){o.jobRemoved=!1,o.jobAdded=!1},100)})}else t.isJobSaved=!0,t.saveJobInterState=!0})},l.prototype.fetchTeamData=function(e){var t=e.filter(function(e){return(e.teamId||e.hiringManager)&&!e.teamList}).map(function(e){return{teamId:e.teamId,hiringManager:e.hiringManager,jobId:e.jobId}});t.length&&this.commonService.getDDO(this.elementTag,"getTeamMembers",{teamIdList:t}).then(function(t){var i=t.getTeamMembers||{};e.filter(function(e){return!e.teamList}).forEach(function(e){var t=i[e.jobId];e.teamList=[],t&&t.length?(t.length>4?(e.teamMoreSize=t.length-3,e.teamList=t.slice(0,3)):(e.teamMoreSize=0,e.teamList=t),e.teamList.forEach(function(e){e.firstName=e.firstName||"",e.lastName=e.lastName||"",e.initials=((e.firstName.trim()[0]||"")+(e.lastName.trim()[0]||"")).toUpperCase();var t=new Image;t.onerror=function(){e.pictureUrl=null},e.pictureUrl&&(t.src=e.pictureUrl)})):console.info("Team details not fetched for jobId "+e.jobId)})})},l.prototype.handleReferJob=function(e,t,i){var o=this;this.questionnaireMode==s?(this.referMode="showPopup",document.body.classList.add("modal-open"),this.referJob=JSON.parse(JSON.stringify(e)),i&&Object.keys(i).forEach(function(e){o.referJob[e]=i[e]}),e.showReferView=!e.showReferView,e.showReferView||(this.referMode="hidePopup",this.closeRefer(e))):"first"==this.questionnaireMode?t?"ph-questionnaire"==t?(e.showReferView=!0,e.showQuestionnaireView=!1):this.closeRefer(e):(document.body.classList.add("modal-open"),e.showReferView=!1,e.showQuestionnaireView=!0,this.referJob=JSON.parse(JSON.stringify(e)),i&&Object.keys(i).forEach(function(e){o.referJob[e]=i[e]})):"last"==this.questionnaireMode&&(t?"ph-refer-friend"==t?(e.showReferView=!1,e.showQuestionnaireView=!0):this.closeRefer(e):(document.body.classList.add("modal-open"),e.showReferView=!0,e.showQuestionnaireView=!1,this.referJob=JSON.parse(JSON.stringify(e)),i&&Object.keys(i).forEach(function(e){o.referJob[e]=i[e]})))},l.prototype.closeRefer=function(e){e.showReferView=!1,e.showQuestionnaireView=!1,document.body.classList.remove("modal-open"),this.referralId=""},l.prototype.handleJobClick=function(e){var t={params:{widgetId:this.elementTag,widgetview:this.getView(),widgetName:this.getWidgetName(!1)}};e.fitLevel&&(t.params.jobFitLevel=e.fitLevel);var i=(new Date).getTime()+(65536*(1+Math.random())|0).toString(16).substring(0);return this.commonService.storePageTrackEventData(i,e),this.commonService.processTrackingEvent("job_click",i,t,{}),!0},l.prototype.showAllLocations=function(t){var i=this;this.jobResults=this.jobResults||[],this.jobResults.forEach(function(t){t.popUpOpen&&(t.popUpOpen=!1,e.prototype.closeDialogPopup.call(i)),t.categoryPopUpOpen&&(t.categoryPopUpOpen=!1,e.prototype.closeDialogPopup.call(i))}),t.popUpOpen=!0,setTimeout(function(){var o=i.element.querySelector(".multi-location-popup"),n=i.element.querySelector(".job-location.ph-a11y-multi-location-"+t.jobId);n||(n=i.element.querySelector(".job-location .ph-a11y-multi-location-"+t.jobId)||document.activeElement);var r=i.element.querySelector(".ph-a11y-close-multi-location");o&&n&&r&&e.prototype.openDialogPopup.call(i,"multi-location-popup",n,r)},50);var o={jobSeqNo:t.jobSeqNo,category:t.category};e.prototype.trackWidgetClick.call(this,"multi_location_click",o)},l.prototype.hideAllLocations=function(t){t.popUpOpen=!1,e.prototype.closeDialogPopup.call(this);var i={jobSeqNo:t.jobSeqNo};e.prototype.trackWidgetClick.call(this,"popup_close_click",i)},l.prototype.showAllCategory=function(t){var i=this;this.jobResults=this.jobResults||[],this.jobResults.forEach(function(t){t.categoryPopUpOpen&&(t.categoryPopUpOpen=!1,e.prototype.closeDialogPopup.call(i)),t.popUpOpen&&(t.popUpOpen=!1,e.prototype.closeDialogPopup.call(i))}),t.categoryPopUpOpen=!0,setTimeout(function(){var o=i.element.querySelector(".multi-category-popup"),n=i.element.querySelector(".ph-a11y-multi-category-"+t.jobId),r=i.element.querySelector(".ph-a11y-close-multi-location");o&&n&&r&&e.prototype.openDialogPopup.call(i,"multi-category-popup",n,r)},50);var o={jobSeqNo:t.jobSeqNo,category:t.category};e.prototype.trackWidgetClick.call(this,"multi_category_click",o)},l.prototype.hideAllCategory=function(t){t.categoryPopUpOpen=!1,e.prototype.closeDialogPopup.call(this);var i={jobSeqNo:t.jobSeqNo};e.prototype.trackWidgetClick.call(this,"popup_close_click",i)},l.prototype.detached=function(){this.subscriptions.forEach(function(e){e.dispose()})},l.prototype.getIMAppliedJobs=function(){var e=this;this.commonService.getDDO(this.elementTag,"getAppliedJobs",{}).then(function(t){if(t&&t.getAppliedJobs&&t.getAppliedJobs.data&&t.getAppliedJobs.data.jobDetails&&(e.appliedJobs=t.getAppliedJobs.data.jobDetails,Array.isArray(e.appliedJobs))){for(var i={},o=e.appliedJobs,n=Array.isArray(o),r=0,o=n?o:o[Symbol.iterator]();;){var a;if(n){if(r>=o.length)break;a=o[r++]}else{if(r=o.next(),r.done)break;a=r.value}var s=a;i[s.jobId]=s}e.appliedJobsMap=i}})},l.prototype.imApplyUrl=function(e){if("internal"==this.siteType){var t=this.commonService.getBaseUrl()+"apply?jobSeqNo="+e.jobSeqNo,i="",o=!1;if(this.applyParams&&this.applyParams.length){var n=t;e.hasOwnProperty("imExternalApply")&&(n=e.imExternalApply?e.imApplyUrl:t),this.applyParams.forEach(function(t){-1==n.indexOf(t.key)&&t.isFromJob&&t.value&&t.value.length&&e[t.value]?i+=i&&i.length?"&"+t.key+"="+e[t.value]:t.key+"="+e[t.value]:-1==n.indexOf(t.key)&&!t.isFromJob&&t.value&&t.value.length&&(i+=i&&i.length?"&"+t.key+"="+t.value:t.key+"="+t.value),t.isEncode&&(o=t.isEncode)})}return e.hasOwnProperty("imExternalApply")&&e.imExternalApply?(i&&i.length&&(i=-1==e.imApplyUrl.indexOf("?")?"?"+i:"&"+i,e.imApplyUrl=o?e.imApplyUrl+encodeURIComponent(i):e.imApplyUrl+i),e.imApplyUrl):(i&&i.length&&(i=-1==t.indexOf("?")?"?"+i:"&"+i,t+=i),t)}},l.prototype.toggleTooltip=function(e){try{var t=this.element.querySelectorAll(".apply-button-wrapper");if(t&&t[e]&&t[e].classList){t[e].classList.contains("show-tooltip")?t[e].classList.remove("show-tooltip"):t[e].classList.add("show-tooltip");var i=setTimeout(function(){t[e].classList.remove("show-tooltip"),clearTimeout(i)},2800)}}catch(e){console.log(e)}},l}(i.PhenomWidget)})
define("ph-common/ph-video-widget",["exports","./index"],function(e,t){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function n(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(e,"__esModule",{value:!0}),e.PhenomVideoWidget=void 0;e.PhenomVideoWidget=function(e){function t(n,r,a){return i(this,t),o(this,e.call(this,n,r,a))}return n(t,e),t.prototype.attached=function(){e.prototype.attached.call(this),this.subscribeToEvent("PLAY_VIDEO",this.playVideo),this.subscribeToEvent("PAUSE_VIDEO",this.pauseVideo)},t.prototype.playVideo=function(e){},t.prototype.pauseVideo=function(e){},t.prototype.changeVolume=function(e){},t}(t.PhenomWidget)})
define("ph-common/ph-modal-dialog-display",["exports"],function(e){"use strict";function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function e(i){t(this,e),this.bodyOverflow="auto",this.activeElement=null,this.canHideDocumentOverflow=!0,this.keyEventCallback=null,this.updateSelectors(i),this.keyEventCallback=this.handleKeyDown.bind(this),this.indexBasedTabable=[].slice.call(document.querySelectorAll('[tabindex]:not([tabindex="0"]):not([tabindex="-1"])'))}return e.prototype.updateSelectors=function(e){var t=e||{};this.sModalContent=t.sModalContent||".ph-widget-modal-content",this.sPopoverBody=t.sPopoverBody||".popover-body",this.nPopupHide=t.nPopupHide||"popup-hide",this.nPopupShow=t.nPopupShow||"popup-show",this.sFocusToFirstItem=t.sFocusToFirstItem||".popover-main.active .ref-modal-tab-item",this.sTabGaurdEndSrOnly=t.sTabGaurdEndSrOnly||".tabGaurdEndSrOnly",this.sTabGaurdStartSrOnly=t.sTabGaurdStartSrOnly||".tabGaurdStartSrOnly"},e.prototype.show=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.querySelector(this.sModalContent),i=t.querySelector(this.sPopoverBody);i&&(1==e?(i.classList.remove(this.nPopupHide),i.classList.add(this.nPopupShow)):0==e&&(i.classList.remove(this.nPopupShow),i.classList.add(this.nPopupHide)),this.handleModalAriaContent(e))},e.prototype.addFocusToFirst=function(e){if(e=e||document.querySelector(this.sModalContent)){var t=e.querySelector(this.sFocusToFirstItem);t&&t.focus()}},e.prototype.handleKeyDown=function(e){var t=document.querySelector(this.sModalContent);if(t){switch(e.keyCode){case 27:this.show(!1);break;case 9:t&&!t.contains(document.activeElement)&&(this.addFocusToFirst(t),e.preventDefault());break;case 33:case 34:case 38:case 40:t.contains(document.activeElement)&&e.preventDefault()}return!0}},e.prototype.handleModalAriaContent=function(e,t){var i=this;try{var o=!!e,n=t||[".ph-header",".ph-inline-nav-bar",".ph-footer",".ph-widget-main-content"];if(!n.length)return!1;n.forEach(function(e){if(e){var t=document.querySelectorAll(e),i=t&&t.length;if(i){for(var n=void 0,r=0;r<i;r++)n=t[r];n&&n.setAttribute("aria-hidden",o+"")}}});var r=document.querySelector(this.sModalContent);r.setAttribute("aria-hidden",!o+""),e?(this.activeElement=document.activeElement,this.handleDocumentOverflow(!0),document.addEventListener("keydown",this.keyEventCallback),r.querySelector(this.sTabGaurdStartSrOnly).addEventListener("focus",function(e){if(e.stopImmediatePropagation(),r){var t=r.querySelectorAll(i.sFocusToFirstItem);t[t.length-1].focus()}},!0),r.querySelector(this.sTabGaurdEndSrOnly).addEventListener("focus",function(e){e.stopImmediatePropagation(),i.addFocusToFirst(r)},!0),setTimeout(function(){i.addFocusToFirst(r)},40)):(document.removeEventListener("keydown",this.keyEventCallback),this.handleDocumentOverflow(!1),this.activeElement&&this.activeElement.focus())}catch(e){console.info(e)}},e.prototype.handleDocumentOverflow=function(e){"hidden"!==document.body.style.overflow&&(this.bodyOverflow=document.body.style.overflow),e&&this.canHideDocumentOverflow?document.body.style.overflow="hidden":document.body.style.overflow=this.bodyOverflow},e.prototype.resetTABindex=function(){this.indexBasedTabable.forEach(function(e){var t=e.getAttribute("tabindex"),i=t.split("-");i.length>0&&(i=i[1]),e.setAttribute("tabindex",i)})},e.prototype.holdTABindex=function(){this.indexBasedTabable.forEach(function(e){var t=e.getAttribute("tabindex");e.setAttribute("tabindex","-"+t)})},e}();e.ModalDailogDisplay=i})
define("ph-common/ph-validation/ph-validation-controller",["exports","validate.js"],function(e,t){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.ValidationController=void 0;var o=function(e){return e&&e.__esModule?e:{default:e}}(t);e.ValidationController=function(){function e(){i(this,e),this.validationObj={},this.validationRules={},this.validationErrors={},this.recentError="",this._prevProperty="",this.validateTrigger="blur",this.validateApi=o.default,this.validateApi.options={fullMessages:!1},this.addCustomValidationProviders()}return e.prototype.equal=function(e,t){for(var i in e)if(e[i]!==t[i])return!1;return!0},e.prototype.isNestedObject=function(e){if(e&&this.validateApi.isArray(e)&&e.length){for(var t=0;t<e.length;t++){var i=e[t];if(this.validateApi.isObject(i))return!0}return!1}},e.prototype.getNestedObjIdx=function(e,t,i){var o=this,n=-1;return this.isNestedObject(t)&&t.forEach(function(t,r){var a=o.validationObj[e];o.validateApi.isArray(a)&&(a=a[r]),o.equal(i,a)&&(n=r)}),n},e.prototype.setDirty=function(e,t,i,o,n,r){return this.validateApi.isArray[this.validationObj[e]]?e==t&&o==i&&this.equal(n,this.validationObj[e][r]):e==t&&o==i&&this.equal(n,this.validationObj[e])},e.prototype.addCustomValidationProviders=function(){var e=this;this.validateApi.validators.objectArray=function(t,i,o,n){var r=[];t&&e.validateApi.isArray(t)&&t.forEach(function(t){var o=e.validateApi(t,i);r.push(o||{})});var a=!1;if(r.forEach(function(e){a=e}),a)return r},this.validateApi.validators.simpleOject=function(t,i,o,n){var r={key:{}};if(t=t||e.validationObj[o]){var a=e.validateApi(t,i);return r.key=a}return r}},e.prototype.addValidationCtx=function(e,t){this.validationObj=e,this.validationRules=t},e.prototype.setValidateTrigger=function(e){this.validateTrigger=e},e.prototype.validate=function(e,t,i){var o=this,n=this.validateApi(this.validationObj,this.validationRules);for(var r in n)if(n.hasOwnProperty(r)&&this.validateApi.isArray(n[r]))for(var a=0;a<n[r].length;a++)this.validateApi.isEmpty(n[r][a])&&(n[r][a]=void 0);for(var s in n)if(n.hasOwnProperty(s)&&this.validateApi.isArray(n[s])){for(var l=!0,c=0;c<n[s].length;c++)if(void 0!=n[s][c]){l=!1;break}l&&delete n[s]}var p=JSON.parse(JSON.stringify(this.validationErrors)),d="";if(n&&e){var u=e.indexOf(".");if(-1!=u&&(e=e.substring(0,u)),this.isNestedObject(n[e])){var h=this.getNestedObjIdx(e,n[e],t);-1!=h&&(p[e]||(p[e]=[{}]),p[e][h]||(p[e][h]={}),n[e]=n[e]||{},i?(n[e][h]=n[e][h]||{},p[e][h][i]=n[e][h][i],d=n[e][h][i],this._prevProperty=e+h+i+""):(p[e][h]=n[e][h],d=n[e][h],this._prevProperty=e+h))}else d=n[e],p[e]=n[e],this._prevProperty=e;d&&(this.recentError="",this.validateApi.isArray(d)&&(d=d[0]),setTimeout(function(){o.recentError=d},6))}else p=n||{};return this.validationErrors=p,this.validationErrors},e.prototype.hasErrors=function(){var e=this.validate();return Object.keys(e).length>0},e}()})
define("ph-common/ph-validation/ph-validate-binding-behavior",["exports","aurelia-framework","aurelia-dependency-injection","./ph-validation-controller"],function(e,t,i,o){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.PhValidateBindingBehavior=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=function(e,t,i,o){var n,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"===("undefined"==typeof Reflect?"undefined":r(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},s=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":r(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},l=e.PhValidateBindingBehavior=function(){function e(t){n(this,e),this.container=t}return e.prototype.bind=function(e,t,i){var n=this;this.validationController=this.container.get(o.ValidationController);for(var r=e.sourceExpression.expression.name,a=e.sourceExpression.expression.object,s=void 0,l=void 0;(!e.source.bindingContext.element||a.object)&&a;){l=r,r=a.name+"."+r;var c=e.source.bindingContext[a.name];!c&&a.object&&(c=e.source.bindingContext[a.object.name][a.name]),s=Object.create(c),a=a.object}var p=this.getTarget(e,t);this.validationController.validateTrigger&&(e.validateBlurHandler=function(){n.validationController.validate(r,s,l)},p.addEventListener("blur",e.validateBlurHandler))},e.prototype.unbind=function(e,t){e.validateBlurHandler&&e.validateTarget&&(e.validateTarget.removeEventListener("blur",e.validateBlurHandler),e.validateBlurHandler=null,e.validateTarget=null)},e.prototype.getTarget=function(e,t){var i=e.target;if(i instanceof Element)return i;for(var o=0,n=t.controllers.length;o<n;o++){var r=t.controllers[o];if(r.viewModel===i){
var a=r.container.get(DOM.Element);if(a)return a;throw new Error('Unable to locate target element for "'+e.sourceExpression+'".')}}throw new Error('Unable to locate target element for "'+e.sourceExpression+'".')},e}();e.PhValidateBindingBehavior=l=a([(0,t.autoinject)(),s("design:paramtypes",[i.Container])],l)})
define("ph-common/ph-translation/ph-translation-value-converter",["exports","aurelia-framework","./../common-service","./ph-translation-service"],function(e,t,i,o){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.PhtValueConverter=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=function(e,t,i,o){var n,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"===("undefined"==typeof Reflect?"undefined":r(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},s=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":r(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},l=e.PhtValueConverter=function(){function e(t,i){n(this,e),this.commonService=t,this.translationService=i,this.bundle=this.commonService.getLangBundle()}return e.prototype.toView=function(e,t,i,o){if(this.bundle=this.commonService.getLangBundle(),t)return this.translationService.renderLiteral(e,t);var n="";if(e)if(i)for(var r=e.split(i),o=o||" ",a=0;a<r.length;a++){var s=r[a];n+=this.bundle[s]||s,n+=o}else n=this.bundle[e]||e;return n},e}();e.PhtValueConverter=l=a([(0,t.autoinject)(),s("design:paramtypes",[i.CommonService,o.TranslationService])],l)})
define("ph-common/ph-candidate-login-service",["exports","aurelia-framework","./index"],function(e,t,i){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.CandidateLoginService=void 0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"===("undefined"==typeof Reflect?"undefined":n(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},a=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":n(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=e.CandidateLoginService=function(){function e(t){o(this,e),this.commonService=t,this.providerKey={FACEBOOK:"facebook",MICROSOFT:"microsoft",LINKEDIN:"linkedIn",GOOGLE:"google",LOGIN:"google-signin"}}return e.prototype.getValidateJwtToken=function(e,t,i){return this.commonService.getDDO(e,t,i).then(function(e){return e[t]})},e.prototype.getLocale=function(){var e=this.commonService.getLocale();return e=e.split("_"),e="/"+e[1]+"/"+e[0]+"/"},e.prototype.socialLoginUrl=function(e,t,o,n){var r=this.commonService.getQueryParam("qpage")||"";r=decodeURIComponent(r);var a=o.name,s=o.profileValidation,l=o.redirectUri||window.location.href;a&&"linkedin"==a.toLocaleLowerCase()&&(a="linkedIn");var c=this.commonService.getSiteSettings("oauth");if(c&&c[a]){var p=this.commonService.getQueryParam("page")||"",d=c[a],u=this.getLocale(),h=this.commonService.getLocale(),f=window.location.pathname;r||(f+=window.location.search);var g={page:f,protocol:window.location.protocol,localePath:u,qpage:r,pagename:p,locale:h,siteVariant:t,rurl:encodeURIComponent(l)};if(n&&Object.keys(n).length)for(var m in n)g.hasOwnProperty(m)||(g[m]=n[m]);return s&&(g.profileValidation=!0),(this.commonService.getCsrfToken()&&(g.csrfToken=this.commonService.getCsrfToken()),d)?(d.redirectUriPath=this.commonService.getRootDomain()+d.redirectUri,d.state=JSON.stringify(g),this.redirectToProvider(d,a)):(i.logger.debug("provider doesnt exist"),!1)}},e.prototype.redirectToProvider=function(e,t){var i=this.providerKey,o=e.loginUrl+"?response_type="+e.response_type+"&";switch(t){case i.MICROSOFT:case i.LINKEDIN:o+="client_id="+encodeURIComponent(e.clientId)+"&";break;case i.GOOGLE:case i.LOGIN:o+="client_id="+encodeURIComponent(e.clientId)+"&access_type=offline&approval_prompt=auto&";break;case i.FACEBOOK:o+="client_id="+encodeURIComponent(e.clientId)+"&"}return!!t&&(o+="redirect_uri="+encodeURIComponent(e.redirectUriPath),e.scope&&(o+="&scope="+encodeURIComponent(e.scope)),e.state&&(o+="&state="+encodeURIComponent(e.state)),o)},e.prototype.getMergeProfile=function(e,t,o){return this.commonService.getDDO(e,t,{}).then(function(e){if((e=e[t])&&"success"==e.status){var o=e.data;if(o&&o.allProfiles&&o.allProfiles.length){var n=[];o.linkedAccountList=[],o.mergeProfilesCount=0,o.allProfiles.forEach(function(e){if(e.hasOwnProperty("merge")||(e.merge=!0),e.hasOwnProperty("validation")&&!o.mergeAuthFlow&&(o.mergeAuthFlow="unsuccessfulMerge",e.validation&&(o.mergeAuthFlow="successfulMerge")),e.merge&&e.linkedAccounts&&e.linkedAccounts.length){for(var t=0;t<e.linkedAccounts.length;t++)-1==n.indexOf(e.linkedAccounts[t].email+""+e.linkedAccounts[t].socialProvider)&&(o.linkedAccountList.push(e.linkedAccounts[t]),n.push(e.linkedAccounts[t].email+""+e.linkedAccounts[t].socialProvider));o.mergeProfilesCount++}})}return o}if("failure"==e.status)return i.logger.debug("Failed"),{}})},e.prototype.doLogout=function(e,t){return this.commonService.getDDO(e,t,{}).then(function(e){return e[t]})},e.prototype.profileMergeCancel=function(e,t,i){return this.commonService.getDDO(e,t,i).then(function(e){return e[t]})},e}();e.CandidateLoginService=s=r([(0,t.autoinject)(),a("design:paramtypes",[i.CommonService])],s)})
define("ph-common/ph-a11y-autocomplete",["exports"],function(e){"use strict";function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});e.A11yAutoComplete=function(){function e(){t(this,e)}return e.prototype.init=function(e){if(e){var t=void 0,i=e.querySelector("[data-ph-autocomplete-input]");if(i&&(t=i.getAttribute("data-ph-autocomplete-input"),i.setAttribute("aria-autocomplete","list"),i.setAttribute("aria-controls",t+"-listbox"),i.setAttribute("id",t+"-input")),t){var o=e.querySelector(".ph-autocomplete-input-label");o&&(o.setAttribute("for",t+"-input"),o.setAttribute("id",t+"-label"));var n=e.querySelector(".ph-autocomplete-input-container");n&&(n.setAttribute("aria-expanded","false"),n.setAttribute("aria-owns",t+"-listbox"),n.setAttribute("aria-haspopup","listbox"),n.setAttribute("id",t+"-inputcontainer"));var r=e.querySelector(".ph-autocomplete-input-listbox");r&&(r.setAttribute("aria-labelledby",t+"-label"),r.setAttribute("role","listbox"),r.setAttribute("id",t+"-listbox"))}}},e.prototype.moveDown=function(e,t,i,o,n,r,a){this.handleKeyMove(e,t,i,o,n,r,a)},e.prototype.moveUp=function(e,t,i,o,n,r,a){this.handleKeyMove(e,t,i,o,n,r,a)},e.prototype.handleKeyMove=function(e,t,i,o,n,r,a){if(e[i].activeIndex=n,o[n].aria||(o[n].aria={}),o[n].aria.selected=!0,o[n].aria.id="result-item-"+n,t&&t.setAttribute("aria-activedescendant",o[n].aria.id),r&&a&&r.querySelector("#"+o[n].aria.id)){var s=r.querySelector("#"+o[n].aria.id);if(a&&a.offsetHeight-s.offsetHeight<s.offsetTop&&s.offsetTop<a.scrollHeight){var l=s.scrollHeight-s.offsetHeight*n;a.scrollTop=l<0?-1*l:l}else a.scrollTop=0}},e}()});