PageSourceSearch

https://www.ohiolegalhelp.org/sites/default/files/js/js_Y-HH7Izo2h…56c2-jvqXdeLneJ1BlueXBvrEoOXxwcN1J49BUYAGa3

js ohiolegalhelp.org collected 2026-09-24 12:02:23 UTC 103,662 bytes, 20 lines download raw bytes

1/* @license GPL-2.0-or-later https://www.drupal.org/licensing/faq */
2((Drupal,drupalSettings)=>{Drupal.extlink=Drupal.extlink||{};Drupal.extlink.attach=(context,drupalSettings)=>{if(typeof drupalSettings.data==='undefined'||!drupalSettings.data.hasOwnProperty('extlink'))return;let extIconPlacement='append';if(drupalSettings.data.extlink.extIconPlacement&&drupalSettings.data.extlink.extIconPlacement!=='0')extIconPlacement=drupalSettings.data.extlink.extIconPlacement;const pattern=/^(([^:]+?\.)*)([^.:]+)((\.[a-z0-9]{1,253})*)(:[0-9]{1,5})?$/;const host=window.location.host.replace(pattern,'$2$3$6');const subdomain=window.location.host.replace(host,'');let subdomains;if(drupalSettings.data.extlink.extSubdomains)subdomains='([^/]*\\.)?';else if(subdomain==='www.'||subdomain==='')subdomains='(www\\.)?';else subdomains=subdomain.replace('.','\\.');let allowedDomains=false;if(drupalSettings.data.extlink.allowedDomains){allowedDomains=[];for(let i=0;i<drupalSettings.data.extlink.allowedDomains.length;i++)allowedDomains.push(new RegExp(`^https?:\\/\\/${drupalSettings.data.extlink.allowedDomains[i].replace(/(\r\n|\n|\r)/gm,'')}.*$`,'i'));}const internalLink=new RegExp(`^https?://([^@]*@)?${subdomains}${host}`,'i');let extInclude=false;if(drupalSettings.data.extlink.extInclude)extInclude=new RegExp(drupalSettings.data.extlink.extInclude.replace(/\\/,'\\'),'i');let extExclude=false;if(drupalSettings.data.extlink.extExclude)extExclude=new RegExp(drupalSettings.data.extlink.extExclude.replace(/\\/,'\\'),'i');let extExcludeNoreferrer=false;if(drupalSettings.data.extlink.extExcludeNoreferrer)extExcludeNoreferrer=new RegExp(drupalSettings.data.extlink.extExcludeNoreferrer.replace(/\\/,'\\'),'i');let extCssExclude=false;if(drupalSettings.data.extlink.extCssExclude)extCssExclude=drupalSettings.data.extlink.extCssExclude;let extCssInclude=false;if(drupalSettings.data.extlink.extCssInclude)extCssInclude=drupalSettings.data.extlink.extCssInclude;let extCssExplicit=false;if(drupalSettings.data.extlink.extCssExplicit)extCssExplicit=drupalSettings.data.extlink.extCssExplicit;const externalLinks=[];const mailtoLinks=[];const telLinks=[];const extlinks=context.querySelectorAll('a:not([data-extlink]), area:not([data-extlink])');extlinks.forEach((el)=>{try{let url='';if(typeof el.href==='string')url=el.href.toLowerCase();else{if(typeof el.href==='object')url=el.href.baseVal;}const isExtCssIncluded=extCssInclude&&(el.matches(extCssInclude)||el.closest(extCssInclude));if(url.indexOf('http')===0&&((!internalLink.test(url)&&!(extExclude&&extExclude.test(url)))||(extInclude&&extInclude.test(url))||isExtCssIncluded)&&!(extCssExclude&&el.matches(extCssExclude))&&!(extCssExclude&&el.closest(extCssExclude))&&!(extCssExplicit&&!el.closest(extCssExplicit))){let match=false;if(!isExtCssIncluded&&allowedDomains){for(let i=0;i<allowedDomains.length;i++)if(allowedDomains[i].test(url)){match=true;break;}}if(!match)externalLinks.push(el);}else{if(el.tagName!=='AREA'&&!(extCssExclude&&el.closest(extCssExclude))&&!(extCssExplicit&&!el.closest(extCssExplicit)))if(url.indexOf('mailto:')===0)mailtoLinks.push(el);else{if(url.indexOf('tel:')===0)telLinks.push(el);}}}catch(error){return false;}});const hasExtIcon=drupalSettings.data.extlink.extClass!=='0'&&drupalSettings.data.extlink.extClass!=='';const hasAdditionalExtClasses=drupalSettings.data.extlink.extAdditionalLinkClasses!=='';Drupal.extlink.applyClassAndSpan(externalLinks,'ext',hasExtIcon?extIconPlacement:null);if(hasAdditionalExtClasses)Drupal.extlink.applyClassAndSpan(externalLinks,drupalSettings.data.extlink.extAdditionalLinkClasses,null);const hasMailtoClass=drupalSettings.data.extlink.mailtoClass!=='0'&&drupalSettings.data.extlink.mailtoClass!=='';const hasAdditionalMailtoClasses=drupalSettings.data.extlink.extAdditionalMailtoClasses!=='';if(hasMailtoClass)Drupal.extlink.applyClassAndSpan(mailtoLinks,drupalSettings.data.extlink.mailtoClass,extIconPlacement);if(hasAdditionalMailtoClasses)Drupal.extlink.applyClassAndSpan(mailtoLinks,drupalSettings.data.extlink.extAdditionalMailtoClasses,null);const hasTelClass=drupalSettings.data.extlink.telClass!=='0'&&drupalSettings.data.extlink.telClass!=='';const hasAdditionalTelClasses=drupalSettings.data.extlink.extAdditionalTelClasses!=='0'&&drupalSettings.data.extlink.extAdditionalTelClasses!=='';if(hasTelClass)Drupal.extlink.applyClassAndSpan(telLinks,drupalSettings.data.extlink.telClass,extIconPlacement);if(hasAdditionalTelClasses)Drupal.extlink.applyClassAndSpan(mailtoLinks,drupalSettings.data.extlink.extAdditionalTelClasses,null);if(drupalSettings.data.extlink.extTarget){externalLinks.forEach((link,i)=>{if(!(drupalSettings.data.extlink.extTargetNoOverride&&link.matches('a[target]')))externalLinks[i].setAttribute('target','_blank');});externalLinks.forEach((link,i)=>{const val=link.getAttribute('rel');
2if(val===null||typeof val==='undefined'){externalLinks[i].setAttribute('rel','noopener');return;}if(val.indexOf('noopener')>-1)if(val.indexOf('noopener')===-1)externalLinks[i].setAttribute('rel',`${val} noopener`);else{}else externalLinks[i].setAttribute('rel',`${val} noopener`);});}if(drupalSettings.data.extlink.extNofollow)externalLinks.forEach((link,i)=>{const val=link.getAttribute('rel');if(val===null||typeof val==='undefined'){externalLinks[i].setAttribute('rel','nofollow');return;}let target='nofollow';if(drupalSettings.data.extlink.extFollowNoOverride)target='follow';if(val.indexOf(target)===-1)externalLinks[i].setAttribute('rel',`${val} nofollow`);});if(drupalSettings.data.extlink.extTitleNoOverride===false)externalLinks.forEach((link,i)=>{const oldTitle=link.getAttribute('title');let newTitle='';if(drupalSettings.data.extlink.extTargetAppendNewWindowDisplay)newTitle=drupalSettings.data.extlink.extTargetAppendNewWindowLabel;if(oldTitle!==null){if(Drupal.extlink.hasNewWindowText(oldTitle))return;newTitle=Drupal.extlink.combineLabels(oldTitle,newTitle);}if(newTitle)externalLinks[i].setAttribute('title',newTitle);});if(drupalSettings.data.extlink.extNoreferrer)externalLinks.forEach((link,i)=>{if(drupalSettings.data.extlink.extExcludeNoreferrer&&extExcludeNoreferrer.test(link.getAttribute('href')))return;const val=link.getAttribute('rel');if(val===null||typeof val==='undefined'){externalLinks[i].setAttribute('rel','noreferrer');return;}externalLinks[i].setAttribute('rel',`${val} noreferrer`);});Drupal.extlink=Drupal.extlink||{};Drupal.extlink.popupClickHandler=Drupal.extlink.popupClickHandler||(()=>{if(drupalSettings.data.extlink.extAlert)return confirm(drupalSettings.data.extlink.extAlertText);});const _that=this;Drupal.extlink.handleClick=function(event){const shouldNavigate=Drupal.extlink.popupClickHandler.call(_that,event);if(typeof shouldNavigate!=='undefined'&&!shouldNavigate)event.preventDefault();};externalLinks.forEach((val,i)=>{externalLinks[i].removeEventListener('click',Drupal.extlink.handleClick);externalLinks[i].addEventListener('click',Drupal.extlink.handleClick);});};Drupal.extlink.hasNewWindowText=function(label){return label.toLowerCase().indexOf(Drupal.t('new window'))!==-1;};Drupal.extlink.combineLabels=function(labelA,labelB){labelA=labelA||'';labelB=labelB||'';if(!labelA.trim())return labelB;if(!labelB.trim())return labelA;const labelANoParens=labelA.trim().replace('(','').replace(')','');const labelBNoParens=labelB.trim().replace('(','').replace(')','');if(labelA===labelANoParens){if(labelB===labelBNoParens)return `${labelA}, ${labelB}`;return `${labelA} ${labelB}`;}if(labelB===labelBNoParens)return `${labelB} ${labelA}`;return `(${labelANoParens}, ${labelBNoParens})`;};Drupal.extlink.applyClassAndSpan=(links,className,iconPlacement)=>{let linksToProcess;if(drupalSettings.data.extlink.extImgClass)linksToProcess=links;else linksToProcess=links.filter((link)=>{return link.querySelector('img, svg')===null;});for(let i=0;i<linksToProcess.length;i++){if(className!=='0')linksToProcess[i].classList.add(className);if(className===drupalSettings.data.extlink.mailtoClass&&drupalSettings.data.extlink.extAdditionalMailtoClasses)linksToProcess[i].classList.add(drupalSettings.data.extlink.extAdditionalMailtoClasses);else if(className===drupalSettings.data.extlink.telClass&&drupalSettings.data.extlink.extAdditionalTelClasses)linksToProcess[i].classList.add(drupalSettings.data.extlink.extAdditionalTelClasses);else{if(drupalSettings.data.extlink.extAdditionalLinkClasses)linksToProcess[i].classList.add(drupalSettings.data.extlink.extAdditionalLinkClasses);}linksToProcess[i].setAttribute('data-extlink','');if(iconPlacement){let link=linksToProcess[i];if(drupalSettings.data.extlink.extPreventOrphan&&iconPlacement==='append'){let lastTextNode=link.lastChild;let trailingWhitespace=null;let parentNode=link;while(lastTextNode)if(lastTextNode.lastChild){parentNode=lastTextNode;lastTextNode=lastTextNode.lastChild;}else if(lastTextNode.nodeName==='#text'&&parentNode.lastElementChild&&lastTextNode.textContent.trim().length===0){trailingWhitespace=lastTextNode;parentNode=parentNode.lastElementChild;lastTextNode=parentNode.lastChild;}else break;if(lastTextNode&&lastTextNode.nodeName==='#text'&&lastTextNode.textContent.length>0){const lastText=lastTextNode.textContent;const lastWordRegex=new RegExp(/\S+\s*$/,'g');const lastWord=lastText.match(lastWordRegex);if(lastWord!==null){const breakPreventer=document.createElement('span');breakPreventer.classList.add('extlink-nobreak');breakPreventer.textContent=lastWord[0];if(trailingWhitespace){trailingWhitespace.textContent='';breakPreventer.append(trailingWhitespace.textContent);}lastTextNode.textContent=lastText.substring(0,lastText.length-lastWord[0].length);lastTextNode.parentNode.append(breakPreventer);link=breakPreventer;}}}let iconElement;if(drupalSettings.data.extlink.extUseFontAwesome){iconElement=document.createElement('span');iconElement.setAttribute('class',`fa-${className} extlink`);
2if(className===drupalSettings.data.extlink.mailtoClass){if(drupalSettings.data.extlink.mailtoLabel)link.ariaLabel=drupalSettings.data.extlink.mailtoLabel;iconElement.innerHTML=Drupal.theme('extlink_fa_mailto',drupalSettings,iconPlacement);}else if(className===drupalSettings.data.extlink.extClass){if(drupalSettings.data.extlink.extLabel)link.ariaLabel=drupalSettings.data.extlink.extLabel;iconElement.innerHTML=Drupal.theme('extlink_fa_extlink',drupalSettings,iconPlacement);}else{if(className===drupalSettings.data.extlink.telClass){if(drupalSettings.data.extlink.telLabel)link.ariaLabel=drupalSettings.data.extlink.telLabel;iconElement.innerHTML=Drupal.theme('extlink_fa_tel',drupalSettings,iconPlacement);}}}else{iconElement=document.createElementNS('http://www.w3.org/2000/svg','svg');iconElement.setAttribute('focusable','false');iconElement.setAttribute('width','1em');iconElement.setAttribute('height','1em');iconElement.classList.add(className);iconElement.setAttribute('data-extlink-placement',iconPlacement);if(className===drupalSettings.data.extlink.mailtoClass)iconElement=Drupal.theme('extlink_mailto',iconElement,drupalSettings);else if(className===drupalSettings.data.extlink.extClass)iconElement=Drupal.theme('extlink_extlink',iconElement,drupalSettings);else{if(className===drupalSettings.data.extlink.telClass)iconElement=Drupal.theme('extlink_tel',iconElement,drupalSettings);}}iconElement.setAttribute('role','img');iconElement.setAttribute('aria-hidden',drupalSettings.data.extlink.extHideIcons);link[iconPlacement](iconElement);}}};Drupal.theme.extlink_fa_mailto=function(drupalSettings,iconPlacement){return `<span class="${drupalSettings.data.extlink.extFaMailtoClasses}" data-extlink-placement="${iconPlacement}"></span>`;};Drupal.theme.extlink_fa_extlink=function(drupalSettings,iconPlacement){return `<span class="${drupalSettings.data.extlink.extFaLinkClasses}" data-extlink-placement="${iconPlacement}"></span>`;};Drupal.theme.extlink_fa_tel=function(drupalSettings,iconPlacement){return `<span class="${drupalSettings.data.extlink.extFaTelClasses}" data-extlink-placement="${iconPlacement}"></span>`;};Drupal.theme.extlink_mailto=function(iconElement,drupalSettings){iconElement.setAttribute('aria-label',drupalSettings.data.extlink.mailtoLabel);iconElement.setAttribute('viewBox','0 10 70 20');iconElement.innerHTML=`<title>${drupalSettings.data.extlink.mailtoLabel}</title><path d="M56 14H8c-1.1 0-2 0.9-2 2v32c0 1.1 0.9 2 2 2h48c1.1 0 2-0.9 2-2V16C58 14.9 57.1 14 56 14zM50.5 18L32 33.4 13.5 18H50.5zM10 46V20.3l20.7 17.3C31.1 37.8 31.5 38 32 38s0.9-0.2 1.3-0.5L54 20.3V46H10z"/>`;return iconElement;};Drupal.theme.extlink_extlink=function(iconElement,drupalSettings){iconElement.setAttribute('aria-label',drupalSettings.data.extlink.extLabel);iconElement.setAttribute('viewBox','0 0 80 40');iconElement.innerHTML=`<title>${drupalSettings.data.extlink.extLabel}</title><path d="M48 26c-1.1 0-2 0.9-2 2v26H10V18h26c1.1 0 2-0.9 2-2s-0.9-2-2-2H8c-1.1 0-2 0.9-2 2v40c0 1.1 0.9 2 2 2h40c1.1 0 2-0.9 2-2V28C50 26.9 49.1 26 48 26z"/><path d="M56 6H44c-1.1 0-2 0.9-2 2s0.9 2 2 2h7.2L30.6 30.6c-0.8 0.8-0.8 2 0 2.8C31 33.8 31.5 34 32 34s1-0.2 1.4-0.6L54 12.8V20c0 1.1 0.9 2 2 2s2-0.9 2-2V8C58 6.9 57.1 6 56 6z"/>`;return iconElement;};Drupal.theme.extlink_tel=function(iconElement,drupalSettings){iconElement.setAttribute('aria-label',drupalSettings.data.extlink.telLabel);iconElement.setAttribute('viewBox','0 0 181.352 181.352');iconElement.innerHTML=`<title>${drupalSettings.data.extlink.telLabel}</title><path xmlns="http://www.w3.org/2000/svg" d="M169.393,167.37l-14.919,9.848c-9.604,6.614-50.531,14.049-106.211-53.404C-5.415,58.873,9.934,22.86,17.134,14.555L29.523,1.678c2.921-2.491,7.328-2.198,9.839,0.811l32.583,38.543l0.02,0.02c2.384,2.824,2.306,7.22-0.83,9.868v0.029l-14.44,10.415c-5.716,5.667-0.733,14.587,5.11,23.204l27.786,32.808c12.926,12.477,20.009,18.241,26.194,14.118l12.008-13.395c2.941-2.472,7.328-2.169,9.839,0.821l32.603,38.543v0.02C172.607,160.316,172.519,164.703,169.393,167.37z"/>`;return iconElement;};Drupal.behaviors.extlink=Drupal.behaviors.extlink||{};Drupal.behaviors.extlink.attach=(context,drupalSettings)=>{if(typeof extlinkAttach==='function')extlinkAttach(context);else Drupal.extlink.attach(context,drupalSettings);};})(Drupal,drupalSettings);;
3(function($,Drupal){Drupal.theme.progressBar=function(id){const escapedId=Drupal.checkPlain(id);return (`<div id="${escapedId}
vendor: 3,483 bytes, lines 3-5
3" class="progress" aria-live="polite">`+'<div class="progress__label">&nbsp;</div>'+'<div class="progress__track"><div class="progress__bar"></div></div>'+'<div class="progress__percentage"></div>'+'<div class="progress__description">&nbsp;</div>'+'</div>');};Drupal.ProgressBar=function(id,updateCallback,method,errorCallback){this.id=id;this.method=method||'GET';this.updateCallback=updateCallback;this.errorCallback=errorCallback;this.element=$(Drupal.theme('progressBar',id));};$.extend(Drupal.ProgressBar.prototype,{setProgress(percentage,message,label){if(percentage>=0&&percentage<=100){$(this.element).find('div.progress__bar').each(function(){this.style.width=`${percentage}%`;});$(this.element).find('div.progress__percentage').html(`${percentage}%`);}$('div.progress__description',this.element).html(message);$('div.progress__label',this.element).html(label);if(this.updateCallback)this.updateCallback(percentage,message,this);},startMonitoring(uri,delay){this.delay=delay;this.uri=uri;this.sendPing();},stopMonitoring(){clearTimeout(this.timer);this.uri=null;},sendPing(){if(this.timer)clearTimeout(this.timer);if(this.uri){const pb=this;let uri=this.uri;if(!uri.includes('?'))uri+='?';else uri+='&';uri+='_format=json';$.ajax({type:this.method,url:uri,data:'',dataType:'json',success(progress){if(progress.status===0){pb.displayError(progress.data);return;}pb.setProgress(progress.percentage,progress.message,progress.label);pb.timer=setTimeout(()=>{pb.sendPing();},pb.delay);},error(xmlhttp){const e=new Drupal.AjaxError(xmlhttp,pb.uri);pb.displayError(`<pre>${e.message}</pre>`);}});}},displayError(string){const error=$('<div class="messages messages--error"></div>').html(string);$(this.element).before(error).hide();if(this.errorCallback)this.errorCallback(this);}});})(jQuery,Drupal);;
4/* @license MIT https://raw.githubusercontent.com/muicss/loadjs/4.3.0/LICENSE.txt */
5loadjs=function(){var h=function(){},o={},c={},f={};function u(e,n){if(e){var t=f[e];if(c[e]=n,t)for(;t.length;)t[0](e,n),t.splice(0,1)}}function l(e,n){e.call&&(e={success:e}),n.length?(e.error||h)(n):(e.success||h)(e)}function p(t,r,i,s){var o,e,u,n=document,c=i.async,f=(i.numRetries||0)+1,l=i.before||h,a=t.replace(/[\?|#].*$/,""),d=t.replace(/^(css|img|module|nomodule)!/,"");if(s=s||0,/(^css!|\.css$)/.test(a))(u=n.createElement("link")).rel="stylesheet",u.href=d,(o="hideFocus"in u)&&u.relList&&(o=0,u.rel="preload",u.as="style");else if(/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(a))(u=n.createElement("img")).src=d;else if((u=n.createElement("script")).src=d,u.async=void 0===c||c,e="noModule"in u,/^module!/.test(a)){if(!e)return r(t,"l");u.type="module"}else if(/^nomodule!/.test(a)&&e)return r(t,"l");!(u.onload=u.onerror=u.onbeforeload=function(e){var n=e.type[0];if(o)try{u.sheet.cssText.length||(n="e")}catch(e){18!=e.code&&(n="e")}if("e"==n){if((s+=1)<f)return p(t,r,i,s)}else if("preload"==u.rel&&"style"==u.as)return u.rel="stylesheet";r(t,n,e.defaultPrevented)})!==l(t,u)&&n.head.appendChild(u)}function t(e,n,t){var r,i;if(n&&n.trim&&(r=n),i=(r?t:n)||{},r){if(r in o)throw"LoadJS";o[r]=!0}function s(n,t){!function(e,r,n){var t,i,s=(e=e.push?e:[e]).length,o=s,u=[];for(t=function(e,n,t){if("e"==n&&u.push(e),"b"==n){if(!t)return;u.push(e)}--s||r(u)},i=0;i<o;i++)p(e[i],t,n)}(e,function(e){l(i,e),n&&l({success:n,error:t},e),u(r,e)},i)}if(i.returnPromise)return new Promise(s);s()}return t.ready=function(e,n){return function(e,t){e=e.push?e:[e];var n,r,i,s=[],o=e.length,u=o;
5for(n=function(e,n){n.length&&s.push(e),--u||t(s)};o--;)r=e[o],(i=c[r])?n(r,i):(f[r]=f[r]||[]).push(n)}(e,function(e){l(n,e)}),t},t.done=function(e){u(e,[])},t.reset=function(){o={},c={},f={}},t.isDefined=function(e){return e in o},t}();;
6/* @license GPL-2.0-or-later https://www.drupal.org/licensing/faq */
7Drupal.debounce=function(func,wait,immediate){let timeout;let result;return function(...args){const context=this;const later=function(){timeout=null;if(!immediate)result=func.apply(context,args);};const callNow=immediate&&!timeout;clearTimeout(timeout);timeout=setTimeout(later,wait);if(callNow)result=func.apply(context,args);return result;};};;
8(function(Drupal,debounce){let liveElement;const announcements=[];Drupal.behaviors.drupalAnnounce={attach(context){if(!liveElement){liveElement=document.createElement('div');liveElement.id='drupal-live-announce';liveElement.className='visually-hidden';liveElement.setAttribute('aria-live','polite');liveElement.setAttribute('aria-busy','false');document.body.appendChild(liveElement);}}};function announce(){const text=[];let priority='polite';let announcement;const il=announcements.length;for(let i=0;i<il;i++){announcement=announcements.pop();text.unshift(announcement.text);if(announcement.priority==='assertive')priority='assertive';}if(text.length){liveElement.innerHTML='';liveElement.setAttribute('aria-busy','true');liveElement.setAttribute('aria-live',priority);liveElement.innerHTML=text.join('\n');liveElement.setAttribute('aria-busy','false');}}Drupal.announce=function(text,priority){announcements.push({text,priority});return debounce(announce,200)();};})(Drupal,Drupal.debounce);;
9((Drupal)=>{Drupal.Message=class{constructor(messageWrapper=null){if(!messageWrapper)this.messageWrapper=Drupal.Message.defaultWrapper();else this.messageWrapper=messageWrapper;}static defaultWrapper(){let wrapper=document.querySelector('[data-drupal-messages]')||document.querySelector('[data-drupal-messages-fallback]');if(!wrapper){wrapper=document.createElement('div');document.body.appendChild(wrapper);}if(wrapper.hasAttribute('data-drupal-messages-fallback')){wrapper.removeAttribute('data-drupal-messages-fallback');wrapper.classList.remove('hidden');}wrapper.setAttribute('data-drupal-messages','');return wrapper.innerHTML===''?Drupal.Message.messageInternalWrapper(wrapper):wrapper.firstElementChild;}static getMessageTypeLabels(){return {status:Drupal.t('Status message'),error:Drupal.t('Error message'),warning:Drupal.t('Warning message')};}add(message,options={}){if(!options.hasOwnProperty('type'))options.type='status';if(typeof message!=='string')throw new Error('Message must be a string.');Drupal.Message.announce(message,options);options.id=options.id?String(options.id):`${options.type}-${Math.random().toFixed(15).replace('0.','')}`;if(!Drupal.Message.getMessageTypeLabels().hasOwnProperty(options.type)){const {type}=options;throw new Error(`The message type, ${type}, is not present in Drupal.Message.getMessageTypeLabels().`);}this.messageWrapper.appendChild(Drupal.theme('message',{text:message},options));return options.id;}select(id){return this.messageWrapper.querySelector(`[data-drupal-message-id^="${id}"]`);}remove(id){return this.messageWrapper.removeChild(this.select(id));}clear(){this.messageWrapper.querySelectorAll('[data-drupal-message-id]').forEach((message)=>{this.messageWrapper.removeChild(message);});}static announce(message,options){if(!options.priority&&(options.type==='warning'||options.type==='error'))options.priority='assertive';if(options.announce!=='')Drupal.announce(options.announce||message,options.priority);}static messageInternalWrapper(messageWrapper){const innerWrapper=document.createElement('div');innerWrapper.setAttribute('class','messages__wrapper');messageWrapper.insertAdjacentElement('afterbegin',innerWrapper);return innerWrapper;}};Drupal.theme.message=({text},{type,id})=>{const messagesTypes=Drupal.Message.getMessageTypeLabels();const messageWrapper=document.createElement('div');messageWrapper.setAttribute('class',`messages messages--${type}`);messageWrapper.setAttribute('role',type==='error'||type==='warning'?'alert':'status');messageWrapper.setAttribute('data-drupal-message-id',id);messageWrapper.setAttribute('data-drupal-message-type',type);messageWrapper.setAttribute('aria-label',messagesTypes[type]);messageWrapper.innerHTML=`${text}`;return messageWrapper;};})(Drupal);;
10(function($,window,Drupal,drupalSettings,loadjs,{isFocusable,tabbable}){Drupal.behaviors.AJAX={attach(context,settings){function loadAjaxBehavior(base){const elementSettings=settings.ajax[base];if(typeof elementSettings.selector==='undefined')elementSettings.selector=`#${base}`;
10once('drupal-ajax',$(elementSettings.selector)).forEach((el)=>{elementSettings.element=el;elementSettings.base=base;Drupal.ajax(elementSettings);});}Object.keys(settings.ajax||{}).forEach(loadAjaxBehavior);Drupal.ajax.bindAjaxLinks(document.body);once('ajax','.use-ajax-submit').forEach((el)=>{const elementSettings={url:$(el.form).attr('action'),setClick:true,event:'click',progress:{type:'throbber'},base:el.id,element:el};Drupal.ajax(elementSettings);});},detach(context,settings,trigger){if(trigger==='unload')Drupal.ajax.expired().forEach((instance)=>{Drupal.ajax.instances[instance.instanceIndex]=null;});}};Drupal.AjaxError=function(xmlhttp,uri,customMessage){let statusCode;let statusText;let responseText;if(xmlhttp.status)statusCode=`\n${Drupal.t('An AJAX HTTP error occurred.')}\n${Drupal.t('HTTP Result Code: !status',{'!status':xmlhttp.status})}`;else statusCode=`\n${Drupal.t('An AJAX HTTP request terminated abnormally.')}`;statusCode+=`\n${Drupal.t('Debugging information follows.')}`;const pathText=`\n${Drupal.t('Path: !uri',{'!uri':uri})}`;statusText='';try{statusText=`\n${Drupal.t('StatusText: !statusText',{'!statusText':xmlhttp.statusText.trim()})}`;}catch(e){}responseText='';try{responseText=`\n${Drupal.t('ResponseText: !responseText',{'!responseText':xmlhttp.responseText.trim()})}`;}catch(e){}responseText=responseText.replace(/<("[^"]*"|'[^']*'|[^'">])*>/gi,'');responseText=responseText.replace(/[\n]+\s+/g,'\n');const readyStateText=xmlhttp.status===0?`\n${Drupal.t('ReadyState: !readyState',{'!readyState':xmlhttp.readyState})}`:'';customMessage=customMessage?`\n${Drupal.t('CustomMessage: !customMessage',{'!customMessage':customMessage})}`:'';this.message=statusCode+pathText+statusText+customMessage+responseText+readyStateText;this.name='AjaxError';if(!Drupal.AjaxError.messages)Drupal.AjaxError.messages=new Drupal.Message();Drupal.AjaxError.messages.add(Drupal.t("Oops, something went wrong. Check your browser's developer console for more details."),{type:'error'});};Drupal.AjaxError.prototype=new Error();Drupal.AjaxError.prototype.constructor=Drupal.AjaxError;Drupal.ajax=function(settings){if(arguments.length!==1)throw new Error('Drupal.ajax() function must be called with one configuration object only');const base=settings.base||false;const element=settings.element||false;delete settings.base;delete settings.element;if(!settings.progress&&!element)settings.progress=false;const ajax=new Drupal.Ajax(base,element,settings);ajax.instanceIndex=Drupal.ajax.instances.length;Drupal.ajax.instances.push(ajax);return ajax;};Drupal.ajax.instances=[];Drupal.ajax.expired=function(){return Drupal.ajax.instances.filter((instance)=>instance&&instance.element!==false&&!document.body.contains(instance.element));};Drupal.ajax.bindAjaxLinks=(element)=>{once('ajax','.use-ajax',element).forEach((ajaxLink)=>{const $linkElement=$(ajaxLink);const elementSettings={progress:{type:'throbber'},dialogType:$linkElement.data('dialog-type'),dialog:$linkElement.data('dialog-options'),dialogRenderer:$linkElement.data('dialog-renderer'),base:$linkElement.attr('id'),element:ajaxLink};const href=$linkElement.attr('href');if(href){elementSettings.url=href;elementSettings.event='click';}const httpMethod=$linkElement.data('ajax-http-method');if(httpMethod)elementSettings.httpMethod=httpMethod;Drupal.ajax(elementSettings);});};Drupal.Ajax=function(base,element,elementSettings){const defaults={httpMethod:'POST',event:element?'mousedown':null,keypress:true,selector:base?`#${base}`:null,effect:'none',speed:'none',method:'replaceWith',progress:{type:'throbber',message:Drupal.t('Processing...')},submit:{js:true}};$.extend(this,defaults,elementSettings);this.commands=new Drupal.AjaxCommands();this.instanceIndex=false;if(this.wrapper)this.wrapper=`#${this.wrapper}`;this.element=element;this.preCommandsFocusedElementSelector=null;this.elementSettings=elementSettings;if(this.element?.form)this.$form=$(this.element.form);if(!this.url){const $element=$(this.element);if(this.element.tagName==='A')this.url=$element.attr('href');else{if(this.element&&element.form)this.url=this.$form.attr('action');}}const originalUrl=this.url;this.url=this.url.replace(/\/nojs(\/|$|\?|#)/,'/ajax$1');if(drupalSettings.ajaxTrustedUrl[originalUrl])drupalSettings.ajaxTrustedUrl[this.url]=true;const ajax=this;ajax.options={url:ajax.url,data:ajax.submit,isInProgress(){return ajax.ajaxing;},beforeSerialize(elementSettings,options){return ajax.beforeSerialize(elementSettings,options);},beforeSubmit(formValues,elementSettings,options){ajax.ajaxing=true;ajax.preCommandsFocusedElementSelector=null;return ajax.beforeSubmit(formValues,elementSettings,options);},beforeSend(xmlhttprequest,options){ajax.ajaxing=true;return ajax.beforeSend(xmlhttprequest,options);},success(response,status,xmlhttprequest){ajax.preCommandsFocusedElementSelector=document.activeElement.getAttribute('data-drupal-selector');if(typeof response==='string')response=JSON.parse(response);if(response!==null&&!drupalSettings.ajaxTrustedUrl[ajax.url])if(xmlhttprequest.getResponseHeader('X-Drupal-Ajax-Token')!=='1'){const customMessage=Drupal.t('The response failed verification so will not be processed.');return ajax.error(xmlhttprequest,ajax.url,customMessage);}return (Promise.resolve(ajax.success(response,status)).then(()=>{ajax.ajaxing=false;
10$(document).trigger('ajaxSuccess',[xmlhttprequest,this]);$(document).trigger('ajaxComplete',[xmlhttprequest,this]);if(--$.active===0)$(document).trigger('ajaxStop');}));},error(xmlhttprequest,status,error){ajax.ajaxing=false;},complete(xmlhttprequest,status){if(status==='error'||status==='parsererror')return ajax.error(xmlhttprequest,ajax.url);},dataType:'json',jsonp:false,method:ajax.httpMethod};if(elementSettings.dialog)ajax.options.data.dialogOptions=elementSettings.dialog;if(!ajax.options.url.includes('?'))ajax.options.url+='?';else ajax.options.url+='&';let wrapper=`drupal_${elementSettings.dialogType||'ajax'}`;if(elementSettings.dialogRenderer)wrapper+=`.${elementSettings.dialogRenderer}`;ajax.options.url+=`${Drupal.ajax.WRAPPER_FORMAT}=${wrapper}`;$(ajax.element).on(elementSettings.event,function(event){if(!drupalSettings.ajaxTrustedUrl[ajax.url]&&!Drupal.url.isLocal(ajax.url))throw new Error(Drupal.t('The callback URL is not local and not trusted: !url',{'!url':ajax.url}));return ajax.eventResponse(this,event);});if(elementSettings.keypress)$(ajax.element).on('keypress',function(event){return ajax.keypressResponse(this,event);});if(elementSettings.prevent)$(ajax.element).on(elementSettings.prevent,false);};Drupal.ajax.WRAPPER_FORMAT='_wrapper_format';Drupal.Ajax.AJAX_REQUEST_PARAMETER='_drupal_ajax';Drupal.Ajax.prototype.execute=function(){if(this.ajaxing)return;try{this.beforeSerialize(this.element,this.options);return $.ajax(this.options);}catch(e){this.ajaxing=false;window.alert(`An error occurred while attempting to process ${this.options.url}: ${e.message}`);return $.Deferred().reject();}};Drupal.Ajax.prototype.keypressResponse=function(element,event){const ajax=this;if(event.which===13||(event.which===32&&element.type!=='text'&&element.type!=='textarea'&&element.type!=='tel'&&element.type!=='number')){event.preventDefault();event.stopPropagation();$(element).trigger(ajax.elementSettings.event);}};Drupal.Ajax.prototype.eventResponse=function(element,event){event.preventDefault();event.stopPropagation();const ajax=this;if(ajax.ajaxing)return;try{if(ajax.$form){if(ajax.setClick)element.form.clk=element;ajax.$form.ajaxSubmit(ajax.options);}else{ajax.beforeSerialize(ajax.element,ajax.options);$.ajax(ajax.options);}}catch(e){ajax.ajaxing=false;window.alert(`An error occurred while attempting to process ${ajax.options.url}: ${e.message}`);}};Drupal.Ajax.prototype.beforeSerialize=function(element,options){if(this.$form&&document.body.contains(this.$form.get(0))){const settings=this.settings||drupalSettings;Drupal.detachBehaviors(this.$form.get(0),settings,'serialize');}options.data[Drupal.Ajax.AJAX_REQUEST_PARAMETER]=1;const pageState=drupalSettings.ajaxPageState;options.data['ajax_page_state[theme]']=pageState.theme;options.data['ajax_page_state[theme_token]']=pageState.theme_token;options.data['ajax_page_state[libraries]']=pageState.libraries;};Drupal.Ajax.prototype.beforeSubmit=function(formValues,element,options){};Drupal.Ajax.prototype.beforeSend=function(xmlhttprequest,options){if(this.$form){options.extraData=options.extraData||{};options.extraData.ajax_iframe_upload='1';const v=$.fieldValue(this.element);if(v!==null)options.extraData[this.element.name]=v;}$(this.element).prop('disabled',true);if(!this.progress||!this.progress.type)return;const progressIndicatorMethod=`setProgressIndicator${this.progress.type.slice(0,1).toUpperCase()}${this.progress.type.slice(1).toLowerCase()}`;if(progressIndicatorMethod in this&&typeof this[progressIndicatorMethod]==='function')this[progressIndicatorMethod].call(this);};Drupal.theme.ajaxProgressThrobber=(message)=>{const messageMarkup=typeof message==='string'?Drupal.theme('ajaxProgressMessage',message):'';const throbber='<div class="throbber">&nbsp;</div>';return `<div class="ajax-progress ajax-progress-throbber">${throbber}${messageMarkup}</div>`;};Drupal.theme.ajaxProgressIndicatorFullscreen=()=>'<div class="ajax-progress ajax-progress-fullscreen">&nbsp;</div>';Drupal.theme.ajaxProgressMessage=(message)=>`<div class="message">${message}</div>`;Drupal.theme.ajaxProgressBar=($element)=>$('<div class="ajax-progress ajax-progress-bar"></div>').append($element);Drupal.Ajax.prototype.setProgressIndicatorBar=function(){const progressBar=new Drupal.ProgressBar(`ajax-progress-${this.element.i
10d}`,$.noop,this.progress.method,$.noop);if(this.progress.message)progressBar.setProgress(-1,this.progress.message);if(this.progress.url)progressBar.startMonitoring(this.progress.url,this.progress.interval||1500);this.progress.element=$(Drupal.theme('ajaxProgressBar',progressBar.element));this.progress.object=progressBar;$(this.element).after(this.progress.element);};Drupal.Ajax.prototype.setProgressIndicatorThrobber=function(){this.progress.element=$(Drupal.theme('ajaxProgressThrobber',this.progress.message));if($(this.element).closest('[data-drupal-ajax-container]').length)$(this.element).closest('[data-drupal-ajax-container]').after(this.progress.element);else $(this.element).after(this.progress.element);};Drupal.Ajax.prototype.setProgressIndicatorFullscreen=function(){this.progress.element=$(Drupal.theme('ajaxProgressIndicatorFullscreen'));$('body').append(this.progress.element);};Drupal.Ajax.prototype.commandExecutionQueue=function(response,status){const ajaxCommands=this.commands;return Object.keys(response||{}).reduce((executionQueue,key)=>executionQueue.then(()=>{const {command}=response[key];if(command&&ajaxCommands[command])return ajaxCommands[command](this,response[key],status);}),Promise.resolve());};Drupal.Ajax.prototype.success=function(response,status){if(this.progress.element)$(this.progress.element).remove();if(this.progress.object)this.progress.object.stopMonitoring();$(this.element).prop('disabled',false);const elementParents=$(this.element).parents('[data-drupal-selector]').addBack().toArray();const focusChanged=Object.keys(response||{}).some((key)=>{const {command,method}=response[key];return (command==='focusFirst'||command==='openDialog'||(command==='invoke'&&method==='focus'));});return (this.commandExecutionQueue(response,status).then(()=>{if(!focusChanged){let target=false;if(this.element){if($(this.element).data('refocus-blur')&&this.preCommandsFocusedElementSelector)target=document.querySelector(`[data-drupal-selector="${this.preCommandsFocusedElementSelector}"]`);if(!target&&!$(this.element).data('disable-refocus')){for(let n=elementParents.length-1;!target&&n>=0;n--)target=document.querySelector(`[data-drupal-selector="${elementParents[n].getAttribute('data-drupal-selector')}"]`);}}if(target)$(target).trigger('focus');}if(this.$form&&document.body.contains(this.$form.get(0))){const settings=this.settings||drupalSettings;Drupal.attachBehaviors(this.$form.get(0),settings);}this.settings=null;}).catch((error)=>console.error(Drupal.t('An error occurred during the execution of the Ajax response: !error',{'!error':error}))));};Drupal.Ajax.prototype.getEffect=function(response){const type=response.effect||this.effect;const speed=response.speed||this.speed;const effect={};if(type==='none'){effect.showEffect='show';effect.hideEffect='hide';effect.showSpeed='';}else if(type==='fade'){effect.showEffect='fadeIn';effect.hideEffect='fadeOut';effect.showSpeed=speed;}else{effect.showEffect=`${type}Toggle`;effect.hideEffect=`${type}Toggle`;effect.showSpeed=speed;}return effect;};Drupal.Ajax.prototype.error=function(xmlhttprequest,uri,customMessage){if(this.progress.element)$(this.progress.element).remove();if(this.progress.object)this.progress.object.stopMonitoring();$(this.wrapper).show();$(this.element).prop('disabled',false);if(this.$form&&document.body.contains(this.$form.get(0))){const settings=this.settings||drupalSettings;Drupal.attachBehaviors(this.$form.get(0),settings);}throw new Drupal.AjaxError(xmlhttprequest,uri,customMessage);};Drupal.theme.ajaxWrapperNewContent=($newContent,ajax,response)=>(response.effect||ajax.effect)!=='none'&&$newContent.filter((i)=>!(($newContent[i].nodeName==='#comment'||($newContent[i].nodeName==='#text'&&/^(\s|\n|\r)*$/.test($newContent[i].textContent))))).length>1?Drupal.theme('ajaxWrapperMultipleRootElements',$newContent):$newContent;Drupal.theme.ajaxWrapperMultipleRootElements=($elements)=>$('<div></div>').append($elements);Drupal.AjaxCommands=function(){};Drupal.AjaxCommands.prototype={insert(ajax,response){const $wrapper=response.selector?$(response.selector):$(ajax.wrapper);const method=response.method||ajax.method;const effect=ajax.getEffect(response);const settings=response.settings||ajax.settings||drupalSettings;const parseHTML=(htmlString)=>{const fragment=document.createDocumentFragment();const template=fragment.appendChild(document.createElement('template'));template.innerHTML=htmlString;return template.content.childNodes;};let $newContent=$(parseHTML(response.data));
10$newContent=Drupal.theme('ajaxWrapperNewContent',$newContent,ajax,response);switch(method){case 'html':case 'replaceWith':case 'replaceAll':case 'empty':case 'remove':Drupal.detachBehaviors($wrapper.get(0),settings);break;default:break;}$wrapper[method]($newContent);if(effect.showEffect!=='show')$newContent.hide();const $ajaxNewContent=$newContent.find('.ajax-new-content');if($ajaxNewContent.length){$ajaxNewContent.hide();$newContent.show();$ajaxNewContent[effect.showEffect](effect.showSpeed);}else{if(effect.showEffect!=='show')$newContent[effect.showEffect](effect.showSpeed);}$newContent.each((index,element)=>{if(element.nodeType===Node.ELEMENT_NODE&&document.documentElement.contains(element))Drupal.attachBehaviors(element,settings);});},remove(ajax,response,status){const settings=response.settings||ajax.settings||drupalSettings;$(response.selector).each(function(){Drupal.detachBehaviors(this,settings);}).remove();},changed(ajax,response,status){const $element=$(response.selector);if(!$element.hasClass('ajax-changed')){$element.addClass('ajax-changed');if(response.asterisk)$element.find(response.asterisk).append(` <abbr class="ajax-changed" title="${Drupal.t('Changed')}">*</abbr> `);}},alert(ajax,response,status){window.alert(response.text);},announce(ajax,response){if(response.priority)Drupal.announce(response.text,response.priority);else Drupal.announce(response.text);},redirect(ajax,response,status){window.location=response.url;},css(ajax,response,status){$(response.selector).css(response.argument);},settings(ajax,response,status){const ajaxSettings=drupalSettings.ajax;if(ajaxSettings)Drupal.ajax.expired().forEach((instance)=>{if(instance.selector){const selector=instance.selector.replace('#','');if(selector in ajaxSettings)delete ajaxSettings[selector];}});if(response.merge)$.extend(true,drupalSettings,response.settings);else ajax.settings=response.settings;},data(ajax,response,status){$(response.selector).data(response.name,response.value);},focusFirst(ajax,response,status){let focusChanged=false;const container=document.querySelector(response.selector);if(container){const tabbableElements=tabbable(container);if(tabbableElements.length){tabbableElements[0].focus();focusChanged=true;}else{if(isFocusable(container)){container.focus();focusChanged=true;}}}if(ajax.hasOwnProperty('element')&&!focusChanged)ajax.element.focus();},invoke(ajax,response,status){const $element=$(response.selector);$element[response.method](...response.args);},restripe(ajax,response,status){$(response.selector).find('> tbody > tr:visible, > tr:visible').removeClass('odd even').filter(':even').addClass('odd').end().filter(':odd').addClass('even');},update_build_id(ajax,response,status){document.querySelectorAll(`input[name="form_build_id"][value="${response.old}"]`).forEach((item)=>{item.value=response.new;});},add_css(ajax,response,status){const allUniqueBundleIds=response.data.map(function(style){const uniqueBundleId=style.href;if(!loadjs.isDefined(uniqueBundleId))loadjs(`css!${style.href}`,uniqueBundleId,{before(path,styleEl){Object.keys(style).forEach((attributeKey)=>{styleEl.setAttribute(attributeKey,style[attributeKey]);});}});return uniqueBundleId;});return new Promise((resolve,reject)=>{loadjs.ready(allUniqueBundleIds,{success(){resolve();},error(depsNotFound){const message=Drupal.t(`The following files could not be loaded: @dependencies`,{'@dependencies':depsNotFound.join(', ')});reject(message);}});});},message(ajax,response){const messages=new Drupal.Message(document.querySelector(response.messageWrapperQuerySelector));if(response.clearPrevious)messages.clear();messages.add(response.message,response.messageOptions);},add_js(ajax,response,status){const parentEl=document.querySelector(response.selector||'body');const settings=ajax.settings||drupalSettings;const allUniqueBundleIds=response.data.map((script)=>{const uniqueBundleId=script.src;if(!loadjs.isDefined(uniqueBundleId))loadjs(script.src,uniqueBundleId,{async:false,before(path,scriptEl){Object.keys(script).forEach((attributeKey)=>{scriptEl.setAttribute(attributeKey,script[attributeKey]);});parentEl.appendChild(scriptEl);return false;}});return uniqueBundleId;});return new Promise((resolve,reject)=>{loadjs.ready(allUniqueBundleIds,{success(){Drupal.attachBehaviors(parentEl,settings);resolve();},error(depsNotFound){const message=Drupal.t(`The following files could not be loaded: @dependencies`,{'@dependencies':depsNotFound.join(', ')});reject(message);}});});},scrollTop(ajax,response){document.querySelector(response.selector)?.scrollIntoView();}};const stopEvent=(xhr,settings)=>{return (xhr.getResponseHeader('X-Drupal-Ajax-Token')==='1'&&typeof settings.isInProgress==='function'&&settings.isInProgress());};$.extend(true,$.event.special,{ajaxSuccess:{trigger(event,xhr,settings){if(stopEvent(xhr,settings))return false;}},ajaxComplete:{trigger(event,xhr,settings){if(stopEvent(xhr,settings)){$.active++;return false;}}}});})(jQuery,window,Drupal,drupalSettings,loadjs,window.tabbable);;
11(function(Drupal){Drupal.AjaxCommands.prototype.gtagEvent=function(ajax,response){gtag('event',response.event_name,response.data);};})(Drupal);;
12(function($,Drupal,once){'use strict';Drupal.behaviors.improved_multi_select={detach:function(context,settings,trigger){const options=settings.improved_multi_select;remoteListeners(context);
12options.selectors.forEach(function(selector){$(once('improvedselect',selector,context)).each(function(){let $select=$(this);let imsSelectId=$select.attr('id');$('#improvedselect-'+imsSelectId).remove();$('#'+imsSelectId+'-cloned').remove();});});},attach:function(context,settings){$(document).ready(function(){let searchBox=$('input.improvedselect_filter');if(searchBox&&settings.improved_multi_select&&settings.improved_multi_select.placeholder_text)searchBox.attr("placeholder",settings.improved_multi_select.placeholder_text);});if(!settings.improved_multi_select||!settings.improved_multi_select.selectors){$.event.trigger('improvedMultiSelectAttached');return;}const options=settings.improved_multi_select;options.selectors.forEach(function(selector){improvedselectAttach(selector,options,context);});remoteListeners(context);$('.improvedselect_filter',context).bind('input',function(){improvedselectFilter($(this).attr('sid'),options,context);});$('.improvedselect .add',context).click(function(){let sid=$(this).attr('sid');$('#improvedselect-'+sid+' .improvedselect_all .selected',context).each(function(){let $opt=$(this);$opt.removeClass('selected');improvedselectUpdateGroupVisibility($opt,1);$('#improvedselect-'+sid+' .improvedselect_sel',context).append($opt);});improvedselectUpdate(sid,context);});$('.improvedselect .del',context).click(function(){let sid=$(this).attr('sid');$('#improvedselect-'+sid+' .improvedselect_sel .selected',context).each(function(){let $opt=$(this);$opt.removeClass('selected');$('#improvedselect-'+sid+' .improvedselect_all',context).append($opt);improvedselectUpdateGroupVisibility($opt,0);});$('#improvedselect-'+sid+' .improvedselect_filter',context).attr('prev','');improvedselectFilter(sid,options,context);improvedselectUpdate(sid,context);});$('.improvedselect .add_all',context).click(function(){let sid=$(this).attr('sid');$('#improvedselect-'+sid+' .improvedselect_all li[isgroup!=isgroup]',context).each(function(){let $opt=$(this);if($opt.css('display')!=='none'){$opt.removeClass('selected');improvedselectUpdateGroupVisibility($opt,1);$('#improvedselect-'+sid+' .improvedselect_sel',context).append($opt);}});improvedselectUpdate(sid,context);});$('.improvedselect .del_all',context).click(function(){let sid=$(this).attr('sid');$('#improvedselect-'+sid+' .improvedselect_sel li',context).each(function(){let $opt=$(this);$opt.removeClass('selected');$('#improvedselect-'+sid+' .improvedselect_all',context).append($opt);improvedselectUpdateGroupVisibility($opt,0);});$('#improvedselect-'+sid+' .improvedselect_filter',context).attr('prev','');improvedselectFilter(sid,options,context);improvedselectUpdate(sid,context);});$('.improvedselect .move_up',context).click(function(){let sid=$(this).attr('sid');$('#improvedselect-'+sid+' .improvedselect_sel .selected',context).each(function(){let $selected=$(this);$selected.prev(':not(.selected)').before($selected);});improvedselectUpdate(sid,context);});$('.improvedselect .move_down',context).click(function(){let sid=$(this).attr('sid');$($('#improvedselect-'+sid+' .improvedselect_sel .selected',context).get().reverse()).each(function(){let $selected=$(this);$selected.next(':not(.selected)').after($selected);});improvedselectUpdate(sid,context);});$.event.trigger('improvedMultiSelectInitialized',[$(this)]);$.event.trigger('improvedMultiSelectAttached');}};function remoteListeners(context){$('.improvedselect_filter',context).off('input');$('.improvedselect .add',context).off('click');$('.improvedselect .del',context).off('click');$('.improvedselect .add_all',context).off('click');$('.improvedselect .del_all',context).off('click');$('.improvedselect .move_up',context).off('click');$('.improvedselect .move_down',context).off('click');}function improvedselectFilter(sid,options,context){let $filter=$('#improvedselect-'+sid+' .improvedselect_filter',context);let $selectedGroup=$('#improvedselect-'+sid+' .improvedselect_tabs li.selected:not(.all) a',context);let text=$filter.val();let pattern;let regex;let words;if(text.length&&text!==$filter.attr('prev')){$filter.attr('prev',text);if(!options.js_regex)text=text.replace(/[[\]^$.\\()|?*+]/g,"\\$&").replace(/{([0-9]+,?[0-9]*)}/g,'\\{$1\\}');switch(options.filtertype){case 'partial':default:pattern=text;break;case 'exact':pattern='^'+text+'$';break;case 'anywords':{words=text.split(' ');pattern='';for(let i=0;i<words.length;i++)if(words[i])pattern+=(pattern)?'|\\b'+words[i]+'\\b':'\\b'+words[i]+'\\b';break;}case 'anywords_partial':{words=text.split(' ');pattern='';for(let i=0;i<words.length;i++)if(words[i])pattern+=(pattern)?'|'+words[i]+'':words[i];break;}case 'allwords':{words=text.split(' ');pattern='^';for(let i=0;i<words.length;i++)if(words[i])pattern+='(?=.*?\\b'+words[i]+'\\b)';break;}case 'allwords_partial':{words=text.split(' ');pattern='^';for(let i=0;i<words.length;i++)if(words[i])pattern+='(?=.*?'+words[i]+')';break;}}try{regex=new RegExp(pattern,'i');}catch(e){return;}$('#improvedselect-'+sid+' .improvedselect_all li',context).each(function(){let $opt=$(this);if($opt.attr('isgroup')!=='isgroup'){let str=$opt.text();if(str.match(regex)&&(!$selectedGroup.length||$selectedGroup.text()===$opt.attr('group'))){$opt.show();if($opt.attr('group'))if(!$selectedGroup.length)$opt.siblings('li[isgroup="isgroup"][so="---'+$opt.attr('group')+'---"]').show();else $opt.siblings('li[isgroup="isgroup"][so="---'+$opt.attr('group')+'---"]').hide();}else{$opt.hide();if($opt.attr('group'))if($opt.siblings('li[isgroup!="isgroup"][group="'+$opt.attr('group')+'"]:visible').length===0)$opt.siblings('li[isgroup="isgroup"][so="---'+$opt.attr('group')+'---"]').hide();}}});}else{if(!text.length)$filter.attr('prev','');$('#improvedselect-'+sid+' .improvedselect_all li',context).each(function(){let $opt=$(this);if($opt.attr('isgroup')!=='isgroup'){if(!$selectedGroup.length||$selectedGroup.text()===$opt.attr('group'))$opt.show();else $opt.hide();improvedselectUpdateGroupVisibility($opt,0);}}
12);}}function improvedselectAttach(selector,options,context){$(once('improvedselect',selector,context)).each(function(){let $select=$(this);let moveButtons='';let imsSelectId=$select.attr('id');let $cloned_select=null;let regex=new RegExp('.+-cloned$','i');if(imsSelectId.match(regex))return;if(options.remove_required_attr)$select.removeAttr('required');if(options.orderable){$cloned_select=$select.clone();$cloned_select.attr('id',imsSelectId+'-cloned');$cloned_select.attr('name','cloned-'+$select.attr('name'));$cloned_select.appendTo($select.parent()).hide();moveButtons='<span class="move_up" sid="'+imsSelectId+'">'+Drupal.checkPlain(options.buttontext_moveup)+'</span>'+'<span class="move_down" sid="'+imsSelectId+'">'+Drupal.checkPlain(options.buttontext_movedown)+'</span>';}$select.parent().append('<div class="improvedselect" sid="'+imsSelectId+'" id="improvedselect-'+imsSelectId+'">'+'<div class="improvedselect-text-wrapper">'+'<input type="text" class="improvedselect_filter" sid="'+imsSelectId+'" prev="" />'+'</div><ul class="improvedselect_sel"></ul><ul class="improvedselect_all"></ul><div class="improvedselect_control">'+'<span class="add" sid="'+imsSelectId+'">'+Drupal.checkPlain(options.buttontext_add)+'</span>'+'<span class="del" sid="'+imsSelectId+'">'+Drupal.checkPlain(options.buttontext_del)+'</span>'+'<span class="add_all" sid="'+imsSelectId+'">'+Drupal.checkPlain(options.buttontext_addall)+'</span>'+'<span class="del_all" sid="'+imsSelectId+'">'+Drupal.checkPlain(options.buttontext_delall)+'</span>'+moveButtons+'</div><div class="clear"></div></div>');if($select.find('optgroup').has('option').length>0){$select.parent().find('.improvedselect').addClass('has_group');$('#improvedselect-'+imsSelectId+' .improvedselect-text-wrapper',context).after('<div class="improvedselect_tabs-wrapper" sid="'+imsSelectId+'"><ul class="improvedselect_tabs"></ul></div>');$select.find('optgroup').has('option').each(function(){$('#improvedselect-'+imsSelectId+' .improvedselect_tabs',context).append('<li><a href="">'+$(this).attr('label')+'</a></li>');});$('#improvedselect-'+imsSelectId+' .improvedselect_tabs',context).prepend('<li class="all"><a href="">'+Drupal.t('All')+'</a></li>');$('#improvedselect-'+imsSelectId+' .improvedselect_tabs li a',context).click(function(e){let $group=$(this);let sid=$group.parent().parent().parent().attr('sid');$('#improvedselect-'+imsSelectId+' .improvedselect_tabs li.selected',context).removeClass('selected').find('a').unwrap();$group.wrap('<div>').parents('li').first().addClass('selected');if(!$group.hasClass('all'))$('#improvedselect-'+imsSelectId+' .improvedselect_all li.selected[group!="'+$group.text()+'"]',context).removeClass('selected');if(options.groupresetfilter)$('#improvedselect-'+imsSelectId+' .improvedselect_filter',context).val('');$('#improvedselect-'+imsSelectId+' .improvedselect_filter',context).attr('prev','');improvedselectFilter(sid,options,context);e.preventDefault();});$('#improvedselect-'+imsSelectId+' .improvedselect_tabs li.all a',context).click();}$select.find('option, optgroup').each(function(){let $opt=$(this);let group='';if($opt[0].tagName==='OPTGROUP'){if($opt.has('option').length)$('#improvedselect-'+imsSelectId+' .improvedselect_all',context).append('<li isgroup="isgroup" so="---'+$opt.attr('label')+'---">--- '+$opt.attr('label')+' ---</li>');}else{group=$opt.parent('optgroup').attr('label');if(group)group=' group="'+group+'"';else group='';if($opt.attr('value')!=='_none')if($opt.attr('selected'))$('#improvedselect-'+imsSelectId+' .improvedselect_sel',context).append('<li so="'+$opt.attr('value')+'"'+group+'>'+$opt.html()+'</li>');else $('#improvedselect-'+imsSelectId+' .improvedselect_all',context).append('<li so="'+$opt.attr('value')+'"'+group+'>'+$opt.html()+'</li>');}});$('#improvedselect-'+imsSelectId+' .improvedselect_sel li, #improvedselect-'+imsSelectId+' .improvedselect_all li[isgroup!="isgroup"]',context).click(function(){$(this).toggleClass('selected');});$select.hide();$('#improvedselect-'+imsSelectId+' .improvedselect_sel li, #improvedselect-'+imsSelectId+' .improvedselect_all li[isgroup!="isgroup"]',context).dblclick(function(){let selected=$(this).parent().find('li.selected');let current_class=$(this).parent().attr('class');if(current_class==='improvedselect_all'){$(this).parent().find('li.selected').removeClass('selected');$(this).addClass('selected');$(this).parent().parent().find('.add').click();}else{$(this).parent().find('li.selected').removeClass('selected');$(this).addClass('selected');$(this).parent().parent().find('.del').click();}if(selected.length){for(let k=0;k<selected.length;k++)if($(selected[k]).parent().attr('class')===current_class)$(selected[k]).addClass('selected');}});$('.improvedselect_sel, .improvedselect_all').each(function(){if($(this).parent().height()>0)$(this).height($(this).parent().height()-35);});});}function improvedselectUpdateGroupVisibility($opt,numItems){let $selectedGroup=$opt.parents('.improvedselect').first().find('.improvedselect_tabs li.selected:not(.all) a');if($opt.parent().children('li[isgroup!="isgroup"][group="'+$opt.attr('group')+'"]:visible').length<=numItems||$selectedGroup.length)$opt.siblings('li[isgroup="isgroup"][so="---'+$opt.attr('group')+'---"]').hide();else $opt.siblings('li[isgroup="isgroup"][so="---'+$opt.attr('group')+'---"]').show();}function improvedselectUpdate(sid,context){let $select=$('#'+sid);
12let $cloned_select=$('#'+sid+'-cloned');if($cloned_select.length){$select.find('option, optgroup').remove();$cloned_select.find('option:selected').prop('selected',false);$('#improvedselect-'+sid+' .improvedselect_sel li',context).each(function(){let $li=$(this);$select.append($('<option></option>').attr('value',$li.attr('so')).prop('selected',true).text($li.text()));$('#'+sid+'-cloned [value="'+$(this).attr('so')+'"]',context).prop('selected',true);});}else{$select.find('option:selected').prop('selected',false);$('#improvedselect-'+sid+' .improvedselect_sel li',context).each(function(){$('#'+sid+' [value="'+$(this).attr('so')+'"]',context).prop('selected',true);});}$select.find('option, optgroup').each(function(){let $opt=$(this);if($opt[0].tagName==='OPTGROUP'){if($opt.has('option').length)$('#improvedselect-'+sid+' .improvedselect_all',context).append($('#improvedselect-'+sid+' .improvedselect_all [so="---'+$opt.attr('label')+'---"]',context));}else if($opt.attr('selected'))$('#improvedselect-'+sid+' .improvedselect_sel',context).append($('#improvedselect-'+sid+' .improvedselect_sel [so="'+$opt.attr('value')+'"]',context));else $('#improvedselect-'+sid+' .improvedselect_all',context).append($('#improvedselect-'+sid+' .improvedselect_all [so="'+$opt.attr('value')+'"]',context));});$('#'+sid,context).trigger('change');}})(jQuery,Drupal,once);;
13(function($,drupalSettings){'use strict';Drupal.behaviors.lang_dropdown={attach:function(context,settings){settings=settings||drupalSettings;if(settings.lang_dropdown)$('select.lang-dropdown-select-element').each(function(){var $dropdown=$(this);var key=$dropdown.data('lang-dropdown-id');var ldSettings=settings.lang_dropdown[key];if(ldSettings){var flags=ldSettings.languageicons;if(flags)$.each(flags,function(index,value){var option=$dropdown.find('option[value="'+index+'"]');if(ldSettings.widget==='msdropdown')option.attr('data-image',value);else{if(ldSettings.widget==='ddslick'&&Boolean(ldSettings.showSelectedHTML))option.attr('data-imagesrc',value);}});if(ldSettings.widget==='msdropdown')try{$dropdown.msDropDown({visibleRows:ldSettings.visibleRows,roundedCorner:Boolean(ldSettings.roundedCorner),animStyle:ldSettings.animStyle,event:ldSettings.event,mainCSS:ldSettings.mainCSS});}catch(e){if(console)console.log(e);}else if(ldSettings.widget==='chosen')$dropdown.chosen({disable_search:ldSettings.disable_search,no_results_text:ldSettings.no_results_text});else{if(ldSettings.widget==='ddslick'){$.data(document.body,'ddslick'+key+'flag',0);$dropdown.ddslick({width:ldSettings.width,height:(ldSettings.height===0)?null:ldSettings.height,showSelectedHTML:Boolean(ldSettings.showSelectedHTML),imagePosition:ldSettings.imagePosition,onSelected:function(data,element){var i=jQuery.data(document.body,'ddslick'+key+'flag');if(i){$.data(document.body,'ddslick'+key+'flag',0);data.selectedItem.closest('form').submit();}$.data(document.body,'ddslick'+key+'flag',1);}});}}}});$('select.lang-dropdown-select-element').change(function(){$(this).closest('form').submit();});}};})(jQuery,drupalSettings);;
14/* @license MIT https://raw.githubusercontent.com/js-cookie/js-cookie/v3.0.5/LICENSE */
15!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self,function(){var n=e.Cookies,o=e.Cookies=t();o.noConflict=function(){return e.Cookies=n,o;};}());}(this,(function(){"use strict";function e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)e[o]=n[o];}return e;}var t=function t(n,o){function r(t,r,i){if("undefined"!=typeof document){"number"==typeof (i=e({},o,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var c="";for(var u in i)i[u]&&(c+="; "+u,!0!==i[u]&&(c+="="+i[u].split(";")[0]));return document.cookie=t+"="+n.write(r,t)+c;}}return Object.create({set:r,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var t=document.cookie?document.cookie.split("; "):[],o={},r=0;r<t.length;r++){var i=t[r].split("="),c=i.slice(1).join("=");try{var u=decodeURIComponent(i[0]);if(o[u]=n.read(c,u),e===u)break;}catch(e){}}return e?o[e]:o;}},remove:function(t,n){r(t,"",e({},n,{expires:-1}));},withAttributes:function(n){return t(this.converter,e({},this.attributes,n));},withConverter:function(n){return t(e({},this.converter,n),this.attributes);}},{attributes:{value:Object.freeze(o)},converter:{value:Object.freeze(n)}});}({read:function(e){return '"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decode
15URIComponent);}},{path:"/"});return t;}));;
16/* @license GPL-2.0-or-later https://www.drupal.org/licensing/faq */
17(function(n){n.fn.copiq=function(e){var t=n.extend({parent:"body",content:"",onSuccess:function(){},onError:function(){}},e);return this.each(function(){var e=n(this);e.on("click",function(){var n=e.parents(t.parent).find(t.content);var o=document.createRange();var c=window.getSelection();o.selectNodeContents(n[0]);c.removeAllRanges();c.addRange(o);try{var r=document.execCommand("copy");var a=r?"onSuccess":"onError";t[a](e,n,c.toString());}catch(i){}c.removeAllRanges();});});};})(jQuery);var SMSLink=SMSLink||{};SMSLink.detector=SMSLink.detector||function(){var a,b,c,d=navigator.userAgent;return d.match(/iPad/i)||d.match(/iPhone/i)?(a="iOS",c=d.indexOf("OS ")):d.match(/Android/i)?(a="Android",c=d.indexOf("Android ")):a=null,"iOS"===a&&c>-1?b=d.substr(c+3,3).replace("_","."):"Android"===a&&c>-1?a=d.substr(c+8,3):ver=null,{version:function(){return b;},os:function(){return a;},isMobile:function(){return null!==a;}};};var SMSLink=SMSLink||{};SMSLink.link=SMSLink.link||function(){function a(){SMSLink.linkDetector||(SMSLink.linkDetector=new SMSLink.detector());}return a(),{replaceAll:function(){this.replaceWithSelector("[href^='sms:']");},replaceWithSelector:function(a){elements=document.querySelectorAll(a);for(i in elements)this.replace(elements[i]);},replace:function(a){if(a.href){switch(replaceBody=!1,SMSLink.linkDetector.os()){case "iOS":parseFloat(SMSLink.linkDetector.version())<=8?replaceBody=";":replaceBody="&";}replaceBody&&(a.href=a.href.replace(/\?body=/,replaceBody+"body="));}}};};;
18if(typeof drupalSettings==='undefined')drupalSettings.path.currentLanguage='en';window.BE_API=window.BE_API||{};window.BE_API.onLoad=()=>{window.BE_API.setSessionAttributes({selected_language:drupalSettings.path.currentLanguage});};(function($,Drupal){window.dataLayer=window.dataLayer||[];var webform=$(".webform-submission-form");webform.on('change','input, select, textarea',function(){var webformFieldLabel;var inputId=$(this).attr('id');if(webform.find("label[for='"+inputId+"']").length>0){var text=$(this).val();if(text!=='')webformFieldLabel=webform.find("label[for='"+inputId+"']").text().trim();}else webformFieldLabel=$(this).parent("label").text().trim();var item=webform.find("label[for='"+inputId+"']").attr('for');if($(this).attr('type')=='radio'&&!$("input[id='"+item+"']:checked").val())return;if(webformFieldLabel!==undefined)dataLayer.push({event:"questionComplete",field:webformFieldLabel});});$('.webform-submission-form input:invalid').on('invalid',function(e){webformFieldLabel=getWebformFieldLabel($(this));
18message=$(this).validationMessage||'Invalid value.';dataLayer.push({event:"inputError",formName:$("form.webform-submission-form").data('webform-label'),errorMessage:message,errorField:webformFieldLabel});});$(".webform-submission-form #edit-actions-draft, .webform-submission-form #edit-actions-submit, .webform-submission-form #edit-actions-wizard-next").on('click',function(e){var names=[];$("input:radio").each(function(){names.push($(this).attr("name"));});var unique=names.filter(function(itm,i,a){return i==names.indexOf(itm);});unique.forEach(function(name,i){var error=false;if($("input:radio[name="+name+"]:checked").length==0){message=$(this).validationMessage||'Invalid value.';webformFieldLabel=$('input:radio[name='+name+']').closest('fieldset').find('legend .fieldset-legend').text();error=true;}if(error)dataLayer.push({event:"inputError",formName:$("form.webform-submission-form").data('webform-label'),errorMessage:message,errorField:webformFieldLabel});});});function getWebformFieldLabel(input){var inputId=input.attr('id');if(webform.find("label[for='"+inputId+"']").length)return webform.find("label[for='"+inputId+"']").text().trim();else return input.parent("label").text().trim();}$(".overview-action-preview a").click(function(){dataLayer.push({event:"formEvent",formStatus:"Preview",formName:$("section.form-fill").data('webform-label'),findingMethod:"Form Overview"});});$(".overview-action-restart a").click(function(e){dataLayer.push({event:"formEvent",formStatus:"Restarted",formName:$("section.form-fill").data('webform-label'),findingMethod:"Form Overview"});});$(".overview-action-edit a").click(function(){dataLayer.push({event:"formEvent",formStatus:"Edited",formName:$("section.form-fill").data('webform-label'),findingMethod:"Form Overview"});});$(".overview-action-resume").click(function(e){dataLayer.push({event:"formEvent",formStatus:"Resumed",formName:$("section.form-fill").data('webform-label'),findingMethod:"Form Overview"});});$(".hub-action-resume").click(function(e){dataLayer.push({event:"formEvent",formStatus:"Resumed",formName:$(this).data('webform-label'),findingMethod:"User Hub"});});$(".log-in__link.resume").click(function(e){dataLayer.push({event:"formEvent",formStatus:"Resumed",formName:$(this).data('webform-label'),findingMethod:"Header Dropdown"});});})(jQuery,Drupal);if(typeof drupalSettings==='undefined')drupalSettings={};function clearStaleSessionStorage(){var now=Math.floor(Date.now()/1000);var lastAccess=JSON.parse(sessionStorage.getItem('lastAccess'))||{};if(lastAccess.access>0)if(now-lastAccess.access>1800){sessionStorage.clear();sessionStorage.setItem('lastAccess',JSON.stringify({'access':now}));}else sessionStorage.setItem('lastAccess',JSON.stringify({'access':now}));else{sessionStorage.clear();sessionStorage.setItem('lastAccess',JSON.stringify({'access':now}));clickPath={};}}clearStaleSessionStorage();(function($,Drupal){Drupal.behaviors.olhQuizNavigation={attach:function(context,settings){if(typeof settings==='undefined')return;if((settings.path.currentPath=='login'&&settings.user.uid==0)||(settings.path.currentPath=='user/login'&&settings.user.uid==0)){sessionStorage.clear();return;}$("a.user-logout").click(function(){sessionStorage.clear();return;});$(once('clickpath','html',context)).each(function(){var clickPath=JSON.parse(sessionStorage.getItem('clickPath'))||{};var dict=JSON.parse(sessionStorage.getItem('dict'))||[];var current_path=settings.path.currentPath;var prevType='';var prevId='';if('olh' in drupalSettings){prevType=drupalSettings.olh.prev.type;prevId=drupalSettings.olh.prev.id;}if($("#__pageLoaded").val()!=1){$("#__pageLoaded").val(1);delete clickPath[current_path];clickPath[current_path]={'visitedPath':location.pathname,'type':prevType,'id':prevId};}else{$("#__pageLoaded").val(1);delete clickPath[dict[dict.length-1]];}dict=Object.keys(clickPath);sessionStorage.setItem('dict',JSON.stringify(dict));sessionStorage.setItem('clickPath',JSON.stringify(clickPath));});}};Drupal.behaviors.olhQuizPreviousQuestion={attach:function(context,settings){if(typeof settings==='undefined')return;$(once('previous','.previous-question')).click(function(e){e.preventDefault();var clickPath=JSON.parse(sessionStorage.getItem('clickPath'))||{};var dict=JSON.parse(sessionStorage.getItem('dict'))||[];var clickPathKeys=Object.keys(clickPath);var numberOfKeys=Object.keys(clickPath).length;var clickPathCurrentKey=(numberOfKeys-1);var clickPathPreviousKey=(numberOfKeys-2);var previous=clickPath[clickPathKeys[clickPathPreviousKey]].visitedPath;if(clickPathKeys[clickPathPreviousKey].includes('node/')&&previous!="/"){var clickPathPreviousKey=(numberOfKeys-3);previous=clickPath[clickPathKeys[clickPathPreviousKey]].visitedPath;var clickPathSkippedKey=(numberOfKeys-2);delete clickPath[clickPathKeys[clickPathSkippedKey]];}delete clickPath[clickPathKeys[clickPathCurrentKey]];dict=Object.keys(clickPath);sessionStorage.setItem('dict',JSON.stringify(dict));sessionStorage.setItem('clickPath',JSON.stringify(clickPath));location=previous;});}};Drupal.behaviors.searchFilterSubmit={attach:function(context,settings){$(".search-filters #edit-type, .search-filters #edit-category").change(function(){var terms=$('#edit-terms').clone();$(this).parents('form').append(terms);$("form").trigger('submit');});}};Drupal.behaviors.dangerBar={attach:function(context,settings){$('#danger-bar').click(function(e){e.preventDefault();$.ajax({url:'/exit'}).always(function(){sessionStorage.clear();window.location.replace('https://google.com');window.open('https://google.com');});return false;});}};Drupal.behaviors.dangerBarWebformExit={attach:function(context,settings){$('#edit-safety').click(function(e){sessionStorage.clear();window.location.replace('https://google.com');});}};Drupal.behaviors.loginToggles={attach:function(context,settings){$('.login__button').click(function(){$(this).addClass('active');$('.login-email__button').removeClass('active');$('.login__form').show();$('.login-email__button').show();$('.login__button').hide();$('.login-email__form').hide();$('#edit-email').focus();return false;});$('.login-email__button').click(function(){$(this).addClass('active');$('.login__button').removeClass('active');$('.login-email__button').hide();$('.login__button').show();$('.login-email__form').show();$('.login__form').hide();return false;});if($('form#user-login-form input').hasClass('error'))$('.login-email__button').click();if($("form#user-login-form #edit-one-time-password").length)$('.login-email__button').click();}};if(Cookies.get('olh_notification_dismiss')!=1){$(".notification-alert--notify .dismiss").removeClass('hide');$('.notification-alert--notify').removeClass('hide');}else $('.notification-alert--notify').remove();$('.notification-alert--notify .dismiss').on('click',function(e){e.preventDefault();$('.notification-alert--notify').remove();Cookies.set('olh_notification_dismiss',1,{expires:30,path:'/'});});if(Cookies.get('olh_resubmit_dismiss')!=1){$(".notification-alert--resubmit .dismiss").removeClass('hide');$('.notification-alert--resubmit').removeClass('hide');}else $('.notification-alert--resubmit').remove();$('.notification-alert--resubmit .dismiss').on('click',function(e){e.preventDefault();$('.notification-alert--resubmit').remove();Cookies.set('olh_resubmit_dismiss',1,{expires:30,path:'/'});});$('.info-icon').on('click',function(e){e.preventDefault();$(this).toggleClass('show');$('.standard-alert__pop-up').toggleClass('show');});$('.standard-alert__close').on('click',function(e){e.preventDefault();$(this).removeClass('show');$('.standard-alert__pop-up').removeClass('show');});$('#email-radio').click(function(){$(this).addClass('email-show');$('.hide-show-info').addClass('email-show');$('.hide-show-info').removeClass('phone-show');});$('#mb-radio').click(function(){$(this).addClass('phone-show');$('.hide-show-info').addClass('phone-show');$('.hide-show-info').removeClass('email-show');});$('.toggle-password').click(function(e){$(this).toggleClass("eye-show");if($(this).hasClass("eye-show"))$(this).siblings(':password').prop('type','text');else $(this).siblings(':text').prop('type','password');});Drupal.behaviors.feedbackSubmit={attach:function(context,settings){$('.webform-submission-feedback-form .form-item label').click(function(){$(this).find('input').click(function(){$('.webform-submission-feedback-form .webform-button--submit').click();});});$('.webform-submission-feedback-form .feedback-survey-decline').attr('role','button').attr('tabindex','0').click(function(){$(".webform-submission-feedback-form").fadeOut(500);}).on('keydown',function(e){if(e.key==='Enter'||e.key===' '){e.preventDefault();$(this).click();}});}};Drupal.behaviors.variousToggles={attach:function(context,settings){$(once('nav-toggle','.nav-toggle-menu')).on('click',function(e){$(this).toggleClass('active');$(this).attr('aria-expanded',($(this).attr('aria-expanded')=="false"?true:false));$('#mobile-menu').toggleClass('active');$('#mobile-menu').parent('header').toggleClass('mobile-active');$('.log-in').removeClass('active');$('.log-in-arrow').removeClass('active');});$(once('search','.toggle-search')).on('click',function(e){e.preventDefault();$(this).toggleClass('active');$(this).next('.search-form').toggleClass('active');$("input#search-field").focus();$('.log-in').removeClass('active');$('.log-in-arrow').removeClass('active');});$(once('search','.search-close')).on('click',function(e){e.preventDefault();$('.toggle-search').trigger('click');});$(once('logging-in-out','.toggle-loggedout')).on('click',function(e){e.preventDefault();$(this).toggleClass('active');$('.log-in').toggleClass('active');$('.log-in-arrow').toggleClass('active');$('.search-form').removeClass('active');$('.toggle-search').removeClass('active');$('#mobile-menu').removeClass('active');$('#mobile-menu').parent('header').removeClass('mobile-active');$('.nav-toggle-menu').removeClass('active');var header=$("#scroll-drop").height();var div=$(".mod-log-in").height();var win=$(window).height();});$('#edit-register-selection').removeClass('inline');$('#edit-register-selection').addClass('flex');$(once('send-form-toggle','.email-form-header')).on('click',function(e){e.preventDefault();$(this).parent().find('.email-form-content').slideToggle();$(this).parent().find('.form-item-email-address-mail-1 input').focus();});$(once('category','.category-picker button')).on('click',function(e){$('.category-picker').toggleClass('active');});function checkRelatedMore(){var xActive=$('.all-related-topics').find("li.active").length;var xAll=$('.all-related-topics').find("li").length;if(xActive==xAll)$('.all-related-topics button').fadeOut();}checkRelatedMore();$('.all-related-topics button').on('click',function(e){e.preventDefault();var x=$('.all-related-topics').find("li.active").length;if(x==0)x=3;var focusElem=x+1;x=x+3;$('.all-related-topics').find("li:nth-child(-n+"+x+")").addClass('active').find('a').removeAttr('tabindex');$('.all-related-topics').find("li:nth-child("+focusElem+")").find('a').focus();checkRelatedMore();});$('.filter button').on('click',function(e){if($(this).parent().parent().parent().hasClass('disabled'))return false;else $(this).parent().parent().toggleClass('active');});$('.disabledbutton').on('click',function(e){e.preventDefault();e.stopPropagation();return false;});$(once('pdf-preview-wrap','.form-fill .preview-alt')).each(function(){$(this).on('click',function(e){e.preventDefault();$('.pdf-viewer-wrapper').toggleClass('active');$('.pdf-viewer-alt').toggleClass('active');});});$(once('pdf-preview','.form-fill .preview')).each(function(){$(this).on('click',function(e){e.preventDefault();$('.pdf-viewer').toggleClass('active');});});$(once('pdf-close','.pdf-viewer-wrapper__close')).each(function(){$(this).on('click',function(e){e.preventDefault();$('.pdf-viewer-wrapper').removeClass('active');$('.pdf-viewer-alt').removeClass('active');});});$(once('people-append','.form-item-household')).each(function(){$(this).append(Drupal.t('people')).appendTo($('#edit-household-size--wrapper .fieldset-wrapper #edit-household-size'));});$('#demos-form .form-checkbox').each(function(){var cbState=$(this).prop('checked');if(cbState){$(this).prop("checked",true);$(this).parent().addClass('active');}});$('#demos-form:not(:has #edit-household-size)').find('.form-checkbox').change(function(){var cbState=$(this).prop('checked');$(this).parent().parent().find('.form-checkbox').prop("checked",false);$(this).parent().parent().find('.active').removeClass('active');if(cbState){$(this).prop("checked",true);$(this).parent().addClass('active');}});$(once('household','#edit-household-size--wrapper .form-checkbox')).each(function(){$(this).change(function(){var cbState=$(this).prop('checked');$('#edit-household').val('_none').resetSelect('#edit-household');$('#edit-household-size--wrapper .form-checkbox').prop("checked",false);$('#edit-household-size--wrapper .active').removeClass('active');if(cbState){$(this).prop("checked",true);$(this).parent().addClass('active');}});});$(once('household-check','#edit-household')).each(function(){$(this).change(function(){if($('#edit-household').val()>0){$('#edit-household-size--wrapper #edit-household-size-1').prop("checked",false);$('#edit-household-size--wrapper #edit-household-size-2').prop("checked",true);$('#edit-household-size--wrapper .form-item-household-size-1 label').removeClass('active');}});});var regSelect=$('input[name="register_selection"]');regSelect.change(function(){check_communication_preferences();});
18if($("#edit-register-selection-phone").length)check_communication_preferences();}};function check_communication_preferences(){var textMe=$('#edit-field-user-notifications-text');var emailMe=$('#edit-field-user-notifications-email');var regByPhone=$('#edit-register-selection-phone');var regByEmail=$('#edit-register-selection-email');if(regByPhone.prop('checked')==true){textMe.closest('.form-item').show();emailMe.closest('.form-item').hide();$('#edit-phone-number-wrapper').show();textMe.prop('checked',true);}else{emailMe.closest('.form-item').show();textMe.closest('.form-item').hide();$('#edit-phone-number-wrapper').hide();emailMe.prop('checked',true);}}Drupal.behaviors.alertScroll={attach:function(context,settings){$(".alert-banner--slider > div:gt(0)").hide();var current=$('.alert-banner--slider > div:first');var curheight=current.height();current.parent().height(curheight);if($(".alert-banner--slider > div").length>1)setInterval(function(){$('.alert-banner--slider > div:first').fadeOut(300).removeClass('active').next().show().addClass('active').end().appendTo('.alert-banner--slider');setInterval(function(){$(".alert-banner--slider").height($('.alert-banner--slider > div.active').height());},700);},6000);}};Drupal.behaviors.dropShadow={attach:function(context,settings){$(window).scroll(function(){var scroll=$(window).scrollTop();if(scroll>0)$("#scroll-drop").addClass("active-shadow");else $("#scroll-drop").removeClass("active-shadow");});}};Drupal.behaviors.pdfScroll={attach:function(context,settings){$(once('pdf-preview','a[href="#pdf-preview"]')).each(function(){$(this).on('click',function(e){e.preventDefault();if($(this).hasClass('closed'))$('html, body').animate({scrollTop:$($(this).attr('href')).offset().top},500,'linear');$(this).toggleClass('closed');});});}};Drupal.behaviors.buttonAlertLink={attach:function(context,settings){$(once('alert-button',".alert-link-button")).each(function(){$(this).click(function(){var path=window.location.pathname+window.location.search;sessionStorage.setItem('buttonAlertLink','active');sessionStorage.setItem('buttonAlertLinkPath',path);});});var alertActive=sessionStorage.getItem('buttonAlertLink')||'inactive';if(alertActive=='active'){var path=sessionStorage.getItem('buttonAlertLinkPath');newURL=window.location.protocol+"//"+window.location.host+path;var followAlert=$('<div class="notification-alert alert-follow-notification" role="img" aria-label="notification-icon">');followAlert.append('<a class="dismiss alert-follow-dismiss" role="button" aria-label="hide-notification">'+Drupal.t('Dismiss')+'</a>');followAlert.append('<div><a href="'+newURL+'" class="alert-follow-dismiss">'+Drupal.t('Click here to return to the form you were working on.')+'</a></div>');$(once('main',"main")).each(function(){$(this).prepend(followAlert);});}$(document).on("click",".alert-follow-dismiss",function(){sessionStorage.removeItem('buttonAlertLink');sessionStorage.removeItem('buttonAlertLinkPath');$(".alert-follow-notification").remove();});}};Drupal.behaviors.shsLabels={attach:function(context,settings){var waitForEl=function(selector,callback){if(jQuery(selector).length)callback();else setTimeout(function(){waitForEl(selector,callback);},100);};$('.shs-field-container').not('.any-updated').on('change',function(event,xhr,settings){$(this).addClass('any-updated');waitForEl(".shs-widget-container[data-shs-level='1'] select option[value='All']",function(){$(once('shs-widget',".shs-widget-container[data-shs-level='1'] select option[value='All']")).each(function(){$(this).text(Drupal.t('Select Your City'));});});});}};Drupal.behaviors.olhWebformRadios={attach:function(context,settings){$(once('checkmark','.radios--wrapper .form-item')).each(function(){$(this).each(function(){$(this).find('input').appendTo($(this).find('label'));$(this).find('label').append('<span class="checkmark"></span>');});});$(once('checkmark','.webform-type-checkboxes .form-item')).each(function(){$(this).each(function(){$(this).find('input').appendTo($(this).find('label'));$(this).find('label').append('<span class="checkmark"></span>');});});}};Drupal.behaviors.copyCitation={attach:function(context,settings){link=new SMSLink.link();link.replaceWithSelector('.send-to-text');$('.send-to-print').click(function(e){window.print();e.preventDefault();});
18$(once('share','.send-to-share')).each(function(){$(this).click(function(e){$(this).toggleClass('active');$(".share-options").toggleClass('visually-hidden');e.preventDefault();});});$('.send-to-link').click(function(e){e.preventDefault();});$('.send-to-link').copiq({parent:'.send-to-url-wrapper',content:'.send-to-url',onSuccess:function($element,source,selection){let el=$(once('copied','.send-to-link'));el.css("color","green");el.append('<div class="send-to-link--copied text">'+Drupal.t("Copied")+'</div>');setTimeout(function(){el.css("color",'#01274a');},2000);}});}};$.fn.resetSelect=function(select){$(select+' option').removeAttr('selected');};$('#user-pass p').first().addClass('small');Drupal.behaviors.webformExpandableNav={attach:function(context,settings){$('.webform-built-in-nav__expandable-column-button').click(function(e){e.preventDefault();$(this).closest('.webform-built-in-nav').toggleClass('js-expand');$(this).attr('aria-expanded',function(i,attr){return attr==='true'?'false':'true';});});$('.webform-built-in-nav__expandable-column-mobile-button').click(function(e){e.preventDefault();$(this).closest('.webform-built-in-nav').find('.webform-built-in-nav__expandable-column-content').slideToggle();$(this).attr('aria-expanded',function(i,attr){return attr==='true'?'false':'true';});});}};Drupal.behaviors.webformSubtopicToggle={attach:function(context,settings){const mainTopicCheckboxes=context.querySelectorAll('.depth-term input[type="checkbox"]');
18function toggleSubtopicsForCheckbox(checkboxEl){const parentDiv=checkboxEl.closest('.depth-term');const subtopicsDiv=parentDiv?parentDiv.nextElementSibling:null;if(subtopicsDiv&&subtopicsDiv.classList.contains('subtopics')){const isChecked=checkboxEl.checked;subtopicsDiv.setAttribute('aria-hidden',isChecked?'false':'true');if(!isChecked){const childCheckboxes=subtopicsDiv.querySelectorAll('input[type="checkbox"]');childCheckboxes.forEach(function(childCb){if(childCb.checked)childCb.checked=false;});}}}mainTopicCheckboxes.forEach(function(checkbox){if(checkbox.checked)toggleSubtopicsForCheckbox(checkbox);else toggleSubtopicsForCheckbox(checkbox);});mainTopicCheckboxes.forEach(function(checkbox){checkbox.addEventListener('change',function(){toggleSubtopicsForCheckbox(this);});});}};Drupal.behaviors.printPDFAbsoluteURLs={attach:function(context,settings){window.addEventListener("beforeprint",(event)=>{const links=document.querySelectorAll("a");links.forEach((link)=>{const href=link.getAttribute("href");if(href&&!href.startsWith("http"))link.setAttribute("href",window.location.origin+href);});});}};Drupal.behaviors.olhSideNavSkipLink={attach:function(context){var skipLinks=once('side-nav-skip-link','a.webform-built-in-nav__skip-link[href="#expandable-column-content"]',context);$(skipLinks).on('click',function(e){var target=document.getElementById('expandable-column-content');if(!target)return;var firstFocusable=target.querySelector('a[href], div[tabindex]');if(!firstFocusable)return;e.preventDefault();firstFocusable.focus({preventScroll:true});var header=document.querySelector('.header--main');var offset=header?header.offsetHeight+20:165;var top=firstFocusable.getBoundingClientRect().top+window.scrollY-offset;window.scrollTo({top,behavior:'smooth'});});}};Drupal.behaviors.olhSkipLink={attach:function(context){var skipLinks=once('skip-link','a[href="#block-olh-mainpagecontent"], a.skip-link',context);$(skipLinks).on('click',function(e){var target=document.getElementById('block-olh-mainpagecontent')||document.querySelector('main');if(!target)return;var content=null;var quiz=document.querySelector('.quiz');if(quiz){var question=quiz.querySelector('h1')||quiz.querySelector('.instruction');if(question&&(question.offsetParent!==null||question.getClientRects().length>0))content=question;}var sidebar_content=document.querySelector('.sidenav-content');if(sidebar_content){var mainContent=sidebar_content.querySelector('button');if(mainContent&&(mainContent.offsetParent!==null||mainContent.getClientRects().length>0))content=mainContent;}if(!content){var candidates=target.querySelectorAll('h1, h2, h3, p, [role="heading"], a[href], button, input:not([type="hidden"]), select, textarea');for(var i=0;i<candidates.length;i++)if(candidates[i].offsetParent!==null||candidates[i].getClientRects().length>0){content=candidates[i];break;}}if(!content)return;e.preventDefault();var nativelyFocusable=content.matches('a[href], button, input, select, textarea, [tabindex]');if(!nativelyFocusable){content.setAttribute('tabindex','-1');content.addEventListener('blur',function(){content.removeAttribute('tabindex');},{once:true});}content.focus({preventScroll:true});var header=document.querySelector('.header--main');var offset=header?header.offsetHeight+20:165;var top=content.getBoundingClientRect().top+window.scrollY-offset;window.scrollTo({top,behavior:'smooth'});});}};})(jQuery,Drupal);if(typeof drupalSettings==='undefined')drupalSettings={};(function($,Drupal){window.addEventListener("beforeunload",function(){const synth=window.speechSynthesis;synth.cancel();});Drupal.behaviors.glossify={attach:function(context,settings){if(typeof tippy==='undefined')return;const synth=window.speechSynthesis;const elements=document.getElementsByClassName("tippy-definition");let buttonIdNumber=1;for(const element of elements){const content=document.createElement("span");const tippyInstance=tippy(element,{a11y:true,delay:0,arrow:false,size:'large',duration:0,placement:'bottom',zIndex:998,trigger:'click',touch:true,touchHold:false,interactive:true,hideOnClick:true,content});content.textContent=element.getAttribute('data-help-content');content.setAttribute('class','tippy-speak-content');content.setAttribute("data-term-id",element.getAttribute('data-term-id'));let buttonId="ttsglossary"+buttonIdNumber;let button=document.createElement("button");button.setAttribute("id",buttonId);button.setAttribute("class","tts-section tts-glossary");button.setAttribute("type","button");button.setAttribute("value","play");button.setAttribute("aria-label",Drupal.t("Read aloud."));const glossaryElementClickListener=(event)=>{event.preventDefault();speak(tippyInstance,content,buttonId);};button.addEventListener("click",glossaryElementClickListener);content.insertAdjacentElement("beforeend",button);buttonIdNumber++;}if(drupalSettings.olhTts.help_link_path!=undefined){once('ttsHelp','#read-aloud-wrapper',context).forEach(function(){let abbr=document.createElement('button');abbr.setAttribute('class','tippy-help definition taxonomy-tooltip-tip');abbr.setAttribute('aria-label',Drupal.t('Text-to-Speech Help'));abbr.textContent='?';const targetElement=document.getElementById('read-aloud-wrapper');if(targetElement)targetElement.insertAdjacentElement('beforeend',abbr);else{const targetElement=document.querySelector('.quiz #tts1');if(targetElement)targetElement.insertAdjacentElement('beforeend',abbr);}});let link='<a href="'+drupalSettings.olhTts.help_link_path+'" target="_blank">
18'+drupalSettings.olhTts.help_link_text+'</a>';const instance=tippy('.tippy-help',{a11y:true,allowHTML:true,content:link,delay:0,arrow:false,size:'large',theme:'tts-help',duration:0,placement:'bottom',zIndex:998,trigger:'click',touch:true,touchHold:false,interactive:true,hideOnClick:true});}function speak(tippyInstance,content,buttonId,toDatalayer={}){const player=document.querySelector("#beyondwords-player");if(player){const playPauseButton=player.querySelector(".playing .play-pause-button");if(playPauseButton){tippyInstance.setProps({hideOnClick:false});playPauseButton.click();tippyInstance.setProps({hideOnClick:true});}}toDatalayer['event']='nativeTtsEvent';toDatalayer['nativeTtsType']="glossary";toDatalayer['nativeTtsGlossaryTermID']=content.getAttribute('data-term-id');toDatalayer['nativeTtsLanguage']=drupalSettings.path.currentLanguage;toDatalayer['nativeTtsPath']=drupalSettings.path.currentPath;if('currentQuery' in drupalSettings.path)if('page' in drupalSettings.path.currentQuery)toDatalayer['nativeTtsPage']=drupalSettings.path.currentQuery.page;let inputTxt=content.textContent.replace(/[\r\n]+\s*/g,'\r\n');let truncatedTxt=inputTxt.length>=99?inputTxt.substring(0,99):inputTxt;truncatedTxt=truncatedTxt.replaceAll('\n',' ').replaceAll('\r','').trim();let inputTxtEncoded=encodeURIComponent(inputTxt);while(inputTxtEncoded.length>=99){truncatedTxt=truncatedTxt.substring(0,truncatedTxt.length-2);inputTxtEncoded=encodeURIComponent(truncatedTxt);}let button=document.getElementById(buttonId);if(button.classList.contains("playing")){const thisEventDL={};Object.assign(thisEventDL,{'nativeTtsEventType':'cancel','nativeTtsText':truncatedTxt},toDatalayer);button.classList.remove("playing");dataLayer.push(thisEventDL);synth.cancel();return;}let buttons=document.getElementsByClassName("tts-section");if(buttons.length!==0)Array.from(buttons).forEach((e)=>{e.classList.remove("playing");});button.classList.add("playing");button.setAttribute("aria-label",Drupal.t("Stop reading aloud."));synth.cancel();if(synth.speaking){console.error("speechSynthesis.speaking");return;}if(inputTxt!==""){const utterThis=new SpeechSynthesisUtterance(inputTxt);const voices=synth.getVoices();let defaultVoices=[];switch(drupalSettings.path.currentLanguage){case 'ar':defaultVoices=["ar-XA-Standard-A","ar-SA","Microsoft Naayf","Maged","ar"];break;case 'en':defaultVoices=["Google US English","Zira","Samantha","English","en"];break;case 'es':defaultVoices=["Google español de Estados Unidos","español"];break;case 'uk':defaultVoices=["Ostap","Polina","Google Леся","Леся","русский"];break;case 'ru':defaultVoices=["Svetlana","Microsoft Irina","Microsoft Pavel","русский","russian","ru"];break;case 'pl':defaultVoices=["polski"];break;case 'de':defaultVoices=["Deutsch"];break;}outer:for(let s=0;s<defaultVoices.length;s++){for(let i=0;i<voices.length;i++)if(voices[i].name.toLowerCase().includes(defaultVoices[s].toLowerCase())||voices[i].name.toLowerCase()===defaultVoices[s].toLowerCase()){utterThis.voice=voices[i];break outer;}}utterThis.lang=drupalSettings.path.currentLanguage;utterThis.onend=function(event){const thisEventDL={};Object.assign(thisEventDL,{'nativeTtsText':truncatedTxt,'nativeTtsEventType':event.type},toDatalayer);button.classList.remove("playing");dataLayer.push(thisEventDL);};utterThis.onstart=function(event){const thisEventDL={};Object.assign(thisEventDL,{'nativeTtsText':truncatedTxt,'nativeTtsEventType':event.type},toDatalayer);dataLayer.push(thisEventDL);};utterThis.onerror=function(event){console.log(event);};synth.speak(utterThis);let r=setInterval(()=>{if(!synth.speaking)clearInterval(r);else{synth.pause();synth.resume();}},14000);}}}};})(jQuery,Drupal);(function(Drupal,once){Drupal.behaviors.webformModal={attach:function(context){const header=document.querySelector('header');const modal=document.querySelector('#ai-side-modal');const toggleBtn=document.querySelector('#ai-modal-toggle');const body=document.querySelector('main');function adjustModalPosition(){if(header&&modal){const headerHeight=header.offsetHeight;modal.style.top=`${headerHeight}px`;modal.style.height=`calc(100% - ${headerHeight}px)`;if(toggleBtn)toggleBtn.style.top=`${headerHeight+10}px`;}}adjustModalPosition();window.addEventListener('resize',adjustModalPosition);once('webformModal','#ai-modal-toggle',context).forEach((element)=>{element.addEventListener('click',()=>{modal.classList.toggle('open');body.classList.toggle('modal-open');});});once('webformModalClose','#ai-modal-close',context).forEach((element)=>{element.addEventListener('click',()=>{modal.classList.remove('open');body.classList.remove('modal-open');});});}};})(Drupal,once);;
19if(typeof drupalSettings==='undefined')drupalSettings.path.currentLanguage='en';window.BE_API=window.BE_API||{};window.BE_API.onLoad=()=>{window.BE_API.setSessionAttributes({selected_language:drupalSettings.path.currentLanguage});};;
20(function(Drupal,drupalSettings){'use strict';window.addEventListener("beforeunload",function(){const synth=window.speechSynthesis;synth.cancel();});Drupal.behaviors.olhTtsOlhTtsNative={attach(context,settings){if(drupalSettings.olhTts.nope)return;if(context!==document)if(localStorage.getItem("showTts")==='false')return;const synth=window.speechSynthesis;setUp();function setUp(){const ttsWebformElements=context.querySelectorAll("form.webform-submission-form .tts-webform-element, "+"form.webform-submission-form .tts-webform-text"+"form.webform-submission-form .tts-webform-markup-element");let buttonIdNumber=1;
20ttsWebformElements.forEach(ElementSetup);QuizEtcSetup();function QuizEtcSetup(){const quizPage=once('ttsbuttonadded',".quiz-wrapper > section.quiz",document);const searchResults=once('ttsbuttonadded',".search-result-card",document);const searchTitle=once('ttsbuttonadded',".tts-enabled h1",document);const liveHelpStart=once('ttsbuttonadded',".live-help-start",document);QuizAndSearchElementSetup(quizPage,'quiz');QuizAndSearchElementSetup(searchResults,'search');QuizAndSearchElementSetup(searchTitle,'search');QuizAndSearchElementSetup(liveHelpStart,'liveHelp');}function QuizAndSearchElementSetup(section,clickListener){if(section.length!==0)section.forEach(function(e){const quiz=e.classList[0];let buttonId="tts"+buttonIdNumber;let button=document.createElement("button");let wrapper=document.getElementById('read-aloud-wrapper');button.classList.add("tts-section","tts-section-element");button.setAttribute("id",buttonId);button.setAttribute("type","button");button.setAttribute("value","play");button.setAttribute("aria-label",Drupal.t("Read aloud."));if(quiz==='quiz')wrapper.insertAdjacentElement("afterbegin",button);else e.insertAdjacentElement("beforeend",button);const searchElementClickListener=(event)=>{event.preventDefault();const searchDataLayer={'nativeTtsType':'search views'};speak(e,buttonId,searchDataLayer);};const quizElementClickListener=(event)=>{const quizPath=JSON.parse(window.sessionStorage.dict);const currentQuizPage=quizPath[quizPath.length-1];const clickPath=JSON.parse(window.sessionStorage.clickPath);const visitedPath=clickPath[currentQuizPage];const toDatalayer={'nativeTtsQuizEntity':currentQuizPage,'nativeTtsType':visitedPath['type'],'nativeTtsQuizPath':visitedPath['visitedPath']};event.preventDefault();speak(e,buttonId,toDatalayer);};switch(clickListener){case 'quiz':button.addEventListener("click",quizElementClickListener);break;default:button.addEventListener("click",searchElementClickListener);break;}buttonIdNumber++;});}function ElementSetup(element){const webformDatalayer={'nativeTtsType':'webform'};if(element.parentElement.parentElement.parentElement.classList.contains("not-tts"))return;if(element.classList.contains("tts-webform-element")){element.hasLabel=true;const labels=once('ttsbuttonadded',"label",element);const spans=once('ttsbuttonadded',"span:not(.extlink-nobreak)",element);const textDescriptions=once('ttsbuttonadded',".webform-element-description",element);const textMarkup=once('ttsbuttonadded',".tts-markup-content",element);const webformMoreLink=once('ttsbuttonadded',".webform-element-more--link",element);const webformMoreContent=once('ttsbuttonadded',".webform-element-more--content",element);if(labels.length!==0)labels.forEach(function(e){let buttonId="tts"+buttonIdNumber;e.insertAdjacentHTML('beforeend','<button id="'+buttonId+'" class="tts-section tts-section-element" type="button" value="Play"></button>');let button=e.getElementsByTagName("button")[0];button.addEventListener("click",(event)=>{const thisLabelDatalayer={};Object.assign(thisLabelDatalayer,{'nativeTtsWebformType':'label','nativeTtsLabelFor':e.getAttribute('for')},webformDatalayer);speak(e,buttonId,thisLabelDatalayer);});buttonIdNumber++;});if(spans.length!==0)spans.forEach(function(e){if(e.classList.contains('checkmark'))return;if(e.parentElement!==null){if(e.parentElement.classList.contains("tts-markup-content"))return;if(e.parentElement.parentElement!==null)if(e.parentElement.parentElement.classList.contains("tts-markup-content"))return;}let buttonId="tts"+buttonIdNumber;e.innerHTML+='  <button id="'+buttonId+'" class="tts-section tts-section-element" type="button" value="Play"></button>';let button=e.getElementsByTagName("button")[0];button.addEventListener("click",(event)=>{const thisSpanDL={};Object.assign(thisSpanDL,{'nativeTtsWebformType':'span'},webformDatalayer);speak(e,buttonId,thisSpanDL);});buttonIdNumber++;});if(textDescriptions.length!==0)textDescriptions.forEach(function(e){let buttonId="tts"+buttonIdNumber;e.innerHTML+='  <button id="'+buttonId+'" class="tts-section tts-section-element" type="button" value="Play"></button>';let button=e.getElementsByTagName("button")[0];button.addEventListener("click",(event)=>{const thisTextDescDL={};Object.assign(thisTextDescDL,{'nativeTtsWebformType':'field descriptions and markup elements'},webformDatalayer);speak(e,buttonId,thisTextDescDL);});buttonIdNumber++;});if(webformMoreLink.length!==0)webformMoreLink.forEach(function(e){let buttonId="tts"+buttonIdNumber;e.insertAdjacentHTML('afterend','<button id="'+buttonId+'" class="tts-section tts-section-element" type="button" value="Play"></button>');let button=e.parentElement.getElementsByTagName("button")[0];button.addEventListener("click",(event)=>{const thisMoreTitleDL={};Object.assign(thisMoreTitleDL,{'nativeTtsWebformType':'more title'},webformDatalayer);speak(e,buttonId,thisMoreTitleDL);});buttonIdNumber++;});if(webformMoreContent.length!==0)webformMoreContent.forEach(function(e){let buttonId="tts"+buttonIdNumber;e.innerHTML+='  <button id="'+buttonId+'" class="tts-section tts-section-element" type="button" value="Play"></button>';let button=e.getElementsByTagName("button")[0];button.addEventListener("click",(event)=>{const thisMoreContentDL={};Object.assign(thisMoreContentDL,{'nativeTtsWebformType':'more content'},webformDatalayer);speak(e,buttonId,thisMoreContentDL);});buttonIdNumber++;});if(textMarkup.length!==0)textMarkup.forEach(function(e){let buttonId="tts"+buttonIdNumber;let button=document.createElement("button");button.classList.add("tts-section","tts-section-element","tts-markup");button.setAttribute('id',buttonId);button.setAttribute('type',"button");button.setAttribute('value',"play");button.setAttribute("aria-label",Drupal.t("Read alound."));e.insertAdjacentElement("afterbegin",button);button=e.getElementsByTagName("button")[0];button.addEventListener("click",(event)=>{const thisTextMarkupDL={};Object.assign(thisTextMarkupDL,{'nativeTtsWebformType':'field descriptions and markup elements'},webformDatalayer);speak(e,buttonId,thisTextMarkupDL);});buttonIdNumber++;});}else{if(element.classList.contains("tts-webform-text")){let buttonId="tts"+buttonIdNumber;element.hasLabel=false;element.innerHTML+='  <button id="'+buttonId+'" class="tts-section tts-section-text" type="button" value="Play""></button>';element.getElementsByTagName("button")[0].addEventListener("click",(event)=>{const thisLegendDL={};Object.assign(thisLegendDL,{'nativeTtsWebformType':'legends'},webformDatalayer);speak(element,buttonId,thisLegendDL);});buttonIdNumber++;}}}}function speak(element,buttonId,toDatalayer={}){toDatalayer['event']='nativeTtsEvent';toDatalayer['nativeTtsLanguage']=drupalSettings.path.currentLanguage;toDatalayer['nativeTtsPath']=drupalSettings.path.currentPath;if('currentQuery' in drupalSettings.path){if('page' in drupalSettings.path.currentQuery)toDatalayer['nativeTtsPage']=drupalSettings.path.currentQuery.page;if('source_entity_id' in drupalSettings.path.currentQuery)toDatalayer['native_tts_source_entity_id']=drupalSettings.path.currentQuery.source_entity_id;if('source_entity_type' in drupalSettings.path.currentQuery)toDatalayer['native_tts_source_entity_type']=drupalSettings.path.currentQuery.source_entity_type;}let inputTxt="";if(typeof element==="string")inputTxt=element;if(inputTxt===""&&element.hasLabel===true)inputTxt=element.getElementsByTagName("label")[0].textContent;if(inputTxt===""){let cloned=cleanUpAdminStuff(element);cloned=addPauses(cloned);inputTxt=cloned.textContent;inputTxt=inputTxt.replace("< ","");inputTxt=inputTxt.replace(" >","");}if(inputTxt==="")inputTxt=element.parentElement.textContent;if(inputTxt!=="")inputTxt=inputTxt.replace(/[\r\n]+\s*/g,'\r\n');let truncatedTxt=inputTxt.length>=99?inputTxt.substring(0,99):inputTxt;truncatedTxt=truncatedTxt.replaceAll('\n',' ').replaceAll('\r','').trim();let inputTxtEncoded=encodeURIComponent(inputTxt);while(inputTxtEncoded.length>=99){truncatedTxt=truncatedTxt.substring(0,truncatedTxt.length-2);inputTxtEncoded=encodeURIComponent(truncatedTxt);}let button=document.getElementById(buttonId);if(button.classList.contains("playing")){const thisEventDL={};Object.assign(thisEventDL,{'nativeTtsEventType':'cancel','nativeTtsText':truncatedTxt},toDatalayer);button.classList.remove("playing");dataLayer.push(thisEventDL);synth.cancel();return;}let buttons=document.getElementsByClassName("tts-section");
20if(buttons.length!==0)Array.from(buttons).forEach((e)=>{e.classList.remove("playing");});button.classList.add("playing");button.setAttribute("aria-label",Drupal.t("Stop reading aloud."));synth.cancel();if(synth.speaking){console.error("speechSynthesis.speaking");return;}if(inputTxt!==""){const utterThis=new SpeechSynthesisUtterance(inputTxt);const voices=synth.getVoices();let defaultVoices=[];switch(drupalSettings.path.currentLanguage){case 'ar':defaultVoices=["ar-XA-Standard-A","ar-SA","Microsoft Naayf","Maged","ar"];break;case 'en':defaultVoices=["Google US English","Zira","Samantha","English","en"];break;case 'es':defaultVoices=["Google español de Estados Unidos","español"];break;case 'uk':defaultVoices=["Ostap","Polina","Google Леся","Леся","русский"];break;case 'ru':defaultVoices=["Svetlana","Microsoft Irina","Microsoft Pavel","русский","russian","ru"];break;case 'pl':defaultVoices=["polski"];break;case 'de':defaultVoices=["Deutsch"];break;}outer:for(let s=0;s<defaultVoices.length;s++){for(let i=0;i<voices.length;i++)if(voices[i].name.toLowerCase().includes(defaultVoices[s].toLowerCase())||voices[i].name.toLowerCase()===defaultVoices[s].toLowerCase()){utterThis.voice=voices[i];break outer;}}utterThis.lang=drupalSettings.path.currentLanguage;utterThis.onend=function(event){const thisEventDL={};Object.assign(thisEventDL,{'nativeTtsText':truncatedTxt,'nativeTtsEventType':event.type},toDatalayer);button.classList.remove("playing");dataLayer.push(thisEventDL);};utterThis.onstart=function(event){const thisEventDL={};Object.assign(thisEventDL,{'nativeTtsText':truncatedTxt,'nativeTtsEventType':event.type},toDatalayer);dataLayer.push(thisEventDL);};utterThis.onerror=function(event){};synth.speak(utterThis);let r=setInterval(()=>{if(!synth.speaking)clearInterval(r);else{synth.pause();synth.resume();}},14000);}}function cleanUpAdminStuff(element){let clonedElement=element.cloneNode(true);let removedElements=clonedElement.querySelectorAll('select, #block-olh-local-tasks, div.contextual, #read-aloud-wrapper');removedElements.forEach(function(el){el.remove();});return clonedElement;}function addPauses(element){let pauseElements=element.querySelectorAll('h2, h3, h4, h5, h6, p, li, dt, blockquote, pre, figure, footer, .tts-pause-after');pauseElements.forEach(function(el){el.innerHTML=el.innerHTML+'.';});let removedElements=element.querySelectorAll('select');removedElements.forEach(function(el){el.remove();});return element;}let showTtsButtons=once('ttsButton','#read-aloud-control',context).shift();if(showTtsButtons===undefined)return;if(drupalSettings.olhTts.nope){showTtsButtons.remove();return;}let showTts=localStorage.getItem('showTts');if(showTts===null)showTts="false";let text=showTtsButtons.getElementsByTagName("span")[0];let img=showTtsButtons.getElementsByTagName("img")[0];if(showTts==="true")ttsShow();else ttsHide();showTtsButtons.addEventListener("click",(event)=>{if(showTts==="true"){ttsHide();dataLayer.push({event:"showHideReadAloudLabels",category:"TextToSpeech",label:"Hide"});}else{ttsShow();dataLayer.push({event:"showHideReadAloudLabels",category:"TextToSpeech",label:"Show"});}});function ttsShow(){setUp();let buttons=document.querySelectorAll("button.tts-section");showTts="true";img.setAttribute("src","/modules/custom/olh_tts/icons/tts-off-global.svg");if(text)text.innerText=Drupal.t("Hide Read Aloud Buttons");img.setAttribute("alt",Drupal.t("Hide read aloud buttons."));for(let i=0;i<buttons.length;i++)buttons[i].style.display='initial';localStorage.setItem("showTts",showTts);}function ttsHide(){setUp();let buttons=document.querySelectorAll("button.tts-section");showTts="false";if(text)text.innerText=Drupal.t("Show Read Aloud Buttons");img.setAttribute("src","/modules/custom/olh_tts/icons/tts.svg");img.setAttribute("alt",Drupal.t("Show read aloud buttons."));for(let i=0;i<buttons.length;i++)buttons[i].style.display='none';localStorage.setItem("showTts",showTts);}}};}(Drupal,drupalSettings));;

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.