@joomla/joomla-a11y-checker
Version:
ooa11y is an accessibility and quality assurance tool that visually highlights common accessibility and usability issues.
2 lines • 93.6 kB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Jooa11y={})}(this,(function(e){"use strict";var t="top",n="bottom",o="right",r="left",a="auto",i=[t,n,o,r],s="start",l="end",c="viewport",d="popper",u=i.reduce((function(e,t){return e.concat([t+"-"+s,t+"-"+l])}),[]),f=[].concat(i,[a]).reduce((function(e,t){return e.concat([t,t+"-"+s,t+"-"+l])}),[]),p=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function h(e){return e?(e.nodeName||"").toLowerCase():null}function g(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function m(e){return e instanceof g(e).Element||e instanceof Element}function y(e){return e instanceof g(e).HTMLElement||e instanceof HTMLElement}function b(e){return"undefined"!=typeof ShadowRoot&&(e instanceof g(e).ShadowRoot||e instanceof ShadowRoot)}var A={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},o=t.attributes[e]||{},r=t.elements[e];y(r)&&h(r)&&(Object.assign(r.style,n),Object.keys(o).forEach((function(e){var t=o[e];!1===t?r.removeAttribute(e):r.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var o=t.elements[e],r=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});y(o)&&h(o)&&(Object.assign(o.style,a),Object.keys(r).forEach((function(e){o.removeAttribute(e)})))}))}},requires:["computeStyles"]};function E(e){return e.split("-")[0]}var _=Math.max,v=Math.min,j=Math.round;function L(e,t){void 0===t&&(t=!1);var n=e.getBoundingClientRect(),o=1,r=1;if(y(e)&&t){var a=e.offsetHeight,i=e.offsetWidth;i>0&&(o=j(n.width)/i||1),a>0&&(r=j(n.height)/a||1)}return{width:n.width/o,height:n.height/r,top:n.top/r,right:n.right/o,bottom:n.bottom/r,left:n.left/o,x:n.left/o,y:n.top/r}}function I(e){var t=L(e),n=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:o}}function T(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&b(n)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function S(e){return g(e).getComputedStyle(e)}function x(e){return["table","td","th"].indexOf(h(e))>=0}function O(e){return((m(e)?e.ownerDocument:e.document)||window.document).documentElement}function N(e){return"html"===h(e)?e:e.assignedSlot||e.parentNode||(b(e)?e.host:null)||O(e)}function w(e){return y(e)&&"fixed"!==S(e).position?e.offsetParent:null}function C(e){for(var t=g(e),n=w(e);n&&x(n)&&"static"===S(n).position;)n=w(n);return n&&("html"===h(n)||"body"===h(n)&&"static"===S(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&y(e)&&"fixed"===S(e).position)return null;for(var n=N(e);y(n)&&["html","body"].indexOf(h(n))<0;){var o=S(n);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||t&&"filter"===o.willChange||t&&o.filter&&"none"!==o.filter)return n;n=n.parentNode}return null}(e)||t}function R(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function M(e,t,n){return _(e,v(t,n))}function $(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function k(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}var H={name:"arrow",enabled:!0,phase:"main",fn:function(e){var a,s=e.state,l=e.name,c=e.options,d=s.elements.arrow,u=s.modifiersData.popperOffsets,f=E(s.placement),p=R(f),h=[r,o].indexOf(f)>=0?"height":"width";if(d&&u){var g=function(e,t){return $("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:k(e,i))}(c.padding,s),m=I(d),y="y"===p?t:r,b="y"===p?n:o,A=s.rects.reference[h]+s.rects.reference[p]-u[p]-s.rects.popper[h],_=u[p]-s.rects.reference[p],v=C(d),j=v?"y"===p?v.clientHeight||0:v.clientWidth||0:0,L=A/2-_/2,T=g[y],S=j-m[h]-g[b],x=j/2-m[h]/2+L,O=M(T,x,S),N=p;s.modifiersData[l]=((a={})[N]=O,a.centerOffset=O-x,a)}},effect:function(e){var t=e.state,n=e.options.element,o=void 0===n?"[data-popper-arrow]":n;null!=o&&("string"!=typeof o||(o=t.elements.popper.querySelector(o)))&&T(t.elements.popper,o)&&(t.elements.arrow=o)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function G(e){return e.split("-")[1]}var D={top:"auto",right:"auto",bottom:"auto",left:"auto"};function B(e){var a,i=e.popper,s=e.popperRect,c=e.placement,d=e.variation,u=e.offsets,f=e.position,p=e.gpuAcceleration,h=e.adaptive,m=e.roundOffsets,y=e.isFixed,b=u.x,A=void 0===b?0:b,E=u.y,_=void 0===E?0:E,v="function"==typeof m?m({x:A,y:_}):{x:A,y:_};A=v.x,_=v.y;var L=u.hasOwnProperty("x"),I=u.hasOwnProperty("y"),T=r,x=t,N=window;if(h){var w=C(i),R="clientHeight",M="clientWidth";if(w===g(i)&&"static"!==S(w=O(i)).position&&"absolute"===f&&(R="scrollHeight",M="scrollWidth"),w=w,c===t||(c===r||c===o)&&d===l)x=n,_-=(y&&N.visualViewport?N.visualViewport.height:w[R])-s.height,_*=p?1:-1;if(c===r||(c===t||c===n)&&d===l)T=o,A-=(y&&N.visualViewport?N.visualViewport.width:w[M])-s.width,A*=p?1:-1}var $,k=Object.assign({position:f},h&&D),H=!0===m?function(e){var t=e.x,n=e.y,o=window.devicePixelRatio||1;return{x:j(t*o)/o||0,y:j(n*o)/o||0}}({x:A,y:_}):{x:A,y:_};return A=H.x,_=H.y,p?Object.assign({},k,(($={})[x]=I?"0":"",$[T]=L?"0":"",$.transform=(N.devicePixelRatio||1)<=1?"translate("+A+"px, "+_+"px)":"translate3d("+A+"px, "+_+"px, 0)",$)):Object.assign({},k,((a={})[x]=I?_+"px":"",a[T]=L?A+"px":"",a.transform="",a))}var W={passive:!0};var q={left:"right",right:"left",bottom:"top",top:"bottom"};function P(e){return e.replace(/left|right|bottom|top/g,(function(e){return q[e]}))}var F={start:"end",end:"start"};function U(e){return e.replace(/start|end/g,(function(e){return F[e]}))}function K(e){var t=g(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function V(e){return L(O(e)).left+K(e).scrollLeft}function Y(e){var t=S(e),n=t.overflow,o=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+o)}function z(e){return["html","body","#document"].indexOf(h(e))>=0?e.ownerDocument.body:y(e)&&Y(e)?e:z(N(e))}function Q(e,t){var n;void 0===t&&(t=[]);var o=z(e),r=o===(null==(n=e.ownerDocument)?void 0:n.body),a=g(o),i=r?[a].concat(a.visualViewport||[],Y(o)?o:[]):o,s=t.concat(i);return r?s:s.concat(Q(N(i)))}function X(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function J(e,t){return t===c?X(function(e){var t=g(e),n=O(e),o=t.visualViewport,r=n.clientWidth,a=n.clientHeight,i=0,s=0;return o&&(r=o.width,a=o.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(i=o.offsetLeft,s=o.offsetTop)),{width:r,height:a,x:i+V(e),y:s}}(e)):m(t)?function(e){var t=L(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):X(function(e){var t,n=O(e),o=K(e),r=null==(t=e.ownerDocument)?void 0:t.body,a=_(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),i=_(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),s=-o.scrollLeft+V(e),l=-o.scrollTop;return"rtl"===S(r||n).direction&&(s+=_(n.clientWidth,r?r.clientWidth:0)-a),{width:a,height:i,x:s,y:l}}(O(e)))}function Z(e,t,n){var o="clippingParents"===t?function(e){var t=Q(N(e)),n=["absolute","fixed"].indexOf(S(e).position)>=0&&y(e)?C(e):e;return m(n)?t.filter((function(e){return m(e)&&T(e,n)&&"body"!==h(e)})):[]}(e):[].concat(t),r=[].concat(o,[n]),a=r[0],i=r.reduce((function(t,n){var o=J(e,n);return t.top=_(o.top,t.top),t.right=v(o.right,t.right),t.bottom=v(o.bottom,t.bottom),t.left=_(o.left,t.left),t}),J(e,a));return i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}function ee(e){var a,i=e.reference,c=e.element,d=e.placement,u=d?E(d):null,f=d?G(d):null,p=i.x+i.width/2-c.width/2,h=i.y+i.height/2-c.height/2;switch(u){case t:a={x:p,y:i.y-c.height};break;case n:a={x:p,y:i.y+i.height};break;case o:a={x:i.x+i.width,y:h};break;case r:a={x:i.x-c.width,y:h};break;default:a={x:i.x,y:i.y}}var g=u?R(u):null;if(null!=g){var m="y"===g?"height":"width";switch(f){case s:a[g]=a[g]-(i[m]/2-c[m]/2);break;case l:a[g]=a[g]+(i[m]/2-c[m]/2)}}return a}function te(e,r){void 0===r&&(r={});var a=r,s=a.placement,l=void 0===s?e.placement:s,u=a.boundary,f=void 0===u?"clippingParents":u,p=a.rootBoundary,h=void 0===p?c:p,g=a.elementContext,y=void 0===g?d:g,b=a.altBoundary,A=void 0!==b&&b,E=a.padding,_=void 0===E?0:E,v=$("number"!=typeof _?_:k(_,i)),j=y===d?"reference":d,I=e.rects.popper,T=e.elements[A?j:y],S=Z(m(T)?T:T.contextElement||O(e.elements.popper),f,h),x=L(e.elements.reference),N=ee({reference:x,element:I,strategy:"absolute",placement:l}),w=X(Object.assign({},I,N)),C=y===d?w:x,R={top:S.top-C.top+v.top,bottom:C.bottom-S.bottom+v.bottom,left:S.left-C.left+v.left,right:C.right-S.right+v.right},M=e.modifiersData.offset;if(y===d&&M){var H=M[l];Object.keys(R).forEach((function(e){var r=[o,n].indexOf(e)>=0?1:-1,a=[t,n].indexOf(e)>=0?"y":"x";R[e]+=H[a]*r}))}return R}function ne(e,t){void 0===t&&(t={});var n=t,o=n.placement,r=n.boundary,a=n.rootBoundary,s=n.padding,l=n.flipVariations,c=n.allowedAutoPlacements,d=void 0===c?f:c,p=G(o),h=p?l?u:u.filter((function(e){return G(e)===p})):i,g=h.filter((function(e){return d.indexOf(e)>=0}));0===g.length&&(g=h);var m=g.reduce((function(t,n){return t[n]=te(e,{placement:n,boundary:r,rootBoundary:a,padding:s})[E(n)],t}),{});return Object.keys(m).sort((function(e,t){return m[e]-m[t]}))}var oe={name:"flip",enabled:!0,phase:"main",fn:function(e){var i=e.state,l=e.options,c=e.name;if(!i.modifiersData[c]._skip){for(var d=l.mainAxis,u=void 0===d||d,f=l.altAxis,p=void 0===f||f,h=l.fallbackPlacements,g=l.padding,m=l.boundary,y=l.rootBoundary,b=l.altBoundary,A=l.flipVariations,_=void 0===A||A,v=l.allowedAutoPlacements,j=i.options.placement,L=E(j),I=h||(L===j||!_?[P(j)]:function(e){if(E(e)===a)return[];var t=P(e);return[U(e),t,U(t)]}(j)),T=[j].concat(I).reduce((function(e,t){return e.concat(E(t)===a?ne(i,{placement:t,boundary:m,rootBoundary:y,padding:g,flipVariations:_,allowedAutoPlacements:v}):t)}),[]),S=i.rects.reference,x=i.rects.popper,O=new Map,N=!0,w=T[0],C=0;C<T.length;C++){var R=T[C],M=E(R),$=G(R)===s,k=[t,n].indexOf(M)>=0,H=k?"width":"height",D=te(i,{placement:R,boundary:m,rootBoundary:y,altBoundary:b,padding:g}),B=k?$?o:r:$?n:t;S[H]>x[H]&&(B=P(B));var W=P(B),q=[];if(u&&q.push(D[M]<=0),p&&q.push(D[B]<=0,D[W]<=0),q.every((function(e){return e}))){w=R,N=!1;break}O.set(R,q)}if(N)for(var F=function(e){var t=T.find((function(t){var n=O.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return w=t,"break"},K=_?3:1;K>0;K--){if("break"===F(K))break}i.placement!==w&&(i.modifiersData[c]._skip=!0,i.placement=w,i.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function re(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function ae(e){return[t,o,n,r].some((function(t){return e[t]>=0}))}var ie={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var n=e.state,a=e.options,i=e.name,s=a.offset,l=void 0===s?[0,0]:s,c=f.reduce((function(e,a){return e[a]=function(e,n,a){var i=E(e),s=[r,t].indexOf(i)>=0?-1:1,l="function"==typeof a?a(Object.assign({},n,{placement:e})):a,c=l[0],d=l[1];return c=c||0,d=(d||0)*s,[r,o].indexOf(i)>=0?{x:d,y:c}:{x:c,y:d}}(a,n.rects,l),e}),{}),d=c[n.placement],u=d.x,p=d.y;null!=n.modifiersData.popperOffsets&&(n.modifiersData.popperOffsets.x+=u,n.modifiersData.popperOffsets.y+=p),n.modifiersData[i]=c}};var se={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var a=e.state,i=e.options,l=e.name,c=i.mainAxis,d=void 0===c||c,u=i.altAxis,f=void 0!==u&&u,p=i.boundary,h=i.rootBoundary,g=i.altBoundary,m=i.padding,y=i.tether,b=void 0===y||y,A=i.tetherOffset,j=void 0===A?0:A,L=te(a,{boundary:p,rootBoundary:h,padding:m,altBoundary:g}),T=E(a.placement),S=G(a.placement),x=!S,O=R(T),N="x"===O?"y":"x",w=a.modifiersData.popperOffsets,$=a.rects.reference,k=a.rects.popper,H="function"==typeof j?j(Object.assign({},a.rects,{placement:a.placement})):j,D="number"==typeof H?{mainAxis:H,altAxis:H}:Object.assign({mainAxis:0,altAxis:0},H),B=a.modifiersData.offset?a.modifiersData.offset[a.placement]:null,W={x:0,y:0};if(w){if(d){var q,P="y"===O?t:r,F="y"===O?n:o,U="y"===O?"height":"width",K=w[O],V=K+L[P],Y=K-L[F],z=b?-k[U]/2:0,Q=S===s?$[U]:k[U],X=S===s?-k[U]:-$[U],J=a.elements.arrow,Z=b&&J?I(J):{width:0,height:0},ee=a.modifiersData["arrow#persistent"]?a.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},ne=ee[P],oe=ee[F],re=M(0,$[U],Z[U]),ae=x?$[U]/2-z-re-ne-D.mainAxis:Q-re-ne-D.mainAxis,ie=x?-$[U]/2+z+re+oe+D.mainAxis:X+re+oe+D.mainAxis,se=a.elements.arrow&&C(a.elements.arrow),le=se?"y"===O?se.clientTop||0:se.clientLeft||0:0,ce=null!=(q=null==B?void 0:B[O])?q:0,de=K+ie-ce,ue=M(b?v(V,K+ae-ce-le):V,K,b?_(Y,de):Y);w[O]=ue,W[O]=ue-K}if(f){var fe,pe="x"===O?t:r,he="x"===O?n:o,ge=w[N],me="y"===N?"height":"width",ye=ge+L[pe],be=ge-L[he],Ae=-1!==[t,r].indexOf(T),Ee=null!=(fe=null==B?void 0:B[N])?fe:0,_e=Ae?ye:ge-$[me]-k[me]-Ee+D.altAxis,ve=Ae?ge+$[me]+k[me]-Ee-D.altAxis:be,je=b&&Ae?function(e,t,n){var o=M(e,t,n);return o>n?n:o}(_e,ge,ve):M(b?_e:ye,ge,b?ve:be);w[N]=je,W[N]=je-ge}a.modifiersData[l]=W}},requiresIfExists:["offset"]};function le(e,t,n){void 0===n&&(n=!1);var o,r,a=y(t),i=y(t)&&function(e){var t=e.getBoundingClientRect(),n=j(t.width)/e.offsetWidth||1,o=j(t.height)/e.offsetHeight||1;return 1!==n||1!==o}(t),s=O(t),l=L(e,i),c={scrollLeft:0,scrollTop:0},d={x:0,y:0};return(a||!a&&!n)&&(("body"!==h(t)||Y(s))&&(c=(o=t)!==g(o)&&y(o)?{scrollLeft:(r=o).scrollLeft,scrollTop:r.scrollTop}:K(o)),y(t)?((d=L(t,!0)).x+=t.clientLeft,d.y+=t.clientTop):s&&(d.x=V(s))),{x:l.left+c.scrollLeft-d.x,y:l.top+c.scrollTop-d.y,width:l.width,height:l.height}}function ce(e){var t=new Map,n=new Set,o=[];function r(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var o=t.get(e);o&&r(o)}})),o.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||r(e)})),o}var de={placement:"bottom",modifiers:[],strategy:"absolute"};function ue(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function fe(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,o=void 0===n?[]:n,r=t.defaultOptions,a=void 0===r?de:r;return function(e,t,n){void 0===n&&(n=a);var r,i,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},de,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],c=!1,d={state:s,setOptions:function(n){var r="function"==typeof n?n(s.options):n;u(),s.options=Object.assign({},a,s.options,r),s.scrollParents={reference:m(e)?Q(e):e.contextElement?Q(e.contextElement):[],popper:Q(t)};var i,c,f=function(e){var t=ce(e);return p.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}((i=[].concat(o,s.options.modifiers),c=i.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{}),Object.keys(c).map((function(e){return c[e]}))));return s.orderedModifiers=f.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,o=void 0===n?{}:n,r=e.effect;if("function"==typeof r){var a=r({state:s,name:t,instance:d,options:o}),i=function(){};l.push(a||i)}})),d.update()},forceUpdate:function(){if(!c){var e=s.elements,t=e.reference,n=e.popper;if(ue(t,n)){s.rects={reference:le(t,C(n),"fixed"===s.options.strategy),popper:I(n)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)}));for(var o=0;o<s.orderedModifiers.length;o++)if(!0!==s.reset){var r=s.orderedModifiers[o],a=r.fn,i=r.options,l=void 0===i?{}:i,u=r.name;"function"==typeof a&&(s=a({state:s,options:l,name:u,instance:d})||s)}else s.reset=!1,o=-1}}},update:(r=function(){return new Promise((function(e){d.forceUpdate(),e(s)}))},function(){return i||(i=new Promise((function(e){Promise.resolve().then((function(){i=void 0,e(r())}))}))),i}),destroy:function(){u(),c=!0}};if(!ue(e,t))return d;function u(){l.forEach((function(e){return e()})),l=[]}return d.setOptions(n).then((function(e){!c&&n.onFirstUpdate&&n.onFirstUpdate(e)})),d}}var pe=fe({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,o=e.options,r=o.scroll,a=void 0===r||r,i=o.resize,s=void 0===i||i,l=g(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&c.forEach((function(e){e.addEventListener("scroll",n.update,W)})),s&&l.addEventListener("resize",n.update,W),function(){a&&c.forEach((function(e){e.removeEventListener("scroll",n.update,W)})),s&&l.removeEventListener("resize",n.update,W)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=ee({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,o=n.gpuAcceleration,r=void 0===o||o,a=n.adaptive,i=void 0===a||a,s=n.roundOffsets,l=void 0===s||s,c={placement:E(t.placement),variation:G(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,B(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,B(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},A,ie,oe,se,H,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,o=t.rects.reference,r=t.rects.popper,a=t.modifiersData.preventOverflow,i=te(t,{elementContext:"reference"}),s=te(t,{altBoundary:!0}),l=re(i,o),c=re(s,r,a),d=ae(l),u=ae(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:u},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":u})}}]}),he="tippy-content",ge="tippy-arrow",me="tippy-svg-arrow",ye={passive:!0,capture:!0},be=function(){return document.body};function Ae(e,t,n){if(Array.isArray(e)){var o=e[t];return null==o?Array.isArray(n)?n[t]:n:o}return e}function Ee(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function _e(e,t){return"function"==typeof e?e.apply(void 0,t):e}function ve(e,t){return 0===t?e:function(o){clearTimeout(n),n=setTimeout((function(){e(o)}),t)};var n}function je(e){return[].concat(e)}function Le(e,t){-1===e.indexOf(t)&&e.push(t)}function Ie(e){return[].slice.call(e)}function Te(e){return Object.keys(e).reduce((function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t}),{})}function Se(){return document.createElement("div")}function xe(e){return["Element","Fragment"].some((function(t){return Ee(e,t)}))}function Oe(e){return xe(e)?[e]:function(e){return Ee(e,"NodeList")}(e)?Ie(e):Array.isArray(e)?e:Ie(document.querySelectorAll(e))}function Ne(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function we(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function Ce(e,t,n){var o=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[o](t,n)}))}function Re(e,t){for(var n=t;n;){var o;if(e.contains(n))return!0;n=null==n.getRootNode||null==(o=n.getRootNode())?void 0:o.host}return!1}var Me={isTouch:!1},$e=0;function ke(){Me.isTouch||(Me.isTouch=!0,window.performance&&document.addEventListener("mousemove",He))}function He(){var e=performance.now();e-$e<20&&(Me.isTouch=!1,document.removeEventListener("mousemove",He)),$e=e}function Ge(){var e,t=document.activeElement;if((e=t)&&e._tippy&&e._tippy.reference===e){var n=t._tippy;t.blur&&!n.state.isVisible&&t.blur()}}var De=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto,Be=Object.assign({appendTo:be,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),We=Object.keys(Be);function qe(e){var t=(e.plugins||[]).reduce((function(t,n){var o,r=n.name,a=n.defaultValue;r&&(t[r]=void 0!==e[r]?e[r]:null!=(o=Be[r])?o:a);return t}),{});return Object.assign({},e,t)}function Pe(e,t){var n=Object.assign({},t,{content:_e(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(qe(Object.assign({},Be,{plugins:t}))):We).reduce((function(t,n){var o=(e.getAttribute("data-tippy-"+n)||"").trim();if(!o)return t;if("content"===n)t[n]=o;else try{t[n]=JSON.parse(o)}catch(e){t[n]=o}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},Be.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function Fe(e,t){e.innerHTML=t}function Ue(e){var t=Se();return!0===e?t.className=ge:(t.className=me,xe(e)?t.appendChild(e):Fe(t,e)),t}function Ke(e,t){xe(t.content)?(Fe(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?Fe(e,t.content):e.textContent=t.content)}function Ve(e){var t=e.firstElementChild,n=Ie(t.children);return{box:t,content:n.find((function(e){return e.classList.contains(he)})),arrow:n.find((function(e){return e.classList.contains(ge)||e.classList.contains(me)})),backdrop:n.find((function(e){return e.classList.contains("tippy-backdrop")}))}}function Ye(e){var t=Se(),n=Se();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var o=Se();function r(n,o){var r=Ve(t),a=r.box,i=r.content,s=r.arrow;o.theme?a.setAttribute("data-theme",o.theme):a.removeAttribute("data-theme"),"string"==typeof o.animation?a.setAttribute("data-animation",o.animation):a.removeAttribute("data-animation"),o.inertia?a.setAttribute("data-inertia",""):a.removeAttribute("data-inertia"),a.style.maxWidth="number"==typeof o.maxWidth?o.maxWidth+"px":o.maxWidth,o.role?a.setAttribute("role",o.role):a.removeAttribute("role"),n.content===o.content&&n.allowHTML===o.allowHTML||Ke(i,e.props),o.arrow?s?n.arrow!==o.arrow&&(a.removeChild(s),a.appendChild(Ue(o.arrow))):a.appendChild(Ue(o.arrow)):s&&a.removeChild(s)}return o.className=he,o.setAttribute("data-state","hidden"),Ke(o,e.props),t.appendChild(n),n.appendChild(o),r(e.props,e.props),{popper:t,onUpdate:r}}Ye.$$tippy=!0;var ze=1,Qe=[],Xe=[];function Je(e,t){var n,o,r,a,i,s,l,c,d=Pe(e,Object.assign({},Be,qe(Te(t)))),u=!1,f=!1,p=!1,h=!1,g=[],m=ve(V,d.interactiveDebounce),y=ze++,b=(c=d.plugins).filter((function(e,t){return c.indexOf(e)===t})),A={id:y,reference:e,popper:Se(),popperInstance:null,props:d,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:b,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(o),cancelAnimationFrame(r)},setProps:function(t){if(A.state.isDestroyed)return;R("onBeforeUpdate",[A,t]),U();var n=A.props,o=Pe(e,Object.assign({},n,Te(t),{ignoreAttributes:!0}));A.props=o,F(),n.interactiveDebounce!==o.interactiveDebounce&&(k(),m=ve(V,o.interactiveDebounce));n.triggerTarget&&!o.triggerTarget?je(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):o.triggerTarget&&e.removeAttribute("aria-expanded");$(),C(),v&&v(n,o);A.popperInstance&&(X(),Z().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));R("onAfterUpdate",[A,t])},setContent:function(e){A.setProps({content:e})},show:function(){var e=A.state.isVisible,t=A.state.isDestroyed,n=!A.state.isEnabled,o=Me.isTouch&&!A.props.touch,r=Ae(A.props.duration,0,Be.duration);if(e||t||n||o)return;if(x().hasAttribute("disabled"))return;if(R("onShow",[A],!1),!1===A.props.onShow(A))return;A.state.isVisible=!0,S()&&(_.style.visibility="visible");C(),B(),A.state.isMounted||(_.style.transition="none");if(S()){var a=N(),i=a.box,l=a.content;Ne([i,l],0)}s=function(){var e;if(A.state.isVisible&&!h){if(h=!0,_.offsetHeight,_.style.transition=A.props.moveTransition,S()&&A.props.animation){var t=N(),n=t.box,o=t.content;Ne([n,o],r),we([n,o],"visible")}M(),$(),Le(Xe,A),null==(e=A.popperInstance)||e.forceUpdate(),R("onMount",[A]),A.props.animation&&S()&&function(e,t){q(e,t)}(r,(function(){A.state.isShown=!0,R("onShown",[A])}))}},function(){var e,t=A.props.appendTo,n=x();e=A.props.interactive&&t===be||"parent"===t?n.parentNode:_e(t,[n]);e.contains(_)||e.appendChild(_);A.state.isMounted=!0,X()}()},hide:function(){var e=!A.state.isVisible,t=A.state.isDestroyed,n=!A.state.isEnabled,o=Ae(A.props.duration,1,Be.duration);if(e||t||n)return;if(R("onHide",[A],!1),!1===A.props.onHide(A))return;A.state.isVisible=!1,A.state.isShown=!1,h=!1,u=!1,S()&&(_.style.visibility="hidden");if(k(),W(),C(!0),S()){var r=N(),a=r.box,i=r.content;A.props.animation&&(Ne([a,i],o),we([a,i],"hidden"))}M(),$(),A.props.animation?S()&&function(e,t){q(e,(function(){!A.state.isVisible&&_.parentNode&&_.parentNode.contains(_)&&t()}))}(o,A.unmount):A.unmount()},hideWithInteractivity:function(e){O().addEventListener("mousemove",m),Le(Qe,m),m(e)},enable:function(){A.state.isEnabled=!0},disable:function(){A.hide(),A.state.isEnabled=!1},unmount:function(){A.state.isVisible&&A.hide();if(!A.state.isMounted)return;J(),Z().forEach((function(e){e._tippy.unmount()})),_.parentNode&&_.parentNode.removeChild(_);Xe=Xe.filter((function(e){return e!==A})),A.state.isMounted=!1,R("onHidden",[A])},destroy:function(){if(A.state.isDestroyed)return;A.clearDelayTimeouts(),A.unmount(),U(),delete e._tippy,A.state.isDestroyed=!0,R("onDestroy",[A])}};if(!d.render)return A;var E=d.render(A),_=E.popper,v=E.onUpdate;_.setAttribute("data-tippy-root",""),_.id="tippy-"+A.id,A.popper=_,e._tippy=A,_._tippy=A;var j=b.map((function(e){return e.fn(A)})),L=e.hasAttribute("aria-expanded");return F(),$(),C(),R("onCreate",[A]),d.showOnCreate&&ee(),_.addEventListener("mouseenter",(function(){A.props.interactive&&A.state.isVisible&&A.clearDelayTimeouts()})),_.addEventListener("mouseleave",(function(){A.props.interactive&&A.props.trigger.indexOf("mouseenter")>=0&&O().addEventListener("mousemove",m)})),A;function I(){var e=A.props.touch;return Array.isArray(e)?e:[e,0]}function T(){return"hold"===I()[0]}function S(){var e;return!(null==(e=A.props.render)||!e.$$tippy)}function x(){return l||e}function O(){var e,t,n=x().parentNode;return n?null!=(t=je(n)[0])&&null!=(e=t.ownerDocument)&&e.body?t.ownerDocument:document:document}function N(){return Ve(_)}function w(e){return A.state.isMounted&&!A.state.isVisible||Me.isTouch||a&&"focus"===a.type?0:Ae(A.props.delay,e?0:1,Be.delay)}function C(e){void 0===e&&(e=!1),_.style.pointerEvents=A.props.interactive&&!e?"":"none",_.style.zIndex=""+A.props.zIndex}function R(e,t,n){var o;(void 0===n&&(n=!0),j.forEach((function(n){n[e]&&n[e].apply(n,t)})),n)&&(o=A.props)[e].apply(o,t)}function M(){var t=A.props.aria;if(t.content){var n="aria-"+t.content,o=_.id;je(A.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(A.state.isVisible)e.setAttribute(n,t?t+" "+o:o);else{var r=t&&t.replace(o,"").trim();r?e.setAttribute(n,r):e.removeAttribute(n)}}))}}function $(){!L&&A.props.aria.expanded&&je(A.props.triggerTarget||e).forEach((function(e){A.props.interactive?e.setAttribute("aria-expanded",A.state.isVisible&&e===x()?"true":"false"):e.removeAttribute("aria-expanded")}))}function k(){O().removeEventListener("mousemove",m),Qe=Qe.filter((function(e){return e!==m}))}function H(t){if(!Me.isTouch||!p&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!A.props.interactive||!Re(_,n)){if(je(A.props.triggerTarget||e).some((function(e){return Re(e,n)}))){if(Me.isTouch)return;if(A.state.isVisible&&A.props.trigger.indexOf("click")>=0)return}else R("onClickOutside",[A,t]);!0===A.props.hideOnClick&&(A.clearDelayTimeouts(),A.hide(),f=!0,setTimeout((function(){f=!1})),A.state.isMounted||W())}}}function G(){p=!0}function D(){p=!1}function B(){var e=O();e.addEventListener("mousedown",H,!0),e.addEventListener("touchend",H,ye),e.addEventListener("touchstart",D,ye),e.addEventListener("touchmove",G,ye)}function W(){var e=O();e.removeEventListener("mousedown",H,!0),e.removeEventListener("touchend",H,ye),e.removeEventListener("touchstart",D,ye),e.removeEventListener("touchmove",G,ye)}function q(e,t){var n=N().box;function o(e){e.target===n&&(Ce(n,"remove",o),t())}if(0===e)return t();Ce(n,"remove",i),Ce(n,"add",o),i=o}function P(t,n,o){void 0===o&&(o=!1),je(A.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,o),g.push({node:e,eventType:t,handler:n,options:o})}))}function F(){var e;T()&&(P("touchstart",K,{passive:!0}),P("touchend",Y,{passive:!0})),(e=A.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch(P(e,K),e){case"mouseenter":P("mouseleave",Y);break;case"focus":P(De?"focusout":"blur",z);break;case"focusin":P("focusout",z)}}))}function U(){g.forEach((function(e){var t=e.node,n=e.eventType,o=e.handler,r=e.options;t.removeEventListener(n,o,r)})),g=[]}function K(e){var t,n=!1;if(A.state.isEnabled&&!Q(e)&&!f){var o="focus"===(null==(t=a)?void 0:t.type);a=e,l=e.currentTarget,$(),!A.state.isVisible&&Ee(e,"MouseEvent")&&Qe.forEach((function(t){return t(e)})),"click"===e.type&&(A.props.trigger.indexOf("mouseenter")<0||u)&&!1!==A.props.hideOnClick&&A.state.isVisible?n=!0:ee(e),"click"===e.type&&(u=!n),n&&!o&&te(e)}}function V(e){var t=e.target,n=x().contains(t)||_.contains(t);if("mousemove"!==e.type||!n){var o=Z().concat(_).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:d}:null})).filter(Boolean);(function(e,t){var n=t.clientX,o=t.clientY;return e.every((function(e){var t=e.popperRect,r=e.popperState,a=e.props.interactiveBorder,i=r.placement.split("-")[0],s=r.modifiersData.offset;if(!s)return!0;var l="bottom"===i?s.top.y:0,c="top"===i?s.bottom.y:0,d="right"===i?s.left.x:0,u="left"===i?s.right.x:0,f=t.top-o+l>a,p=o-t.bottom-c>a,h=t.left-n+d>a,g=n-t.right-u>a;return f||p||h||g}))})(o,e)&&(k(),te(e))}}function Y(e){Q(e)||A.props.trigger.indexOf("click")>=0&&u||(A.props.interactive?A.hideWithInteractivity(e):te(e))}function z(e){A.props.trigger.indexOf("focusin")<0&&e.target!==x()||A.props.interactive&&e.relatedTarget&&_.contains(e.relatedTarget)||te(e)}function Q(e){return!!Me.isTouch&&T()!==e.type.indexOf("touch")>=0}function X(){J();var t=A.props,n=t.popperOptions,o=t.placement,r=t.offset,a=t.getReferenceClientRect,i=t.moveTransition,l=S()?Ve(_).arrow:null,c=a?{getBoundingClientRect:a,contextElement:a.contextElement||x()}:e,d={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(S()){var n=N().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}},u=[{name:"offset",options:{offset:r}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!i}},d];S()&&l&&u.push({name:"arrow",options:{element:l,padding:3}}),u.push.apply(u,(null==n?void 0:n.modifiers)||[]),A.popperInstance=pe(c,_,Object.assign({},n,{placement:o,onFirstUpdate:s,modifiers:u}))}function J(){A.popperInstance&&(A.popperInstance.destroy(),A.popperInstance=null)}function Z(){return Ie(_.querySelectorAll("[data-tippy-root]"))}function ee(e){A.clearDelayTimeouts(),e&&R("onTrigger",[A,e]),B();var t=w(!0),o=I(),r=o[0],a=o[1];Me.isTouch&&"hold"===r&&a&&(t=a),t?n=setTimeout((function(){A.show()}),t):A.show()}function te(e){if(A.clearDelayTimeouts(),R("onUntrigger",[A,e]),A.state.isVisible){if(!(A.props.trigger.indexOf("mouseenter")>=0&&A.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&u)){var t=w(!1);t?o=setTimeout((function(){A.state.isVisible&&A.hide()}),t):r=requestAnimationFrame((function(){A.hide()}))}}else W()}}function Ze(e,t){void 0===t&&(t={});var n=Be.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",ke,ye),window.addEventListener("blur",Ge);var o=Object.assign({},t,{plugins:n}),r=Oe(e).reduce((function(e,t){var n=t&&Je(t,o);return n&&e.push(n),e}),[]);return xe(e)?r[0]:r}Ze.defaultProps=Be,Ze.setDefaultProps=function(e){Object.keys(e).forEach((function(t){Be[t]=e[t]}))},Ze.currentInput=Me,Object.assign({},A,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}}),Ze.setDefaultProps({render:Ye});const et=e=>{const t=document.createElement("div");return t.textContent=e,t.innerHTML.replaceAll('"',""").replaceAll("'","'").replaceAll("`","`")},tt={langStrings:{},addI18n:function(e){this.langStrings=e},_:function(e){return this.translate(e)},sprintf:function(e,...t){let n=this._(e);return t&&t.length&&t.forEach((e=>{n=n.replace(/%\([a-zA-z]+\)/,e)})),n},translate:function(e){return this.langStrings[e]||e}},nt={langCode:"en",checkRoot:"main",readabilityRoot:"main",readabilityLang:"en",containerIgnore:".jooa11y-ignore",outlineIgnore:"",headerIgnore:"",imageIgnore:"",linkIgnore:"",linkIgnoreSpan:"noscript, span.sr-only-example",linksToFlag:"",videoContent:"video, [src*='youtube.com'], [src*='vimeo.com'], [src*='yuja.com'], [src*='panopto.com']",audioContent:"audio, [src*='soundcloud.com'], [src*='simplecast.com'], [src*='podbean.com'], [src*='buzzsprout.com'], [src*='blubrry.com'], [src*='transistor.fm'], [src*='fusebox.fm'], [src*='libsyn.com']",embeddedContent:"",suspiciousAltWords:["image","graphic","picture","photo"],placeholderAltStopWords:["alt","image","photo","decorative","photo","placeholder","placeholder image","spacer","."],partialAltStopWords:["click","click here","click here for more","click here to learn more","click here to learn more.","check out","download","download here","download here.","find out","find out more","find out more.","form","here","here.","info","information","link","learn","learn more","learn more.","learn to","more","page","paper","read more","read","read this","this","this page","this page.","this website","this website.","view","view our","website","."],warningAltWords:["< "," >","click here"],newWindowPhrases:["external","new tab","new window","pop-up","pop up"],fileTypePhrases:["document","pdf","doc","docx","word","mp3","ppt","text","pptx","powerpoint","txt","exe","dmg","rtf","install","windows","macos","spreadsheet","worksheet","csv","xls","xlsx","video","mp4","mov","avi"]};nt.embeddedContent=`${nt.videoContent}, ${nt.audioContent}`;e.Jooa11y=class{constructor(e){this.containerIgnore="",this.imageIgnore="",this.headerIgnore="",this.linkIgnore="",this.options=((e,t)=>{const n=t?Object.assign(nt,t):nt;if(["langCode","checkRoot"].forEach((e=>{if(!n[e])throw new Error(`Option [${e}] is required`)})),n.readabilityRoot||(n.readabilityRoot=n.checkRoot),n.containerIgnore){let e=n.containerIgnore.split(",").map((e=>`${e} *, ${e}`));n.containerIgnore='[aria-hidden="true"], #jooa11y-container *, .jooa11y-instance *, '+e.join(", ")}else n.containerIgnore='[aria-hidden="true"], #jooa11y-container *, .jooa11y-instance *';return e.containerIgnore=n.containerIgnore,e.imageIgnore=e.containerIgnore+', [role="presentation"], [src^="https://trck.youvisit.com"]',n.imageIgnore&&(e.imageIgnore=n.imageIgnore+","+e.imageIgnore),e.headerIgnore=n.containerIgnore,n.headerIgnore&&(e.headerIgnore=n.headerIgnore+","+e.headerIgnore),e.linkIgnore=e.containerIgnore+', [aria-hidden="true"], .anchorjs-link',n.linkIgnore&&(e.linkIgnore=n.linkIgnore+","+e.linkIgnore),n})(this,e);const t=document.createElement("div");t.setAttribute("id","jooa11y-container"),t.setAttribute("role","region"),t.setAttribute("lang",this.options.langCode),t.setAttribute("aria-label",tt._("CONTAINER_LABEL"));let n="On"===localStorage.getItem("jooa11y-remember-contrast"),o="On"===localStorage.getItem("jooa11y-remember-labels"),r="On"===localStorage.getItem("jooa11y-remember-links-advanced"),a="On"===localStorage.getItem("jooa11y-remember-readability");t.innerHTML=`<button type="button" aria-expanded="false" id="jooa11y-toggle" aria-describedby="jooa11y-notification-badge" aria-label="${tt._("MAIN_TOGGLE_LABEL")}">\n <svg role='img' focusable='false' width='35px' height='35px' aria-hidden='true' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path fill='#ffffff' d='M256 48c114.953 0 208 93.029 208 208 0 114.953-93.029 208-208 208-114.953 0-208-93.029-208-208 0-114.953 93.029-208 208-208m0-40C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm0 56C149.961 64 64 149.961 64 256s85.961 192 192 192 192-85.961 192-192S362.039 64 256 64zm0 44c19.882 0 36 16.118 36 36s-16.118 36-36 36-36-16.118-36-36 16.118-36 36-36zm117.741 98.023c-28.712 6.779-55.511 12.748-82.14 15.807.851 101.023 12.306 123.052 25.037 155.621 3.617 9.26-.957 19.698-10.217 23.315-9.261 3.617-19.699-.957-23.316-10.217-8.705-22.308-17.086-40.636-22.261-78.549h-9.686c-5.167 37.851-13.534 56.208-22.262 78.549-3.615 9.255-14.05 13.836-23.315 10.217-9.26-3.617-13.834-14.056-10.217-23.315 12.713-32.541 24.185-54.541 25.037-155.621-26.629-3.058-53.428-9.027-82.141-15.807-8.6-2.031-13.926-10.648-11.895-19.249s10.647-13.926 19.249-11.895c96.686 22.829 124.283 22.783 220.775 0 8.599-2.03 17.218 3.294 19.249 11.895 2.029 8.601-3.297 17.219-11.897 19.249z'/></svg>\n <div id="jooa11y-notification-badge">\n <span id="jooa11y-notification-count"></span>\n </div>\n </button><div id="jooa11y-panel"><div id="jooa11y-outline-panel" role="tabpanel" aria-labelledby="jooa11y-outline-header">\n <div id="jooa11y-outline-header" class="jooa11y-header-text">\n <h2 tabindex="-1">${tt._("PAGE_OUTLINE")}</h2>\n </div>\n <div id="jooa11y-outline-content">\n <ul id="jooa11y-outline-list"></ul>\n </div><div id="jooa11y-readability-panel">\n <div id="jooa11y-readability-content">\n <h2 class="jooa11y-header-text-inline">${tt._("READABILITY")}</h2>\n <p id="jooa11y-readability-info"></p>\n <ul id="jooa11y-readability-details"></ul>\n </div>\n </div>\n </div><div id="jooa11y-settings-panel" role="tabpanel" aria-labelledby="jooa11y-settings-header">\n <div id="jooa11y-settings-header" class="jooa11y-header-text">\n <h2 tabindex="-1">${tt._("SETTINGS")}</h2>\n </div>\n <div id="jooa11y-settings-content">\n <ul id="jooa11y-settings-options">\n <li>\n <label id="check-contrast" for="jooa11y-contrast-toggle">${tt._("CONTRAST")}</label>\n <button id="jooa11y-contrast-toggle"\n aria-labelledby="check-contrast"\n class="jooa11y-settings-switch"\n aria-pressed="${n?"true":"false"}">${n?tt._("ON"):tt._("OFF")}</button>\n </li>\n <li>\n <label id="check-labels" for="jooa11y-labels-toggle">${tt._("FORM_LABELS")}</label>\n <button id="jooa11y-labels-toggle" aria-labelledby="check-labels" class="jooa11y-settings-switch"\n aria-pressed="${o?"true":"false"}">${o?tt._("ON"):tt._("OFF")}</button>\n </li>\n <li>\n <label id="check-changerequest" for="jooa11y-links-advanced-toggle">${tt._("LINKS_ADVANCED")}<span class="jooa11y-badge">AAA</span></label>\n <button id="jooa11y-links-advanced-toggle" aria-labelledby="check-changerequest" class="jooa11y-settings-switch"\n aria-pressed="${r?"true":"false"}">${r?tt._("ON"):tt._("OFF")}</button>\n </li>\n <li>\n <label id="check-readability" for="jooa11y-readability-toggle">${tt._("READABILITY")}<span class="jooa11y-badge">AAA</span></label>\n <button id="jooa11y-readability-toggle" aria-labelledby="check-readability" class="jooa11y-settings-switch"\n aria-pressed="${a?"true":"false"}">${a?tt._("ON"):tt._("OFF")}</button>\n </li>\n <li>\n <label id="dark-mode" for="jooa11y-theme-toggle">${tt._("DARK_MODE")}</label>\n <button id="jooa11y-theme-toggle" aria-labelledby="dark-mode" class="jooa11y-settings-switch"></button>\n </li>\n </ul>\n </div>\n </div><div id="jooa11y-panel-alert">\n <div class="jooa11y-header-text">\n <button id="jooa11y-close-alert" class="jooa11y-close-btn" aria-label="${tt._("ALERT_CLOSE")}" aria-describedby="jooa11y-alert-heading jooa11y-panel-alert-text"></button>\n <h2 id="jooa11y-alert-heading">${tt._("ALERT_TEXT")}</h2>\n </div>\n <p id="jooa11y-panel-alert-text"></p>\n <div id="jooa11y-panel-alert-preview"></div>\n </div><div id="jooa11y-panel-content">\n <button id="jooa11y-cycle-toggle" type="button" aria-label="${tt._("SHORTCUT_SR")}">\n <div class="jooa11y-panel-icon"></div>\n </button>\n <div id="jooa11y-panel-text"><p id="jooa11y-status" aria-live="polite"></p></div>\n </div><div id="jooa11y-panel-controls" role="tablist" aria-orientation="horizontal">\n <button type="button" role="tab" aria-expanded="false" id="jooa11y-outline-toggle" aria-controls="jooa11y-outline-panel">\n ${tt._("SHOW_OUTLINE")}\n </button>\n <button type="button" role="tab" aria-expanded="false" id="jooa11y-settings-toggle" aria-controls="jooa11y-settings-panel">\n ${tt._("SHOW_SETTINGS")}\n </button>\n <div style="width:35px"></div>\n </div></div>`,document.body.append(t),this.settingPanelToggles(),this.jooa11yMainToggle(),this.sanitizeHTMLandComputeARIA(),this.initializeJumpToIssueTooltip()}jooa11yMainToggle(){const e=document.getElementById("jooa11y-toggle");e.addEventListener("click",(t=>{"Opened"===localStorage.getItem("jooa11y-remember-panel")?(localStorage.setItem("jooa11y-remember-panel","Closed"),e.classList.remove("jooa11y-on"),e.setAttribute("aria-expanded","false"),this.resetAll(),this.updateBadge(),t.preventDefault()):(localStorage.setItem("jooa11y-remember-panel","Opened"),e.classList.add("jooa11y-on"),e.setAttribute("aria-expanded","true"),this.checkAll(),document.getElementById("jooa11y-notification-badge").style.display="none",t.preventDefault())})),"Opened"===localStorage.getItem("jooa11y-remember-panel")&&(e.classList.add("jooa11y-on"),e.setAttribute("aria-expanded","true")),e.classList.contains("jooa11y-on")&&(e.classList.toggle("loading-jooa11y"),e.setAttribute("aria-expanded","true"),setTimeout(this.checkAll,800)),document.onkeydown=t=>{if(("key"in(t=t||window.event)?"Escape"===t.key||"Esc"===t.key:27===t.keyCode)&&document.getElementById("jooa11y-panel").classList.contains("jooa11y-active")&&(e.setAttribute("aria-expanded","false"),e.classList.remove("jooa11y-on"),e.click(),this.resetAll()),t.altKey&&"KeyA"==t.code){const e=document.getElementById("jooa11y-toggle");e.click(),e.focus(),t.preventDefault()}}}sanitizeHTMLandComputeARIA(){this.computeTextNodeWithImage=function(e){const t=Array.from(e.querySelectorAll("img"));let n="";if(0===t.length&&e.textContent.trim().length>1)n=e.textContent.trim();else if(t.length&&0===e.textContent.trim().length){let e=t[0].getAttribute("alt");e&&" "!==e?void 0!==e&&(n=e):n=" "}else t.length&&e.textContent.trim().length&&(t.forEach((e=>{e.insertAdjacentHTML("afterend"," <span class='jooa11y-clone-image-text' aria-hidden='true'>"+t[0].getAttribute("alt")+"</span> ")})),n=e.textContent.trim());return n},this.computeAriaLabel=function(e){if(e.matches("[aria-label]"))return e.getAttribute("aria-label");if(e.matches("[aria-labelledby]")){let t=e.getAttribute("aria-labelledby").split(/\s+/);if(t.length>0){let e="";return t.forEach((t=>{null===document.querySelector("#"+t)?e+=" ":e+=document.querySelector("#"+t).firstChild.nodeValue+" "})),e}return""}if(Array.from(e.children).filter((e=>e.matches("[aria-label]"))).length>0)return Array.from(e.children)[0].getAttribute("aria-label");if(Array.from(e.children).filter((e=>e.matches("[title]"))).length>0)return Array.from(e.children)[0].getAttribute("title");if(Array.from(e.children).filter((e=>e.matches("[aria-labelledby]"))).length>0){let t=Array.from(e.children)[0].getAttribute("aria-labelledby").split(/\s+/);if(t.length>0){let e="";return t.forEach((t=>{null===document.querySelector("#"+t)?e+=" ":e+=document.querySelector("#"+t).firstChild.nodeValue+" "})),e}return""}return"noAria"}}settingPanelToggles(){const e=document.getElementById("jooa11y-contrast-toggle");e.onclick=async()=>{"On"===localStorage.getItem("jooa11y-remember-contrast")?(localStorage.setItem("jooa11y-remember-contrast","Off"),e.textContent=tt._("OFF"),e.setAttribute("aria-pressed","false"),this.resetAll(!1),await this.checkAll()):(localStorage.setItem("jooa11y-remember-contrast","On"),e.textContent=tt._("ON"),e.setAttribute("aria-pressed","true"),this.resetAll(!1),await this.checkAll())};const t=document.getElementById("jooa11y-labels-toggle");t.onclick=async()=>{"On"===localStorage.getItem("jooa11y-remember-labels")?(localStorage.setItem("jooa11y-remember-labels","Off"),t.textContent=tt._("OFF"),t.setAttribute("aria-pressed","false"),this.resetAll(!1),await this.checkAll()):(localStorage.setItem("jooa11y-remember-labels","On"),t.textContent=tt._("ON"),t.setAttribute("aria-pressed","true"),this.resetAll(!1),await this.checkAll())};const n=document.getElementById("jooa11y-links-advanced-toggle");n.onclick=async()=>{"On"===localStorage.getItem("jooa11y-remember-links-advanced")?(localStorage.setItem("jooa11y-remember-links-advanced","Off"),n.textContent=tt._("OFF"),n.setAttribute("aria-pressed","false"),this.resetAll(!1),await this.checkAll()):(localStorage.setItem("jooa11y-remember-links-advanced","On"),n.textContent=tt._("ON"),n.setAttribute("aria-pressed","true"),this.resetAll(!1),await this.checkAll())};const o=document.getElementById("jooa11y-readability-toggle");o.onclick=async()=>{"On"===localStorage.getItem("jooa11y-remember-readability")?(localStorage.setItem("jooa11y-remember-readability","Off"),o.textContent=tt._("OFF"),o.setAttribute("aria-pressed","false"),document.getElementById("jooa11y-readability-panel").classList.remove("jooa11y-active"),this.resetAll(!1),await this.checkAll()):(localStorage.setItem("jooa11y-remember-readability","On"),o.textContent=tt._("ON"),o.setAttribute("aria-pressed","true"),document.getElementById("jooa11y-readability-panel").classList.add("jooa11y-active"),this.resetAll(!1),await this.checkAll())},"On"===localStorage.getItem("jooa11y-remember-readability")&&document.getElementById("jooa11y-readability-panel").classList.add("jooa11y-active");let r=window.matchMedia("(prefers-color-scheme: dark)");const a=document.getElementById("jooa11y-theme-toggle"),i=document.querySelector("html"),s=localStorage.getItem("jooa11y-remember-theme");r.matches?(a.textContent=tt._("ON"),a.setAttribute("aria-pressed","true")):(a.textContent=tt._("OFF"),a.setAttribute("aria-pressed","false")),r.addEventListener("change",(function(e){e.matches?(i.setAttribute("data-jooa11y-theme","dark"),a.textContent=tt._("ON"),a.setAttribute("aria-pressed","true"),localStorage.setItem("jooa11y-remember-theme","")):(i.setAttribute("data-jooa11y-theme","light"),a.textContent=tt._("OFF"),a.setAttribute("aria-pressed","false"),localStorage.setItem("jooa11y-remember-theme",""))})),a.onclick=async()=>{const e=localStorage.getItem("jooa11y-remember-theme");"dark"===e?(i.setAttribute("data-jooa11y-theme","light"),localStorage.setItem("jooa11y-remember-theme","light"),a.textContent=tt._("OFF"),a.setAttribute("aria-pressed","false")):"light"===e?(i.setAttribute("data-jooa11y-theme","dark"),localStorage.setItem("jooa11y-remember-theme","dark"),a.textContent=tt._("ON"),a.setAttribute("aria-pressed","true")):r.matches?(i.setAttribute("data-jooa11y-theme","light"),localStorage.setItem("jooa11y-remember-theme","light"),a.textContent=tt._("OFF"),a.setAttribute("aria-pressed","false")):(i.setAttribute("data-jooa11y-theme","dark"),localStorage.setItem("jooa11y-remember-theme","dark"),a.textContent=tt._("OFF"),a.setAttribute("aria-pressed","true"))},"dark"===s?(i.setAttribute("data-jooa11y-theme","dark"),localStorage.setItem("jooa11y-remember-theme","dark"),a.textContent=tt._("ON"),a.setAttribute("aria-pressed","true")):"light"===s&&(i.setAttribute("data-jooa11y-theme","light"),localStorage.setItem("jooa11y-remember-theme","light"),a.textContent=tt._("OFF"),a.setAttribute("aria-pressed","false"))}initializeJumpToIssueTooltip(){Ze("#jooa11y-cycle-toggle",{content:`<div style="text-align:center">${tt._("SHORTCUT_TOOLTIP")} »<br><span class="jooa11y-shortcut-icon"></span></div>`,allowHTML:!0,delay:[900,0],trigger:"mouseenter focusin",arrow:!0,placement:"top",theme:"jooa11y-theme",aria:{content:null,expanded:!1},appendTo:document.body})}doInitialCheck(){"Closed"!==localStorage.getItem("jooa11y-remember-panel")&&localStorage.getItem("jooa11y-remember-panel")||(this.panelActive=!0,this.checkAll())}checkAll=async()=>{this.errorCount=0,this.warningCount=0,this.$root=document.querySelector(this.options.checkRoot),this.findElements(),this.checkHeaders(),this.checkLinkText(),this.checkUnderline(),this.checkAltText(),"On"===localStorage.getItem("jooa11y-remember-contrast")&&this.checkContrast(),"On"===localStorage.getItem("jooa11y-remember-labels")&&this.checkLabels(),"On"===localStorage.getItem("jooa11y-remember-links-advanced")&&this.checkLinksAdvanced(),"On"===localStorage.getItem("jooa11y-remember-readability")&&this.checkReadability(),this.checkEmbeddedContent(),this.checkQA(),this.panelActive?this.resetAll():this.updatePanel(),this.initializeTooltips(),this.detectOverflow(),this.nudge(),document.getElementsByClassName("jooa11y-on").length||this.updateBadge()};resetAll(e=!0){this.panelActive=!1,this.clearEverything();const t=document.getElementById("jooa11y-outline-toggle"),n=t.cloneNode(!0);t.parentNode.replaceChild(n,t);const o=document.getElementById("jooa11y-settings-toggle"),r=o.cloneNode(!0);o.parentNode.replaceChild(r,o),document.querySelectorAll(".jooa11y-error-border").forEach((e=>e.classList.remove("jooa11y-error-border"))),document.querySelectorAll(".jooa11y-error-text").forEach((e=>e.classList.remove("jooa11y-error-text"))),document.querySelectorAll(".jooa11y-warning-border").forEach((e=>e.classList.remove("jooa11y-warning-border"))),document.querySelectorAll(".jooa11y-warning-text").forEach((e=>e.classList.remove("jooa11y-warning-text"))),document.querySelectorAll("p").forEach((e=>e.classList.remove("jooa11y-fake-list"))),document.querySelectorAll(".jooa11y-warning-uppercase").forEach((e=>e.outerHTML=e.innerHTML)),document.querySelectorAll(".jooa11y-good-border").forEach((e=>e.classList.remove("jooa11y-good-border"))),document.querySelectorAll(".jooa11y-good-text").forEach((e=>e.classList.remove("jooa11y-good-text"))),document.querySelectorAll("\n .jooa11y-instance,\n .jooa11y-instance-inline,\n .jooa11y-heading-label,\n #jooa11y-outline-list li,\n .jooa11y-readability-period,\n #jooa11y-readability-info span,\n #jooa11y-readability-details li,\n .jooa11y-clone-image-text\n ").forEach((e=>e.parentNode.removeChild(e))),document.querySelectorAll(".jooa11y-overflow").forEach((e=>e.classList.remove("jooa11y-overflow"))),document.querySelectorAll(".jooa11y-fake-heading").forEach((e=>e.classList.remove("jooa11y-fake-heading"))),document.querySelectorAll(".jooa11y-pulse-border").forEach((e=>e.classList.remove("jooa11y-pulse-border"))),document.querySelector("#jooa11y-panel-alert").classList.remove("jooa11y-active");for(var a=document.querySelector("#jooa11y-panel-alert-text");a.firstChild;)a.removeChild(a.firstChild);for(var i=document.querySelector("#jooa11y-status");i.firstChild;)i.removeChild(i.firstChild);e&&document.querySelector("#jooa11y-panel").classList.remove("jooa11y-active")}clearEverything(){}initializeTooltips(){Ze(".jooa11y-btn",{interactive:!0,trigger:"mouseenter click focusin",arrow:!0,delay:[200,0],theme:"jooa11y-theme",placement:"bottom",allowHTML:!0,aria:{content:"describedby"},appendTo:document.body})}detectOverflow(){document.querySelectorAll(".jooa11y-btn").forEach((function(e){const t=((e,t,n)=>{for(;null!==e;){if(window.getComputedStyle(e).getPropertyValue(t)===n)return e;e=e.parentElement}return null})(e,"overflow","hidden");null!==t&&t.classList.add("jooa11y-overflow")}))}nudge=()=>{document.querySelectorAll(".jooa11y-instance, .jooa11y-instance-inline").forEach((e=>{const t=e.nextElementSibling;null!==t&&(t.classList.contains("jooa11y-instance")||t.classList.contains("jooa11y-instance-inline"))&&t.querySelector("button").setAttribute("style","margin: -10px -20px !important;")}))};updateBadge(){let e=this.errorCount+this.warningCount;const t=document.getElementById("jooa11y-notification-badge");0===e?t.style.display="none":(t.style.display="flex",document.getElementById("jooa11y-notification-count").innerHTML=tt.sprintf("PANEL_STATUS_ICON",e))}updatePanel(){this.panelActive=!0,this.errorCount,this.warningCount,this.buildPanel(),this.skipToIssue();const e=document.getElementById("jooa11y-cycle-toggle");e.disabled=!1,e.setAttribute("style","cursor: pointer !important;");document.getElementById("jooa11y-panel").classList.add("jooa11y-active");const t=document.getElementById("jooa11y-panel-content"),n=document.getElementById("jooa11y-status"),o=document.querySelectorAll(".jooa11y-btn");this.errorCount>0&&this.warningCount>0?(t.setAttribute("class","jooa11y-errors"),n.textContent=tt.sprintf("PANEL_STATUS_BOTH",this.errorCount,this.warningCount)):this.errorCount>0?(t.setAttribute("class","jooa11y-errors"),n.textContent=tt.sprintf("PANEL_STATUS_ERRORS",this.errorCount)):this.warningCount>0?(t.setAttribute("class","jooa11y-warnings"),n.textContent=tt.sprintf("PANEL_STATUS_WARNINGS",this.warningCount)):(t.setAttribute("class","jooa11y-good"),n.textContent=tt._("PANEL_STATUS_NONE"),0===o.length&&(e.disabled=!0,e.setAttribute("style","cursor: default !important;")))}buildPanel=()=>{const e=document.getElementById("jooa11y-outline-toggle"),t=document.getElementById("jooa11y-outline-panel"),n=document.getElementById("jooa11y-outline-list"),o=document.getElementById("jooa11y-settings-toggle"),r=document.getElementById("jooa11y-settings-panel"),a=document.getElementById("jooa11y-settings-content"),i=document.querySelectorAll(".jooa11y-heading-label");e.addEventListener("click",(()=>{"true"===e.getAttribute("aria-expanded")?(e.classList.remove("jooa11y-outline-active"),t.classList.remove("jooa11y-active"),e.textContent=tt._("SHOW_OUTLINE"),e.setAttribute("aria-expanded","false"),localStorage.setItem("jooa11y-remember-outline","Closed")):(e.classList.add("jooa11y-outline-active"),t.classList.add("jooa11y-active"),e.textContent=tt._("HIDE_OUTLINE"),e.setAttribute("aria-expanded","true"),localStorage.setItem("jooa11y-remember-outline","Opened")),document.querySelector("#jooa11y-outline-header > h2").focus(),i.forEach((e=>e.classList.toggle("jooa11y-label-visible"))),r.classList.remove("jooa11y-active"),o.classList.remove("jooa11y-settings-active"),o.setAttribute("aria-expanded","false"),o.textContent=tt._("SHOW_SETTINGS"),n.clientHeight>250&&n.setAttribute("tabindex","0")})),"Opened"===localStorage.getItem("jooa11y-remember-outline")&&(e.classList.add("jooa11y-outline-active"),t.classList.add("jooa11y-active"),e.textContent=tt._("HIDE_OUTLINE"),e.setAttribute("aria-expanded","true"),i.forEach((e=>e.classList.toggle("jooa11y-label-visible"))),n.clientHeight>250&&n.setAttribute("tabindex","0")),o.addEventListener("click",(()=>{"true"===o.getAttribute("aria-expanded")?(o.classList.remove("jooa11y-settings-active"),r.classList.remove("jooa11y-active"),o.textContent=tt._("SHOW_SETTINGS"),o.setAttribute("aria-expanded","false")):(o.classList.add("jooa11y-settings-active"),r.classList.add("jooa11y-active"),o.textContent=tt._("HIDE_SETTINGS"),o.setAttribute("aria-expanded","true")),document.querySelector("#jooa11y-settings-header > h2").focus(),t.classList.remove("jooa11y-active"),e.classList.remove("jooa11y-outline-active"),e.setAttribute("aria-expanded","false"),e.textContent=tt._("SHOW_OUTLINE"),i.forEach((e=>e.classList.remove("jooa11y-label-visible"))),localStorage.setItem("jooa11y-remember-outline","Closed"),a.clientHeight>350&&a.setAttribute("tabindex","0")})),document.getElementById("jooa11y-panel-controls").addEventListener("keydown",(function(e){const t=document.querySelectorAll("#jooa11y-outline-toggle[role=tab], #jooa11y-settings-toggle[role=tab]");if("ArrowRight"===e.key)for(let n=0;n<t.length;n++)if("true"===t[n].getAttribute("aria-expanded")||"false"===t[n].getAttribute("aria-expanded")){t[n+1].focus(),e.preventDefault();break}if("ArrowDown"===e.key)for(let n=0;n<t.length;n++)if("true"===t[n].getAttribute("aria-expanded")||"false"===t[n].getAttribute("aria-expanded")){t[n+1].focus(),e.preventDefault();break}if("ArrowLeft"===e.key)for(let n=t.length-1;n>0;n--)if("true"===t[n].getAttribute("aria-expanded")||"false"===t[n].getAttribute("aria-expanded")){t[n-1].focus(),e.preventDefault();break}if("ArrowUp"===e.key)for(let n=t.length-1;n>0;n--)if("true"===t[n].getAttribute("aria-expanded")||"false"===t[n].getAttribute("aria-expanded")){t[n-1].focus(),e.preventDefault();break}}));const s=document.getElementById("jooa11y-close-alert"),l=document.getElementById("jooa11y-panel-alert"),c=document.getElementById("jooa11y-panel-alert-text"),d=document.getElementById("jooa11y-cycle-toggle");s.addEventListener("click",(()=>{for(l.classList.remove("jooa11y-active");c.firstChild;)c.removeChild(c.firstChild);document.querySelectorAll(".jooa11y-pulse-border").forEach((e=>e.classList.remove("jooa11y-pulse-border"))),d.focus()}))};skipToIssue=()=>{let e=0;const t=document.querySelectorAll(".jooa11y-btn").length;document.addEventListener("keyup",(e=>{(e.altKey&&"Period"===e.code||"KeyS"==e.code)&&(n(),e.preventDefault())}));document.getElementById("jooa11y-cycle-toggle").addEventListener("click",(e=>{n(),e.preventDefault()}));const n=function(){const n=document.querySelectorAll(".jooa11y-btn"),o=document.getElementById("jooa11y-panel-alert"),r=document.getElementById("jooa11y-panel-alert-text"),a=document.getElementById("jooa11y-panel-alert-preview"),i=(e,t,n)=>{for(;null!==e;){if(window.getComputedStyle(e).getPropertyValue(t)===n)return e;e=e.parentElement}return null},s=e=>{let t=e.getBoundingClientRect(),n=window.pageYOffset||document.documentElement.scrollTop;return{top:t.top+n}};let l,c=n[e].offsetTop;if(0===c){let t=i(n[e],"display","none");l=s(t.previousElementSibling).top-50}else l=s(n[e]).top-50;c>=0?(setTimeout((function(){window.scrollTo({top:l,behavior:"smooth"})}),1),n.forEach((function(e){const t=i(e,"display","none");if(null!==t){t.previousElementSibling.classList.add("jooa11y-pulse-border")}})),n[e].focus()):n[e].focus(),0===c?(o.classList.add("jooa11y-active"),r.textContent=`${tt._("PANEL_STATUS_HIDDEN")}`,a.innerHTML=n[e].getAttribute("data-tippy-content")):c<1&&(o.classList.remove("jooa11y-active"),document.querySelectorAll(".jooa11y-pulse-border").forEach((e=>e.classList.remove("jooa11y-pulse-border")))),e+=1,e>=t&&(e=0)}};findElements(){const e=Array.from(this.$root.querySelectorAll("h1, h2, h3, h4, h5, h6, [role='heading'][aria-level]")),t=Array.from(this.$root.querySelectorAll("p"));this.$containerExclusions=Array.from(document.querySelectorAll(this.containerIgnore)),this.$h=e.filter((e=>!this.$containerExclusions.includes(e))),this.$p=t.filter((e=>!this.$containerExclusions.includes(e)))}checkHeaders(){let e;this.$h.forEach(((t,n)=>{let o,r=this.computeTextNodeWithImage(t),a=et(r);o=t.getAttribute("aria-level")?+t.getAttribute("aria-level"):+t.tagName.slice(1);let i=t.textContent.trim().length,s=null,l=null;if(o-e>1&&0!==n)s=tt.sprintf("HEADING_NON_CONSECUTIVE_LEVEL",e,o);else if(0===t.textContent.trim().length)if(t.querySelectorAll("img").length){const e=t.querySelector("img").getAttribute("alt");void 0!==e&&" "!==e&&""!==e||(s=tt.sprintf("HEADING_EMPTY_WITH_IMAGE",o),t.classList.add("jooa11y-error-text"))}else s=tt.sprintf("HEADING_EMPTY",o),t.classList.add("jooa11y-error-text");else 0===n&&1!==o&&2!==o?s=tt._("HEADING_FIRST"):t.textContent.trim().length>170&&(l=`${tt._("HEADING_LONG")} . ${tt.sprintf("HEADING_LONG_INFO",i)}`);e=o;let c=`<li class='jooa11y-outline-${o}'>\n <span class='jooa11y-badge'>${o}</span>\n <span class='jooa11y-outline-list-item'>${a}</span>\n </li>`,d=`<li class='jooa11y-outline-${o}'>\n <span class='jooa11y-badge jooa11y-error-badge'>\n <span aria-hidden='true'>✗</span>\n <span class='jooa11y-visually-hidden'>${tt._("ERROR")}</span> ${o}</span>\n <span class='jooa11y-outline-list-item jooa11y-red-text jooa11y-bold'>${a}</span>\n </li>`,u=`<li class='jooa11y-outline-${o}'>\n <span class='jooa11y-badge jooa11y-warning-badge'>\n <span aria-hidden='true'>?</span>\n <span class='jooa11y-visually-hidden'>${tt._("WARNING")}</span> ${o}</span>\n <span class='jooa11y-outline-list-item jooa11y-yellow-text jooa11y-bold'>${a}</span>\n </li>`,f=[];this.options.outlineIgnore&&(f=Array.from(document.querySelectorAll(this.options.outlineIgnore))),f.includes(t)||(t.insertAdjacentHTML("beforeend",`<span class='jooa11y-heading-label'>H${o}</span>`),null!=s&&t.closest("a")?(this.errorCount++,t.classList.add("jooa11y-error-border"),t.closest("a").insertAdjacentHTML("afterend",this.annotate(tt._("ERROR"),s,!0)),document.querySelector("#jooa11y-outline-list").insertAdjacentHTML("beforeend",d)):null!=s?(this.errorCount++,t.classList.add("jooa11y-error-border"),t.insertAdjacentHTML("beforebegin",this.annotate(tt._("ERROR"),s)),document.querySelector("#jooa11y-outline-list").insertAdjacentHTML("beforeend",d)):null!=l&&t.closest("a")?(this.warningCount++,t.closest("a").insertAdjacentHTML("afterend",this.annotate(tt._("WARNING"),l)),document.querySelector("#jooa11y-outline-list").insertAdjacentHTML("beforeend",u)):null!=l?(t.insertAdjacentHTML("beforebegin",this.annotate(tt._("WARNING"),l)),document.querySelector("#jooa11y-outline-list").insertAdjacentHTML("beforeend",u)):null!=s&&null!=l||document.querySelector("#jooa11y-outline-list").insertAdjacentHTML("beforeend",c))}));0===Array.from(this.$root.querySelectorAll('h1, [role="heading"][aria-level="1"]')).filter((e=>!this.$containerExclusions.includes(e))).length&&(this.errorCount++,document.querySelector("#jooa11y-outline-header").insertAdjacentHTML("afterend",`<div class='jooa11y-instance jooa11y-missing-h1'>\n <span class='jooa11y-badge jooa11y-error-badge'><span aria-hidden='true'>✗</span><span class='jooa11y-visually-hidden'>${tt._("ERROR")}</span></span>\n <span class='jooa11y-red-text jooa11y-bold'>${tt._("PANEL_HEADING_MISSING_ONE")}</span>\n </div>`),document.querySelector("#jooa11y-container").insertAdjacentHTML("afterend",this.annotateBanner(tt._("ERROR"),tt._("HEADING_MISSING_ONE"))))}checkLinkText(){const e=e=>{let t=[null,null,null];return this.options.partialAltStopWords.forEach((n=>{if(e.length===n.length&&e.toLowerCase().indexOf(n)>=0)return t[0]=n,!1})),this.options.warningAltWords.forEach((n=>{if(e.toLowerCase().indexOf(n)>=0)return t[1]=n,!1})),["http",".asp",".htm",".php",".edu/",".com/",".net/",".org/",".us/",".ca/",".de/",".icu/",".uk/",".ru/",".info/",".top/",".xyz/",".tk/",".cn/",".ga/",".cf/",".nl/",".io/"].forEach((n=>{if(e.toLowerCase().indexOf(n)>=0)return t[2]=n,!1})),t},t=Array.from(this.$root.querySelectorAll(this.linkIgnore));Array.from(this.$root.querySelectorAll("a[href]")).filter((e=>!t.includes(e))).forEach((t=>{let n=this.computeAriaLabel(t),o=t.getAttribute("aria-labelledby"),r=t.getAttribute("aria-label"),a=t.getAttribute("title"),i=null,s=null,l=null;if(t.children.length){let e=t.children[0];i=e.getAttribute("aria-labelledby"),s=e.getAttribute("aria-label"),l=e.getAttribute("title")}let c=e(((e,t)=>{const n=e.cloneNode(!0);return Array.from(t?n.querySelectorAll(t):n.children).forEach((e=>{e.parentElement.removeChild(e)})),n})(t,this.options.linkIgnoreSpan).textContent.trim());if("noAria"===n&&(n=t.textContent),t.getAttribute("href")&&!t.textContent.trim())if(t.querySelectorAll("img").length);else if(o||r)t.classList.add("jooa11y-good-border"),t.insertAdjacentHTML("beforebegin",this.annotate(tt._("GOOD"),tt.sprintf("LINK_LABEL",n),!0));else if(a){let e=a;t.classList.add("jooa11y-good-border"),t.insertAdjacentHTML("beforebegin",this.annotate(tt._("GOOD"),tt.sprintf("LINK_LABEL",e),!0))}else t.children.length?i||s||l?(t.classList.add("jooa11y-good-border"),t.insertAdjacentHTML("beforebegin",this.annotate(tt._("GOOD"),tt.sprintf("LINK_LABEL",n),!0))):(this.errorCount++,t.classList.add("jooa11y-error-border"),t.insertAdjacentHTML("afterend",this.annotate(tt._("ERROR"),tt.sprintf("LINK_EMPTY_LINK_NO_LABEL"),!0))):(this.errorCount++,t.classList.add("jooa11y-error-border"),t.insertAdjacentHTML("afterend",this.annotate(tt._("ERROR"),tt._("LINK_EMPTY"),!0)));else null!==c[0]?o?t.insertAdjacentHTML("beforebegin",this.annotate(tt._("GOOD"),tt.sprintf("LINK_LABEL",n),!0)):r?t.insertAdjacentHTML("beforebegin",this.annotate(tt._("GOOD"),tt.sprintf("LINK_LABEL",r),!0)):"true"===t.getAttribute("aria-hidden")&&"-1"===t.getAttribute("tabindex")||(this.errorCount++,t.classList.add("jooa11y-error-text"),t.insertAdjacentHTML("afterend",this.annotate(tt._("ERROR"),`${tt.sprintf("LINK_STOPWORD",c[0])} <hr aria-hidden="true"> ${tt._("LINK_STOPWORD_TIP")}`,!0))):null!==c[1]?(this.warningCount++,t.classList.add("jooa11y-warning-text"),t.insertAdjacentHTML("afterend",this.annotate(tt._("WARNING"),`${tt.sprintf("LINK_BEST_PRACTICES",c[1])} <hr aria-hidden="true"> ${tt._("LINK_BEST_PRACTICES_DETAILS")}`,!0))):null!=c[2]&&n.length>40&&(this.warningCount++,t.classList.add("jooa11y-warning-text"),t.insertAdjacentHTML("afterend",this.annotate(tt._("WARNING"),`${tt._("LINK_URL")} <hr aria-hidden="true"> ${tt._("LINK_URL_TIP")}`,!0)))}))}checkLinksAdvanced(){const e=Array.from(this.$root.querySelectorAll(this.linkIgnore+", #jooa11y-container a, .jooa11y-exclude")),t=Array.from(this.$root.querySelectorAll("a[href]")).filter((t=>!e.includes(t)));let n={};t.forEach((e=>{let t=this.computeAriaLabel(e);"noAria"===t&&(t=e.textContent);const o=e.matches("\n a[href$='.pdf'],\n a[href$='.doc'],\n a[href$='.zip'],\n a[href$='.mp3'],\n a[href$='.txt'],\n a[href$='.exe'],\n a[href$='.dmg'],\n a[href$='.rtf'],\n a[href$='.pptx'],\n a[href$='.ppt'],\n a[href$='.xls'],\n a[href$='.xlsx'],\n a[href$='.csv'],\n a[href$='.mp4'],\n a[href$='.mov'],\n a[href$='.avi']\n "),r=e.querySelector("img");let a=r&&r.getAttribute("alt")||"",i=t.trim().toLowerCase()+" "+a,s=e.getAttribute("href");0!==t.length&&(n[i]&&0!==i.length?n[s]||(this.warningCount++,e.classList.add("jooa11y-warning-text"),e.insertAdjacentHTML("afterend",this.annotate(tt._("WARNING"),`${tt._("LINK_IDENTICAL_NAME")} <hr aria-hidden="true"> ${tt.sprintf("LINK_IDENTICAL_NAME_TIP",t)}`,!0))):(n[i]=!0,n[s]=!0));const l=this.options.newWindowPhrases.some((function(e){return t.toLowerCase().indexOf(e)>=0})),c=this.options.fileTypePhrases.some((function(e){return t.toLowerCase().indexOf(e)>=0}));"_blank"!==e.getAttribute("target")||o||l||(this.warningCount++,e.classList.add("jooa11y-warning-text"),e.insertAdjacentHTML("afterend",this.annotate(tt._("WARNING"),`${tt._("NEW_TAB_WARNING")} <hr aria-hidden="true"> ${tt._("NEW_TAB_WARNING_TIP")}`,!0))),o&&!c&&(this.warningCount++,e.classList.add("jooa11y-warning-text"),e.insertAdjacentHTML("afterend",this.annotate(tt._("WARNING"),`${tt._("FILE_TYPE_WARNING")} <hr aria-hidden="true"> ${tt._("FILE_TYPE_WARNING_TIP")}`,!0)))}))}checkUnderline(){Array.from(this.$root.querySelectorAll("u")).forEach((e=>{this.warningCount++,e.insertAdjacentHTML("beforebegin",this.annotate(tt._("WARNING"),`${tt._("TEXT_UNDERLINE_WARNING")} <hr aria-hidden="true"> ${tt._("TEXT_UNDERLINE_WARNING_TIP")}`,!0))}));Array.from(this.$root.querySelectorAll("h1, h2, h3, h4, h5, h6, p, div, span, li, blockquote")).forEach((e=>{"underline"===getComputedStyle(e).textDecorationLine&&(this.warningCount++,e.insertAdjacentHTML("beforebegin",this.annotate(tt._("WARNING"),`${tt._("TEXT_UNDERLINE_WARNING")} <hr aria-hidden="true"> ${tt._("TEXT_UNDERLINE_WARNING_TIP")}`,!0)))}))}checkAltText(){const e=e=>{let t=[null,null,null];return[".png",".jpg",".jpeg",".gif",".tiff",".svg"].forEach((n=>{e.toLowerCase().indexOf(n)>=0&&(t[0]=n)})),this.options.suspiciousAltWords.forEach((n=>{e.toLowerCase().indexOf(n)>=0&&(t[1]=n)})),this.options.placeholderAltStopWords.forEach((n=>{e.length===n.length&&e.toLowerCase().indexOf(n)>=0&&(t[2]=n)})),t},t=Array.from(this.$root.querySelectorAll("img")),n=Array.from(this.$root.querySelectorAll(this.imageIgnore));t.filter((e=>!n.includes(e))).forEach((t=>{let n=t.getAttribute("alt");if(null===n)t.closest("a[href]")?t.closest("a[href]").textContent.trim().length>1?(t.classList.add("jooa11y-error-border"),t.closest("a[href]").insertAdjacentHTML("beforebegin",this.annotate(tt._("ERROR"),tt._("MISSING_ALT_LINK_BUT_HAS_TEXT_MESSAGE"),!1,!0))):0===t.closest("a[href]").textContent.trim().length&&(t.classList.add("jooa11y-error-border"),t.closest("a[href]").insertAdjacentHTML("beforebegin",this.annotate(tt._("ERROR"),tt._("MISSING_ALT_LINK_MESSAGE"),!1,!0))):(t.classList.add("jooa11y-error-border"),t.insertAdjacentHTML("beforebegin",this.annotate(tt._("ERROR"),tt._("MISSING_ALT_MESSAGE"),!1,!0)));else{let o=et(n),r=e(o),a=n.length;if(null!=r[0]&&t.closest("a[href]"))this.errorCount++,t.classList.add("jooa11y-error-border"),t.closest("a[href]").insertAdjacentHTML("beforebegin",this.annotate(tt._("ERROR"),`${tt.sprintf("LINK_IMAGE_BAD_ALT_MESSAGE",o,r[0])} <hr aria-hidden="true"> ${tt._("LINK_IMAGE_BAD_ALT_MESSAGE_INFO")}`,!1));else if(null!=r[2]&&t.closest("a[href]"))this.errorCount++,t.classList.add("jooa11y-error-border"),t.closest("a[href]").insertAdjacentHTML("beforebegin",this.annotate(tt._("ERROR"),tt.sprintf("LINK_IMAGE_PLACEHOLDER_ALT_MESSAGE",o),!1,!0));else if(null!=r[1]&&t.closest("a[href]"))this.warningCount++,t.classList.add("jooa11y-warning-border"),t.closest("a[href]").insertAdjacentHTML("beforebegin",this.annotate(tt._("WARNING"),`${tt.sprintf("LINK_IMAGE_SUS_ALT_MESSAGE",o,r[1])} <hr aria-hidden="true"> ${tt.sprintf("LINK_IMAGE_SUS_ALT_MESSAGE_INFO",o)}`,!1));else if(null!=r[0])this.errorCount++,t.classList.add("jooa11y-error-border"),t.insertAdjacentHTML("beforebegin",this.annotate(tt._("ERROR"),`${tt._("LINK_ALT_HAS_BAD_WORD_MESSAGE")} <hr aria-hidden="true"> ${tt.sprintf("LINK_ALT_HAS_BAD_WORD_MESSAGE_INFO",r[0],o)}`,!1));else if(null!=r[2])this.errorCount++,t.classList.add("jooa11y-error-border"),t.insertAdjacentHTML("beforebegin",this.annotate(tt._("ERROR"),tt.sprintf("LINK_ALT_PLACEHOLDER_MESSAGE",o),!1));else if(null!=r[1])this.warningCount++,t.classList.add("jooa11y-warning-border"),t.insertAdjacentHTML("beforebegin",this.annotate(tt._("WARNING"),`${tt.sprintf("LINK_ALT_HAS_SUS_WORD_MESSAGE",o,r[1])} <hr aria-hidden="true"> ${tt.sprintf("LINK_ALT_HAS_SUS_WORD_MESSAGE_INFO",o)}`,!1));else if(""!==n&&" "!==n||!t.closest("a[href]")){if(n.length>250&&t.closest("a[href]"))this.warningCount++,t.classList.add("jooa11y-warning-border"),t.closest("a[href]").insertAdjacentHTML("beforebegin",this.annotate(tt._("WARNING"),`${tt._("HYPERLINK_ALT_LENGTH_MESSAGE")} <hr aria-hidden="true"> ${tt.sprintf("HYPERLINK_ALT_LENGTH_MESSAGE_INFO",o,a)}`,!1));else if(""!==n&&t.closest("a[href]")&&0===t.closest("a[href]").textContent.trim().length)this.warningCount++,t.classList.add("jooa11y-warning-border"),t.closest("a[href]").insertAdjacentHTML("beforebegin",this.annotate(tt._("WARNING"),`${tt._("LINK_IMAGE_LINK_ALT_TEXT_MESSAGE")} <hr aria-hidden="true"> ${tt.sprintf("LINK_IMAGE_LINK_ALT_TEXT_MESSAGE_INFO",o)}`,!1));else if(""!==n&&t.closest("a[href]")&&t.closest("a[href]").textContent.trim().length>1)this.warningCount++,t.classList.add("jooa11y-warning-border"),t.closest("a[href]").insertAdjacentHTML("beforebegin",this.annotate(tt._("WARNING"),`${tt._("LINK_ANCHOR_LINK_AND_ALT_MESSAGE")} <hr aria-hidden="true"> ${tt.sprintf("LINK_ANCHOR_LINK_AND_ALT_MESSAGE_INFO",o)}`,!1));else if(""===n||" "===n)if(t.closest("figure")){const e=t.closest("figure").querySelector("figcaption");null!==e&&e.textContent.trim().length>=1&&(this.warningCount++,t.classList.add("jooa11y-warning-border"),t.insertAdjacentHTML("beforebegin",this.annotate(tt._("WARNING"),`${tt._("IMAGE_FIGURE_DECORATIVE")} <hr aria-hidden="true"> ${tt._("IMAGE_FIGURE_DECORATIVE_INFO")}`,!1,!0)))}else this.warningCount++,t.classList.add("jooa11y-warning-border"),t.insertAdjacentHTML("beforebegin",this.annotate(tt._("WARNING"),tt._("LINK_DECORATIVE_MESSAGE"),!1,!0));else if(n.length>250)this.warningCount++,t.classList.add("jooa11y-warning-border"),t.insertAdjacentHTML("beforebegin",this.annotate(tt._("WARNING"),`${tt._("LINK_ALT_TOO_LONG_MESSAGE")} <hr aria-hidden="true"> ${tt.sprintf("LINK_ALT_TOO_LONG_MESSAGE_INFO",o,a)}`,!1));else if(""!==n)if(t.closest("figure")){const e=t.closest("figure").querySelector("figcaption");null!==e&&e.textContent.trim().toLowerCase===o.trim().toLowerCase&&(this.warningCount++,t.classList.add("jooa11y-warning-border"),t.insertAdjacentHTML("beforebegin",this.annotate(tt._("WARNING"),`${tt.sprintf("IMAGE_FIGURE_DUPLICATE_ALT",o)} <hr aria-hidden="true"> ${tt._("IMAGE_FIGURE_DECORATIVE_INFO")}`,!1,!0)))}else t.insertAdjacentHTML("beforebegin",this.annotate(tt._("GOOD"),`${tt.sprintf("LINK_PASS_ALT",o)}`,!1,!0))}else"-1"===t.closest("a[href]").getAttribute("tabindex")&&"true"===t.closest("a[href]").getAttribute("aria-hidden")||("true"===t.closest("a[href]").getAttribute("aria-hidden")?(this.errorCount++,t.classList.add("jooa11y-error-border"),t.closest("a[href]").insertAdjacentHTML("beforebegin",this.annotate(tt._("ERROR"),tt._("LINK_HYPERLINKED_IMAGE_ARIA_HIDDEN"),!1,!0))):0===t.closest("a[href]").textContent.trim().length?(this.errorCount++,t.classList.add("jooa11y-error-border"),t.closest("a[href]").insertAdjacentHTML("beforebegin",this.annotate(tt._("ERROR"),tt._("LINK_IMAGE_LINK_NULL_ALT_NO_TEXT_MESSAGE"),!1,!0))):t.closest("a[href]").insertAdjacentHTML("beforebegin",this.annotate(tt._("GOOD"),tt._("LINK_LINK_HAS_ALT_MESSAGE"),!1,!0)))}}))}checkLabels(){Array.from(this.$root.querySelectorAll("input, select, textarea")).filter((e=>{return!(this.$containerExclusions.includes(e)||(t=e,t.getAttribute("hidden")||0===t.offsetWidth&&0===t.offsetHeight||"none"===getComputedStyle(t).getPropertyValue("display")));var t})).forEach((e=>{let t=this.computeAriaLabel(e);const n=e.getAttribute("type");if("submit"===n||"button"===n||"hidden"===n);else if("image"===n){let t=e.getAttribute("alt");t&&" "!==t||e.getAttribute("aria-label")||(this.errorCount++,e.classList.add("jooa11y-error-border"),e.insertAdjacentHTML("afterend",this.annotate(tt._("ERROR"),tt._("LABELS_MISSING_IMAGE_INPUT_MESSAGE"),!0)))}else if("reset"===n)this.warningCount++,e.classList.add("jooa11y-warning-border"),e.insertAdjacentHTML("afterend",this.annotate(tt._("WARNING"),`${tt._("LABELS_INPUT_RESET_MESSAGE")} <hr aria-hidden="true"> ${tt._("LABELS_INPUT_RESET_MESSAGE_TIP")}`,!0));else if(e.getAttribute("aria-label")||e.getAttribute("aria-labelledby")||e.getAttribute("title"))if(e.getAttribute("title")){let t=e.getAttribute("title");this.warningCount++,e.classList.add("jooa11y-warning-border"),e.insertAdjacentHTML("afterend",this.annotate(tt._("WARNING"),`${tt._("LABELS_ARIA_LABEL_INPUT_MESSAGE")} <hr aria-hidden="true"> ${tt.sprintf("LABELS_ARIA_LABEL_INPUT_MESSAGE_INFO",t)}`,!0))}else this.warningCount++,e.classList.add("jooa11y-warning-border"),e.insertAdjacentHTML("afterend",this.annotate(tt._("WARNING"),`${tt._("LABELS_ARIA_LABEL_INPUT_MESSAGE")} <hr aria-hidden="true"> ${tt.sprintf("LABELS_ARIA_LABEL_INPUT_MESSAGE_INFO",t)}`,!0));else if(e.closest("label")&&e.closest("label").textContent.trim());else if(e.getAttribute("id")&&Array.from(e.parentElement.children).filter((e=>"LABEL"===e.nodeName)).length){const t=Array.from(e.parentElement.children).filter((e=>"LABEL"===e.nodeName));let n=!1;t.forEach((t=>{n||t.getAttribute("for")===e.getAttribute("id")&&(n=!0)})),n||(this.errorCount++,e.classList.add("jooa11y-error-border"),e.insertAdjacentHTML("afterend",this.annotate(tt._("ERROR"),`${tt._("LABELS_NO_FOR_ATTRIBUTE_MESSAGE")} <hr aria-hidden="true"> ${tt.sprintf("LABELS_NO_FOR_ATTRIBUTE_MESSAGE_INFO",e.getAttribute("id"))}`,!0)))}else this.errorCount++,e.classList.add("jooa11y-error-border"),e.insertAdjacentHTML("afterend",this.annotate(tt._("ERROR"),tt._("LABELS_MISSING_LABEL_MESSAGE"),!0))}))}checkEmbeddedContent(){const e=Array.from(this.$root.querySelectorAll("iframe, audio, video")).filter((e=>!this.$containerExclusions.includes(e)));e.filter((e=>e.matches(this.options.videoContent))).forEach((e=>{let t=e.getElementsByTagName("TRACK");"VIDEO"===e.tagName&&t.length||(this.warningCount++,e.classList.add("jooa11y-warning-border"),e.insertAdjacentHTML("beforebegin",this.annotate(tt._("WARNING"),tt._("EMBED_VIDEO"))))}));e.filter((e=>e.matches(this.options.audioContent))).forEach((e=>{this.warningCount++,e.classList.add("jooa11y-warning-border"),e.insertAdjacentHTML("beforebegin",this.annotate(tt._("WARNING"),tt._("EMBED_AUDIO")))})),e.forEach((e=>{"VIDEO"===e.tagName||"AUDIO"===e.tagName||"true"===e.getAttribute("aria-hidden")||null!==e.getAttribute("hidden")||"none"===e.style.display||"presentation"===e.getAttribute("role")||null!==e.getAttribute("title")&&""!==e.getAttribute("title")||null!==e.getAttribute("aria-label")&&""!==e.getAttribute("aria-label")||null===e.getAttribute("aria-labelledby")&&(e.classList.contains("jooa11y-warning-border")&&e.classList.remove("jooa11y-warning-border"),this.errorCount++,e.classList.add("jooa11y-error-border"),e.insertAdjacentHTML("beforebegin",this.annotate(tt._("ERROR"),tt._("EMBED_MISSING_TITLE"))))}));e.filter((e=>!e.matches(this.options.embeddedContent))).forEach((e=>{"VIDEO"===e.tagName||"AUDIO"===e.tagName||"true"===e.getAttribute("aria-hidden")||null!==e.getAttribute("hidden")||"none"===e.style.display||"presentation"===e.getAttribute("role")||"-1"===e.getAttribute("tabindex")||(this.warningCount++,e.classList.add("jooa11y-warning-border"),e.insertAdjacentHTML("beforebegin",this.annotate(tt._("WARNING"),tt._("EMBED_GENERAL_WARNING"))))}))}checkQA(){(this.options.linksToFlag?Array.from(this.$root.querySelectorAll(this.options.linksToFlag)):[]).filter((e=>!this.$containerExclusions.includes(e))).forEach((e=>{this.errorCount++,e.classList.add("jooa11y-error-text"),e.insertAdjacentHTML("afterend",this.annotate(tt._("ERROR"),tt.sprintf("QA_BAD_LINK",e.getAttribute("href")),!0))}));let e=Array.from(this.$root.querySelectorAll('a[href$=".pdf"]')).filter((e=>!this.$containerExclusions.includes(e))),t=e[0],n=e.length;e.length>0&&(this.warningCount++,e.forEach((e=>{e.classList.add("jooa11y-warning-text"),e.querySelector("img")&&e.classList.remove("jooa11y-warning-text")})),t.insertAdjacentHTML("afterend",this.annotate(tt._("WARNING"),tt.sprintf("QA_PDF_COUNT",n),!0)));Array.from(this.$root.querySelectorAll("h1, h2, h3, h4, h5, h6, p, li:not([class^='jooa11y']), blockquote")).filter((e=>!this.$containerExclusions.includes(e))).forEach((function(e){let t=e.innerHTML;e.innerHTML=t.replace(/(?!<a[^>]*?>)(\b[A-Z][',!:A-Z\s]{15,}|\b[A-Z]{15,}\b)(?![^<]*?<\/a>)/g,"<span class='jooa11y-warning-uppercase'>$1</span>")}));const o=document.querySelectorAll(".jooa11y-warning-uppercase");o.forEach((e=>{e.insertAdjacentHTML("afterend",this.annotate(tt._("WARNING"),tt._("QA_UPPERCASE_WARNING"),!0))})),o.length>0&&this.warningCount++;Array.from(this.$root.querySelectorAll("table:not([role='presentation'])")).filter((e=>!this.$containerExclusions.includes(e))).forEach((e=>{let t=e.querySelectorAll("th"),n=e.querySelectorAll("h1, h2, h3, h4, h5, h6");0===t.length&&(this.errorCount++,e.classList.add("jooa11y-error-border"),e.insertAdjacentHTML("beforebegin",this.annotate(tt._("ERROR"),tt._("TABLES_MISSING_HEADINGS")))),n.length>0&&(this.errorCount++,n.forEach((e=>{e.classList.add("jooa11y-error-border"),e.insertAdjacentHTML("beforebegin",this.annotate(tt._("ERROR"),`${tt._("TABLES_SEMANTIC_HEADING")} <hr aria-hidden="true"> ${tt._("TABLES_SEMANTIC_HEADING_INFO")}`))}))),t.forEach((e=>{0===e.textContent.trim().length&&(this.errorCount++,e.classList.add("jooa11y-error-border"),e.innerHTML=this.annotate(tt._("ERROR"),`${tt._("TABLES_EMPTY_HEADING")} <hr aria-hidden="true"> ${tt._("TABLES_EMPTY_HEADING_INFO")}`))}))}));const r=document.querySelector("html").getAttribute("lang");if(!r||r.length<2){this.errorCount++;document.getElementById("jooa11y-container").insertAdjacentHTML("afterend",this.annotateBanner(tt._("ERROR"),tt._("QA_PAGE_LANGUAGE_MESSAGE")))}Array.from(this.$root.querySelectorAll("strong, em")).filter((e=>!this.$containerExclusions.includes(e))).forEach((e=>{e.textContent.trim().length>200&&(this.warningCount++,e.insertAdjacentHTML("beforebegin",this.annotate(tt._("WARNING"),tt._("QA_BAD_ITALICS"))))}));Array.from(this.$root.querySelectorAll("blockquote")).filter((e=>!this.$containerExclusions.includes(e))).forEach((e=>{let t=e.textContent;t.trim().length<25&&(this.warningCount++,e.classList.add("jooa11y-warning-border"),e.insertAdjacentHTML("beforebegin",this.annotate(tt._("WARNING"),`${tt.sprintf("QA_BLOCKQUOTE_MESSAGE",t)} <hr aria-hidden="true"> ${tt._("QA_BLOCKQUOTE_MESSAGE_TIP")}`)))})),this.$p.forEach((e=>{let t=e.innerHTML.indexOf("</strong><br>"),n=e.innerHTML.indexOf("<br></strong>");if(e&&e.textContent.trim().length>=300){let o=e.firstChild;if("STRONG"===o.tagName&&(-1!==n||-1!==t)){let t=o.textContent;!e.closest("table")&&t.length<=120&&(o.classList.add("jooa11y-fake-heading","jooa11y-warning-border"),e.insertAdjacentHTML("beforebegin",this.annotate(tt._("WARNING"),`${tt.sprintf("QA_FAKE_HEADING",t)} <hr aria-hidden="true"> ${tt._("QA_FAKE_HEADING_INFO")}`)))}}if(/^<(strong)>.+<\/\1>$/.test(e.innerHTML.trim())){const t=e.previousElementSibling;let n="";if(null!==t&&(n=t.tagName),!e.closest("table")&&e.textContent.length<=120&&"H"!==n.charAt(0)){let t=e.textContent;e.classList.add("jooa11y-fake-heading","jooa11y-warning-border"),e.firstChild.insertAdjacentHTML("afterend",this.annotate(tt._("WARNING"),`${tt.sprintf("QA_FAKE_HEADING",t)} <hr aria-hidden="true"> ${tt._("QA_FAKE_HEADING_INFO")}`))}}})),this.$root.querySelectorAll(".jooa11y-fake-heading").length>0&&this.warningCount++;const a=this.$root.querySelectorAll("[id]");let i={};a.forEach((e=>{let t=e.id;t&&(void 0===i[t]?i[t]=1:(e.classList.add("sa11y-error-border"),e.insertAdjacentHTML("beforebegin",this.annotate(tt._("WARNING"),`${tt._("QA_DUPLICATE_ID")}\n\t\t\t\t\t\t\t\t<hr aria-hidden="true">\n\t\t\t\t\t\t\t\t${tt.sprintf("QA_DUPLICATE_ID_TIP",t)}`,!0))))}));let s="",l={b:"a",B:"A",2:"1"},c=/a\.|a\)|A\.|A\)|1\.|1\)|\*\s|-\s|--|•\s|→\s|✓\s|✔\s|✗\s|✖\s|✘\s|❯\s|›\s|»\s/,d=function(e){return e.replace(/^b|^B|^2/,(function(e){return l[e]}))};this.$p.forEach((e=>{let t=!1,n=e.textContent.substring(0,2);if(n.trim().length>0&&n!==s&&n.match(c)){let o=e.innerHTML.indexOf("<br>");if(-1!==o){let r=e.innerHTML.substring(o+4).trim().substring(0,2);n===d(r)&&(t=!0)}if(!t){if("P"===e.nextElementSibling.nodeName?e.nextElementSibling:null){n===d(e.nextElementSibling.textContent.substring(0,2))&&(t=!0)}}t?(this.warningCount++,e.insertAdjacentHTML("beforebegin",this.annotate(tt._("WARNING"),`${tt.sprintf("QA_SHOULD_BE_LIST",n)} <hr aria-hidden="true"> ${tt._("QA_SHOULD_BE_LIST_TIP")}`)),e.classList.add("jooa11y-fake-list"),s=n):s=""}else s=""})),this.$root.querySelectorAll(".jooa11y-fake-list").length>0&&this.warningCount++}checkContrast(){const e=Array.from(this.$root.querySelectorAll("* > :not(.jooa11y-heading-label)")).filter((e=>!this.$containerExclusions.includes(e)));var t={errors:[],warnings:[]};let n=e,o={parseRgb:function(e){let t,n,o,r,a;if(n=e.match(/rgb\(\s*(\-?\d+),\s*(\-?\d+)\s*,\s*(\-?\d+)\s*\)/)){for(o=n.slice(1,4),t=r=0;r<=2;t=++r)o[t]=+o[t];o[3]=1}else if(n=e.match(/rgba\(\s*(\-?\d+),\s*(\-?\d+)\s*,\s*(\-?\d+)\s*,\s*([01]|[01]?\.\d+)\)/))for(o=n.slice(1,5),t=a=0;a<=3;t=++a)o[t]=+o[t];return o},relativeLuminance:function(e){let t=[];for(let n=0;n<3;n++){let o=e[n]/255;t.push(o<.03928?o/12.92:Math.pow((o+.055)/1.055,2.4))}return.2126*t[0]+.7152*t[1]+.0722*t[2]},contrastRatio:function(e,t){let n=o.relativeLuminance(o.parseRgb(e)),r=o.relativeLuminance(o.parseRgb(t));return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)},getBackground:function(e){let t=getComputedStyle(e),n=t.backgroundColor,r=t.backgroundImage,a=(o.parseRgb(n)+"").split(",");return a[3]<1&&a[3]>0?"alpha":"rgba(0, 0, 0, 0)"!==n&&"transparent"!==n&&"none"===r&&"0"!==a[3]?n:"none"!==r?"image":"HTML"===e.tagName?"rgb(255, 255, 255)":o.getBackground(e.parentNode)},check:function(){t={errors:[],warnings:[]};for(let e=0;e<n.length;e++)!function(e){if(o){let n,r,a,i=getComputedStyle(e),s=i.color,l=i.fill,c=3*parseInt(i.fontSize)/4,d=i.fontWeight,u=e.tagName,f=o.getBackground(e),p=[].reduce.call(e.childNodes,(function(e,t){return e+(3===t.nodeType?t.textContent:"")}),"").trim();"SVG"===u?(n=Math.round(100*o.contrastRatio(l,f))/100,n<3&&(r={elem:e,ratio:n+":1"},t.errors.push(r))):(p.length||"INPUT"===u||"SELECT"===u||"TEXTAREA"===u)&&("image"===f||"alpha"===f?(a={elem:e},t.warnings.push(a)):(n=Math.round(100*o.contrastRatio(s,f))/100,c>=18||c>=14&&d>=700?n<3&&(r={elem:e,ratio:n+":1"},t.errors.push(r)):n<4.5&&(r={elem:e,ratio:n+":1"},t.errors.push(r))))}}(n[e]);return t}};o.check(),t.errors.forEach((e=>{let t=e.elem,n=e.ratio,o=t.cloneNode(!0),r=o.querySelectorAll(".jooa11y-heading-label");for(let e=0;e<r.length;e++)o.removeChild(r[e]);let a=o.textContent;this.errorCount++,"INPUT"===t.tagName?t.insertAdjacentHTML("beforebegin",this.annotate(tt._("ERROR"),`${tt._("CONTRAST_ERROR_INPUT_MESSAGE")}\n <hr aria-hidden="true">\n ${tt.sprintf("CONTRAST_ERROR_INPUT_MESSAGE_INFO",n)}`,!0)):t.insertAdjacentHTML("beforebegin",this.annotate(tt._("ERROR"),`${tt.sprintf("CONTRAST_ERROR_MESSAGE",n,a)}\n <hr aria-hidden="true">\n ${tt.sprintf("CONTRAST_ERROR_MESSAGE_INFO",n,a)}`,!0))})),t.warnings.forEach((e=>{let t=e.elem,n=t.cloneNode(!0),o=n.querySelectorAll(".jooa11y-heading-label");for(let e=0;e<o.length;e++)n.removeChild(o[e]);let r=n.textContent;this.warningCount++,t.insertAdjacentHTML("beforebegin",this.annotate(tt._("WARNING"),`${tt._("CONTRAST_WARNING_MESSAGE")} <hr aria-hidden="true"> ${tt.sprintf("CONTRAST_WARNING_MESSAGE_INFO",r)}`,!0))}))}checkReadability(){const e=document.querySelector(this.options.readabilityRoot),t=Array.from(e.querySelectorAll("p, li")).filter((e=>!this.$containerExclusions.includes(e)));function n(e){if((e=e.toLowerCase().replace(".","").replace("\n","")).length<=3)return 1;let t=(e=(e=e.replace(/(?:[^laeiouy]es|ed|[^laeiouy]e)$/,"")).replace(/^y/,"")).match(/[aeiouy]{1,2}/g),n=0;return t&&(n=t.length),n}t.forEach((e=>{let t=e.textContent;t.length>=120&&"."!==t.charAt(t.length-1)&&e.insertAdjacentHTML("beforeend","<span class='jooa11y-readability-period jooa11y-visually-hidden'>.</span>")}));let o=[];for(let e=0;e<t.length;e++){var r=t[e];""!==r.textContent.replace(/ |\n/g,"")&&o.push(r.textContent)}let a=o.join(" ").trim().toString(),i=a.replace(/[.!?-]+/g," ").split(" "),s=0;for(let e=0;e<i.length;e++)0!=i[e]&&(s+=1);let l=a.split(/[.!?]+/),c=0;for(let e=0;e<l.length;e++)""!==l[e]&&(c+=1);let d,u=0,f=0,p=0;for(let e=0;e<i.length;e++)if(0!=i[e]){var h=n(i[e]);1===h&&(f+=1),2===h&&(p+=1),u+=h}"en"===this.options.readabilityLang?d=206.835-1.015*s/c-84.6*u/s:"fr"===this.options.readabilityLang?d=207-1.015*s/c-73.6*u/s:"es"===this.options.readabilityLang&&(d=206.84-1.02*s/c-100*u/s*.6),d>100?d=100:d<0&&(d=0);const g=document.getElementById("jooa11y-readability-info");if(0===a.length)g.innerHTML=tt._("READABILITY_NO_P_OR_LI_MESSAGE");else if(s>30){let e=d.toFixed(1),t=(s/c).toFixed(1),n=Math.round((s-(f+p))/s*100);g.innerHTML=e>=0&&e<30?`<span>${e}</span> <span class="jooa11y-readability-score">${tt._("VERY_DIFFICULT_READABILITY")}</span>`:e>31&&e<49?`<span>${e}</span> <span class="jooa11y-readability-score">${tt._("DIFFICULT_READABILITY")}</span>`:e>50&&e<60?`<span>${e}</span> <span class="jooa11y-readability-score">${tt._("FAIRLY_DIFFICULT_READABILITY")}</span>`:`<span>${e}</span> <span class="jooa11y-readability-score">${tt._("GOOD_READABILITY")}</span>`,document.getElementById("jooa11y-readability-details").innerHTML=`<li><span class='jooa11y-bold'>${tt._("AVG_WORD_PER_SENTENCE")}</span> ${t}</li>\n <li><span class='jooa11y-bold'>${tt._("COMPLEX_WORDS")}</span> ${n}%</li>\n <li><span class='jooa11y-bold'>${tt._("TOTAL_WORDS")}</span> ${s}</li>`}else g.textContent=tt._("READABILITY_NOT_ENOUGH_CONTENT_MESSAGE")}annotate(e,t,n=!1){const o=[tt._("ERROR"),tt._("WARNING"),tt._("GOOD")];if(-1===o.indexOf(e))throw Error(`Invalid type [${e}] for annotation`);const r={[o[0]]:"error",[o[1]]:"warning",[o[2]]:"good"};return t&&"[object Function]"==={}.toString.call(t)&&(t=t()),t=et(t),`\n <div class=${n?"jooa11y-instance-inline":"jooa11y-instance"}>\n <button\n type="button"\n aria-label="${[e]}"\n class="jooa11y-btn jooa11y-${r[e]}-btn${n?"-text":""}"\n data-tippy-content="<div lang='${this.options.langCode}'>\n <div class='jooa11y-header-text'>${[e]}</div>\n ${t}\n </div>\n ">\n </button>\n </div>`}annotateBanner(e,t){const n=[tt._("ERROR"),tt._("WARNING"),tt._("GOOD")];if(-1===n.indexOf(e))throw Error(`Invalid type [${e}] for annotation`);const o={[n[0]]:"error",[n[1]]:"warning",[n[2]]:"good"};return t&&"[object Function]"==={}.toString.call(t)&&(t=t()),`<div class="jooa11y-instance jooa11y-${o[e]}-message-container">\n <div role="region" aria-label="${[e]}" class="jooa11y-${o[e]}-message" lang="${this.options.langCode}">\n ${t}\n </div>\n </div>`}},e.Lang=tt,Object.defineProperty(e,"__esModule",{value:!0})}));