var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(t,e,r)=>e in t?__defProp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,__spreadValues=(t,e)=>{for(var r in e||(e={}))__hasOwnProp.call(e,r)&&__defNormalProp(t,r,e[r]);if(__getOwnPropSymbols)for(var r of __getOwnPropSymbols(e))__propIsEnum.call(e,r)&&__defNormalProp(t,r,e[r]);return t},__spreadProps=(t,e)=>__defProps(t,__getOwnPropDescs(e)),__objRest=(t,e)=>{var r={};for(var n in t)__hasOwnProp.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&__getOwnPropSymbols)for(var n of __getOwnPropSymbols(t))e.indexOf(n)<0&&__propIsEnum.call(t,n)&&(r[n]=t[n]);return r},__async=(t,e,r)=>new Promise(((n,i)=>{var o=t=>{try{l(r.next(t))}catch(e){i(e)}},a=t=>{try{l(r.throw(t))}catch(e){i(e)}},l=t=>t.done?n(t.value):Promise.resolve(t.value).then(o,a);l((r=r.apply(t,e)).next())}));!function(){"use strict";const t=(t,e=["userway"])=>{const r=__spreadProps(__spreadValues({},t),{isUserWay:!0});e.forEach((t=>{let e=window.frames[t];if(!e||"function"!=typeof e.postMessage)try{e=document.querySelector(`iframe[name=${t}]`),e=e?e.contentWindow:null}catch(n){console.error(n)}e&&e.postMessage(r,"*")}))},e=(t,e)=>{if(t===document)return!0;const r=t,n=getComputedStyle(r),i=r.getBoundingClientRect(),o=(t=>t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth))(i),a=0===i.width||0===i.height,l="0"!==n.opacity&&"hidden"!==n.visibility&&"none"!==n.display&&"collapse"!==n.visibility;return(r.offsetWidth>0||r.offsetHeight>0||r.getClientRects().length>0)&&(!e.shouldBeInViewport||o)&&!a&&l},r=t=>{if(["#text","#comment"].includes(t.nodeName))return!1;let e=t.getAttribute("aria-hidden"),r=t.getAttribute("hidden");return(t=>"none"===window.getComputedStyle(t).display)(t)||"true"===e||null!==r&&""!==r},n=["NOSCRIPT","SCRIPT","style"],i=(t,e)=>{var o;for(let a=0;a{let r=e;return(e=i(t.childNodes,r)).replace(/\s+/g," ").trim()},a=t=>{let e=t.split(" "),r="";for(let n=0;n{var e,r,n;let i=null!=(r=null==(e=t.getAttribute("aria-label"))?void 0:e.trim())?r:"";const o=t.getAttribute("aria-describedby");if(i+=o?u(o):"",i)return i.toLowerCase();const a=t.getAttribute("aria-labelledby");if(a&&(i+=u(a)),i.trim())return i.toLowerCase();if(i=null!=(n=t.textContent)?n:"",i.trim())return i.toLowerCase();if("INPUT"===t.tagName){const e=t;if(i=e.value||"",i.trim()&&e.type&&["button","submit","reset"].includes(e.type.toLowerCase()))return i.toLowerCase()}if(!t.hasChildNodes())return null;let l=t.querySelector('img, *[role="img"]');return l&&(i=s(l)||"",i.trim())?i.toLowerCase():null},s=t=>{const e=t.alt;if(e&&e.trim())return e.trim();const r=t.getAttribute("aria-label");if(r&&r.trim())return r.trim();const n=t.getAttribute("aria-describedby");if(n){const t=u(n);if(t)return t}const i=t.getAttribute("aria-labelledby");if(i){let t=u(i);if(t)return t}return null},u=t=>t.split(" ").reduce(((t,e)=>{var r;const n=document.getElementById(e.trim());return t+(null!=(r=null==n?void 0:n.textContent)?r:"")}),""),c=()=>"uw"+(~~(1e8*Math.random())).toString(16),d=(t,e=0)=>{let r=3735928559^e,n=1103547991^e;for(let i,o=0;o>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),4294967296*(2097151&n)+(r>>>0)},p=(t,e=!1)=>{var r;if("html"===t.nodeName.toLowerCase())return"/HTML";if("body"===t.nodeName.toLowerCase())return"/HTML/BODY";if("head"===t.nodeName.toLowerCase())return"/HTML/HEAD";let n=0;const i=null==(r=t.parentElement)?void 0:r.children;if(!i)return"";for(let o=0;o{const i=e[n],o=t.getAttribute(i)||"";return t.hasAttribute&&t.hasAttribute(i)&&""!==o?r+";"+n+":"+d(o):r}),"|"+r)}const f=new RegExp("^(data:)"),g=new RegExp("(.)(gif|jpe?g|tiff?|png|webp|bmp)","i"),b=t=>{if(f.test(t))return t;t&&(t=t.replace(/^(http|https)(:\/\/)/,"").replace(/^(www\.)/,""));const e=t.match(g);return(null==e?void 0:e.index)&&(null==e?void 0:e.length)?t.substring(0,e.index+e[0].length):t.split("?")[0]},h=(t,e,r=!1)=>t.reduce(((t,n)=>{const i=r&&n.position?":nth-of-type("+n.position+")":"";return t+=n.tag+i+(n.idx>=e?">":" ")}),"").slice(0,-1),A=(t,e)=>{if(null===e)return!0;const r=t.innerText?d(t.innerText).toString():"";if(e.innerText.toString()!==r)return!1;const n=t.hasAttribute("href")?d(t.getAttribute("href")).toString():"";if(e.href&&e.href!==n)return!1;const i=t.hasAttribute("src")?d(t.getAttribute("src")).toString():"";return!e.src||e.src===i},y=(t,e=null,r)=>{const n=(i=t,[].slice.call(document.querySelectorAll(i)));var i;if(1===n.length){if(null==r.params)return n[0];if(A(n[0],e))return n[0]}if(n.length>1){if(null==r.params)return null;const t=n.filter((t=>A(t,e)));if(1===t.length)return t[0]}return null};var E=(t=>(t[t.Strict=0]="Strict",t[t.Medium=1]="Medium",t[t.Loose=2]="Loose",t))(E||{});const v={i:"innerText",s:"src",h:"href"},T=t=>{const[e,r]=t.split("|");let n={innerText:""};if(r){const[t,...e]=r.split(";");n.innerText=t,e.forEach((t=>{const[e,r]=t.split(":");n[v[e]]=r}))}return{xpath:e,params:n}},w=t=>{const{xpath:e,params:r}=T(t),n=((t,e)=>{const r=("/"===t[0]?t.slice(1):t).split("/");return r.map(((t,n)=>{const i=t.toLowerCase(),[,o,a]=i.match(/(\S+)\[(\S+)?\]/)||[,i],l=r.length-1===n,s={idx:n,tag:o};return a&&(s.position=+a),l&&e&&(s.params=e),s}))})(e,r);return((t,e=4)=>{let r=t.length-2-e;const n=t[t.length-1];let i;const o=n.params;if(r<0){i=h(t,0,!0);return y(i,o,n)||(i=h(t,0),y(i,o,n))}const a=a=>{for(r=t.length-2-e;r>=0;r--){i=a===E.Loose?h(t.slice(0,2).concat(...t.slice(-r-e)),t.length-e):h(t,t.length-e-r-1,a===E.Strict);const l=y(i,o,n);if(l)return l}},l=[E.Strict,E.Medium,E.Loose];for(let s=0;s{const{xpath:e,params:r}=T(t),n=document.evaluate(e,document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue;return n&&A(n,r)?n:null},_=t=>{let e=t.closest("label"),r="";if(e){for(let t of e.childNodes)t.nodeType===Node.TEXT_NODE&&(r+=t.textContent);if(r.trim())return r.trim()}if(t.id){let e=(t=>{const e=document.querySelectorAll("LABEL");for(let r=0;rt.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"),S=t=>{try{const e=new URL(t);return["http:","https:"].includes(e.protocol)}catch(e){return!1}},C=t=>!(t instanceof HTMLElement)||L.some((e=>t.hasAttribute(e)))||I.some((e=>t.classList.contains(e)))||x.includes(t.nodeName.toLowerCase()),R=(t,e)=>{try{if("childList"===e){const e=[...t.addedNodes].reduce(((t,e)=>{if(e instanceof HTMLElement){const r=[...e.getElementsByTagName("*")];return[...t,...r]}return t}),[]);return[].filter.call([...t.addedNodes,...e],(t=>!C(t)))}return"attributes"===e?C(t.target)?[]:[t.target]:[]}catch(r){return[]}},M=t=>__async(this,null,(function*(){const e=yield fetch(t);return yield e.json()})),D={AriaEditorValues:[],BrokenLink:[],Contrast:[],EmptyControls:[],ExternalLink:[],Forms:[],Headings:[],Language:[],MissingAlts:[],Pdfs:[],VagueLinks:[]},k=UserWayWidgetApp.ContextHolder.config.remediation,P=UserWayWidgetApp.ContextHolder.config.tunings,B=UserWayWidgetApp.ContextHolder.config.services,U=UserWayWidgetApp.ContextHolder.config.imageAlt,{isMobile:W,language:j}=UserWayWidgetApp.ContextHolder.config;let H={};function $(t){H=__spreadValues({},t)}function F(){return H}const V=()=>__async(this,null,(function*(){if(null==k?void 0:k.consolidated){const t=yield M(k.consolidated);return t.MissingAlts.reverse(),void $(t)}$(D)})),X="https://api.userway.org/api/";var q=(t=>(t.Remediation="remediation",t.AriaEditor="aria-editor",t))(q||{}),G=(t=>(t.KeyboardNavEnabled="app-key-nav-enabled",t))(G||{});const K=t=>{const e=UserWayWidgetApp.getLib("util"),{registerPostMessageListener:r}=e;return r((e=>{var r;(null==(r=null==e?void 0:e.data)?void 0:r.isUserWay)&&t(e)}))},z=document.documentElement,Z={attributes:!0,attributeFilter:["aria-label","alt"],childList:!0,subtree:!0},Y=new Set,Q=t=>{Y.add(t)},J=new MutationObserver((t=>{const e=(t=>{const e=[];for(const r of t)e.push(...R(r,r.type));return e})(t);e.length&&Y.forEach((t=>t(e)))})),tt=[{src:"wave.min.js",name:"Wave"},{src:"axe.min.js",name:"BrowserStack"}],et=[{url:"wave.webaim.org",name:"Wave"}],rt=(t,e)=>{try{const r=[];return"childList"===e&&t.addedNodes.length&&t.addedNodes.forEach((t=>{const e=(t=>{if("script"===t.nodeName.toLowerCase()){const e=tt.find((e=>t.src.includes(e.src)));if(e)return e}return"iframe"===t.nodeName.toLowerCase()&&t.title.toLowerCase().includes("equalweb")?{name:"EqualWeb"}:null})(t);e&&r.push(e)})),r}catch(r){return[]}},nt=(t,e)=>__async(this,null,(function*(){const{account:r}=UserWayWidgetApp.ContextHolder.config,n={date:(new Date).toISOString(),url:window.location.href,scannerName:t,a11yScore:e};yield fetch(`${X}scaner-activity/${r}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}).catch((t=>{console.log(t)}))})),it=t=>{try{UserWayWidgetApp.getLib("scan_manager").accessibilityScore().then((e=>{nt(t,e)}))}catch(e){console.log(e)}},ot=document.documentElement,at={childList:!0,subtree:!0},lt=new MutationObserver((t=>{const e=(t=>{const e=[];for(const r of t)e.push(...rt(r,r.type));return e})(t)[0];e&&it(e.name)}));const st="object"==typeof global&&global&&global.Object===Object&&global;var ut="object"==typeof self&&self&&self.Object===Object&&self;const ct=st||ut||Function("return this")();const dt=ct.Symbol;var pt=Object.prototype,mt=pt.hasOwnProperty,ft=pt.toString,gt=dt?dt.toStringTag:void 0;var bt=Object.prototype.toString;var ht="[object Null]",At="[object Undefined]",yt=dt?dt.toStringTag:void 0;function Et(t){return null==t?void 0===t?At:ht:yt&&yt in Object(t)?function(t){var e=mt.call(t,gt),r=t[gt];try{t[gt]=void 0;var n=!0}catch(o){}var i=ft.call(t);return n&&(e?t[gt]=r:delete t[gt]),i}(t):function(t){return bt.call(t)}(t)}var vt="[object Symbol]";var Tt=/\s/;var wt=/^\s+/;function Nt(t){return t?t.slice(0,function(t){for(var e=t.length;e--&&Tt.test(t.charAt(e)););return e}(t)+1).replace(wt,""):t}function _t(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var xt=NaN,It=/^[-+]0x[0-9a-f]+$/i,Lt=/^0b[01]+$/i,Ot=/^0o[0-7]+$/i,St=parseInt;function Ct(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return null!=t&&"object"==typeof t}(t)&&Et(t)==vt}(t))return xt;if(_t(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=_t(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Nt(t);var r=Lt.test(t);return r||Ot.test(t)?St(t.slice(2),r?2:8):It.test(t)?xt:+t}const Rt=function(){return ct.Date.now()};var Mt="Expected a function",Dt=Math.max,kt=Math.min;function Pt(t,e,r){var n,i,o,a,l,s,u=0,c=!1,d=!1,p=!0;if("function"!=typeof t)throw new TypeError(Mt);function m(e){var r=n,o=i;return n=i=void 0,u=e,a=t.apply(o,r)}function f(t){var r=t-s;return void 0===s||r>=e||r<0||d&&t-u>=o}function g(){var t=Rt();if(f(t))return b(t);l=setTimeout(g,function(t){var r=e-(t-s);return d?kt(r,o-(t-u)):r}(t))}function b(t){return l=void 0,p&&n?m(t):(n=i=void 0,a)}function h(){var t=Rt(),r=f(t);if(n=arguments,i=this,s=t,r){if(void 0===l)return function(t){return u=t,l=setTimeout(g,e),c?m(t):a}(s);if(d)return clearTimeout(l),l=setTimeout(g,e),m(s)}return void 0===l&&(l=setTimeout(g,e)),a}return e=Ct(e)||0,_t(r)&&(c=!!r.leading,o=(d="maxWait"in r)?Dt(Ct(r.maxWait)||0,e):o,p="trailing"in r?!!r.trailing:p),h.cancel=function(){void 0!==l&&clearTimeout(l),u=0,n=s=i=l=void 0},h.flush=function(){return void 0===l?a:b(Rt())},h}function Bt(t,e,r){var n=!0,i=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return _t(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),Pt(t,e,{leading:n,maxWait:e,trailing:i})}const Ut="AUTO";let Wt=!0;var jt=(t=>(t.TABINDEX="tabindex",t.ROLE="role",t.TYPE="type",t.SRC="src",t.ARIA_LEVEL="ariaLevel",t.ORIGINAL_ALT="originalAlt",t))(jt||{}),Ht=(t=>(t.UNKNOWN="UNKNOWN",t.NOT_ALLOWED="NOT_ALLOWED",t.TEXT_NODE="TEXT_NODE",t.LANDMARK="LANDMARK",t.CONTROL="CONTROL",t.HEADING="HEADING",t.HAS_ALT_DESCRIPTION="HAS_ALT_DESCRIPTION",t.COMPOSED_TEXT_NODES="COMPOSED_TEXT_NODES",t.IFRAME="IFRAME",t.HIDDEN_FOR_READER="HIDDEN_FOR_READER",t))(Ht||{}),$t=(t=>(t.UNKNOWN="unknown",t.TEXT="text",t.IMAGE="image",t.HEADING="heading",t.FOOTER="footer",t.HEADER="header",t.NAV="nav",t.MAIN="main",t.FORM="form",t.LANDMARK="landmark",t.LINK="link",t.BUTTON="button",t.CHECKBOX="checkbox",t.RADIOBUTTON="radiobutton",t.INPUT="input",t.TEXTAREA="textarea",t.SELECT="select",t.ABBR="abbr",t.LIST_ITEM="list item",t))($t||{});const Ft="accessibility-tree-observer",Vt=["uw-sl","uwy","uw-s10-reading-guide","uw-s12-tooltip"],Xt=(t,e)=>e.ariaLabel?e.ariaLabel:e.ariaLabelledBy?a(e.ariaLabelledBy):o(t,""),qt={},Gt=UserWayWidgetApp.getLib("accessibility_tree_walker");let Kt,zt=[],Zt=1;const Yt=(t,e)=>{var r;if(zt=[],(t=>{const e=3===t.nodeType;return Vt.some((e=>!!t.closest&&t.closest(`.${e}`)))||!e&&t.hasAttribute("data-uw-rm-ignore")})(t)&&!e)return null;const n={node:t,type:Gt.identifyElementType(t)},i=(t=>{if(!t||!t.type)return{};const{node:e}=t;return[Ht.UNKNOWN,Ht.NOT_ALLOWED,Ht.TEXT_NODE].includes(t.type)?{uwAtoId:e.uwAtoId}:{tagName:e.tagName,tabindex:e.getAttribute("tabindex")||"",role:e.getAttribute("role")||"",ariaLevel:e.getAttribute("aria-level")||"",ariaLabel:e.getAttribute("aria-label")||"",ariaLabelledBy:e.getAttribute("aria-labelledby")||"",type:e.getAttribute("type")||"",uwAtoId:e.uwAtoId}})(n);Kt=Gt.identifyElementType(t);const l=Kt===Ht.HIDDEN_FOR_READER;let s,u;switch(zt=(t=>(t.tabindex&&zt.push({name:jt.TABINDEX,value:t.tabindex}),t.role&&zt.push({name:jt.ROLE,value:t.role}),t.type&&zt.push({name:jt.TYPE,value:t.type}),t.ariaLevel&&zt.push({name:jt.ARIA_LEVEL,value:t.ariaLevel}),zt))(i),l&&((t,e)=>{const r=t.cloneNode(!0);r.removeAttribute("aria-hidden"),Kt=Gt.identifyElementType(r),Kt!==Ht.UNKNOWN||"IMG"!==e.tagName&&"img"!==e.role||(Kt=Ht.HAS_ALT_DESCRIPTION)})(t,i),Kt){case Ht.TEXT_NODE:s=(t=>{const e=$t.TEXT;let r="";t.textContent&&(r=t.textContent.trim().replace(/(\n|\r\n)/g,"").replace(/\s+/g," "));const n={};return t.parentElement&&(n.parentXpath=p(t.parentElement)),{semanticType:e,textToRead:r,additionalParams:n}})(t),qt.parentXpath=null==(r=s.additionalParams)?void 0:r.parentXpath;break;case Ht.COMPOSED_TEXT_NODES:s=((t,e)=>({semanticType:"LI"===e.tagName?$t.LIST_ITEM:$t.TEXT,textToRead:e.ariaLabel||o(t,"")}))(t,i);break;case Ht.HIDDEN_FOR_READER:s={semanticType:$t.UNKNOWN,textToRead:""};break;case Ht.HEADING:s=((t,e)=>({semanticType:$t.HEADING,textToRead:e.ariaLabel||o(t,"")}))(t,i);break;case Ht.LANDMARK:s=(t=>{let e,r="";t.ariaLabel?r=t.ariaLabel:t.ariaLabelledBy&&(r=a(t.ariaLabelledBy));const{tagName:n}=t,{role:i}=t;return e="FOOTER"===n||"contentinfo"===i?$t.FOOTER:"HEADER"===n||"banner"===i?$t.HEADER:"FORM"===n||"form"===i?$t.FORM:"MAIN"===n||"main"===i?$t.MAIN:"NAV"===n||"navigation"===i?$t.NAV:$t.LANDMARK,{semanticType:e,textToRead:r}})(i);break;case Ht.CONTROL:s=((t,e)=>{const{tagName:r,role:n,type:i,ariaLabel:o,ariaLabelledBy:l}=e;let s=!1,u="",c=$t.TEXT;return"menuitem"===n||"option"===n?(u=Xt(t,e),s=!0):"link"===n||"A"===r&&!n?(c=$t.LINK,u=Xt(t,e),s=!0):"button"===n||"BUTTON"===r?(c=$t.BUTTON,u=Xt(t,e),s=!0):"INPUT"!==r||"button"!==i&&"submit"!==i&&"reset"!==i||(c=$t.BUTTON,o?u=o:l&&(u=a(l)),s=!0),s||(u=_(t),"checkbox"===n||"INPUT"===r&&"checkbox"===i?c=$t.CHECKBOX:"radio"===n||"INPUT"===r&&"radio"===i?c=$t.RADIOBUTTON:"INPUT"===r&&(c=$t.INPUT),"TEXTAREA"===r&&(c=$t.TEXTAREA),"SELECT"===r&&(c=$t.SELECT)),{semanticType:c,textToRead:u}})(t,i);break;case Ht.HAS_ALT_DESCRIPTION:s=((t,e,r)=>{const{tagName:n,role:i,ariaLabel:o}=e,a=t.getAttribute("alt")||"",l=t.getAttribute("title")||"",s=t.getAttribute("data-uw-rm-ima-original")||"";let u="",c=$t.TEXT;const d=r;return"IMG"!==n&&"img"!==i||(c=$t.IMAGE,d.push({name:jt.SRC,value:t.src}),d.push({name:jt.ORIGINAL_ALT,value:s}),u=o||a||s||u),"ABBR"===n&&(c=$t.ABBR,u=l),{semanticType:c,textToRead:u,attributesToReturn:d}})(t,i,zt),s.attributesToReturn&&(zt=s.attributesToReturn);break;case Ht.UNKNOWN:s=((t,e)=>{let r=$t.TEXT;return"DIV"!==e.tagName||t.innerHTML||(r=$t.LANDMARK),{semanticType:r,textToRead:""}})(t,i);break;default:s={textToRead:"",semanticType:$t.TEXT}}return i.uwAtoId?u=i.uwAtoId:(u=Zt,Zt+=1,n.node.uwAtoId=u),__spreadValues({id:u,xpath:p(t),label:s.textToRead.replace(/\|/g,"").trim(),tagName:i.tagName||"",type:s.semanticType,hidden:l,attributes:zt,el:n.node},qt)},Qt=UserWayWidgetApp.getLib("accessibility_tree_walker");let Jt=[];const te=()=>{let e=null;Jt=[];do{const t=Qt.getNextAccessibilityTreeNode(e);if(!t)break;const r=Yt(t.node);r&&Jt.push(r),e=t.node}while(e);Jt=Jt.map((t=>{const e=t,{el:r}=e;return __objRest(e,["el"])})),t({action:Ft,type:"userway:ato-output:get",data:{nodes:Jt,version:Date.now()}},["uwAccessibilityEditor"])},ee=()=>Jt,re={enabled:!1},ne={"userway:ato-input:enable":()=>{re.enabled||(re.enabled=!0,Q(te),te())},"userway:ato-input:disable":()=>{var t;re.enabled&&(re.enabled=!1,t=te,Y.delete(t))},"userway:ato-input:get":te},ie={automaticcoupons:/automaticcoupons/,"shopping.yahoo":/shopping\.yahoo/,shopperapproved:/shopperapproved/,rakuten:/rakuten/,"translate.google":/translate\.google/,"maps.googleapis.com":/maps\.googleapis\.com/,"s.w.org":/s\.w\.org/,avatar:/avatar/,companylogos:/companylogos/,favicon:/favicon/,activecampaign:/lt\.php(.*)?l=open/,aweber:/openrate\.aweber\.com/,bananatag:/bl-1\.com/,boomerang:/mailstat\.us\/tr/,"campaign monitor":/cmail(\d+)\.com\/t\//,"cirrus insight":/tracking\.cirrusinsight\.com/,close:/close\.com\/email_opened/,"constant contact":/rs6\.net\/on\.jsp/,contactmonkey:/contactmonkey\.com\/api\/v1\/tracker/,convertkit:/convertkit-mail\.com\/o/,"critical impact":/portal\.criticalimpact\.com\/c2\//,emarsys:/emarsys\.com\/e2t\/o/,gem:/zen\.sr\/o/,getnotify:/email81\.com\/case/,getresponse:/getresponse\.com\/open\.html/,growthdot:/growthdot\.com\/api\/mail-tracking/,front:/app\.frontapp\.com\/(.*)?\/seen/,hubspot:/t\.(hubspotemail|hubspotfree|signaux|senal|sidekickopen|sigopn)/,icontact:/click\.icptrack\.com\/icp/,intercom:/(via\.intercom\.io\/o)|(intercom-mail\.com\/via\/o)/,litmus:/emltrk\.com/,mailchimp:/list-manage\.com\/track/,mailgun:/email\.(mailgun|mg)(.*)?\/o/,mailjet:/mjt\.lu\/oo/,mailspring:/getmailspring\.com\/open/,mailtrack:/(mailtrack\.io\/trace)|(mltrk\.io\/pixel)/,mandrill:/mandrillapp\.com\/track/,marketo:/resources\.marketo\.com\/trk/,mixmax:/(email|track)\.mixmax\.com/,mixpanel:/api\.mixpanel\.com\/track/,nethunt:/nethunt\.co(.*)?\/pixel\.gif/,newton:/tr\.cloudmagic\.com/,outreach:/api\/mailings\/opened/,phplist:/phplist\.com\/lists\/ut\.php/,polymail:/polymail\.io/,postmark:/pstmrk\.it\/open/,"return path":/returnpath\.net\/pixel\.gif/,sailthru:/sailthru\.com\/trk/,salesforce:/nova\.collect\.igodigital\.com/,sendgrid:/wf\/open\?upn/,sendy:/sendy\/t\//,streak:/mailfoogae\.appspot\.com/,superhuman:/r\.superhuman\.com/,thunderhead:/na5\.thunderhead\.com/,tinyletter:/tinyletterapp\.com.*open\.gif/,yamm:/yamm-track\.appspot/,yesware:/t\.yesware\.com/,"zendesk sell":/futuresimple\.com\/api\/v1\/sprite\.png/,bing:/bat\.bing\.com/,teads:/cm\.teads\.tv/},oe=["icon","cart","logo"],ae=["h1","h2","h3","h4","h5","h6","span","a","p","figcaption","caption","div"],le=["heading"],se=new RegExp("^(data:)"),ue=new RegExp(/^.+\.svg$/);var ce=(t=>(t.EXCLUDED_SRC="EXCLUDED_SRC",t.HIDDEN_FROM_SCREEN_READER="HIDDEN_FROM_SCREEN_READER",t.BASE64="BASE64",t.SVG="SVG",t.SMALL_SIZE="SMALL_SIZE",t.MICRO_SIZE="MICRO_SIZE",t.WRONG_SRC="WRONG_SRC",t.ASPECT_RATIO="ASPECT_RATIO",t.CUSTOM_CONFIG="CUSTOM_CONFIG",t))(ce||{});const de=["SVG","SMALL_SIZE","HIDDEN_FROM_SCREEN_READER"],pe="data-uw-rm-alt-original",me="REMEDIATION_IMAGE_MISSING_ALT",fe="data-uw-rm-alt",ge=["jpg","jpeg","png","gif","bmp","tiff","tif","svg","webp","ico","apng","heif","heic","avif","eps","raw","cr2","nef","orf","sr2"];var be=(t=>(t.CorrectAlt="ALT",t.Reverted="RT",t.Backend="BE",t.Excluded="EX",t.Hidden="HD",t.Base64="BS64",t.Svg="SVG",t.Small="SM",t.Micro="MC",t.InvalidSrc="SRC",t.AspectRatio="AR",t.AI="AI",t.AIQuotaExceed="QU",t.ClosestText="CT",t.CustomConfig="CC",t.NotLoaded="NL",t))(be||{});const he="uwAccessibilityEditor",Ae=B.editorBuildUrl,ye="aria-editor",Ee="data-uw-rm-ae",ve="aria-editor",Te="REMEDIATION_EMPTY_CONTROLS",we="data-uw-rm-empty-ctrl",Ne=["facebook","youtube","whatsapp","instagram","twitter","reddit","linkedin","viber","pinterest","telegram","search","cart","home"],_e={prev:"Get previous item",next:"Get next item",scroll:"Activate for scroll",top:"Move to top",bottom:"Move to bottom",expand:"Expand this block",collapse:"Collapse this block",close:"Close this option"},xe=[{re:/(fa-)(.+)/,replacer:"$2"}],Ie="REMEDIATION_FORM_LABEL",Le="data-uw-rm-form",Oe=["INPUT","TEXTAREA","SELECT"],Se="data-uw-hidden-control",Ce="hidden-control-element",Re={text:"Text field",radio:"Radio button",checkbox:"Checkbox field",email:"Please enter email address",url:"Please enter url",tel:"Please enter a phone number",password:"Password field",search:"Search field",date:"Date field",time:"Time field",image:"Image field",file:"File field",number:"Number",range:"Select range",submit:"Submit button",color:"Select color",datetime_local:"Date and time field",month:"Month field",week:"Week field",button:"Button",reset:"Reset button"},Me=new Map([["Name",/(name)/],["Age",/(age)/],["Search",/(search|srch)/],["Quantity",/(qua|qty|quantity)/],["Count",/(count|cnt)/]]),De=new Map([["Search",/(search|srch)/],["Select name",/(name)/]]),ke="REMEDIATION_BROKEN_LINK",Pe="data-uw-rm-brl",Be="data-uw-original-href";var Ue=(t=>(t.Processed="PR",t.BackEndContributed="BE",t.Fixed="FX",t.FixedByCorrection="CR",t))(Ue||{});const We=["localhost","userway.dev","linkedin.com","youtube.com"],je="REMEDIATION_META_VIEWPORT",He="uw-rm-meta-viewport",$e='meta[name="viewport"][content*="maximum-scale"], meta[name="viewport"][content*="user-scalable=0"], meta[name="viewport"][content*="user-scalable=no"]',Fe=t=>t.filter((t=>{var e,r;const n=(t=>{switch(t){case me:return"alt";case ye:return"ariaEditor";case Te:return"emptyControls";case Ie:return"forms";case ke:return"brokenLinks";case je:return"metaViewport";default:return null}})(t.ruleId);if(!n||!B.paidAi)return!0;const i=k[n];if(!i)return!0;const o=!1!==(null==(r=null==(e=i.config)?void 0:e.mobile)?void 0:r.enabled);return i.enabled&&(!W||o)})),Ve=(t,e)=>{if(0===t.length)return Promise.resolve();const r=t[0];return Promise.all(r.map((t=>t(e)))).then((()=>Ve(t.slice(1),e)))},Xe=(()=>{let t,e=!1,r=[],n=null;const i=o=>{if(!o.length)return;if(e)return n&&clearTimeout(n),void(n=setTimeout((()=>{i(r),n=null}),800));e=!0;const a=()=>{e=!1};((t,e)=>{const r=t.map((t=>t.map((t=>t.run))));return Ve(r,e)})(t,o).then(a).catch(a),r=[]},{run:o}=(t=>{setTimeout((()=>{Wt=!1}),2e3);const e=Bt((e=>t(e)),300,{leading:!0,trailing:!0}),r=Pt((e=>t(e)),500,{maxWait:2e3,leading:!0,trailing:!0});return{run:t=>Wt?e(t):r(t)}})(i),a=t=>{r.push(...t),o(r)},l=()=>{const t=(()=>{const t=x.join(","),e=L.map((t=>`[${t}]`)).join(","),r=`${t},${e}`;return[...document.body.querySelectorAll(`*:not(${r})`)].filter((t=>!t.closest(e))).map((t=>t))})();o([...t]),K((t=>{if(!t.data)return;const{data:{action:e,type:r}}=t;e===Ft&&ne[r]&&ne[r]()})),Q(a)};return{run:o,init:()=>__async(this,null,(function*(){if((()=>{var t;if((null==(t=window.location)?void 0:t.pathname.indexOf("wp-admin"))>-1)return!0;if(!(null==k?void 0:k.commonSettings))return!1;const{mobile:e,disabledPages:r}=k.commonSettings.config;return!(!W||!e||e.enabled)||!!(null==r?void 0:r.some((t=>{var e;return(null==(e=window.location)?void 0:e.href.indexOf(t))>-1})))})())return;const e=yield Promise.resolve().then((()=>Si));t=e.RulesGroups.map((t=>Fe(t))),P.tech_rem_on_tab||l();const r=K((t=>{var e;(null==(e=null==t?void 0:t.data)?void 0:e.type)===G.KeyboardNavEnabled&&(l(),r())}))})),onDomUpdates:a}})();(()=>{__async(this,null,(function*(){var t;yield V();const e=null!=(t=P.tech_rem_in_throttle_ms)?t:500;setTimeout((()=>{Xe.init(),((t=z,e=Z)=>{P.tech_rem_on_tab||J.observe(t,e);const r=K((n=>{var i;(null==(i=null==n?void 0:n.data)?void 0:i.type)===G.KeyboardNavEnabled&&(J.observe(t,e),r())}))})()}),e)}))})(),lt.observe(ot,at),(()=>{const t=et.find((t=>t.url.includes(window.location.origin)));t&&it(t.name)})();const qe=({ruleId:t,isTargetElement:e,rule:r,postMessageApi:n,forceRun:i})=>(n&&K((t=>{const e=null==t?void 0:t.data;if(!e)return;const{type:r,action:i}=e;i!==q.Remediation&&i!==q.AriaEditor||n[r]&&n[r](e.data?e.data:e)})),{run:n=>__async(this,null,(function*(){try{if(!e)return void(yield r({context:{elements:n}}));const o=n.filter((r=>!r.hasAttribute(`uw-ignore-${t}`)&&e(r)));if(!o.length)return void(i&&(yield r({context:{elements:[]}})));yield r({context:{elements:o}})}catch(o){console.warn(o)}})),stop:()=>{},rerun:()=>{},ruleId:t}),Ge=t=>{if(!t)return null;const e=t.split("|")[0];return document.evaluate(e,document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue},Ke=t=>!!["input","select","button","textarea","a"].includes(t.tagName.toLowerCase())||["button","checkbox","link","option"].includes((t.getAttribute("role")||"").toLowerCase()),ze=t=>{const e=t.getAttribute("tabindex");if(null!==e){const t=parseInt(e,10);if(!Number.isNaN(t))return t}},Ze=t=>{if(Ke(t))return!0;const e=ze(t);return void 0!==e&&!Number.isNaN(e)&&e>=0},Ye=t=>!!x.includes(t.toLowerCase()),Qe=(t,e)=>("img"===t?e.getAttribute("alt"):e.getAttribute("aria-label"))||null,Je=t=>t.getAttribute("role")||null,tr=t=>t.getAttribute("aria-level")||null,er=(t,e)=>"img"===t?e.getAttribute("src"):null,rr=t=>{if(null==t?void 0:t.nextElementSibling){const e=t.nextElementSibling;return Ye(e.tagName)?rr(e):e}return null},nr=t=>{if(null==t?void 0:t.previousElementSibling){const e=t.previousElementSibling;return Ye(e.tagName)?nr(e):e}return null},ir=t=>{var e;return null!=(e=t.uwAtoId)?e:null},or=t=>{if(!t.parentElement)return null;const{parentElement:e}=t,r=p(e);return ee().find((t=>t.xpath===r))?r:or(e)},ar=t=>{const e=Array.from(t.childNodes).find((t=>t.uwAtoId));if(e){const t=p(e);return ee().find((e=>e.xpath===t))?t:null}return null},lr=(t,e)=>{if(!t)return;const r=t,{tabindex:n,el:i}=r,o=__objRest(r,["tabindex","el"]),a=t.el?[...t.el.children]:[],l=e.filter((t=>a.includes(t.el)));if(l.length){const t=l.map((t=>lr(t,e)));return __spreadProps(__spreadValues({},o),{children:t})}return o},sr=(e,r="")=>{const n=[e];e.parentElement&&n.push(e.parentElement);let i=0;const o=(null==e?void 0:e.children)?[...e.children].filter((t=>!Ye(t.tagName))).reverse():[];o.length&&(n.unshift(...o),i+=o.length);const a=rr(e);a&&!n.includes(a)&&(n.splice(i,0,a),i+=1);const l=nr(e);l&&!n.includes(l)&&n.splice(i+1,0,l);const s=n.map((t=>{const r=t.tagName.toLowerCase(),n=Yt(t,!0);if(!n)return null;const{type:i,label:o,id:a}=n,l="function"==typeof t.getAttribute?{label:Qe(r,t),isHidden:(s=t,"true"===s.getAttribute("aria-hidden")||"presentation"===s.getAttribute("role")),role:Je(t),ariaLevel:tr(t),src:er(r,t),isControl:Ke(t),focusable:Ze(t),tabindex:ze(t)}:{};var s;return __spreadValues({tagName:r,text:[...t.childNodes].filter((t=>t.nodeType===Node.TEXT_NODE)).map((t=>{var e;return null==(e=t.textContent)?void 0:e.trim()})).join(" ").trim(),id:a,xpath:p(t),selected:t===e,el:t,semanticType:i,textToRead:o,uwAtoId:ir(t),accessibleParentXpath:or(t),accessibleChildXpath:ar(t)},l)})).filter(Boolean).reverse();if(s){const e=lr(s[0],s);e&&t({action:ve,type:"elements-selected",data:{tree:e,source:r}},[he])}};let ur,cr;let dr;const pr=(t,e)=>{const r="img"===(null==t?void 0:t.tagName.toLowerCase());e&&!r&&t.setAttribute("aria-label",e)},mr=(t,e)=>{const{tabindex:r,role:n,ariaLevel:i}=e;r&&t.setAttribute("tabindex",r),n&&"no role"!==n?t.setAttribute("role",n):n&&"no role"!==n||t.removeAttribute("role"),i&&t.setAttribute("aria-level",i)},fr=qe({ruleId:ye,rule:()=>{if(k.ariaEditor.enabled&&(dr=(()=>{let t=F().AriaEditorValues;const e=`${d(window.location.pathname)}`;return t=t.filter((t=>!t.page||t.page===e)).sort((t=>t.page?-1:1)),t})(),dr))for(const t of dr){const e=Ge(t.xpath);if(!e)continue;const r=e.nodeType===Node.ELEMENT_NODE,n=e.hasAttribute(Ee)&&t.processed;if(!r||n)continue;const{hidden:i,correction:o}=t;i&&e.setAttribute("aria-hidden","true"),pr(e,o),mr(e,t),e.setAttribute(Ee,""),t.processed=!0}},postMessageApi:{"add-aria-editor":()=>{cr=document.querySelector(`iframe[name=${he}]`),cr||(ur=new Promise((t=>{const e={class:"userway_iframe_aria_editor",name:"uwAccessibilityEditor",title:"Aria Editor",style:"\n z-index: 2147483647;\n position: fixed;\n left: 0;\n top: 0;\n width: 100%!important;\n max-width: 100%!important;\n height: 100%!important;\n max-height: 100%!important;\n visibility: hidden;\n opacity: 0!important;\n border: none;\n ",src:Ae};cr=document.createElement("iframe"),Object.entries(e).forEach((([t,e])=>{null==cr||cr.setAttribute(t,e)})),cr.onload=()=>{t()},cr&&document.body.appendChild(cr)})))},"open-aria-editor":()=>{ur.then((()=>{window.parent.postMessage({action:"close",isUserWay:!0}),window.parent.postMessage({action:"manageIconVisibility",isUserWay:!0,type:"hidden"}),cr&&(cr.style.visibility="visible",cr.style.opacity="1"),t({action:ve,type:"aria-editor-open-request"},[he])}))},"close-aria-editor":()=>{window.parent.postMessage({action:"open",isUserWay:!0}),window.parent.postMessage({action:"manageIconVisibility",isUserWay:!0,type:"visible"}),cr&&(cr.style.visibility="hidden",cr.style.opacity="0"),t({action:ve,type:"aria-editor-closed"},[he])},"editor-init":()=>{const e=B,r=!(!e||!e.CUSTOM_BRANDING&&!e.WHITE_LABEL);t({action:ve,type:"open-aria-editor",data:{siteId:B.siteId,showTutorial:!0,whiteLabel:r,hash:d(window.location.pathname)}},[he])},"update-aria-hidden":t=>{const{xpath:e,hidden:r}=t;if(!e)return;const n=N(e);(null==n?void 0:n.nodeType)===Node.ELEMENT_NODE&&(r?n.setAttribute("aria-hidden","true"):n.removeAttribute("aria-hidden"),n.setAttribute(Ee,""))},"update-tabindex":t=>{const{xpath:e,focusable:r,isControl:n}=t;if(!e)return;const i=N(e);(null==i?void 0:i.nodeType)===Node.ELEMENT_NODE&&(n?i[r?"removeAttribute":"setAttribute"]("tabindex","-1"):i[r?"setAttribute":"removeAttribute"]("tabindex","0"),i.setAttribute(Ee,""))},"update-aria-label":t=>{const{xpath:e,label:r}=t;if(!e||null==r)return;const n=N(e);(null==n?void 0:n.nodeType)===Node.ELEMENT_NODE&&(n.setAttribute("aria-label",t.label),n.setAttribute(Ee,""))},"update-aria-level":t=>{const{xpath:e,ariaLevel:r}=t;if(!e)return;const n=N(e);(null==n?void 0:n.nodeType)===Node.ELEMENT_NODE&&(r?n.setAttribute("aria-level",r):n.removeAttribute("aria-level"),n.setAttribute(Ee,""))},"update-role":t=>{const{xpath:e,role:r}=t;if(!e)return;const n=N(e);if((null==n?void 0:n.nodeType)===Node.ELEMENT_NODE){r&&"no role"!==r?n.setAttribute("role",r):n.removeAttribute("role"),n.setAttribute(Ee,"")}},"select-elements-by-xpath":t=>{const{xpath:e,source:r}=t;if(!e)return;const n=N(e);n&&sr(n,r)},"select-elements-at-point":t=>{const{position:{x:e,y:r}}=t;let n=document.elementsFromPoint(e,r);const i=n.findIndex((t=>t.getAttribute("name")===he));-1!==i&&n.splice(i,1),n=n.filter((t=>!["HTML","BODY"].includes(t.tagName))).slice(0,2),n.length&&sr(n[0])},"update-aria-editor-config":t=>{const{page:e="",xpath:r=""}=t,n=F().AriaEditorValues.findIndex((t=>t.page===e&&t.xpath===r)),i=F().AriaEditorValues[n],o=__spreadValues(__spreadValues({},i),(t=>__spreadProps(__spreadValues({},t),{hidden:t.isHidden}))(t));-1!==n?F().AriaEditorValues[n]=o:F().AriaEditorValues.push(o)}}}),gr=({currentSrc:t,src:e})=>t||e,br=(t,e)=>{try{const{width:r,height:n}=window.getComputedStyle(t);return parseInt(r,10)>e&&parseInt(n,10)>e}catch(r){return!1}},hr=(t,{decorative:e,approved:r,fixedByUserWay:n,loadingFromMS:i})=>{var o;return{src:gr(t),alt:t.alt,originalAlt:null!=(o=t.getAttribute(pe))?o:"",decorative:e,approved:r,fixedByUserWay:n,loadingFromMS:i}},Ar=t=>{t.setAttribute("role","presentation"),t.removeAttribute("aria-hidden"),t.setAttribute("alt","")},yr=t=>{if(!t)return"";try{const{hostname:e}=new URL(t);return e.replace(/^https?:\/\//,"").replace(/^www\./,"").replace(/\.[a-zA-Z0-9]*$/,"")}catch(e){return""}},Er=t=>{const e=gr(t);return se.test(e)},vr=t=>{const e=t.trim(),r=new RegExp(`\\.(${ge.join("|")})$`,"i").test(e),n=e.length>500,i=!e,o=e.split(/\s+/).length,a=/[0-9]{5,}/.test(e)&&1===o,l=new RegExp(/^[!@#$%^&*()_+{}[\]`:;<>,.?~\\|\-="'/]+$/,"u").test(e);return a||r||n||i||l},{enabled:Tr,config:wr}=(null==k?void 0:k.alt)||{enabled:!1,config:{}},Nr=null==wr?void 0:wr.decorative,_r=(t,e="selectors")=>{if(!Nr||!Tr)return!1;return Nr[e].some((e=>t.matches(e)))},xr=(t,e)=>{const r=e.alt.trim(),n=gr(e),i=t.find((t=>b(t.src).toLowerCase()===b(n).toLowerCase()));if(!i||null===i.alt)return null;const{decorative:o,alt:a,approved:l,reverted:s}=i;if(s&&!o)return e.setAttribute(fe,be.Reverted),hr(e,{approved:!0,decorative:!r,fixedByUserWay:!1,loadingFromMS:!1});const u=!(!k||"AUTO"===k.strategy)&&!l;!o||u||_r(e,"ignoreSelectors")||Ar(e);const c=l||!r||vr(r);a&&!u&&c&&!o&&e.setAttribute("alt",a),e.setAttribute(fe,be.Backend);const d=hr(e,{approved:l,decorative:o,fixedByUserWay:!0,loadingFromMS:!1});return u&&(d.alt=a),d},Ir=t=>{if("string"!=typeof t)return!1;for(const e of Object.values(ie)){const r=new RegExp(e,"i");if(t.match(r))return!0}return!1},Lr=t=>{const{width:e,height:r}=window.getComputedStyle(t);try{if(0===parseFloat(e)&&0===parseFloat(r))return!1}catch(a){return!1}const n=/^\d*px?/i,i=n.test(e),o=n.test(r);return!(!i||!o)},Or=t=>{if(_r(t))return ce.CUSTOM_CONFIG;const e=gr(t),r=vr(t.alt),n=Lr(t);var i;if(!(i=e)||!i.match(se)&&![/^https?:\/\/.{1,256}\.[a-z]{2,63}\/.+$/gim,/^https?:\/\/[^:\/\s]{1,256}:\d{1,5}\/.+$/gim].some((t=>t.test(i))))return ce.WRONG_SRC;if(Ir(e))return ce.EXCLUDED_SRC;if(!!n&&!br(t,15))return ce.MICRO_SIZE;if(!!n&&(t=>{try{const{width:e,height:r}=window.getComputedStyle(t),n=parseInt(e,10),i=parseInt(r,10);return!!(n<=20&&i>=10*n||i<=20&&n>=10*i)}catch(e){return!1}})(t))return ce.ASPECT_RATIO;if(Er(t)&&r)return ce.BASE64;if("true"===t.getAttribute("aria-hidden")||"presentation"===t.getAttribute("role")||"none"===t.getAttribute("role"))return ce.HIDDEN_FROM_SCREEN_READER;if(ue.test(e)&&r)return ce.SVG;return!(!n||br(t,50))&&r?ce.SMALL_SIZE:null},Sr=t=>{switch(t){case ce.ASPECT_RATIO:return be.AspectRatio;case ce.BASE64:return be.Base64;case ce.EXCLUDED_SRC:return be.Excluded;case ce.SVG:return be.Svg;case ce.MICRO_SIZE:return be.Micro;case ce.SMALL_SIZE:return be.Small;case ce.WRONG_SRC:return be.InvalidSrc;case ce.CUSTOM_CONFIG:return be.CustomConfig;case ce.HIDDEN_FROM_SCREEN_READER:default:return be.Hidden}},Cr=(t,e,r,n)=>{const i=UserWayWidgetApp.getLib("remediation_manager"),o=UserWayWidgetApp.getLib("remediation_helper_outcome");if(!o.of)return;const a=o.of(t,{items:e},null,r,n);i.HelperCallbackAggregator.onHelperRemediationCompleted(a)},Rr=new Map,Mr=(t,e)=>{const r=p(t);Rr.set(r,e)},Dr=t=>{const e=p(t);return Rr.get(e)||null},kr=t=>Cr(me,t,t.filter((t=>t.fixedByUserWay)).length,t.filter((t=>!t.approved)).length),Pr=t=>{t.hasAttribute(pe)||t.setAttribute(pe,t.alt)},Br=(t,e=[])=>{if(0===t.length)return;const{paidAi:r}=B,n=[];for(const i of t){const t=i,o=vr(t.alt),a=gr(t),l=Dr(t),s=_r(t,"ignoreSelectors");Pr(t),ue.test(a)&&r&&t.setAttribute("role","img");const u=xr(e,t);if(u){n.push(u);continue}if(s){t.setAttribute(fe,Sr(ce.CUSTOM_CONFIG));continue}if(!r)continue;const c=null==l?void 0:l.shouldBeDecorativeReason;if(!o&&!c){t.setAttribute(fe,be.CorrectAlt),n.push(hr(t,{approved:!0,decorative:!1,fixedByUserWay:!1}));continue}if(void 0!==c){Ar(t),t.setAttribute(fe,Sr(c)),c&&de.includes(c)&&n.push(hr(t,{approved:!1,decorative:!0,fixedByUserWay:!0}));continue}const d=null==l?void 0:l.relevantText;if(d){t.setAttribute("alt",d),t.setAttribute(fe,be.ClosestText),n.push(hr(t,{approved:!1,decorative:!1,fixedByUserWay:!0}));continue}const{quota:p,usage:m}=U;m>=p?(t.setAttribute(fe,be.AIQuotaExceed),n.push(hr(t,{approved:!1,decorative:!1,fixedByUserWay:!0}))):(t.setAttribute(fe,be.AI),n.push(hr(t,{approved:!1,decorative:!1,fixedByUserWay:!0,loadingFromMS:!0})))}kr(n)},Ur=t=>{const e=t.replace(/^https?:\/\//,"");return document.querySelectorAll(`img[src*="${e}" i],img[srcset*="${e}" i]`)},Wr=t=>__async(this,null,(function*(){const{account:e}=UserWayWidgetApp.ContextHolder.config,{siteId:r}=B,{resourceHash:n}=U,i=encodeURIComponent(t),o=yield fetch(`https://cdn77.api.userway.org/api/img-dscr/v2/${e}/${r}/${n}/alts.json?dto=${i}`,{method:"GET",headers:{"Content-Type":"application/json"}});return(yield o.json()).payload})),jr=t=>{const e=`(.*\\.(${ge.join("|")}))\\?.*$`,r=new RegExp(e),n=t.match(r);if(!n){const e=new URL(t),r=[];let n=!1;return e.searchParams.forEach(((t,e)=>{ge.some((e=>t.endsWith(e)))?n=!0:r.push(e)})),n&&r.forEach((t=>e.searchParams.delete(t))),n?e.toString():t}return n&&n[1]?n[1]:t};var Hr=(t=>(t.RO="RO",t))(Hr||{});const $r=(t,e)=>t.src.localeCompare(e.src),Fr=(t,e=1)=>{if(e>=15)return console.warn("Max split level exceed"),[];const r=((t,e)=>{const r=Math.ceil(t.length/e),n=[];for(let i=0;i8)return Fr(t,e+1);n.push(o)}return n},Vr=t=>t?t.replace(/\n/g,"").replace(/ {2,}/g," ").trim():"",Xr=(t,e)=>{if(!t)return null;const r="next"===e.type?t.nextSibling:t.previousSibling;if((null==r?void 0:r.nodeType)===Node.TEXT_NODE){if(!Vr(r.nodeValue))return Xr(r,{type:e.type})}return r},qr=t=>{const e=t.nodeType===Node.ELEMENT_NODE,r=t instanceof Element&&"hide"===t.getAttribute("data-uw-rm-heading");if(t.nodeType===Node.TEXT_NODE)return!0;if(e&&!r){const e=ae.some((e=>e===t.nodeName.toLowerCase())),r=le.some((e=>{var r;return e===(null==(r=t.getAttribute("role"))?void 0:r.toLowerCase())}));return e||r}return!1},Gr=Array.from(new Set([...ae,"a","span","strong","em","b","i","q","mark"])),Kr=t=>{if((null==t?void 0:t.nodeType)===Node.TEXT_NODE){const e=Vr(t.nodeValue);if(e&&!vr(e))return e}if((null==t?void 0:t.nodeType)===Node.ELEMENT_NODE&&Gr.includes(t.tagName.toLowerCase()))for(const e of t.childNodes){const t=Kr(e);if(t)return t}return null},zr=t=>{const e=t.nodeType===Node.ELEMENT_NODE,r=t.nodeType===Node.TEXT_NODE;if(!r&&!e)return!1;if(e&&"img"===t.nodeName.toLowerCase())return!0;if(r)return!!Vr(t.textContent);const n=ae.some((e=>e===t.nodeName.toLowerCase())),i=le.some((e=>{var r;return e===(null==(r=t.getAttribute("role"))?void 0:r.toLowerCase())}));return n||i};let Zr=0;const Yr=t=>{const e=t.parentElement;if(!e)return null;if(e.getElementsByTagName("img").length>1)return Zr=0,null;if(1===[].slice.call(e.childNodes).filter(zr).length)return Yr(e);const r=(t=>{let e=Xr(t,{type:"next"}),r=Xr(t,{type:"prev"}),n=null,i=null;for(;e||r;){e&&qr(e)&&(n=Kr(e)),r&&qr(r)&&(i=Kr(r));const t=n||i;if(t)return t;e=Xr(e,{type:"next"}),r=Xr(r,{type:"prev"})}return null})(t);return r?(Zr=0,r):(Zr+=1,"body"===e.tagName.toLowerCase()?(Zr=0,null):Zr<2?Yr(e):(Zr=0,null))},Qr=t=>{const e=t.closest("figure");if(e){const t=Array.from(e.children).find((t=>"figcaption"===t.tagName.toLowerCase()));if(t){const e=Vr(t.textContent);if(e&&!vr(e))return e}}const r=[].slice.call(t.classList).join(" "),n=t.id||"",i=(o=r+n).trim()&&oe.find((t=>o.includes(t)))||null;var o;if(i)return i;const a=Yr(t);return a||null},Jr=(t,e)=>{if(!Lr(t))return!1;const r=gr(t);return yr(r)!==e&&!br(t,20)},tn=(t,e,r)=>{t.addEventListener("load",(()=>{e()})),t.addEventListener("error",(()=>{Ar(t),t.setAttribute(fe,be.NotLoaded),r()}))},en=t=>t.map((t=>new Promise((t=>(e,r)=>{if(Ir(t.src))return Ar(t),t.setAttribute(fe,be.Excluded),void r(t);if((t=>t.complete&&0!==t.naturalHeight)(t))return void e(t);if("lazy"===t.loading)return void tn(t,(()=>e(t)),(()=>r(t)));const n=new Image;tn(n,(()=>e(t)),(()=>r(t))),n.src=t.src})(t)))),rn=[],nn=(t,e)=>{if(!U)return;const{state:r}=U;if("ALTS_OFF"===r)return;const n=(t=>{var e,r;const n=[];for(const i of t){const t=gr(i),e=yr(t);if(e){let t=n.find((t=>t.name===e));t||(t={name:e,weight:0},n.push(t)),t.weight+=1}}return null!=(r=null==(e=n.sort(((t,e)=>t.weight{const e=t,r=e.filter(((t,r)=>r===e.findIndex((e=>gr(t)===gr(e))))).map((t=>{const e=t,r=e.alt.trim(),n=r&&!vr(r),i=gr(e),o=Dr(e);return{src:jr(i),alt:e.alt.trim(),dir:n||Or(e)||(null==o?void 0:o.relevantText)?Hr.RO:void 0}}));return r.sort($r),r})(i),r=Fr(t);if(r.length)for(const n of r)Wr(n).then((t=>{if(e(),!t)return;const{missingAlts:r}=t,n=i.filter((t=>r.find((e=>b(e.src)===b(gr(t))))));Br(n,r)}));Br(o),rn.length=0,r.length||e()}catch(a){console.error(a)}},on=Pt(((t,e)=>nn(t,e)),1e3,{maxWait:2e3,leading:!1,trailing:!0}),an=qe({ruleId:me,rule:({context:{elements:t}})=>new Promise((e=>{en(t).forEach((t=>{t.then((t=>{rn.push(t),on(rn,e)})).catch((()=>{}))}))})),isTargetElement:t=>{const e="img"===t.tagName.toLowerCase(),r=t.hasAttribute(fe);if(!e||r)return!1;const n=t.getAttribute("src"),i=t.getAttribute("srcset");return!!(null!=n?n:i)||!!t.closest("picture")},postMessageApi:{"image-alt-update":({src:t,decorative:e,alt:r,role:n})=>{const i=Ur(t);if(i.length){for(const t of i)t.setAttribute("alt",null!=r?r:""),e?Ar(t):("presentation"!==t.getAttribute("role")&&"none"!==t.getAttribute("role")||t.removeAttribute("role"),t.hasAttribute("aria-hidden")&&t.removeAttribute("aria-hidden")),["link","button","heading"].includes(n)&&t.setAttribute("aria-label",r);kr([hr(i[0],{approved:!0,decorative:e,fixedByUserWay:!1})])}},"image-alt-revert":({src:t})=>{const e=Ur(t);for(const r of e){const t=r.getAttribute(pe);null!==t&&r.setAttribute("alt",t)}}}}),ln=t=>{const{tagName:e}=t;return"SELECT"===e||"TEXTAREA"===e?e.toLowerCase():"text"},sn=t=>{const e=t.getAttribute("id");if(!e)return null;try{return document.querySelector(`label[for='${e}']`)}catch(r){return null}},un=t=>{const e="string"==typeof t?t:t.textContent;return e&&e.replace(/\r\n|\r|\n|\t/g," ").replace(/( )+/g," ").trim()},cn=(t,e)=>{for(const[r,n]of e)if(n.test(t))return r;return""},dn=t=>{let e="";const r=t.getAttribute("placeholder"),n=t.getAttribute("title");if(r&&r.trim())return r;if(n&&n.trim())return n;const{classList:i,name:o,tagName:a,type:l}=t,s=`${[...i].join(" ")||""} ${o||""}`.trim();return"text"===l&&(e=cn(s,Me)),"SELECT"===a&&(e=cn(s,De)),e||(t=>{const{tagName:e,type:r}=t;return"SELECT"===e?"select-multiple"===r?"Multiple select":"Single select":"TEXTAREA"===e?"Text area":"INPUT"===e&&r&&Re[r.replace("-","_")]?Re[r.replace("-","_")]:""})(t)},pn=t=>{if(t.parentElement){const e=[...t.parentElement.querySelectorAll("label")];if(1===e.length&&(t=>{const e="LABEL"===t.tagName,r=t.getAttribute("for");return e&&(!(null==r?void 0:r.trim())||!document.getElementById(r))})(e[0]))return e[0].textContent}return null},mn=t=>{const e=t.previousElementSibling;return e&&(t=>{var e;return["DIV","SPAN","P"].includes(t.tagName)&&Boolean(null==(e=t.textContent)?void 0:e.trim())})(e)?(k.strategy===Ut&&((t,e)=>{const r=e.getAttribute("id")||c();e.setAttribute("id",r),t.setAttribute("aria-labelledby",r)})(t,e),e.textContent):null},fn=(t,e,r,n=!0)=>{if(!n)return;const i=t.closest("label"),o=sn(t);r?(t.setAttribute("required",""),t.setAttribute("aria-required","true")):(t.removeAttribute("required"),t.removeAttribute("aria-required"));const a=i||o;if(a){const t=a.querySelector("span[data-uw-reader-element]");if(t)t.textContent=e;else{const t=((t,e="")=>{const r=document.createElement("span");return r.textContent=t,r.setAttribute("style","color: #ffffff!important;background: #000000!important;clip: rect(1px, 1px, 1px, 1px)!important;clip-path: inset(50%)!important;height: 1px!important;width: 1px!important;margin: -1px!important;overflow: hidden!important;padding: 0!important;position: absolute!important;"),r.setAttribute("class",e),r.setAttribute("data-uw-reader-element",""),r.setAttribute("data-uw-rm-ignore",""),r})(e);a.appendChild(t)}}else t.hasAttribute("aria-labelledby")||t.setAttribute("aria-label",e)},gn=t=>{const e=t.getAttribute("aria-labelledby");if(e){const t=(t=>{var e;const r=t.split(" "),n=[];for(const i of r){const t=null==(e=document.getElementById(i))?void 0:e.textContent;t&&n.push(t)}return n.join(" ")})(e);if(t){const e=un(t);if(e)return e}}const r=t.getAttribute("aria-label");if(r){const t=un(r);if(t)return t}const n=t.closest("label");if(n){const t=(t=>{let e=t.textContent||"";const r=t.querySelector("select");if(r){const t=r.textContent||"";e=e.replace(t,"")}return e.trim()})(n);if(t)return un(t)}const i=sn(t);if(i){const t=un(i);if(t)return t}return null},bn=(t,e,r,n)=>{const{Forms:i}=F(),o=gn(t),a=i.find((({xpath:t,approved:e})=>e&&+t===d(r)));return o&&(t=>{const e=sn(t);if(!e)return!1;const{display:r,visibility:n}=getComputedStyle(e);return"none"===r||"hidden"===n})(t)&&t.setAttribute("aria-label",o),a?(fn(t,a.correction,a.required,!0),{type:a.type,xpath:r,required:a.required,correction:a.correction,approved:a.approved,xpathHash:d(r),label:o}):o?(t.setAttribute(Le,"nfx"),{type:e,xpath:r,correction:o,approved:!0,xpathHash:d(r),label:o,required:n}):null},hn=t=>{((t,r={})=>{var n,i;const o={skipParentCheck:null!=(n=r.skipParentCheck)&&n,shouldBeInViewport:null==(i=r.shouldBeInViewport)||i};let a=t,l=e(a,o);if(!o.skipParentCheck)for(;l&&a.parentNode&&a.parentNode!==document;)e(a.parentNode,{shouldBeInViewport:!1})?a=a.parentNode:l=!1;return l})(t,{shouldBeInViewport:!1})||(t.setAttribute("aria-label",Ce),t.setAttribute(Se,Ce),((t,e)=>{new IntersectionObserver(((r,n)=>{for(const i of r)i.intersectionRatio>0&&(e(t),n.disconnect())})).observe(t)})(t,(()=>{t.hasAttribute(Se)&&t.hasAttribute("aria-label")&&t.getAttribute(Se)===t.getAttribute("aria-label")&&(t.removeAttribute(Se),t.removeAttribute("aria-label"))})));const r=pn(t);if(r)return r;const n=mn(t);if(n)return n;const i=dn(t);return i||null},An=qe({ruleId:Ie,rule:({context:{elements:t}})=>{const e=[];for(const r of t){r.setAttribute(Le,"fx");const t=r.hasAttribute("required"),n=k.strategy===Ut,i=p(r),o=ln(r),a=bn(r,o,i,t);if(a){e.push(a);continue}const l=hn(r);l?(fn(r,l,t,n),e.push({type:o,xpath:i,correction:l,approved:!1,xpathHash:d(i),label:null,required:t})):e.push({type:o,xpath:i,correction:null,approved:!1,xpathHash:d(i),label:null,required:t})}Cr(Ie,e,e.filter((t=>t.approved)).length,e.filter((t=>!t.approved)).length)},isTargetElement:t=>{const e=Oe.includes(t.tagName);if(t.hasAttribute(Le)||!e)return!1;const r=t.getAttribute("type");return!("SELECT"!==t.tagName&&"TEXTAREA"!==t.tagName&&("INPUT"!==t.tagName||"hidden"===r))},postMessageApi:{"form-label-update":({correction:t,required:e,xpath:r})=>{const n=N(r.toString());n&&(t&&(n.setAttribute("aria-label",t),n.removeAttribute("aria-labelledby")),e?(n.setAttribute("required",""),n.setAttribute("aria-required","true")):(n.removeAttribute("required"),n.removeAttribute("aria-required")))}}}),yn=t=>{const e=t.tagName.toLowerCase(),r=null==t?void 0:t.type,n=t.getAttribute("role");return["a","button"].includes(e)?"a"===e?"":"