1document.addEventListener('DOMContentLoaded',function(){const mobileMenu=document.querySelector('.header-nav');const menuToggle=document.querySelector('.menu-toggle');const searchToggle=document.querySelector('.search-toggle');const mobileSearch=document.querySelector('.mobile-search');const menuItemsWithChildren=document.querySelectorAll('.header-menu .menu-item-has-children');const siteHeader=document.querySelector('.site-header');const overlayMedia=document.querySelectorAll('.wp-block-cover.alignfull, .wp-block-group.is-style-rotating-gallery');let topbar=document.querySelector('.topbar');const topbarClose=topbar?topbar.querySelector('.topbar-close'):null;let mobileMenuOpen=!1;function isTopbarDismissed(cookieName){return document.cookie.split(';').some(function(item){const parts=item.trim().split('=');return parts[0]===cookieName&&parts[1]==='1'})} 2function setTopbarDismissed(cookieName,days){const maxAge=Math.max(1,days)*24*60*60;const secure=window.location.protocol==='https:'?';Secure':'';document.cookie=cookieName+'=1;max-age='+maxAge+';path=/;SameSite=Lax'+secure} 3function dismissTopbar(){if(!topbar){return} 4topbar.remove();topbar=null} 5if(topbar){const cookieName=topbar.dataset.cookieName||'topbar_closed';if(isTopbarDismissed(cookieName)){dismissTopbar()}} 6function setSiteHeaderHeight(){if(!siteHeader){return} 7const headerHeight=siteHeader.offsetHeight;const headerBottom=Math.max(0,siteHeader.getBoundingClientRect().bottom);document.documentElement.style.setProperty('--site-header-height',headerHeight+'px');document.documentElement.style.setProperty('--site-header-bottom',headerBottom+'px')} 8setSiteHeaderHeight();window.setTimeout(setSiteHeaderHeight,100);window.setTimeout(setSiteHeaderHeight,500);if(topbar&&topbarClose){topbarClose.addEventListener('click',function(){const days=parseFloat(topbar.dataset.cookieDays)||7;const cookieName=topbar.dataset.cookieName||'topbar_closed';setTopbarDismissed(cookieName,days);dismissTopbar();setSiteHeaderHeight()})} 9function rectsOverlap(a,b){return a.bottom>b.top&&a.top<b.bottom&&a.right>b.left&&a.left<b.right} 10function syncCookieBannerOverlay(){const banner=document.getElementById('cookie-consent-banner');if(!banner||banner.style.display==='none'){return} 11const bannerRect=banner.getBoundingClientRect();const overMedia=Array.prototype.some.call(overlayMedia,function(el){return rectsOverlap(bannerRect,el.getBoundingClientRect())});banner.classList.toggle('is-over-media',overMedia)} 12function initHeaderOverlay(){if(!siteHeader||topbar||!overlayMedia.length){return} 13let observer;const mediaInBand=new Set();function headerBandMargin(){return'0px 0px -'+Math.max(0,window.innerHeight-siteHeader.offsetHeight)+'px 0px'} 14function syncHeaderOverlay(){const overMedia=mediaInBand.size>0;siteHeader.classList.toggle('is-over-media',overMedia);siteHeader.classList.toggle('is-past-hero',!overMedia)} 15function observeOverlayTargets(){if(observer){observer.disconnect()} 16mediaInBand.clear();observer=new IntersectionObserver(function(entries){entries.forEach(function(entry){if(entry.isIntersecting){mediaInBand.add(entry.target)}else{mediaInBand.delete(entry.target)}});syncHeaderOverlay()},{root:null,rootMargin:headerBandMargin(),threshold:0});overlayMedia.forEach(function(el){observer.observe(el)})} 17observeOverlayTargets();window.addEventListener('resize',observeOverlayTargets)} 18function syncHeaderScrolled(){if(!siteHeader){return} 19siteHeader.classList.toggle('is-scrolled',window.scrollY>24)} 20syncHeaderScrolled();window.addEventListener('scroll',syncHeaderScrolled,{passive:!0});initHeaderOverlay();if(overlayMedia.length){window.addEventListener('scroll',syncCookieBannerOverlay,{passive:!0});window.addEventListener('resize',syncCookieBannerOverlay)} 21const toggleElement=(element,isVisible)=>{if(!element)return;element.style.display=isVisible?'block':'none'};const toggleState=(element,isActive,stateAttributes=[])=>{if(!element)return;element.classList.toggle('activated',isActive);stateAttributes.forEach(attr=>element.setAttribute(attr,isActive?'true':'false'))};function setLocationsSubmenuLayout(subMenu){if(!subMenu){return} 22const items=subMenu.querySelectorAll(':scope > .menu-item');const rows=Math.ceil(items.length/2)||1;subMenu.style.setProperty('--locations-rows',rows);
22items.forEach(function(item,index){item.classList.remove('locations-col-1','locations-top-right','locations-bottom-left');if(index<rows){item.classList.add('locations-col-1')} 23if(index===rows-1){item.classList.add('locations-bottom-left')} 24if(index===rows){item.classList.add('locations-top-right')}})} 25function isDesktopViewport(){return window.innerWidth>=1024} 26function resetSubMenus(){document.querySelectorAll('.sub-menu-toggle').forEach(toggle=>{toggle.classList.remove('activated');toggle.setAttribute('aria-expanded','false')});document.querySelectorAll('.menu-item-has-children').forEach(menuItem=>{menuItem.classList.remove('submenu-active');const subMenu=menuItem.querySelector('.sub-menu');if(subMenu){if(menuItem.classList.contains('locations')){subMenu.style.removeProperty('display')}else{subMenu.style.display='none'}}})} 27if(menuToggle&&mobileMenu){menuToggle.addEventListener('click',function(){const isOpen=menuToggle.classList.contains('activated');if(isOpen){closeMobileMenu()}else{setSiteHeaderHeight();closeSearch();resetSubMenus();toggleMobileMenu(!0)}})} 28const isSlickstreamSearch=searchToggle&&searchToggle.classList.contains('slickstream');if(searchToggle&&mobileSearch&&!isSlickstreamSearch){searchToggle.addEventListener('click',function(e){e.preventDefault();const isOpen=mobileSearch.classList.contains('activated');if(isOpen){closeSearch()}else{if(!isDesktopViewport()){closeMobileMenu()} 29resetSubMenus();toggleMobileSearch(!0);mobileSearch.querySelector('input[type="search"]')?.focus()}})} 30let navUnlockTimer=null;let navUnlockFinish=null;function cancelNavUnlock(){if(navUnlockTimer){window.clearTimeout(navUnlockTimer);navUnlockTimer=null} 31if(navUnlockFinish&&mobileMenu){mobileMenu.removeEventListener('transitionend',navUnlockFinish);navUnlockFinish=null}} 32function lockMobileNav(){cancelNavUnlock();if(siteHeader){const headerHeight=siteHeader.offsetHeight;const currentTop=siteHeader.getBoundingClientRect().top;const headerParent=siteHeader.parentElement;siteHeader.style.position='fixed';siteHeader.style.top=currentTop+'px';siteHeader.style.left='0';siteHeader.style.right='0';if(headerParent){headerParent.style.paddingTop=headerHeight+'px'} 33document.body.style.overflow='hidden';setSiteHeaderHeight()}} 34function unlockMobileNav(){cancelNavUnlock();if(siteHeader){siteHeader.style.position='';siteHeader.style.top='';siteHeader.style.left='';siteHeader.style.right='';if(siteHeader.parentElement){siteHeader.parentElement.style.paddingTop=''} 35document.body.style.overflow='';setSiteHeaderHeight()}} 36function scheduleNavUnlock(){if(!mobileMenu){unlockMobileNav();return} 37cancelNavUnlock();navUnlockFinish=function(event){if(event&&event.propertyName&&event.propertyName!=='opacity'){return} 38unlockMobileNav()};mobileMenu.addEventListener('transitionend',navUnlockFinish);navUnlockTimer=window.setTimeout(function(){unlockMobileNav()},400)} 39function toggleMobileMenu(isOpen){toggleState(menuToggle,isOpen,['aria-expanded','aria-pressed']);if(isDesktopViewport()){if(mobileMenu){mobileMenu.style.removeProperty('display');mobileMenu.style.removeProperty('opacity')} 40mobileMenuOpen=!1;unlockMobileNav();return} 41mobileMenuOpen=isOpen;if(isOpen){lockMobileNav()}else{scheduleNavUnlock()}} 42function toggleMobileSearch(isOpen){if(!mobileSearch||!searchToggle)return;mobileSearch.classList.toggle('activated',isOpen);toggleState(searchToggle,isOpen,['aria-pressed','aria-expanded']);if(siteHeader){siteHeader.classList.toggle('search-open',isOpen)} 43if(isDesktopViewport()){if(mobileMenu){mobileMenu.style.removeProperty('display');mobileMenu.style.removeProperty('opacity')} 44if(mobileSearch){mobileSearch.style.removeProperty('width')} 45if(!isOpen&&siteHeader){siteHeader.style.position='';siteHeader.style.top='';siteHeader.style.left='';siteHeader.style.right='';document.body.style.overflow=''} 46return}} 47function closeMobileMenu(){if(mobileMenu){toggleMobileMenu(!1);resetSubMenus()}} 48function closeSearch(){if(mobileSearch){toggleMobileSearch(!1)}} 49function closeSiblingSubMenus(menuItem){const parentMenu=menuItem.parentNode;const siblingMenus=parentMenu.querySelectorAll('.menu-item-has-children > .sub-menu');
49siblingMenus.forEach(siblingMenu=>{if(siblingMenu!==menuItem.querySelector('.sub-menu')){const toggleButton=siblingMenu.previousElementSibling;toggleState(toggleButton,!1,['aria-expanded']);if(siblingMenu.parentNode.classList.contains('locations')){siblingMenu.style.removeProperty('display')}else{toggleElement(siblingMenu,!1)} 50siblingMenu.parentNode.classList.remove('submenu-active')}})} 51if(mobileMenu){menuItemsWithChildren.forEach(menuItem=>{const subMenu=menuItem.querySelector('.sub-menu');if(!subMenu)return;if(menuItem.classList.contains('locations')){setLocationsSubmenuLayout(subMenu)} 52const toggleButton=document.createElement('button');toggleButton.className='sub-menu-toggle';toggleButton.setAttribute('aria-expanded','false');toggleButton.setAttribute('aria-label','Toggle Sub Menu');toggleButton.setAttribute('tabindex','0');menuItem.insertBefore(toggleButton,subMenu);if(window.innerWidth<1024&&!menuItem.classList.contains('locations')){toggleElement(subMenu,!1)} 53toggleButton.addEventListener('click',function(event){event.stopPropagation();const isOpen=toggleButton.getAttribute('aria-expanded')==='true';closeSiblingSubMenus(menuItem);toggleState(toggleButton,!isOpen,['aria-expanded']);menuItem.classList.toggle('submenu-active',!isOpen);if(menuItem.classList.contains('locations')){subMenu.style.removeProperty('display')}else{toggleElement(subMenu,!isOpen)}})})} 54document.addEventListener('click',function(e){if(isDesktopViewport())return;if(!e.target.closest('.header-nav')&&!e.target.closest('.menu-toggle')&&!e.target.closest('.mobile-search')&&!e.target.closest('.search-toggle')){closeMobileMenu();closeSearch()}});function enableDesktopHover(){menuItemsWithChildren.forEach(menuItem=>{['mouseenter','mouseleave'].forEach(event=>{menuItem.addEventListener(event,function(){if(window.innerWidth>=1024){requestAnimationFrame(()=>{const isEntering=event==='mouseenter';menuItem.classList.toggle('submenu-active',isEntering);const subMenu=menuItem.querySelector('.sub-menu');if(subMenu&&!menuItem.classList.contains('locations')){toggleElement(subMenu,isEntering)}})}})})})} 55function handleResize(){const isDesktop=isDesktopViewport();setSiteHeaderHeight();if(isDesktop){if(mobileMenu){mobileMenu.style.removeProperty('display');mobileMenu.style.removeProperty('opacity')} 56resetSubMenus();closeSearch();mobileMenuOpen=!1;if(siteHeader){siteHeader.classList.remove('search-open')} 57if(menuToggle){menuToggle.classList.remove('activated');menuToggle.setAttribute('aria-expanded','false');menuToggle.setAttribute('aria-pressed','false')} 58unlockMobileNav()}} 59function setupKeyboardNavigation(){if(!mobileMenu)return;mobileMenu.addEventListener('keydown',function(event){if(window.innerWidth<1024)return;const menuItem=event.target.closest('.menu-item-has-children');if(!menuItem)return;const subMenu=menuItem.querySelector('.sub-menu');if(!subMenu)return;if(event.key==='Tab'){menuItem.classList.add('submenu-active');if(!menuItem.classList.contains('locations')){toggleElement(subMenu,!0)}} 60if((event.key==='Enter'||event.key===' ')&&subMenu){event.preventDefault();toggleState(subMenu.previousElementSibling,!0,['aria-expanded']);if(!menuItem.classList.contains('locations')){toggleElement(subMenu,!0)}} 61if(event.key==='Escape'&&subMenu){event.preventDefault();toggleState(subMenu.previousElementSibling,!1,['aria-expanded']);if(!menuItem.classList.contains('locations')){toggleElement(subMenu,!1)} 62menuItem.classList.remove('submenu-active');menuItem.querySelector('a')?.focus()}});document.addEventListener('focusout',function(event){if(window.innerWidth<1024)return;const menuItem=event.target.closest('.menu-item-has-children');if(!menuItem)return;setTimeout(()=>{if(!menuItem.contains(document.activeElement)){menuItem.classList.remove('submenu-active');const subMenu=menuItem.querySelector('.sub-menu');if(subMenu&&!menuItem.classList.contains('locations')){toggleElement(subMenu,!1)}}},10)})} 63enableDesktopHover();setupKeyboardNavigation();window.addEventListener('resize',handleResize);const featuredImageLinks=document.querySelectorAll('.wp-block-post-featured-image a');featuredImageLinks.forEach(link=>link.setAttribute('tabindex','-1'));document.querySelectorAll('.archive-filter--next').forEach(function(filter){var clearNextHint=function(){filter.classList.remove('archive-filter--next')};filter.addEventListener('focusin',clearNextHint);filter.addEventListener('pointerdown',clearNextHint)});function setCookie(name,value,days){let expires='';if(days){const date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));expires='; expires='+date.toUTCString()} 64document.cookie=name+'='+(value||'')+expires+'; path=/'} 65function getCookie(name){const nameEQ=name+'=';const cookies=document.cookie.split(';');for(let i=0;i<cookies.length;i++){const c=cookies[i].trim();if(c.indexOf(nameEQ)===0){return c.substring(nameEQ.length)}} 66return null} 67function injectConsentMarkup(html,target){if(!html||!target){return} 68const doc=new DOMParser().parseFromString(html,'text/html');const nodes=Array.prototype.slice.call(doc.head.childNodes).concat(Array.prototype.slice.call(doc.body.childNodes));
68nodes.forEach(function(node){if(node.nodeType===Node.COMMENT_NODE){return} 69if(node.nodeName==='SCRIPT'){const script=document.createElement('script');Array.prototype.forEach.call(node.attributes,function(attr){script.setAttribute(attr.name,attr.value)});if(!node.getAttribute('src')){script.text=node.text} 70target.appendChild(script);return} 71if(node.nodeName==='NOSCRIPT'){const holder=document.createElement('div');holder.innerHTML=node.textContent;target.appendChild(holder);return} 72target.appendChild(document.importNode(node,!0))})} 73function loadConsentScripts(){const consentScripts=window.suiteConsentScripts;if(!consentScripts||consentScripts.loaded){return} 74injectConsentMarkup(consentScripts.header,document.head);injectConsentMarkup(consentScripts.footer,document.body);consentScripts.loaded=!0} 75const cookieBanner=document.getElementById('cookie-consent-banner');const acceptCookies=document.getElementById('accept-cookies');const declineCookies=document.getElementById('decline-cookies');const cookieConsent=getCookie('cookieConsent');if(cookieBanner){cookieBanner.style.display=cookieConsent?'none':'block';syncCookieBannerOverlay()} 76if(cookieConsent==='accepted'){loadConsentScripts()} 77if(acceptCookies){acceptCookies.addEventListener('click',function(){setCookie('cookieConsent','accepted',365);loadConsentScripts();if(cookieBanner){cookieBanner.style.display='none'}})} 78if(declineCookies){declineCookies.addEventListener('click',function(){setCookie('cookieConsent','declined',365);if(cookieBanner){cookieBanner.style.display='none'}})} 79let faqIndex=0;function toggleFaq(container,q){const answerId=q.getAttribute('aria-controls')||'';if(!/^faq-answer-\d+$/.test(answerId)){return} 80const a=document.getElementById(answerId);if(!a||!container.contains(a)){return} 81const open=q.getAttribute('aria-expanded')==='true';container.querySelectorAll('.schema-faq-question').forEach(function(qq){qq.setAttribute('aria-expanded','false');qq.classList.remove('faq-q-open')});container.querySelectorAll('.schema-faq-answer').forEach(function(aa){aa.setAttribute('aria-hidden','true');aa.classList.remove('faq-a-open');aa.style.maxHeight=null});if(!open){q.setAttribute('aria-expanded','true');q.classList.add('faq-q-open');a.setAttribute('aria-hidden','false');a.classList.add('faq-a-open');requestAnimationFrame(function(){a.style.maxHeight=a.scrollHeight+'px'})}} 82document.querySelectorAll('.schema-faq').forEach(function(faq){faq.querySelectorAll('.schema-faq-question').forEach(function(q){const a=q.nextElementSibling;if(!a||!a.classList.contains('schema-faq-answer')){return} 83faqIndex+=1;const qId='faq-question-'+faqIndex;const aId='faq-answer-'+faqIndex;a.id=aId;a.setAttribute('aria-hidden','true');a.setAttribute('aria-labelledby',qId);const anchor=document.createElement('a');anchor.className='schema-faq-question';anchor.href='#';anchor.id=qId;anchor.setAttribute('aria-controls',aId);anchor.setAttribute('aria-expanded','false');anchor.textContent=q.textContent;q.replaceWith(anchor);a.style.overflow='hidden';a.style.transition='max-height 0.3s ease';a.style.maxHeight=null});faq.addEventListener('click',function(e){const q=e.target.closest('.schema-faq-question');if(!q){return} 84e.preventDefault();toggleFaq(faq,q)});faq.addEventListener('keydown',function(e){if((e.key==='Enter'||e.key===' ')&&e.target.classList.contains('schema-faq-question')){e.preventDefault();toggleFaq(faq,e.target)}})});function peekSlides(count){const slides=parseFloat(count);if(!slides||slides<1){return count} 85return slides+0.4} 86function enhanceTestimonialCarousel(el){const swiper=el.swiper;if(!swiper||el.dataset.suiteCentered==='1'){return!1} 87el.dataset.suiteCentered='1';swiper.params.centeredSlides=!0;swiper.params.loop=!0;swiper.params.slidesPerView=peekSlides(swiper.params.slidesPerView);if(swiper.originalParams){swiper.originalParams.centeredSlides=!0;swiper.originalParams.loop=!0} 88Object.keys(swiper.params.breakpoints||{}).forEach(function(width){const breakpoint=swiper.params.breakpoints[width];breakpoint.centeredSlides=!0;breakpoint.loop=!0;if(breakpoint.slidesPerView){breakpoint.slidesPerView=peekSlides(breakpoint.slidesPerView)}});if(typeof swiper.setBreakpoint==='function'){swiper.currentBreakpoint=!1;swiper.setBreakpoint()} 89if(typeof swiper.loopDestroy==='function'&&typeof swiper.loopCreate==='function'){swiper.loopDestroy();swiper.loopCreate()}
90swiper.update();if(typeof swiper.slideToLoop==='function'){swiper.slideToLoop(0,0)}else{swiper.slideTo(0,0)} 91return!0} 92function enhanceTestimonialCarousels(){document.querySelectorAll('.is-style-testimonials .wp-block-cb-carousel-v2 .swiper, .wp-block-cb-carousel-v2:has(.is-style-testimonial) .swiper').forEach(function(el){if(enhanceTestimonialCarousel(el)||el.dataset.suiteCentered==='1'){return} 93const observer=new MutationObserver(function(){if(enhanceTestimonialCarousel(el)){observer.disconnect()}});observer.observe(el,{attributes:!0,childList:!0,subtree:!0})})} 94enhanceTestimonialCarousels();window.addEventListener('load',enhanceTestimonialCarousels);setTimeout(enhanceTestimonialCarousels,300);function initTestimonialScroll(){const carousels=document.querySelectorAll('.is-style-testimonials .wp-block-cb-carousel-v2, .wp-block-cb-carousel-v2:has(.is-style-testimonial)');if(!carousels.length){return} 95if(window.matchMedia('(prefers-reduced-motion: reduce)').matches){carousels.forEach(function(carousel){carousel.classList.add('is-testimonials-inview')});return} 96if(!('IntersectionObserver' in window)){carousels.forEach(function(carousel){carousel.classList.add('is-testimonials-inview')});return} 97const observer=new IntersectionObserver(function(entries){entries.forEach(function(entry){if(entry.isIntersecting){entry.target.classList.add('is-testimonials-inview');observer.unobserve(entry.target)}})},{threshold:0.2});carousels.forEach(function(carousel){observer.observe(carousel)})} 98initTestimonialScroll();function initMediaCardScroll(){const rows=document.querySelectorAll('.wp-block-columns:has(> .wp-block-column:nth-child(3) .wp-block-media-text)');if(!rows.length){return} 99if(window.matchMedia('(prefers-reduced-motion: reduce)').matches||!('IntersectionObserver' in window)){rows.forEach(function(row){row.classList.add('is-media-cards-inview')});return} 100const observer=new IntersectionObserver(function(entries){entries.forEach(function(entry){if(entry.isIntersecting){entry.target.classList.add('is-media-cards-inview');observer.unobserve(entry.target)}})},{threshold:0.2});rows.forEach(function(row){observer.observe(row)})} 101initMediaCardScroll();function parseStatText(text){const match=String(text).trim().match(/^(.*?)(\d+(?:\.\d+)?)(.*)$/);if(!match){return null} 102const decimal=match[2].split('.')[1];return{prefix:match[1],value:parseFloat(match[2]),suffix:match[3],decimals:decimal?decimal.length:0}} 103function formatStatValue(value,decimals){if(decimals>0){return value.toFixed(decimals)} 104return String(Math.round(value))} 105function easeOutCubic(t){return 1-Math.pow(1-t,3)} 106function animateStat(el,parsed,duration,delay,minWidth){const start=performance.now()+delay;el.style.display='inline-block';el.style.minWidth=minWidth+'px';el.style.textAlign='center';function frame(now){if(now<start){requestAnimationFrame(frame);return} 107const progress=Math.min(1,(now-start)/duration);const current=parsed.value*easeOutCubic(progress);el.textContent=parsed.prefix+formatStatValue(current,parsed.decimals)+parsed.suffix;if(progress<1){requestAnimationFrame(frame)}} 108el.textContent=parsed.prefix+formatStatValue(0,parsed.decimals)+parsed.suffix;requestAnimationFrame(frame)} 109function initStatsCountUp(){const rows=document.querySelectorAll('.wp-block-columns.is-style-stats');if(!rows.length){return} 110const reduceMotion=window.matchMedia('(prefers-reduced-motion: reduce)').matches;function playRow(row){if(row.dataset.suiteCounted==='1'){return} 111row.dataset.suiteCounted='1';if(reduceMotion){return} 112row.classList.add('is-stats-motion');const targets=[];row.querySelectorAll('.wp-block-heading').forEach(function(heading,index){const target=heading.querySelector('em')||heading;const parsed=parseStatText(target.textContent);if(!parsed){return} 113targets.push({el:target,parsed:parsed,delay:index*120})});window.requestAnimationFrame(function(){const widths=targets.map(function(item){return item.el.getBoundingClientRect().width});targets.forEach(function(item,index){animateStat(item.el,item.parsed,1000,item.delay,widths[index])})})} 114if(!('IntersectionObserver' in window)){rows.forEach(playRow);return} 115const observer=new IntersectionObserver(function(entries){entries.forEac
115h(function(entry){if(entry.isIntersecting){playRow(entry.target);observer.unobserve(entry.target)}})},{threshold:0.4});rows.forEach(function(row){observer.observe(row)})} 116initStatsCountUp();function homepageWaveSections(){const selector='.is-style-wave-bottom';const sections=[];document.querySelectorAll('#getting-started, #what-makes-us-different').forEach(function(root){if(root.matches(selector)){sections.push(root)} 117root.querySelectorAll(selector).forEach(function(section){sections.push(section)})});return sections} 118function initWaveColorShift(){const sections=homepageWaveSections().filter(function(section){if(section.classList.contains('has-dark-green-background-color')){return!0} 119const bg=window.getComputedStyle(section).backgroundColor;const rgb=bg.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);if(!rgb){return!1} 120const r=parseInt(rgb[1],10);const g=parseInt(rgb[2],10);const b=parseInt(rgb[3],10);return r<45&&g>45&&g<110&&b>45&&b<120});if(!sections.length||window.matchMedia('(prefers-reduced-motion: reduce)').matches){return} 121sections.forEach(function(section){section.classList.add('is-wave-color-shift')});function updateWaveShift(){const view=window.innerHeight;sections.forEach(function(section){const rect=section.getBoundingClientRect();const progress=Math.min(1,Math.max(0,(view-rect.top)/(view*0.7)));section.style.setProperty('--suite-wave-mix',Math.round((1-progress)*40)+'%')})} 122window.addEventListener('scroll',updateWaveShift,{passive:!0});window.addEventListener('resize',updateWaveShift);updateWaveShift()} 123initWaveColorShift();function initWaveGradientShift(){const sections=homepageWaveSections().filter(function(section){if(section.classList.contains('is-wave-color-shift')){return!1} 124const image=window.getComputedStyle(section).backgroundImage;return image&&image!=='none'&&image.indexOf('gradient')!==-1});if(!sections.length||window.matchMedia('(prefers-reduced-motion: reduce)').matches){return} 125sections.forEach(function(section){const style=window.getComputedStyle(section);const image=style.backgroundImage;const color=style.backgroundColor;const stops=image.match(/rgba?\([^)]+\)/g);const waveColor=(color&&color!=='transparent'&&color!=='rgba(0, 0, 0, 0)')?color:(stops&&stops.length?stops[stops.length-1]:'var(--wp--preset--color--lavender)');section.classList.add('is-wave-gradient-shift');section.style.setProperty('--suite-wave-gradient-image',image);section.style.setProperty('--suite-wave-gradient-color',waveColor);section.style.setProperty('--suite-wave-gradient','0');section.style.backgroundImage='none';section.style.backgroundColor='transparent'});function updateWaveGradient(){const view=window.innerHeight;sections.forEach(function(section){const rect=section.getBoundingClientRect();const progress=Math.min(1,Math.max(0,(view-rect.top)/(view*0.7)));section.style.setProperty('--suite-wave-gradient',String(progress))})} 126window.addEventListener('scroll',updateWaveGradient,{passive:!0});window.addEventListener('resize',updateWaveGradient);updateWaveGradient()} 127initWaveGradientShift();function initMediaCardWistia(){const cards=document.querySelectorAll('.wp-block-group.is-style-media-card, .wp-block-columns.is-style-media-card');if(!cards.length){return} 128const options={bigPlayButton:!0,fullscreenButton:!1,playBar:!0,qualityControl:!1,roundedPlayer:0,settingsControl:!1,smallPlayButton:!1,volumeControl:!1};window._wq=window._wq||[];cards.forEach(function(card){card.querySelectorAll('wistia-player').forEach(function(player){if(player.getAttribute('wistia-popover')==='true'){return} 129const id=player.getAttribute('media-id');player.setAttribute('rounded-player','0');player.setAttribute('fullscreen-button','false');player.setAttribute('settings-control','false');player.setAttribute('volume-control','false');player.setAttribute('quality-control','false');if(id){window._wq.push({id:id,options:options})}});card.querySelectorAll('iframe[src*="wistia"]').forEach(function(iframe){try{const url=new URL(iframe.src);url.searchParams.set('playBar','true');url.searchParams.set('bigPlayButton','true');url.searchParams.set('fullscreenButton','false');
129url.searchParams.set('settingsControl','false');url.searchParams.set('volumeControl','false');url.searchParams.set('roundedPlayer','0');iframe.src=url.toString()}catch(e){return}})})} 130initMediaCardWistia();function initIconReveal(){const root=document.querySelector('.site-content');if(!root){return} 131const reduceMotion=window.matchMedia('(prefers-reduced-motion: reduce)').matches;const skip='.suite-icon-reveal, .wp-block-social-links, .site-logo, .wp-block-cover__background';const seen=new Set();const icons=[];function isSkippable(el){return!el||seen.has(el)||el.closest(skip)} 132function collect(el){if(isSkippable(el)){return} 133const box=el.getBoundingClientRect();const size=Math.max(box.width,box.height);if(size<12||size>320){return} 134seen.add(el);icons.push(el)} 135root.querySelectorAll('.wp-block-outermost-icon-block, .wp-block-icon').forEach(collect);root.querySelectorAll('svg').forEach(function(svg){collect(svg.closest('.wp-block-outermost-icon-block, .wp-block-icon')||svg)});root.querySelectorAll('img[src*=".svg"]').forEach(collect);if(!icons.length){return} 136function prepareDraw(icon){const svg=icon.tagName==='svg'?icon:icon.querySelector('svg');if(!svg){return} 137let drew=!1;svg.querySelectorAll('path, circle, line, polyline, polygon, rect, ellipse').forEach(function(shape){const stroke=window.getComputedStyle(shape).stroke;if(!stroke||stroke==='none'){return} 138let length=0;try{length=shape.getTotalLength()}catch(e){return} 139if(!length){return} 140shape.style.strokeDasharray=String(length);shape.style.strokeDashoffset=String(length);drew=!0});if(drew){icon.classList.add('suite-icon-draw')}} 141icons.forEach(function(icon){icon.classList.add('suite-icon-reveal');prepareDraw(icon)});if(reduceMotion){icons.forEach(function(icon){icon.classList.add('is-icon-inview')});return} 142if(!('IntersectionObserver' in window)){icons.forEach(function(icon){icon.classList.add('is-icon-inview')});return} 143const queue=[];let playing=!1;function playNextIcon(){if(playing||!queue.length){return} 144playing=!0;const icon=queue.shift();icon.classList.add('is-icon-inview');window.setTimeout(function(){playing=!1;playNextIcon()},550)} 145const observer=new IntersectionObserver(function(entries){entries.forEach(function(entry){if(entry.isIntersecting){observer.unobserve(entry.target);queue.push(entry.target);queue.sort(function(a,b){return a.compareDocumentPosition(b)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1});playNextIcon()}})},{threshold:0.35});icons.forEach(function(icon){observer.observe(icon)})} 146initIconReveal();function initRotatingGalleries(){const groups=document.querySelectorAll('.wp-block-group.is-style-rotating-gallery');if(!groups.length){return} 147const reduceMotion=window.matchMedia('(prefers-reduced-motion: reduce)').matches;groups.forEach(function(group){if(group.dataset.suiteGallery==='1'){return} 148const imgs=group.querySelectorAll('.wp-block-gallery img');if(!imgs.length){return} 149group.dataset.suiteGallery='1';const slides=document.createElement('div');slides.className='suite-gallery-slides';slides.setAttribute('aria-hidden','true');imgs.forEach(function(img,index){const slide=document.createElement('div');slide.className='suite-gallery-slide'+(index===0?' is-active':'');const clone=img.cloneNode(!0);clone.alt='';clone.loading='eager';clone.removeAttribute('loading');clone.setAttribute('loading','eager');clone.setAttribute('fetchpriority',index===0?'high':'low');clone.removeAttribute('width');clone.removeAttribute('height');if(clone.dataset&&clone.dataset.src&&!clone.getAttribute('src')){clone.src=clone.dataset.src} 150slide.appendChild(clone);slides.appendChild(slide)});group.insertBefore(slides,group.firstChild);group.classList.add('is-rotating-gallery-ready');if(imgs.length<2){return} 151const dots=document.createElement('div');dots.className='suite-gallery-dots';dots.setAttribute('role','tablist');dots.setAttribute('aria-label','Gallery slides');let current=0;let timer;function show(index){current=index;slides.querySelectorAll('.suite-gallery-slide').forEach(function(slide,i){slide.classList.toggle('is-active',i===current)});dots.querySelectorAll('button').forEach(function(dot,i){dot.classList.toggle('is-active',i===current);dot.setAttribute('aria-selected',i===current?'true':'false')})} 152function next(){show((current+1)%imgs.length)} 153function prev(){show((current-1+imgs.length)%imgs.length)} 154function start(){stop();timer=window.setInterval(next,5000)} 155function stop(){if(timer){window.clearInterval(timer);timer=null}} 156let pointerX=0;let pointerY=0;let pointerId=null;group.addEventListener('pointerdown',function(event){if(event.target.closest('a, button')){return} 157pointerId=event.pointerId;pointerX=event.clientX;pointerY=event.clientY});group.addEventListener('pointerup',function(event){if(pointerId!==event.pointerId){return} 158pointerId=null;const dx=event.clientX-pointerX;const dy=event.clientY-pointerY;if(Math.abs(dx)<48||Math.abs(dx)<Math.abs(dy)*1.25){return} 159if(dx<0){next()}else{prev()} 160if(!reduceMotion){start()}});group.addEventListener('pointercancel',function(){pointerId=null});
160imgs.forEach(function(img,index){const dot=document.createElement('button');dot.type='button';dot.setAttribute('role','tab');dot.setAttribute('aria-label','Slide '+(index+1));dot.setAttribute('aria-selected',index===0?'true':'false');if(index===0){dot.className='is-active'} 161dot.addEventListener('click',function(){show(index);if(!reduceMotion){start()}});dots.appendChild(dot)});group.appendChild(dots);if(!reduceMotion){start()}})} 162initRotatingGalleries();document.querySelectorAll('.wp-block-group.is-style-expandable').forEach(function(group){const button=group.querySelector('.wp-block-button__link');const list=group.querySelector('.wp-block-list');if(!button||!list){return} 163const clip=document.createElement('div');clip.className='expandable-clip';list.parentNode.insertBefore(clip,list);clip.appendChild(list);let isOpen=!1;button.setAttribute('aria-expanded','false');button.dataset.expandLabel=button.innerHTML;function prefersReducedMotion(){return window.matchMedia('(prefers-reduced-motion: reduce)').matches} 164function collapsedPx(){return parseFloat(getComputedStyle(clip).fontSize)*9} 165function setButton(open){button.setAttribute('aria-expanded',open?'true':'false');button.innerHTML=open?'Show less':button.dataset.expandLabel} 166clip.addEventListener('transitionend',function(event){if(event.propertyName!=='height'){return} 167if(isOpen){clip.style.height='';group.classList.add('is-expanded')}});button.addEventListener('click',function(event){event.preventDefault();isOpen=!isOpen;setButton(isOpen);if(prefersReducedMotion()){group.classList.toggle('is-expanded',isOpen);clip.style.height='';return} 168const from=clip.offsetHeight;if(isOpen){clip.style.transitionDuration='0.4s';clip.style.height=from+'px';clip.offsetHeight;clip.style.height=list.scrollHeight+'px';return} 169group.classList.remove('is-expanded');clip.style.transitionDuration='0.28s';clip.style.height=from+'px';clip.offsetHeight;clip.style.height=collapsedPx()+'px'})})})
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.