!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof def&&def.amd?def("ph-platform",["exports"],t):t((e.phw=e.phw||{},e.phw.platform={}))}(this,function(e){"use strict";var w=function(){return(w=Object.assign||function(e){for(var t,a=1,n=arguments.length;a<n;a++)for(var i in t=arguments[a])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},n=(t.prototype.fecthPhApp=function(){return this.phApp},t.prototype.getDDOFromCache=function(e){var t=this.phApp.ddo,a=this.phApp.pageGroup||{};return t[e]||a[e]},t.prototype.getCsrfToken=function(){var e=document.getElementById("csrfToken");return this.phApp.csrfToken=e&&e.innerText||"",this.phApp.csrfToken||(this.phApp.csrfToken=this.phApp.sessionParams&&this.phApp.sessionParams.csrfToken),this.phApp.csrfToken},t.prototype.getImageUrl=function(){var n=this,i=["cdnUrl","refNum","locale","deviceType"],s="";return i.forEach(function(e,t){var a=n.phApp[e];a&&0<a.trim().length&&(s+=a,"/"!==a[a.length-1]&&i.length-1<t&&(s+="/"))}),s},t.prototype.convertWidgetTagToComponentName=function(e){return e&&e.trim().length?e.substring(e.lastIndexOf("-")+1)+"/"+e.substring(0,e.lastIndexOf("-")):e},t.prototype.getSiteSettings=function(e){var t=this.getDDOFromCache("siteConfig");if(t&&t.data)return e?t.data.siteSettings[e]||t.data[e]:t.data.siteSettings},t.prototype.isCrawlerUserAgent=function(){var e=window.navigator.userAgent,t=!1,a=this.getSiteSettings("crawlerUserAgents");return a&&(t=new RegExp(a,"i").test(e.toLowerCase())),t},t.prototype.fetchReqObj=function(){return{deviceType:this.phApp.deviceType||"desktop",refNum:this.phApp.refNum,lang:this.phApp.locale||"en_us",siteType:this.phApp.siteType,pageId:this.phApp.pageId,pageName:this.phApp.pageName,country:this.phApp.country}},t.prototype.getComponentName=function(e){var t=e.split("-"),a="";return t.forEach(function(e){a+=e[0].toUpperCase()+e.slice(1)}),a},t);function t(){this.phApp=window.phApp||{},this.phApp.ddo=this.phApp.ddo||{}}var i=[{key:"domainName",regex:/{{domainName}}/g,value:""},{key:"linkDomain",regex:/{{linkDomain}}/g,value:""},{key:"imgSrc",regex:/{{imgSrc}}/g,value:""}],y={videowrapper:"video",imagewrapper:"image",linkwrapper:"link"},a=(s.prototype.constructCntReplaceMap=function(){var e=(this.phApp.rootDomain||this.phApp.baseDomain||"").replace("https://","");this.contentReplaceables.domainName=e,this.contentReplaceables.linkDomain=this.phApp.baseUrl,this.contentReplaceables.imgSrc=this.platformUtils.getImageUrl()},s.prototype.applyContextToContentModel=function(t){var a=this;for(var e in t=JSON.stringify(t)||"",this.contentReplaceables){t=(t=t.replace(/&lt;/g,"<")).replace(/&gt;/g,">"),i.forEach(function(e){t=t.replace(e.regex,a.contentReplaceables[e.key])});try{return JSON.parse(t)}catch(e){}}},s.prototype.flattenContentModel=function(e,m,u,t){var h=this;if(!m||!e)return m;var g=e.content||e,f=t||{};u=u||{},Object.keys(g).forEach(function(i){if("_cid"!=i)if("_refType"!=i){var e=g[i]?g[i].type:void 0,s=g[i]?g[i].refType:void 0;if(e){var t=g[i]?g[i].value:void 0;t||"string"!=typeof g[i]||(t=g[i]);var a=typeof t;t||(a="string");var n=u[t];if(n&&(a=typeof n),"dynamictext"==e)m[i]=t;else switch(a){case"object":if(Array.isArray(t)){var o=t;m[i]=[];var r=[];o.forEach(function(e,t){var a={},n=u[e];n&&((m[i][t]=a)._cid=e,a.position=t+1,f&&f.quoteImage&&n&&(n.quoteImage=f.quoteImage),"object"==typeof e&&(n=e,a={}),h.flattenContentModel(n,a,u,f),r.push(a))}),r.forEach(function(e,t){m[i][t]=e})}else{var d=t,c={};m[i]=c;var p=u[d]||{};if(p._cid=d,s&&(p._refType=s),"object"==typeof d&&(p=d||{},c={}),s&&y[s]){var l=u[t]||t||{};l&&(Object.keys(l).forEach(function(e){var t=l[e];if("object"==typeof t&&t.refType==y[s]){var a=u[t.value]||t.value||{};for(var n in a)a.hasOwnProperty(n)&&!l[n]&&(l[n]=a[n]);delete l[e],p=l}}),"videowrapper"===s&&f.playImg&&(l.playImg=f.playImg))}h.flattenContentModel(p,c,u,f),c&&(m[i]=c)}break;default:t&&(m[i]=t)}}}else m[i]=g[i];else m[i]=g[i]})},s.prototype.fillContentBasedOnMapper=function(e,t,a,n,i,s){var o;if(t&&a)if(t.split(".").forEach(function(e){o=o?o[e]:n[e]}),-1!=a.indexOf(".")){var r=a.split(".");if(r&&r.length){var d=r.pop();r.reduce(function(e,t){return e[t]=e[t]||{}},i)[d]=o}}else i[a]=o},s.prototype.mapViewContentModels=function(e){if(e&&e.content){var t=e.content;for(var a in e.origContentItems={},t)if(t.hasOwnProperty(a)){var n=t[a]||{};if(e.origContentItems[a]=JSON.parse(JSON.stringify(n)),n&&n.mappingModel&&"string"==typeof n.mappingModel){var i=n.mappingModel,s=e.modelMappings[i]&&e.modelMappings[i].mapping,o={};if(s){for(var r in s)s.hasOwnProperty(r)&&this.fillContentBasedOnMapper(a,s[r],r,n,o,e);o.mappingModel=s}t[a]=o}}}},s.prototype.compileContentModel=function(a,i){var s=this;return(i=i||{})&&(this.mapViewContentModels(i.data?i.data:i),Object.keys(a||{}).forEach(function(e,t){(a[e]||[]).forEach(function(e){var t={},a=e["data-ph-content-id"],n=i.data&&(i.data.content||i.data);n&&n[a]&&(s.flattenContentModel(n[a],t,n,n[a]),n[a].rawContent=n[a].content,t=s.applyContextToContentModel(t),n[a].content||(n[a].content=t))})})),i},s);function s(){this.contentReplaceables={},this.platformUtils=new n,this.phApp=this.platformUtils.fecthPhApp(),this.constructCntReplaceMap()}var d="X-CSRF-TOKEN",o=(r.prototype.getDDOFromCache=function(e){return this.phApp.ddo[e]},r.prototype.fetchCachedDdo=function(e){return this.getDDOFromCache(e)},r.prototype.fetchEnvironment=function(){var e={};return this.phApp&&(e.componentBase=this.phApp.widgetScriptUrl||this.phApp.cdnUrl+"/common/js/caas-platform/widgets/"),e},r.prototype.formatParams=function(t){return"?"+Object.keys(t).map(function(e){return e+"="+encodeURIComponent(t[e])}).join("&")},r);function r(){var a=this;this.platformUtils=new n,this.makeRequest=function(t,n,e){var i=a.phApp.widgetApiEndpoint,s=new XMLHttpRequest,o=a,r=t.ignoreCache;return new Promise(function(a){var e=o.getDDOFromCache(n);e&&!r?a(e):(s.open("POST",i,!0),t.ddoKey=n,s.setRequestHeader("Content-type","application/json"),s.setRequestHeader(d,o.platformUtils.getCsrfToken()),s.onreadystatechange=function(e){if(this.readyState==XMLHttpRequest.DONE||4===this.readyState){if(200==this.status){var t=JSON.parse(s.responseText);(t=t[n])&&500!=t.status&&(t=t[n]||t,o.phApp.loadingPage=!1)}a(t)}},s.send(JSON.stringify(t)))})},this.makeGetRequest=function(n,i,e){var s=n.url||a.phApp.widgetApiEndpoint,o=new XMLHttpRequest,r=a;return delete n.url,new Promise(function(a,e){var t=r.getDDOFromCache(i);t?a(t):(o.open("GET",s+r.formatParams(n),!0),o.setRequestHeader("Content-type","application/json"),o.setRequestHeader(d,r.platformUtils.getCsrfToken()),o.onreadystatechange=function(e){if(this.readyState==XMLHttpRequest.DONE||4===this.readyState){if(200==this.status){var t=JSON.parse(o.responseText);(t=t[i])&&500!=t.status&&(t=t[i]||t,r.phApp.loadingPage=!1)}a(t)}},o.send(null))})},this.phApp=this.platformUtils.fecthPhApp()}var c=["data-ph-id"],p="instance-id",l="data-ph-widget-id",m="instance-id",u=["[",l,"]"].join(""),h="data-ph-content-id",g=["pcs-card-v1","pcs-component-v1"],f=(v.prototype.constructWgtTempElm=function(e){if(!e||"object"==typeof e)return e||document;var t=document.createElement("div");return t.innerHTML=e,t},v.prototype.prepareWidgetBlocks=function(e,t){var a=this.constructWgtTempElm(e),n=a.querySelectorAll(u);!n.length&&a&&a.getAttribute&&a.getAttribute(l)&&(n=[a]);for(var i=n.length,s=0;s<i;s++){var o=n[s];this.prepareWidgetBlock(o,t)}},v.prototype.prepareWidgetBlock=function(e,t){if(!this.handleHideOnDevice(e)){var a=e.getAttribute(l),n=e.getAttribute(m),i=e.getAttribute(h);this.phApp.ddo=this.phApp.ddo||{};var s=this.phApp.ddo.caasPageViews&&this.phApp.ddo.caasPageViews.data,o=s&&s.views&&s.views[a],r=s&&s.aliases&&(s.aliases[t+"-"+n]||s.aliases[n])||{};!Object.keys(r).length&&n&&(s.aliases[n]=[],r=s.aliases[n]);var d=s&&s.settings&&s.settings[n];if(o&&o.html&&r){var c=this.constructWgtTempElm(o.html);r.html=this.addExtraLogicToView(c,r,d,n||t);var p=this.addwidgetElemWithAttr(o,a,n,i,e);this.replacePhWidgetWithCmpt(e,p),this.prepareWidgetBlocks(r.html,t||n)}}},v.prototype.addExtraLogicToView=function(e,i,t,a){for(var s=e.querySelectorAll("[data-ph-content-id]"),n=function(e){var t=s[e],a=t.getAttribute("ph-alias");if(Object.keys(i).length&&a){var n=i.find(function(e){return e.alias==a});n&&n["data-ph-content-id"]&&t.setAttribute("data-ph-content-id",n["data-ph-content-id"]),o.handleElemAttributes(t,a)}},o=this,r=0;r<s.length;r++)n(r);return this.applyInstanceIdsToSettingsBlock(e,a),e.innerHTML},v.prototype.handleElemAttributes=function(e,t){e.removeAttribute("ph-alias");var a={};for(var n in e.attributes)e.attributes[n]&&e.attributes[n].nodeName&&e.attributes[n].nodeValue&&(a[e.attributes[n].nodeName]=[e.attributes[n].nodeValue]);var i=["exposeAliasToTemplate('",t,"','",e.getAttribute("data-ph-content-id"),"')"].join("");for(var s in e.setAttribute("v-bind:alias",i),a)e.removeAttribute(s);for(var o in a)e.setAttribute(o,a[o])},v.prototype.fetchElemBindables=function(e,t){if(t=t||{},e&&e.attributes)for(var a=0;a<Object.keys(e.attributes).length;a++){var n="data-pha-",i=e.attributes[a].name||"";i.startsWith(n)&&-1==c.indexOf(i)&&(t[i=i.replace(n,"")]=e.attributes[a].value)}return t},v.prototype.addwidgetElemWithAttr=function(e,t,a,n,i){var s=e.widgetTag,o=document.createElement(s),r={"data-widget":s,"data-ph-widget-id":t,"widget-id":t,"instance-id":a,"content-id":n,class:[s,e.view,e.theme].join("-")};-1==g.indexOf(s)&&(r.class=r.class+" pcs-widget");var d=this.fetchElemBindables(i,r);for(var c in d)r.hasOwnProperty(c)&&r[c]&&r[c]&&o.setAttribute(c,r[c]);return s&&-1===this.componentsToLoad.indexOf(s)&&-1===this.widgetTags.indexOf(s)&&this.widgetTags.push(s),o},v.prototype.addWidgetTagsToNestedWidgets=function(e){if(e&&e.views)for(var t in e.views)if(e.views[t]){var a=e.views[t].html,n=a&&this.constructWgtTempElm(a),i=n&&n.querySelectorAll(u);if(i&&i.length){for(var s=0;s<i.length;s++){var o=i[s],r=o.getAttribute(l),d=o.getAttribute(m),c=o.getAttribute(h);if(e.views[r]){var p=this.addwidgetElemWithAttr(e.views[r],r,d,c,o);this.replacePhWidgetWithCmpt(o,p)}}e.views[t].html=n.innerHTML}}},v.prototype.replacePhWidgetWithCmpt=function(e,t){var a=e&&e.nodeName.toLowerCase(),n=t,i=e.parentElement&&"SECTION"==e.parentElement.nodeName;if(!(-1!=g.indexOf(a)||i&&e.parentElement.classList.contains("pcs-widget"))){var s=document.createElement("section");s.classList.add("pcs-widget");var o=e.getAttribute("instance-id"),r=e.getAttribute("data-ph-id");o&&s.setAttribute("instance-id",o),r&&s.setAttribute("data-ph-id",r),s.appendChild(t),n=s}e.parentElement&&e.parentElement.insertBefore(n,e);for(var d=0;d<e.attributes.length;d++)if("class"!=e.attributes[d].name)t.setAttribute(e.attributes[d].name,e.attributes[d].value);else for(var c=e&&e.classList,p=0;p<c.length;p++)t.classList.contains(c[p])||t.classList.add(c[p]);e.parentElement&&e.parentElement.removeChild(e)},v.prototype.applyInstanceIdsToSettingsBlock=function(e,t){if(e){var a=[{key:p,value:t}];this.fetchNestedWidgetsAndApplyInstanceAttrs(e,a)}},v.prototype.fetchNestedWidgetsAndApplyInstanceAttrs=function(e,t){if(e&&t.length)for(var a=e.querySelectorAll("["+p+"]"),n=0;n<a.length;n++)for(var i=a[n],s=0;s<t.length;s++){var o=i.getAttribute(p);t[s].key==p&&o&&t[s].value?(o=t[s].value+"-"+o,i.setAttribute(t[s].key,o)):i.setAttribute(t[s].key,t[s].value)}},v.prototype.handleHideOnDevice=function(e){var t=e.getAttribute("hide-on-mobile"),a=e.getAttribute("hide-on-desktop"),n=this.phApp.deviceType,i=!1;return n&&"mobile"===n&&"true"===t?i=!0:n&&"desktop"===n&&"true"===a&&(i=!0),!!i&&(e.parentElement&&e.parentElement.removeChild&&e.parentElement.removeChild(e),i)},v);function v(){this.widgetTags=[],this.componentsToLoad=[],this.platformUtils=new n,this.phApp=this.platformUtils.fecthPhApp()}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var k,b=(function(e,t){function o(e,t){if(e){var a=p[e];if(c[e]=t,a)for(;a.length;)a[0](e,t),a.splice(0,1)}}function r(e,t){e.call&&(e={success:e}),t.length?(e.error||m)(t):(e.success||m)(e)}function l(a,n,i,s){var o,r,e=document,t=i.async,d=(i.numRetries||0)+1,c=i.before||m,p=a.replace(/^(css|img)!/,"");s=s||0,/(^css!|\.css$)/.test(a)?((r=e.createElement("link")).rel="stylesheet",r.href=p,(o="hideFocus"in r)&&r.relList&&(o=0,r.rel="preload",r.as="style")):/(^img!|\.(png|gif|jpg|svg)$)/.test(a)?(r=e.createElement("img")).src=p:((r=e.createElement("script")).src=a,r.async=void 0===t||t),!(r.onload=r.onerror=r.onbeforeload=function(e){var t=e.type[0];if(o)try{r.sheet.cssText.length||(t="e")}catch(e){18!=e.code&&(t="e")}if("e"==t){if((s+=1)<d)return l(a,n,i,s)}else if("preload"==r.rel&&"style"==r.as)return r.rel="stylesheet";n(a,t,e.defaultPrevented)})!==c(a,r)&&e.head.appendChild(r)}function a(e,t,a){var n,i;if(t&&t.trim&&(n=t),i=(n?a:t)||{},n){if(n in d)throw"LoadJS";d[n]=!0}function s(t,a){!function(e,n,t){var a,i,s=(e=e.push?e:[e]).length,o=s,r=[];for(a=function(e,t,a){if("e"==t&&r.push(e),"b"==t){if(!a)return;r.push(e)}--s||n(r)},i=0;i<o;i++)l(e[i],a,t)}(e,function(e){r(i,e),t&&r({success:t,error:a},e),o(n,e)},i)}if(i.returnPromise)return new Promise(s);s()}var m,d,c,p;e.exports=(m=function(){},d={},c={},p={},a.ready=function(e,t){return function(e,a){e=e.push?e:[e];var t,n,i,s=[],o=e.length,r=o;for(t=function(e,t){t.length&&s.push(e),--r||a(s)};o--;)n=e[o],(i=c[n])?t(n,i):(p[n]=p[n]||[]).push(t)}(e,function(e){r(t,e)}),a},a.done=function(e){o(e,[])},a.reset=function(){d={},c={},p={}},a.isDefined=function(e){return e in d},a)}(k={exports:{}},k.exports),k.exports),A=Object.freeze({default:b,__moduleExports:b}),j=[{key:"af",name:"Afrikaans"},{key:"am",name:"Amharic"},{key:"ar-dz",name:"Arabic (Algeria)"},{key:"ar-kw",name:"Arabic (Kuwait)"},{key:"ar-ly",name:"Arabic (Lybia)"},{key:"ar-ma",name:"Arabic (Morocco)"},{key:"ar-sa",name:"Arabic (Saudi Arabia)"},{key:"ar-tn",name:" Arabic (Tunisia)"},{key:"ar",name:"Arabic"},{key:"az",name:"Azerbaijani"},{key:"be",name:"Belarusian"},{key:"bg",name:"Bulgarian"},{key:"bi",name:"Bislama"},{key:"bm",name:"Bambara"},{key:"bn",name:"Bengali"},{key:"bo",name:"Tibetan"},{key:"br",name:"Breton"},{key:"bs",name:"Bosnian"},{key:"ca",name:"Catalan"},{key:"cs",name:"Czech"},{key:"cv",name:"Chuvash"},{key:"cy",name:"Welsh"},{key:"da",name:"Danish"},{key:"de-at",name:"German (Austria)"},{key:"de-ch",name:"German (Switzerland)"},{key:"de",name:"German"},{key:"dv",name:"Maldivian"},{key:"el",name:"Greek"},{key:"en-au",name:"English (Australia)"},{key:"en-ca",name:"English (Canada)"},{key:"en-gb",name:"English (United Kingdom)"},{key:"en-ie",name:"English (Ireland)"},{key:"en-il",name:"English (Israel)"},{key:"en-in",name:"English (India)"},{key:"en-nz",name:"English (New Zealand)"},{key:"en-sg",name:"English (Singapore)"},{key:"en-tt",name:"English (Trinidad & Tobago)"},{key:"en",name:"English"},{key:"eo",name:"Esperanto"},{key:"es-do",name:"Spanish (Dominican Republic)"},{key:"es-pr",name:"Spanish (Puerto Rico)"},{key:"es-us",name:"Spanish (United States)"},{key:"es",name:"Spanish"},{key:"et",name:"Estonian"},{key:"eu",name:"Basque"},{key:"fa",name:"Persian"},{key:"fi",name:"Finnish"},{key:"fo",name:"Faroese"},{key:"fr-ca",name:"French (Canada)"},{key:"fr-ch",name:"French (Switzerland)"},{key:"fr",name:"French"},{key:"fy",name:"Frisian"},{key:"ga",name:"Irish or Irish Gaelic"},{key:"gd",name:"Scottish Gaelic"},{key:"gl",name:"Galician"},{key:"gom-latn",name:"Konkani Latin script"},{key:"gu",name:"Gujarati"},{key:"he",name:"Hebrew"},{key:"hi",name:"Hindi"},{key:"hr",name:"Croatian"},{key:"ht",name:"Haitian Creole (Haiti)"},{key:"hu",name:"Hungarian"},{key:"hy-am",name:"Armenian"},{key:"id",name:"Indonesian"},{key:"is",name:"Icelandic"},{key:"it-ch",name:"Italian (Switzerland)"},{key:"it",name:"Italian"},{key:"ja",name:"Japanese"},{key:"jv",name:"Javanese"},{key:"ka",name:"Georgian"},{key:"kk",name:"Kazakh"},{key:"km",name:"Cambodian"},{key:"kn",name:"Kannada"},{key:"ko",name:"Korean"},{key:"ku",name:"Kurdish"},{key:"ky",name:"Kyrgyz"},{key:"lb",name:"Luxembourgish"},{key:"lo",name:"Lao"},{key:"lt",name:"Lithuanian"},{key:"lv",name:"Latvian"},{key:"me",name:"Montenegrin"},{key:"mi",name:"Maori"},{key:"mk",name:"Macedonian"},{key:"ml",name:"Malayalam"},{key:"mn",name:"Mongolian"},{key:"mr",name:"Marathi"},{key:"ms-my",name:"Malay"},{key:"ms",name:"Malay"},{key:"mt",name:"Maltese (Malta)"},{key:"my",name:"Burmese"},{key:"nb",name:"Norwegian Bokmål"},{key:"ne",name:"Nepalese"},{key:"nl-be",name:"Dutch (Belgium)"},{key:"nl",name:"Dutch"},{key:"nn",name:"Nynorsk"},{key:"oc-lnc",name:"Occitan, lengadocian dialecte"},{key:"pa-in",name:"Punjabi (India)"},{key:"pl",name:"Polish"},{key:"pt-br",name:"Portuguese (Brazil)"},{key:"pt",name:"Portuguese"},{key:"ro",name:"Romanian"},{key:"ru",name:"Russian"},{key:"rw",name:"Kinyarwanda (Rwanda)"},{key:"sd",name:"Sindhi"},{key:"se",name:"Northern Sami"},{key:"si",name:"Sinhalese"},{key:"sk",name:"Slovak"},{key:"sl",name:"Slovenian"},{key:"sq",name:"Albanian"},{key:"sr-cyrl",name:"Serbian Cyrillic"},{key:"sr",name:"Serbian"},{key:"ss",name:"siSwati"},{key:"sv",name:"Swedish"},{key:"sw",name:"Swahili"},{key:"ta",name:"Tamil"},{key:"te",name:"Telugu"},{key:"tet",name:"Tetun Dili (East Timor)"},{key:"tg",name:"Tajik"},{key:"th",name:"Thai"},{key:"tk",name:"Turkmen"},{key:"tl-ph",name:"Tagalog (Philippines)"},{key:"tlh",name:"Klingon"},{key:"tr",name:"Turkish"},{key:"tzl",name:"Talossan"},{key:"tzm-latn",name:"Central Atlas Tamazight Latin"},{key:"tzm",name:"Central Atlas Tamazight"},{key:"ug-cn",name:"Uyghur (China)"},{key:"uk",name:"Ukrainian"},{key:"ur",name:"Urdu"},{key:"uz-latn",name:"Uzbek Latin"},{key:"uz",name:"Uzbek"},{key:"vi",name:"Vietnamese"},{key:"x-pseudo",name:"Pseudo"},{key:"yo",name:"Yoruba Nigeria"},{key:"zh-cn",name:"Chinese (China)"},{key:"zh-hk",name:"Chinese (Hong Kong)"},{key:"zh-tw",name:"Chinese (Taiwan)"},{key:"zh",name:"Chinese"}],S=(C.prototype.observeElem=function(e,t){this.callback=t,this.lazyElemObserver.observe(e)},C);function C(){var a=this;this.lazyElemObserver=new IntersectionObserver(function(e,t){e.forEach(function(e){if(e.isIntersecting){var t=e.target;a.callback(),a.lazyElemObserver.unobserve(t)}})})}var T=window,E=b||A,P=["PCS-FACETS-V1","PCS-SEARCH-RESULTS-V2","PCS-NPS-V1","PCS-HEADER-V1"],O={jquery:"common/js/vendor/jquery-3.6.1.min.js",slick:"common/js/vendor/slick-v3.min.js",plyrPolyfill:"common/js/vendor/polyfill.min.js",plyrScript:"common/js/vendor/plyr.min.3.5.6.js",plyrStyle:"common/js/vendor/plyr.3.5.6.css",hark:"common/js/vendor/hark.bundle-v1.1.0.js",resumable:"common/js/vendor/resumable-v1.1.min.js",dayjs:"common/js/vendor/dayjs/dayjs.min.js",dayjsutc:"common/js/vendor/dayjs/utc.js",dayjstz:"common/js/vendor/dayjs/timezone.js",dayjsDuration:"common/js/vendor/dayjs/duration.js",advancedFormat:"common/js/vendor/dayjs/advancedFormat.js",localizedFormat:"common/js/vendor/dayjs/localizedFormat.js",customParseFormat:"common/js/vendor/dayjs/customParseFormat.js",dayjslocale:"common/js/vendor/dayjs/locale/",mapBoxSdk:"common/js/vendor/mapbox-sdk.js",videojs:"common/js/vendor/video.min.js","videojs-record":"common/js/vendor/videojs.record.js",videjsStyle:"common/js/vendor/video-js.min.css",videojsrecordstyle:"common/js/vendor/videojs.record.min.css",localforage:"common/js/vendor/localforage.min.js",recordRTC:"common/js/vendor/record-rtc.min.js",dropzoneJs:"common/js/vendor/dropzone.min.js",isJs:"common/js/vendor/isjs.js","mobile-detect":"common/js/vendor/mobile-detect.min.js",jszip:"common/js/vendor/jszip.min.js",jsziputils:"common/js/vendor/jszip-utils.min.js",filesaver:"common/js/vendor/filesaver.min.js",ie11CustomProperties:"common/js/vendor/ie11CustomProperties_css_var.min.js",noUiSlider:"common/js/vendor/nouislider.min.js",addToCalender:"common/js/vendor/addToCalendar-v1.6.1.min.js",validate:"/common/js/vendor/validate.min.js"},I=(V.prototype.fetchEagerLoadScriptVersions=function(){var e=this.platformUtils.getDDOFromCache("caasLazyLoadWidgetVersions");e&&e.status&&"success"===e.status&&(this.versionedScripts=e.data||{})},V.prototype.loadLibScripts=function(e,t){var a=this;if(this.phApp&&this.phApp.caasPlatform){var n=[];this.phApp.caasPlatform.polyfill&&n.push(this.phApp.caasPlatform.polyfill),this.phApp.caasPlatform.vendor&&n.push(this.phApp.caasPlatform.vendor),this.phApp.caasPlatform.common&&n.push(this.phApp.caasPlatform.common),E(n,{success:function(){a.bootstrapWidgets(e,t)},async:!1})}else this.counter<50&&(this.timer=setTimeout(function(){a.counter++,clearTimeout(a.timer),a.bootstrapWidgets(e,t)},150))},V.prototype.bootstrapWidgets=function(e,t){var a=this;if(window.hasOwnProperty("Vue")&&window.hasOwnProperty("PcsCommon"))if(window.hasOwnProperty("phw")&&e.length){var n=[];if(this.env&&this.env.componentBase&&e.forEach(function(e){window.hasOwnProperty("Vue")&&!T.Vue.options.components[e]&&(a.platformUtils.convertWidgetTagToComponentName(e),n.push(a.versionedScripts[e]||a.env.componentBase+e+".js"))}),this.platformUtils.isCrawlerUserAgent())try{var i=e.indexOf("pcs-candidate-login-v1"),s=n[i];s&&-1!==s.indexOf("candidate-login")&&(n.splice(i,1),e.splice(i,1))}catch(e){}E(n,{success:function(){t()},async:!0}),n.length||t()}else t();else this.loadLibScripts(e,t)},V.prototype.initialiseVue=function(e,t){if(e&&(this.elemIntersectionObserver=new S,window.hasOwnProperty("phw")&&window.hasOwnProperty("Vue"))){Object.keys(phw).forEach(function(e){var t=phw[e].default?phw[e].default.component:phw[e].component;t&&(t.options.template="<div></div>",T.Vue.component(t.options.name,t))});var a=e.querySelector("[data-widget]"),n=a&&a.tagName||"",i="internal"==this.phApp.siteType,s=this.platformUtils.getSiteSettings("videoAssessmentPagesList")||[],o=this.phApp.pageName,r=a&&a.hasAttribute("data-auto-loaded");!T.IntersectionObserver||t||-1!=P.indexOf(n)||i||"editor"==T.phApp.env||r||-1!=s.indexOf(o)?this.triggerVueElem(e):this.elemIntersectionObserver.observeElem(e,this.triggerVueElem.bind(this,e))}},V.prototype.triggerVueElem=function(e){e&&e.firstElementChild&&(e.firstElementChild.style.padding=null),e.__vue__||(phw.localVue=new T.Vue({el:e}))},V.prototype.initialiseEmbedVue=function(e,t,n){if(window.hasOwnProperty("phw")&&window.hasOwnProperty("Vue")){e.forEach(function(e){var t=phw[e].default?phw[e].default.component:phw[e].component,a=t&&t.options.props;a&&n&&Object.keys(n).forEach(function(e){e&&a[e]&&(t.options.props[e].default=n[e])}),t&&(t.options.template="<div></div>",T.Vue.component(t.options.name,t))});var a='[data-embed-widget-id ="'+t+'"]',i=document.querySelector(a);n=n||{},i&&(phw.localVue=new T.Vue({el:i}))}},V.prototype.loadScriptById=function(i,s,e){var o=this;return void 0===s&&(s=!0),void 0===e&&(e=!0),new Promise(function(e,t){if(E.isDefined(i))E.ready(i,function(){e(!0)});else{"dayjslocale"===i&&(O[i]+=o.dayjsLocale+".js");var a=O[i];if(a){if(!a.startsWith("http")&&!a.startsWith("://")){var n=o.phApp.scriptsBaseUrl||o.phApp.cdnUrl;n&&!n.endsWith("/")&&(n+="/"),a=n+a}E(a,i,{async:s}),E.ready(i,function(){e(!0)})}else e(!1)}})},V.prototype.loadDayJsScripts=function(){var t=this,a=this.phApp.locale||"en";if(a=a.replace("_","-"),this.dayjsLocale=j.find(function(e){return e.key===a}),void 0===this.dayjsLocale)if(1!==(a=a.split("-")).length){var e=j.find(function(e){return e.key===a[0]});this.dayjsLocale=void 0===e?"en":e.key}else this.dayjsLocale=this.dayjsLocale.key;else this.dayjsLocale=this.dayjsLocale.key;var n={dayjs:"dayjs",dayjsutc:"dayjs_plugin_utc",dayjstz:"dayjs_plugin_timezone",dayjsDuration:"dayjs_plugin_duration",advancedFormat:"dayjs_plugin_advancedFormat",localizedFormat:"dayjs_plugin_localizedFormat",customParseFormat:"dayjs_plugin_customParseFormat"};Object.keys(n).forEach(function(e){window[n[e]]||t.loadScriptById(e)})},V.prototype.loadScript=function(e,t,a,n){if(void 0===a&&(a=!0),void 0===n&&(n=!0),!E.isDefined(t))return e.startsWith("http")||e.startsWith("://")||(e=this.phApp.cdnUrl+"/common/js/vendor/"+e),E(e,{returnPromise:!0,async:!0})},V.prototype.loadScripts=function(e,t,a,n){if(void 0===a&&(a=!0),void 0===n&&(n=!0),!E.isDefined(t))return E(e,{returnPromise:!0,async:a})},V);function V(){this.platformUtils=new n,this.serviceUtils=new o,this.domUtils=new f,this.versionedScripts={},this.counter=0,this.env=this.serviceUtils.fetchEnvironment(),this.phApp=this.platformUtils.fecthPhApp(),T.hasOwnProperty("phw")&&(T.phw.scriptsMap=O);var e=this.platformUtils.getSiteSettings("vendorScripts")||{};for(var t in e)e[t]&&(O[t]="common/js/vendor/"+e[t]);this.fetchEagerLoadScriptVersions(),this.loadDayJsScripts()}var W,x=window.phApp||{},L=new n,N=new a,D=new o,M=new f,q=new I,z="caasPageViews",R="caasContentV1",U="siteGlobalContent",B="getCaasGlobalWdgtInfo",_="data-ph-widget-id",F=["[",_,"]"].join(""),H="data-aud-widget",J="global-managed-widget",G=0,K=[];function X(){!function e(){var s=L.fecthPhApp();var t=L.getCsrfToken();var a=s.ddo&&s.ddo.caasPageViews&&s.ddo.caasPageViews.status;if((!s.inlinePreview&&"success"!=a&&!s.loadingPage||!t)&&G<50)return void(W=setTimeout(function(){G++,clearTimeout(W),e()},150));var o=L.fetchReqObj();if(s.ddo.caasPageViews&&s.ddo.caasContentV1){if(s.ddo[R]){var n=s.ddo[z],i=n&&n.data&&n.data.aliases||{};N.compileContentModel(i,s.ddo[R])}$(void 0)}else s.loadingPage=!0,D.makeRequest(o,z).then(function(a){s.ddo[z]=a;var e=L.getSiteSettings("navItems"),t=L.getSiteSettings("cdnCaasContent"),n=s.viewsFromPage,i=D.makeRequest;e&&e.hasOwnProperty("cdnCaasContentEnabled")||!t||!t.cdnCaasContentEnabled||(e=t),e&&e.cdnCaasContentEnabled&&e.cdnCaasContentUrl&&n&&((o={refNum:s.refNum,locale:s.locale||"en_us",siteType:s.siteType,pageId:s.pageId,channel:s.deviceType||"desktop"}).url=e.cdnCaasContentUrl,i=D.makeGetRequest),i(o,R).then(function(e){var t=a&&a.data&&a.data.aliases||{};te(e,{aliases:t}),$(void 0)})})}();var e=document.querySelector(".ph-page");e&&e.getAttribute("role")||!e||e.setAttribute("role","main")}function $(e){var t=x.ddo.caasPageViews&&x.ddo.caasPageViews.data;M.addWidgetTagsToNestedWidgets(t),M.widgetTags=[];var a=M.constructWgtTempElm(void 0),n=e||a.querySelectorAll("pcs-widget"+F);!n.length&&a&&a.getAttribute&&a.getAttribute(_)&&(n=[a]);for(var i=n.length,s=0;s<i;s++){var o=n[s];if(!o.hasAttribute(H)&&!o.hasAttribute(J)){var r=o.getAttribute("instance-id");M.widgetTags=[],o.style.padding="15px",M.prepareWidgetBlock(o);var d=document.querySelector('[instance-id="'+r+'"]');K.push({tags:M.widgetTags,elem:d})}}ne(!1),Y(),M.widgetTags=[]}function Y(f,e,t){var y=L.fetchReqObj(),v=document.querySelectorAll("pcs-widget["+H+"],pcs-widget["+J+"]");f&&(v=f);var k=document.querySelectorAll("[data-audience-block]");if(v.length){window.MSInputMethodContext&&q.loadScriptById("ie11CustomProperties"),y.widgetIds=[],y.contentIds=[];for(var a=0;a<v.length;a++){var n=v[a].getAttribute("data-ph-widget-id"),i=v[a].getAttribute("data-ph-content-id");n&&-1==y.widgetIds.indexOf(n)&&y.widgetIds.push(n),i&&-1==y.contentIds.indexOf(i)&&y.contentIds.push(i)}var s=[],o=L.getSiteSettings("cdnConfig")||{},r=L.getSiteSettings("iscdnEnabled"),d=D.makeRequest;if(r&&o.cdnDdos&&-1!=o.cdnDdos.indexOf(B)){var c=o.cdnUrl+"/api/DEFAUS/"+B,p={};p.url=c,p.payload={};var l={widgetIds:y.widgetIds,contentIds:y.contentIds};p.payload=JSON.stringify(l),y=p,d=D.makeGetRequest}return s.push(d(y,B)),e&&(y.pageId=t,y.ignoreCache=!0),s.push(function(e,t,a){return D.makeRequest(t,a||U)}(0,y,e)),Promise.all(s).then(function(e){var t,a,n=e[0],i=e[1];if(n&&n.data&&(t=n.data.audiences&&n.data.audiences.cssVariables,a=n.data.videoscreening&&n.data.videoscreening.cssVariables),t||a){var s;s=document.querySelectorAll("["+J+"]");var o=document.querySelectorAll("["+H+"]");if(o.length&&t&&Z(t),s.length&&a&&Z(a),n&&n.data&&n.data.widgets){for(var r={},d={},c=0;c<v.length;c++){var p=v[c].getAttribute("data-ph-content-id"),l=v[c].getAttribute("data-ph-widget-id");(h=v[c].getAttribute("instance-id")||"")&&l&&n.data.widgets[l]&&n.data.widgets[l].settings&&(r[h]=n.data.widgets[l].settings,Q(r,n.data.widgets,l,h)),d[h]=[{"data-ph-content-id":p,alias:"block1"}]}var m={views:n.data.widgets,settings:r,aliases:d};M.addWidgetTagsToNestedWidgets(m),function(e){var t=x.ddo.caasPageViews&&x.ddo.caasPageViews.data||{};for(var a in t.views=t.views||{},e.views)t.views[a]=e.views[a],ae(e.views[a].css||""),x.ddo.caasLazyLoadWidgetVersions=x.ddo.caasLazyLoadWidgetVersions||{status:"success"},x.ddo.caasLazyLoadWidgetVersions.data=x.ddo.caasLazyLoadWidgetVersions.data||{},e.views[a].script&&(x.ddo.caasLazyLoadWidgetVersions.data[e.views[a].widgetTag]=e.views[a].script);for(var n in e.settings)if(t.settings=t.settings||{},Object.keys(e.settings[n]||{}).length){t.settings[n]=t.settings[n]||{};var i=w({},e.settings[n].bindables||{},t.settings[n].bindables||{});t.settings[n]=e.settings[n]||{},t.settings[n].bindables=i}q.fetchEagerLoadScriptVersions()}(m);var u=x.ddo.caasPageViews&&x.ddo.caasPageViews.data||{};u.aliases=u.aliases||{};for(c=0;c<v.length;c++){p=v[c].getAttribute("data-ph-content-id");var h=v[c].getAttribute("instance-id")||"";u.aliases[h]&&u.aliases[h][0]&&u.aliases[h][0]["data-ph-content-id"]||!k.length||(u.aliases[h]=[{alias:"block1","data-ph-content-id":p}]);var g=v[c].getAttribute("data-ph-widget-id");p&&g&&!v[c].getAttribute("global-managed-widget")&&-1==y.contentIds.indexOf(p)&&y.contentIds.push(p)}o.length&&(ee(v),te(i,m)),s.length&&!f&&(ee(v),te(x.ddo[R],m))}return n}})}}function Z(e){var t=document.createElement("script");t.setAttribute("src",e),t.onload=function(){ae(x.brandVariables.variables,"variables")},document.head.appendChild(t)}function Q(i,s,e,o){var t=document.createElement("div");t.innerHTML=s[e].html;var a=t.querySelectorAll("pcs-widget");(a=Array.from(a)).forEach(function(e){var t=e.getAttribute("instance-id"),a=e.getAttribute("data-ph-widget-id"),n=o+"-"+t;i[n]=s[a].settings,Q(i,s,a,n)})}function ee(e){for(var t=0;t<e.length;t++){var a=e[t].getAttribute("instance-id");M.widgetTags=[],M.prepareWidgetBlock(e[t]);var n=document.querySelector('[instance-id="'+a+'"]');K.push({tags:M.widgetTags,elem:n})}ne(!0),M.widgetTags=[]}function te(e,t){if(e&&e.data){var a=N.compileContentModel(t.aliases,e)||{};for(var n in x.ddo[R]=x.ddo[R]||{},x.ddo[R].data=x.ddo[R].data||{},x.ddo[R].data.content=x.ddo[R].data.content||{},x.ddo[R].data.common=x.ddo[R].data.common||{},x.ddo[R].data.modelMappings=x.ddo[R].data.modelMappings||{},x.ddo[R].data)x.ddo[R].data[n]=w({},x.ddo[R].data[n],a.data[n])}return e}function ae(t,e){void 0===e&&(e=void 0);var a=document.createElement("style");a.setAttribute("type","text/css");var n=t;if("variables"==e){["1151px","767px","480px","340px","848px","366px","1024px","1279px"].forEach(function(e){n+="@media only screen and (max-width: "+e+") {"+t+"}"})}a.innerHTML=n,document.head.appendChild(a)}function ne(e){if(K.length){var t=K.splice(0,1);q.bootstrapWidgets(t[0].tags,function(){q.initialiseVue(t[0].elem,e),ne(!1)})}}if(!x.isEmbed){var ie=L.getSiteSettings("ignoreCookiePages")||[],se=x.pageName;if(-1==ie.indexOf(se))if(x.loadingPage)var oe=setInterval(function(){x.loadingPage||(clearInterval(oe),setTimeout(function(){X()},10))},100);else X()}e.fetchWidgetContent=function(e){var t={};for(var a in e=e||{},t.lang=x.locale||"en_us",t.pageId=e.pageId||x.pageId,t.deviceType=x.deviceType||"desktop",e)t.hasOwnProperty(a)||(t[a]=e[a]);return D.makeRequest(t,"caasWidgetContent").then(function(e){if(e&&e.status&&"success"===e.status)return e})},e.fetchCaasGetSiteContent=function(e){var t={};for(var a in e=e||{},t.lang=x.locale||"en_us",t.pageId=e.pageId||x.pageId,t.deviceType=x.deviceType||"desktop",e)t.hasOwnProperty(a)||(t[a]=e[a]);return D.makeRequest(t,"caasGetSiteContent").then(function(e){if(e&&e.status&&"success"===e.status)return e})},e.fetchWidgetView=function(e){var t={};for(var a in e=e||{},t.lang=x.locale||"en_us",t.pageId=x.pageId,t.deviceType=x.deviceType||"desktop",e)t.hasOwnProperty(a)||(t[a]=e[a]);return D.makeRequest(t,"caasWidgetView").then(function(e){if(e&&e.status&&"success"===e.status)return e})},e.init=X,e.initiateInnerWidgets=function(e){e&&$(e)},e.prepareWidgetBlocks=function(e){return M.prepareWidgetBlocks(e)},e.compileContentModel=function(e,t){return N.compileContentModel(e,t)},e.bootstrapWidgets=function(e){q.bootstrapWidgets(M.widgetTags,e)},e.addWidgetTagsToNestedWidgets=function(e){M.addWidgetTagsToNestedWidgets(e)},e.loadScript=function(e,t,a,n){return void 0===a&&(a=!0),void 0===n&&(n=!0),q.loadScript(e,t,a,n)},e.loadScriptById=function(e,t,a){return void 0===t&&(t=!0),void 0===a&&(a=!0),q.loadScriptById(e,t,a)},e.initiateAudienceWidgets=Y,e.initiateAutoRenderWidgets=function(e){return Y(e)},e.initateBlogRenderWidgets=function(t,e){var a=L.fetchReqObj(),n=z;a.pageId="blogpost-"+e,a.ignoreCache=!0,L.getDDOFromCache("caasBlogViews")&&(n="caasBlogViews",delete a.ignoreCache),D.makeRequest(a,n).then(function(e){return e&&e.data&&e.data.aliases&&(x.ddo[z].data.aliases=w({},x.ddo[z].data.aliases,e.data.aliases)),e&&e.data&&e.data.settings&&(x.ddo[z].data.settings=w({},x.ddo[z].data.settings,e.data.settings)),Y(t,R,a.pageId)})},e.initEmbedWidget=function(e){if(e&&e.target){var t,a=[],n=[];if((t="string"==typeof e.target?document.querySelector(e.target):e.target)&&e.viewData&&e.contentData){var i=e.viewData&&e.viewData.views||{},s=Math.random().toString(36).slice(2);t.setAttribute("data-embed-widget-id",s),x.ddo=x.ddo||{},x.ddo.caasPageViews=x.ddo.caasPageViews||{},x.ddo.caasPageViews.status="success",x.ddo.caasPageViews.data=x.ddo.caasPageViews.data||{},x.ddo.caasPageViews.data.views=x.ddo.caasPageViews.data.views||{},Object.keys(i).forEach(function(e){if(i[e].widgetTag){a.push(i[e].widgetTag);var t=L.getComponentName(i[e].widgetTag);n.push(t),x.ddo.caasPageViews.data.views[e]=i[e]}});var o=e.viewData.aliases||{},r=Object.keys(o)&&Object.keys(o)[0];x.ddo.caasPageViews.data.aliases=x.ddo.caasPageViews.data.aliases||{},x.ddo.caasPageViews.data.aliases[r]=e.viewData.aliases[r],console.log("executing embed script"),function(e,t){if(t&&t.content){var a=N.compileContentModel(e,t)||{};x.ddo[R]=x.ddo[R]||{},Object.keys(x.ddo[R]).length&&x.ddo[R].data&&a&&a.data?x.ddo[R].data=w({},x.ddo[R],a.data):x.ddo[R]=a,x.ddo[R].status="success"}else x.ddo[R]=x.ddo[R]||{},x.ddo[R].data=x.ddo[R].data||{},x.ddo[R].status="success"}(o,{data:JSON.parse(JSON.stringify(e.contentData)),content:JSON.parse(JSON.stringify(e.contentData.content)),status:"success"}),M.addWidgetTagsToNestedWidgets(e.viewData),M.prepareWidgetBlock(t),q.bootstrapWidgets(a,function(){q.initialiseEmbedVue(n,s,e.data)})}}},e.initVideoWidget=function(e){var t;if(e&&e.target){if(t="string"==typeof e.target?document.querySelector(e.target):e.target){t.style.display="block";var a=t.getAttribute("data-pcs-type");if(a&&"attr"==a){var n=document.createElement("div"),i={content:{},settings:e};n.setAttribute(t.getAttribute("data-pcs-type-value"),JSON.stringify(i)),t.appendChild(n),new Vue({el:t,data:{content:{}}})}}}else console.log("Invalid payload or missing required parameters ",e)},Object.defineProperty(e,"__esModule",{value:!0})});
