!function(){function e(e){setTimeout(function(){r.totalProcessed.AUTOFOCUS_ON_LOAD=0,t(e),window.addEventListener("popstate",t,!1)},1500)}function t(e){var t=document.activeElement;t&&["INPUT","TEXTAREA"].includes(t.tagName)?(t.blur(),t.setAttribute(r.DATA_ATTRIBUTE_NAME,"autofocus"),i=1):i=0,r.totalProcessed.AUTOFOCUS_ON_LOAD=i,0!==i&&UserWayWidgetApp.ContextHolder.config.services.siteId,e({postMessageAppData:i,backEndData:null,countFixed:i||0,countTodo:i||0})}var n=UserWayWidgetApp.addLib("REMEDIATION_AUTOFOCUS_ON_LOAD"),r=UserWayWidgetApp.getLib("remediation"),i=(UserWayWidgetApp.getLib("util"),0);n.filter=function(e){return[]},n.awaitForResources=function(e,t){return Promise.resolve()},n.doRemediation=function(t,n){return new Promise(function(t,n){try{e(t)}catch(e){n(e)}})}}(),function(){function e(){var e=UserWayWidgetApp.ContextHolder.config,t=e._userway_config.hasOwnProperty("ai_custom_focus_style_enabled");return t?t&&(!0===e._userway_config.ai_custom_focus_style_enabled||"true"===e._userway_config.ai_custom_focus_style_enabled):l.enabled}function t(e){var t={outline:l.outlineWidth+" "+l.outlineStyle+" "+l.outlineColor};return t["outline-offset"]="-"+l.outlineWidth,t}function n(e){if("function"==typeof e.hasAttribute&&e.hasAttribute(c)){var n=window.getComputedStyle(e),r=t(n);d.resetInlineStyles(e,c,r),e.removeAttribute(c)}}function r(e){e.target&&p&&u.addStyles(e.target)}function i(e){var t=e?"addEventListener":"removeEventListener";document[t]("mousedown",o),document[t]("keydown",a),document[t]("focusin",r),document[t]("focusout",m)}function o(){p=!1}function a(){p=!0}var u=UserWayWidgetApp.addLib("REMEDIATION_FOCUS_STYLE"),l=UserWayWidgetApp.getLib("remediationConfig").customFocus,d=UserWayWidgetApp.getLib("inlineStyling"),s=UserWayWidgetApp.getLib("remediation_utils"),c="data-uw-rm-outline",f={width:"2px",color:" #0018FF",style:"solid"},p=!1;u.apply=function(){var t,n,r,o;if(e()){var a=null===(r=null===(n=null===(t=UserWayWidgetApp.ContextHolder)||void 0===t?void 0:t.config)||void 0===n?void 0:n.tunings)||void 0===r?void 0:r.widget_color,u=(null===(o=UserWayWidgetApp.getLib("remediationConfig").customFocus.config)||void 0===o?void 0:o.style)?JSON.parse(UserWayWidgetApp.getLib("remediationConfig").customFocus.config.style):f;l.outlineWidth=u.width,l.outlineColor=u.color||a,l.outlineStyle=u.style,setTimeout(function(){i(!0)},500)}},u.getFocusStyle=function(){return{enabled:e(),outlineWidth:l.outlineWidth||f.width,outlineColor:l.outlineColor||f.color,outlineStyle:l.outlineStyle||f.style}},u.updateOutlineStyle=function(e){if(e.data&&(e.data.update||null!=e.data.enabled)){var t=e.data.update,r=e.data.enabled;l.outlineWidth=t.width,l.outlineStyle=t.style,l.outlineColor=t.color,l.enabled!==r&&(i(l.enabled),[].slice.call(document.querySelectorAll("["+c+"]")).forEach(function(e){n(e)}),l.enabled=r)}},u.addStyles=function(e){if(!e.hasAttribute(s.ignoreElementFromHelperProcessingAttr)){var n=window.getComputedStyle(e),r=t(n);d.applyInlineStyles(e,c,r),e.setAttribute(c,"")}};var m=function(e){e.target&&n(e.target)}}();var __read=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},__spreadArray=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};!function(){function e(e){return e.filter(function(e){var t,n,r,o,m,h,y,g;if("function"==typeof e.hasAttribute&&e.hasAttribute(u)||a.isInertElement(e)||!i.isElementVisible(e,{shouldBeInViewport:!1})||a.isNativeTabbableElement(e)||a.isAriaHiddenElement(e)||a.hasTabbableDescendants(e))return!1;if(e.classList&&e.classList.contains("betterbot_botInfoText"))return e.setAttribute(u,l.BETTERBOT_CHAT),!0;if("function"==typeof e.getAttribute&&d.indexOf(e.getAttribute("role"))>-1&&!e.hasAttribute("tabindex"))return e.setAttribute(u,l.HAS_ROLE_NO_TABINDEX),!0;var v=!1,b=!1;if("function"==typeof e.hasAttribute)try{for(var A=__values(s),E=A.next();!E.done;E=A.next()){var _=E.value;if(e.hasAttribute(_)&&!i.isElementEditable(e)){b=!1,v=!0;try{for(var w=(r=void 0,__values(c)),S=w.next();!S.done;S=w.next()){var W=S.value;e.hasAttribute(W)&&(b=!0)}}catch(e){r={error:e}}finally{try{S&&!S.done&&(o=w.return)&&o.call(w)}finally{if(r)throw r.error}}}}}catch(e){t={error:e}}finally{try{E&&!E.done&&(n=A.return)&&n.call(A)}finally{if(t)throw t.error}}if(v&&!b)return e.setAttribute(u,l.HAS_ONCLICK_NO_ONKEYPRESS),!0;var x=!1,O=!1,C=!1,N=["drag-and-drop"];if("function"==typeof e.hasAttribute){C=e.hasAttribute("tabindex");try{for(var k=__values(f),P=k.next();!P.done;P=k.next()){var _=P.value;if(N.indexOf(e.nodeName.toLowerCase())<0&&e.hasAttribute(_)&&!i.isElementEditable(e)){O=!1,x=!0;try{for(var L=(y=void 0,__values(p)),R=L.next();!R.done;R=L.next()){var W=R.value;e.hasAttribute(W)&&(O=!0)}}catch(e){y={error:e}}finally{try{R&&!R.done&&(g=L.return)&&g.call(L)}finally{if(y)throw y.error}}}}}catch(e){m={error:e}}finally{try{P&&!P.done&&(h=k.return)&&h.call(k)}finally{if(m)throw m.error}}}return!x||O||C?!("A"!==e.tagName||e.href||e.hasAttribute("tabindex")||e.hasAttribute("role"))&&(e.setAttribute(u,l.ANCHOR_NO_HREF),!0):(e.setAttribute(u,l.HAS_NGCLICK_NO_NGKEYPRESS),!0)})}function t(e,t,n,o,a){try{e.onHelperRemediationStarted("REMEDIATION_KEYBOARD_NAVIGATION");var d=0;o.forEach(function(e){var t=e.getAttribute(u);if(t)return d++,t===l.BETTERBOT_CHAT?(e.setAttribute("tabindex","0"),e.setAttribute("role","button"),e.setAttribute("aria-label","Start chat with us"),void i.clickOnEnter(e)):t===l.HAS_ROLE_NO_TABINDEX?(e.setAttribute("tabindex","0"),void i.clickOnEnter(e)):t===l.OVERFLOW_HELPER?void e.setAttribute("tabindex","0"):t===l.HAS_ONCLICK_NO_ONKEYPRESS?void i.clickOnEnter(e):t&&e.getAttribute(u)===l.HAS_NGCLICK_NO_NGKEYPRESS?(e.setAttribute("role","button"),e.setAttribute("tabindex","0"),void i.clickOnEnter(e)):t===l.ANCHOR_NO_HREF?(e.setAttribute("tabindex","0"),void("pointer"===window.getComputedStyle(e).cursor&&i.clickOnEnter(e))):void 0}),e.onHelperRemediationCompleted(r.of("REMEDIATION_KEYBOARD_NAVIGATION",null,null,d,0)),t()}catch(e){n(e)}}var n=UserWayWidgetApp.addLib("REMEDIATION_KEYBOARD_NAVIGATION"),r=UserWayWidgetApp.getLib("remediation_helper_outcome"),i=UserWayWidgetApp.getLib("remediation_util"),o=UserWayWidgetApp.getLib("util"),a=UserWayWidgetApp.getLib("remediation_utils"),u="data-uw-rm-kbnav",l={BETTERBOT_CHAT:"betterbot",HAS_ROLE_NO_TABINDEX:"role",HAS_ONCLICK_NO_ONKEYPRESS:"click",HAS_NGCLICK_NO_NGKEYPRESS:"ngclick",OVERFLOW_HELPER:"scrollTabIndex",ANCHOR_NO_HREF:"anohref"},d=["link","button","menuitem","checkbox"],s=["onclick"],c=["onkeydown","onkeyup","onkeypress"],f=["ng-click"],p=["ng-keypress","ng-keyup","ng-keydown"];n.filter=function(t,n){return n.reset,e([].concat.apply([],__spreadArray([],__read(t.map(function(e){return[].slice.call(o.findAllElements(e))})),!1)))},n.awaitForResources=function(e,t){return Promise.resolve()},n.doRemediation=function(e,n,r){return new Promise(function(i,o){t(e,i,o,n,r)})}}();var __read=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},__values=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},__spreadArray=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};!function(){function e(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}function t(e){var t=Array.from(e.children),n=t.filter(function(e){return"LI"===e.tagName&&!e.hasAttribute("role")});if(n.length)return n;var r=t.filter(function(e){return!e.hasAttribute("role")&&(["A","BUTTON"].includes(e.tagName)||e.hasAttribute("tabindex"))});return r.length?r:[]}function n(){var n,r,i=0,o=Array.from(document.querySelectorAll('*[role="menu"], *[role="menubar"]'));try{for(var a=__values(o),u=a.next();!u.done;u=a.next()){var l=u.value;!function(n){var r,o;if(!n.hasAttribute(m)){n.setAttribute(m,"");if(!Array.from(n.querySelectorAll('*[role="menuitem"], *[role="menuitemcheckbox"], *[role="menuitemradio"]')).length){i++;var a=t(n);try{for(var u=(r=void 0,__values(a)),l=u.next();!l.done;l=u.next()){var d=l.value;d.setAttribute("role","menuitem"),d.setAttribute(m,"menuitem")}}catch(e){r={error:e}}finally{try{l&&!l.done&&(o=u.return)&&o.call(u)}finally{if(r)throw r.error}}if(!a.length&&!e(n)){var s=n.getAttribute("role");n.setAttribute(m+"-role",s),n.removeAttribute("role"),f.onElementVisible(n,function(){if(n.hasAttribute(m+"-role")){var e=n.getAttribute(m+"-role");n.removeAttribute(m+"-role"),n.setAttribute("role",e)}})}}}}(l)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i}function r(){i("aria-labelledby"),i("aria-describedby")}function i(e){Array.from(document.querySelectorAll("*["+m+"-"+e+"]")).forEach(function(t){var n=t.getAttribute(m+"-"+e).split(" "),r=[],i=[];n.forEach(function(e){document.getElementById(e)?r.push(e):i.push(e)}),r.length&&t.setAttribute(e,r.join(" ")),i.length?i.length!==n.length&&t.setAttribute(m+"-"+e,i.join(" ")):t.removeAttribute(m+"-"+e)})}function o(){var e=0;return e+=a("aria-labelledby"),e+=a("aria-describedby")}function a(e){var t=0;return Array.from(document.querySelectorAll("*["+e+"]")).forEach(function(n){if(!n.hasAttribute(m)){var r=n.getAttribute(e).split(" "),i=[],o=[];r.forEach(function(e){document.getElementById(e)?i.push(e):o.push(e)}),o.length&&(n.setAttribute(m+"-"+e,o.join(" ")),i.length?n.setAttribute(e,i.join(" ")):n.removeAttribute(e)),t+=o.length}}),t}function u(e){var t=e.tagName.toLowerCase();if("s"===t||"strike"===t||"del"===t)return!0;var n=window.getComputedStyle(e);if(!!n.getPropertyValue("text-decoration")&&n.getPropertyValue("text-decoration").indexOf("line-through")>-1)return!0;var r=e.parentElement;return!(!r||"BODY"===r.tagName.toUpperCase())&&u(r)}function l(){var e,t,n=0,r=["NOSCRIPT","SCRIPT","style"],i=p.ElementsWithText.getElementsWithText(document,!1),o=i.filter(function(e){return!r.includes(e.tagName)}),a=["CAPTION","CODE","EM","SUP","SUB","INS","P","STRONG","B","MARK","I","U","CITE","SUGGESTION","TERM","TIME","SPAN","DIV","STRIKE","S","DEL"],l=["caption","code","emphasis","superscript","subscript","insertion","paragraph","strong","mark","suggestion","term","time","presentation","none"];try{for(var d=__values(o),s=d.next();!s.done;s=d.next()){var c=s.value;if(!c.hasAttribute(m)){var h=f.customTrim(c.innerText),y=h.match(/(?:[\$\xA2-\xA5\u058F\u060B\u09F2\u09F3\u09FB\u0AF1\u0BF9\u0E3F\u17DB\u20A0-\u20BD\uA838\uFDFC\uFE69\uFF04\uFFE0\uFFE1\uFFE5\uFFE6])(?:[^0-9.]*)([\d,.]+)/);h&&y&&y.length&&(c.setAttribute(m,""),u(c)&&(c.setAttribute("aria-label","Previous price was "+y[0]),function(e){var t=e.tagName,n=e.getAttribute("role");return a.includes(t)||l.includes(n)}(c)&&c.setAttribute("role","img"),c.setAttribute(m,"price"),n++))}}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}return n}function d(){[].slice.call(document.querySelectorAll("["+m+"]")).forEach(function(e){e.removeAttribute(m)})}var s=UserWayWidgetApp.addLib("REMEDIATION_SCREEN_READER_BASIC"),c=UserWayWidgetApp.getLib("remediation_helper_outcome"),f=UserWayWidgetApp.getLib("util"),p=UserWayWidgetApp.getLib("helpers"),m="data-uw-rm-sr";s.filter=function(e,t){return t.reset&&d(),[]},s.awaitForResources=function(){return Promise.resolve()},s.doRemediation=function(e){return new Promise(function(t,i){var a,u,d,s="v2"!==(null===(d=null===(u=null===(a=UserWayWidgetApp.ContextHolder)||void 0===a?void 0:a.config)||void 0===u?void 0:u.tunings)||void 0===d?void 0:d.screenReaderVersion),f=function(){var e,t,n,r,i,o,a,u=null===(t=null===(e=UserWayWidgetApp.ContextHolder)||void 0===e?void 0:e.config)||void 0===t?void 0:t.remediation,l=null===(r=null===(n=UserWayWidgetApp.ContextHolder)||void 0===n?void 0:n.config)||void 0===r?void 0:r.services,d=(null===(i=UserWayWidgetApp.ContextHolder)||void 0===i?void 0:i.config).isMobile;if(!(null===l||void 0===l?void 0:l.paidAi))return!0;var s=u&&u.REMEDIATION_SCREEN_READER_BASIC;if(!s)return!0;var c=!1!==(null===(a=null===(o=s.config)||void 0===o?void 0:o.mobile)||void 0===a?void 0:a.enabled);return s.enabled&&(!d||c)}();if(s&&f)try{e.onHelperRemediationStarted("REMEDIATION_SCREEN_READER_BASIC");var p=l();r();var m=o(),h=n();e.onHelperRemediationCompleted(c.of("REMEDIATION_SCREEN_READER_BASIC",null,null,p+m+h,0)),t(!0)}catch(e){i(e)}})}}();var __assign=this&&this.__assign||function(){return __assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};!function(){var e=UserWayWidgetApp.addLib("remediation_util"),t=UserWayWidgetApp.getLib("util");e.focusableElementsSelector='\n a[href]:not([tabindex^="-"], [inert], [hidden]), \n area[href]:not([tabindex^="-"], [inert], [hidden]), \n audio[controls]:not([tabindex^="-"], [inert], [hidden]), \n button:not([disabled], [tabindex^="-"], [inert], [hidden]), \n details:not([inert], [hidden]) summary:not([tabindex^="-"], [inert], [hidden]), \n input:not([disabled], [type="hidden"], [tabindex^="-"], [hidden]), \n iframe:not([tabindex^="-"], [inert], [hidden]), \n select:not([disabled], [tabindex^="-"], [inert], [hidden]), \n textarea:not([disabled], [tabindex^="-"], [inert], [hidden]), \n video[controls]:not([tabindex^="-"], [inert], [hidden]), \n map[name] area[href]:not([tabindex^="-"]),\n [tabindex]:not([tabindex^="-"], [inert], [hidden]), \n [contenteditable]:not([contenteditable="false"], [tabindex^="-"], [inert], [hidden])\n ',e.keys={isRightShift:function(e){return 16===e.keyCode||"Shift"===e.key||"ShiftRight"===e.code},isLeftShift:function(e){return 16===e.keyCode||"Shift"===e.key||"ShiftLeft"===e.code},isSpace:function(e){return 32===e.keyCode||" "===e.key||"Space"===e.code},isEnter:function(e){return 13===e.keyCode||"Enter"===e.key||"Enter"===e.code},isEsc:function(e){return 27===e.keyCode||"Escape"===e.key||"Escape"===e.code},isTab:function(e){return 9===e.keyCode||"Tab"===e.key||"Tab"===e.code},isHome:function(e){return 36===e.keyCode||"Home"===e.key||"Home"===e.code},isEnd:function(e){return 35===e.keyCode||"End"===e.key||"End"===e.code},isPageUp:function(e){return 33===e.keyCode||"PageUp"===e.key||"PageUp"===e.code},isPageDown:function(e){return 34===e.keyCode||"PageDown"===e.key||"PageDown"===e.code},isArrowLeft:function(e){return 37===e.keyCode||"ArrowLeft"===e.key||"ArrowLeft"===e.code},isArrowUp:function(e){return 38===e.keyCode||"ArrowUp"===e.key||"ArrowUp"===e.code},isArrowRight:function(e){return 39===e.keyCode||"ArrowRight"===e.key||"ArrowRight"===e.code},isArrowDown:function(e){return 40===e.keyCode||"ArrowDown"===e.key||"ArrowDown"===e.code},isPrintableChar:function(e){return 1===e.key.length&&e.key.match(/\S/)}},e.log=function(e,t,n){console.warn("UserWay remediation "+e+" - "+t+": "+n)},e.generateRandomId=t.generateRandomId,e.isElementEditable=function(e){function t(e){var t=e.nodeName.toLowerCase();return!!e.hasAttribute("contenteditable")||1===e.nodeType&&("textarea"===t||"input"===t&&/^(?:text|email|number|search|tel|url|password)$/i.test(e.type))}var n,r,i=t(e);if(i)return!0;try{for(var o=__values(Array.from(e.querySelectorAll("*"))),a=o.next();!a.done;a=o.next()){if(i=t(a.value))break}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},e.waitUntil=function(e,t,n,r){void 0===n&&(n=null),void 0===r&&(r=null),n=__assign({timeout:8e3,frequency:1e3},n||{});var i=Date.now();!function o(){var a=e();if(a)return t(a);setTimeout(function(){if(n.timeout&&Date.now()-i>n.timeout)return void(r&&r());o()},n.frequency)}()},e.trapFocusBetweenElements=function(t,n,r){void 0===r&&(r=null);var i=!1;window.addEventListener("keydown",function(t){e.keys.isLeftShift(t)&&(i=!0)}),window.addEventListener("keyup",function(t){e.keys.isLeftShift(t)&&(i=!1)}),t.setAttribute("tabindex","0"),document.activeElement&&r.contains(document.activeElement)||t.focus(),t.addEventListener("keydown",function(t){e.keys.isTab(t)&&i&&(t.preventDefault(),n.focus())}),n.setAttribute("tabindex","0"),n.addEventListener("keydown",function(n){e.keys.isTab(n)&&(i||(n.preventDefault(),t.focus()))})},e.trapFocusPopupElements=function(t,n){void 0===n&&(n=null);var r=!1;window.addEventListener("keydown",function(t){e.keys.isLeftShift(t)&&(r=!0)}),window.addEventListener("keyup",function(t){e.keys.isLeftShift(t)&&(r=!1)});var i=t[0],o=t[t.length-1];document.activeElement&&n.contains(document.activeElement)||i.focus(),t.forEach(function(n,a){n.addEventListener("keydown",function(n){e.keys.isTab(n)&&(n.preventDefault(),r?(t[a-1]?t[a-1]:o).focus():(t[a+1]?t[a+1]:i).focus())})})},e.trapFocusBetween=function(e){function t(e,t,r){if(9===r.keyCode)return n?t&&t.focus():e&&e.focus(),r.preventDefault();16===r.keyCode&&(n=!0)}for(var n=!1,r=[],i=0;i=0&&r.left>=0&&r.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&r.right<=(window.innerWidth||document.documentElement.clientWidth),o=0===r.width||0===r.height;return(e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0)&&(!t.shouldBeInViewport||i)&&!o&&"0"!==n.opacity&&"hidden"!==n.visibility&&"collapse"!==n.visibility},r=n(e,t);if(!t.skipParentCheck)for(;r&&e.parentNode&&e.parentNode!==document;)n(e.parentNode,{shouldBeInViewport:!1})?e=e.parentNode:r=!1;return r},e.fireEvent=function(e,t){if(e.fireEvent)e.fireEvent("on"+t);else{var n=document.createEvent("Events");n.initEvent(t,!0,!1),e.dispatchEvent(n)}},e.clickOnEnter=function(t){t&&"function"==typeof t.click&&!e.isElementEditable(t)&&t.addEventListener("keydown",function(n){e.keys.isEnter(n)&&(n.preventDefault(),t.click())})},e.clickOnSpace=function(t){t&&"function"==typeof t.click&&!e.isElementEditable(t)&&t.addEventListener("keydown",function(n){e.keys.isSpace(n)&&(n.preventDefault(),t.click())})},e.execOnPage=function(e,t){var n,r,i;if(Array.isArray(e))try{for(var o=__values(e),a=o.next();!a.done;a=o.next()){var u=a.value;if(i=new RegExp(u).test(window.location.href)){t();break}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}else(i=new RegExp(e).test(window.location.href))&&t();return i},e.getFocusableElement=function(t,n,r){t=t||"next",r=r||{},r.childrenOnly=r.childrenOnly||!1,r.canBeHidden=r.canBeHidden||!1;var i=Array.from((r.childrenOnly?n:document).querySelectorAll(e.focusableElementsSelector+(n?","+e.getCssPath(n):"")));r.canBeHidden||(i=i.filter(function(e){return!!e.offsetParent}));var o=i.findIndex(function(e){return!(!n||e!==n)||e===document.activeElement});return"next"===t?i[o+1]||i[0]:"prev"===t?i[o-1]||i[i.length-1]:void 0},e.getCssPath=function(e){for(var t=[];e.parentNode;){if(e.id){t.unshift("#"+e.id);break}if(e==e.ownerDocument.documentElement)t.unshift(e.tagName);else{for(var n=1,r=e;r.previousElementSibling;r=r.previousElementSibling,n++);t.unshift(e.tagName+":nth-child("+n+")")}e=e.parentNode}return t.join(" > ")},e.getElementPosition=function(e){for(var t=0,n=0;e;){if("BODY"==e.tagName){var r=e.scrollLeft||document.documentElement.scrollLeft,i=e.scrollTop||document.documentElement.scrollTop;t+=e.offsetLeft-r+e.clientLeft,n+=e.offsetTop-i+e.clientTop}else t+=e.offsetLeft-e.scrollLeft+e.clientLeft,n+=e.offsetTop-e.scrollTop+e.clientTop;e=e.offsetParent}return{x:t,y:n}};var n=[];e.onHistoryPushState=function(e,t){if(void 0===t&&(t={}),t=__assign({delay:300},t),n.push(e),1===n.length){if(window.history){var r=window.history.pushState;window.history.pushState=function(e){return"function"==typeof window.history.onpushstate&&window.history.onpushstate({state:e}),r.apply(window.history,arguments)}}var i;window.onpopstate=window.history.onpushstate=function(){clearTimeout(i),i=setTimeout(function(){return n.forEach(function(e){return e()})},t.delay)}}},e.announce=function(e){var t=document.createElement("div");t.setAttribute("aria-live","assertive"),t.style.width="0",t.style.height="0",t.style.overflow="hidden",document.body.insertAdjacentElement("afterbegin",t),setTimeout(function(){t.innerHTML=e},1e3),setTimeout(function(){t.remove()},1e4)},e.queryXPath=function(e,t){var n;void 0===t&&(t=null);var r=document.evaluate(e,t||document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null);return(null===r||void 0===r?void 0:r.singleNodeValue)&&(null===(n=null===r||void 0===r?void 0:r.singleNodeValue)||void 0===n?void 0:n.nodeType)===Node.ELEMENT_NODE?r.singleNodeValue:null},e.queryXPathAll=function(e,t){void 0===t&&(t=null);for(var n=document.evaluate(e,t||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null),r=[],i=0,o=n.snapshotLength;i=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};!function(){function e(e){var n=e.alt ;if(n&&n.trim())return n.trim();var r=e.getAttribute("aria-label");if(r&&r.trim())return r.trim();var i=e.getAttribute("aria-describedby");if(i){var o=t(i);if(o)return o}var a=e.getAttribute("aria-labelledby");if(a){var o=t(a);if(o)return o}return null}function t(e){var t=e.split(" "),n="";return t.forEach(function(e){e=e.trim();var t=document.getElementById(e);n+=t&&t.textContent?t.textContent:""}),n}var n,r=UserWayWidgetApp.addLib("remediation_utils");r.ignoreElementFromHelperProcessingAttr="data-uw-rm-ignore";var i=UserWayWidgetApp.getLib("util"),o=UserWayWidgetApp.getLib("inlineStyling"),a=UserWayWidgetApp.getLib("xpath_search"),u=UserWayWidgetApp.getLib("remediation_util");r.PROCESS_ATTRIBUTES={CER:{popup:{wrapper:"data-uw-cer-popup-wrapper",close:"data-uw-cer-popup-close"}}};var l={attrMarker:"uw-remediation",className:"uw-remediation-highlighting",styles:(n={border:"dashed 2px #c00"},n["border-radius"]="3px",n["box-shadow"]="0 0 0 4px yellow, inset 0 0 0 4px yellow",n)};r.sendBackEnd=function(e,t,n){var r={method:"POST",url:"https://api.userway.org/api"+e,header:{"Content-Type":"application/json"},body:{userId:UserWayWidgetApp.ContextHolder.config.services.userId,siteId:UserWayWidgetApp.ContextHolder.config.services.siteId}};return t&&(r.body.elements=t),"object"==typeof n&&Object.keys(n).map(function(e){r.body[e]=n[e]}),i.request(r)},r.highlightElements=function(e,t,n){var r,i,u,d,s=document.querySelectorAll("."+l.className);s.length&&s.forEach(function(e){o.resetInlineStyles(e,l.attrMarker,l.styles),e.classList.remove(l.className)});var c=[];switch(e){case"xpath":var f=a.recursiveXpathSearch(t);c="boolean"!=typeof f?[f]:[];break;case"href":var p=Array.prototype.slice.call(document.querySelectorAll("[href]"));try{for(var m=__values(p),h=m.next();!h.done;h=m.next()){var y=h.value;y.href.toLowerCase().indexOf(t)>-1&&c.push(y)}}catch(e){r={error:e}}finally{try{h&&!h.done&&(i=m.return)&&i.call(m)}finally{if(r)throw r.error}}break;case"src":var g=Array.prototype.slice.call(document.querySelectorAll("[src]"));try{for(var v=__values(g),b=v.next();!b.done;b=v.next()){var A=b.value;A.src.toLowerCase().indexOf(t)>-1&&c.push(A)}}catch(e){u={error:e}}finally{try{b&&!b.done&&(d=v.return)&&d.call(v)}finally{if(u)throw u.error}}break;case"attr":if(n.attrName){var E=document.querySelectorAll("["+n.attrName+'="'+t+'"]');c=Array.prototype.slice.call(E)}}for(var _=0;_=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};!function(){function e(e){var t,n,r=[].slice.call(m.findAllElements(e)),i=r.filter(function(e){var t,n,r=Array.from(e.attributes),i=!1;try{for(var o=__values(r),a=o.next();!a.done;a=o.next()){var u=a.value,l=u.value.toLowerCase();if(-1!==l.indexOf("close")||-1!==l.indexOf("dismiss")){i=!0;break}}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return i}),o=null,a=l().vw,u=Math.round(a/20);try{for(var d=__values(i),s=d.next();!s.done;s=d.next()){var c=s.value,f=c.offsetWidth,p=c.offsetHeight;if(f&&p&&f<=5*u){o=c;break}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=d.return)&&n.call(d)}finally{if(t)throw t.error}}return o}function t(e,t){var n,r,i=null;try{for(var o=__values(e[0]),a=o.next();!a.done;a=o.next()){var l=a.value,d=new Array(e.length).fill(0);d[0]=1;for(var s=1;s-1&&(d[s]=1)}if(d.every(function(e){return!!e})){i=l;break}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i&&0===e[0].indexOf(i)&&u(i.offsetWidth,t)<5&&(i=null),i}function n(e,t){return e.classList.contains("tt-dropdown-menu")||/datepicker/.test(e.getAttribute("class"))||!!e.id&&"klevuSearchingArea"===e.id||e.hasAttribute("data-uw-rm-ignore")||!!Array.from(document.querySelectorAll("nav")).find(function(t){return e.contains(t)})||!!e.querySelector("[class*='search']")}function r(e){var t=window.getComputedStyle(e),r="none"===t.display,i="fixed"===t.position,o=parseFloat(t.width),a=parseFloat(t.height),l=u(o,document.body.offsetWidth),d=u(a,document.body.offsetHeight);return l>=10&&d>=10&&i&&!r&&o&&a&&!n(e,t)}function i(e){var t=null;if(!e)return t;for(;e&&"BODY"!==e.tagName;){if(r(e)){t=e;break}e=e.parentElement}return t}function o(){return/^([^.]+\.)?manage\..*userway\.(dev|org)$/.test(window.location.host)}function a(){if(114355===f.services.siteId||990479===f.services.siteId||o())return null;var e=l(),n=e.vw,r=e.vh,a=Math.round(n/2),u=Math.round(r/2),d=Math.round(3*n/4),s=Math.round(r/4),c=u+Math.round(r/4),p=Math.round(n/20),m=Math.round(r/20),h=[{x:a,y:u-m},{x:a+p,y:u},{x:a,y:u+m},{x:a-p,y:u}],y=[{x:d,y:u-m},{x:d+p,y:u},{x:d,y:u+m},{x:d-p,y:u}],g=[{x:a,y:s},{x:a-p,y:s+m},{x:a+p,y:s+m}],v=[{x:a,y:c},{x:a-p,y:c-m},{x:a+p,y:c-m}],b=document.elementsFromPoint(h[0].x,h[0].y),A=document.elementsFromPoint(h[1].x,h[1].y),E=document.elementsFromPoint(h[2].x,h[2].y),_=document.elementsFromPoint(h[3].x,h[3].y),w=i(t([b,A,E,_],n));if(w)return w;var S=document.elementsFromPoint(g[0].x,g[0].y),W=document.elementsFromPoint(g[1].x,g[1].y),x=document.elementsFromPoint(g[2].x,g[2].y),O=i(t([S,W,x],n));if(O)return O;var C=document.elementsFromPoint(v[0].x,v[0].y),N=document.elementsFromPoint(v[1].x,v[1].y),k=document.elementsFromPoint(v[2].x,v[2].y),P=i(t([C,N,k],n));if(P)return P;var L=document.elementsFromPoint(y[0].x,y[0].y),R=document.elementsFromPoint(y[1].x,y[1].y),T=document.elementsFromPoint(y[2].x,y[2].y),U=document.elementsFromPoint(y[3].x,y[3].y),H=i(t([L,R,T,U],n));return H||null}function u(e,t){return Math.abs(e-t)/((e+t)/2)*100}function l(){return{vw:Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),vh:Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)}}var d=UserWayWidgetApp.addLib("cer_observer"),s=UserWayWidgetApp.getLib("event_emitter"),c=UserWayWidgetApp.getLib("remediation_utils"),f=UserWayWidgetApp.ContextHolder.config,p=UserWayWidgetApp.getLib("remediationConfig").popups,m=UserWayWidgetApp.getLib("util"),h=[];d.tick=function(t){var n=t.processParameters;n.debugMode&&console.log("CER observer: tick");var r,i=null;if(n.debugMode&&(r=performance.now()),p.enabled){var o=null;try{o=a()}catch(e){n.debugMode&&console.error(e)}if(o){o.setAttribute(c.PROCESS_ATTRIBUTES.CER.popup.wrapper,"");if(-1===h.indexOf(o)){s.emitEvent("UW_CER_POPUP_FOUND",[o]),h.push(o);var u=null;try{u=e(o)}catch(e){n.debugMode&&console.error(e)}u&&u.setAttribute(c.PROCESS_ATTRIBUTES.CER.popup.close,""),s.emitEvent("UW_CER_POPUP_ON",[[o,u]]),n.debugMode&&console.log("CER observer: POPUP found",o,u)}}else h.forEach(function(e){s.emitEvent("UW_CER_POPUP_OFF",[e]),n.debugMode&&console.log("CER observer: POPUP closed",e)}),h=[]}n.debugMode&&(i=performance.now(),console.log("CER observer tick: execution took "+(i-r)+" milliseconds."))}}();var __read=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},__spreadArray=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i-1)return!0;if(!x.commonSettings)return!1;var e=x.commonSettings,t=e.enabled,n=e.config,r=n.mobile,i=n.disabledPages;return!t||(!(!UserWayWidgetApp.ContextHolder.config.isMobile||!r||r.enabled)||!(null===i||void 0===i||!i.some(function(e){var t;return(null===(t=window.location)||void 0===t?void 0:t.href.indexOf(e))>-1})))},D=!!O.remediation&&!I(),M=!1;try{UserWayWidgetApp.setDebugMode=function(e){e?(window.localStorage.setItem("userway-rm-debug","1"),console.log("UserWay Remediation: Debug mode enabled")):window.localStorage.removeItem("userway-rm-debug")},M=window.localStorage.getItem("userway-rm-debug")}catch(e){}var F={iterationInProgress:!1,locationChanged:!0,domChangesEnqueued:[],completedEventFired:!1,debugMode:M},B=D?["REMEDIATION_SCREEN_READER_BASIC"]:[],q=D?[function(e){return U?null:e}("REMEDIATION_KEYBOARD_NAVIGATION")].filter(Boolean):[],j=[],Y=[],V=D?["REMEDIATION_FOCUS_STYLE","REMEDIATION_POPUP"]:[],K=[].concat(B,q,j,Y),G=function(){function n(){}return n.prototype.onHelperRemediationStarted=function(t){e(t)},n.prototype.onHelperRemediationCompleted=function(e){e.backEndData&&e.backEndData.items.length&&E.sendBackEnd("/remediation/"+e.backEndData.path,e.backEndData.items,e.backEndData.props),C.put(e),p(e.helperName,C.getHelperPostMessagePayload(e.helperName)),t(e.helperName)},n}();v.HelperCallbackAggregator=new G,(!R||function(){return T.hasAttribute("data-uw-w-kb")}()||UserWayWidgetApp.ContextHolder.config.isMobile)&&u();var X={"get-site-info":f,"remediation-count":s,"all-data":c,"element-is-visible":function(e){var t=JSON.parse(e.data.data),n=t.elements.map(function(e){return[e,E.isElementVisible(e)]});p("element-is-visible",{key:t.key,elements:n})},"element-highlight":function(e){var t=e.data.data.type,n=e.data.data.value?e.data.data.value.toLowerCase():"",r=Object.assign({scroll:!0},e.data.data.options||{});E.highlightElements(t,n,r)},"app-key-nav-enabled":function(e){d(e)},remediation:function(e){var t=e.data.type;C.get()[t]&&p(t,C.getHelperPostMessagePayload(t))},"remediation-check":function(){o()},"add-dynamically":l},Q=UserWayWidgetApp.getLib("REMEDIATION_FOCUS_STYLE"),J={"custom-focus-get":function(e){p("custom-focus-get",Q.getFocusStyle())},"custom-focus-update":function(e){e.data&&e.data.data&&Q.updateOutlineStyle(e.data)}},Z=Object.assign({},X,J),z=function(t){var n=t.data||{};if(n.isUserWay&&("remediation"===n.action||"aria-editor"===n.action)){var r=t.data.type;if(-1!==Object.keys(Z).indexOf(r)){e(r);(0,Z[r])(t),e(r)}else Z.remediation(t)}};_.registerPostMessageListener(z)}();