1/* @license GPL-2.0-or-later https://www.drupal.org/licensing/faq */ 2!function(r,a){a.behaviors.masonryGallery={attach:function(a){var e=r(once("masonry-gallery--desktop",".masonry-gallery--desktop",a));if(e.length){var n,o,l=(n=r("#masonry-gallery--modal .swiper-wrapper").attr("id"),o=null,window.swiper.forEach((function(r){r.slidesEl.id===n&&(o=r);})),o);if(l){e.masonry({itemSelector:".masonry-gallery--item",percentPosition:!0,horizontalOrder:!0});var t=0;r(".masonry-gallery .masonry-gallery--desktop .masonry-gallery--trigger").each((function(){r(this).attr("data-index",t),t++;})),r(".masonry-gallery--trigger").on("click",(function(){var a=r(this).attr("data-index");l.slideTo(a);}));}}}};}(jQuery,Drupal);; 3!function(n,s){s.behaviors.markFirstElement={attach:function(s,e){n(".news-announcements__section .views-row",s).first().addClass("is-first"),n(document).ajaxComplete((function(){n(".news-announcements__section .views-row").not(".is-first").removeClass("is-first");}));}};}(jQuery,Drupal);; 4!function(i,e){e.behaviors.signinIronmanProfile={attach:function(e){var n="_competitor",t=i(once("sign-in__cookie-area",".sign-in__cookie-area",e));
4if(this.checkCookie(n)){var o=this.getCookie(n),r=JSON.parse(o),a=t.find(".sign-in__icon"),s=t.find(".sign-in__label.sign-in__main-label");a.attr("src",r.profile_image),s.text(r.firstname);var c=t.find("#sign-in-units option");"Miles (mi)"===r.preferred_units?(c.attr("value","imperial").html("Imperial"),i("body").addClass("imperial-units")):(c.attr("value","metric").html("Metric"),i("body").addClass("metric-units"));}},getCookie:function(i){var e=new RegExp("(?:^|; )"+encodeURIComponent(i)+"=([^;]*)"),n=document.cookie.match(e);return n?decodeURIComponent(n[1]):null;},cookieExists:function(i){return document.cookie.split(";").some((function(e){return e.trim().startsWith(i+"=");}));},checkCookie:function(i){return this.cookieExists(i)?1:0;}};}(jQuery,Drupal);; 5(function($){Drupal.behaviors.standings={attach:function(context,settings){const selector='.standings-search .views-infinite-scroll-content-wrapper table > tbody > tr:not(.points-breakdown)';once('standings',selector,context).forEach(function(element){const toggleButton=$(element).find('.toggle-points').first();const athleteNid=toggleButton.attr('data-athlete-nid');const viewDomId=`view-container-${athleteNid}`;$(element).after(` 6 <tr class="points-breakdown"> 7 <td colspan=100> 8 <div class="breakdown-view" data-athlete-nid="${athleteNid}" data-view-loaded="false"> 9 <div class="js-view-dom-id-${viewDomId}"></div> 10 </div> 11 </td> 12 </tr>`);const year=window.location.pathname.split('/').pop();const isProseries=window.location.pathname.indexOf('/proseries')===0;if($('.js-view-dom-id-'+viewDomId).length){var view_info={view_name:'athlete_results',view_display_id:'points_breakdown',view_args:athleteNid,view_dom_id:viewDomId,year,is_proseries:isProseries?'1':'0'};var ajax_settings={submit:view_info,url:drupalSettings.path.baseUrl+'views/ajax',element:toggleButton.get(0),event:'click',progress:{type:'fullscreen'}};var ajax_call=Drupal.ajax(ajax_settings);}toggleButton.on('click',function(){ajax_call.execute();const nextRow=$(element).next();if(nextRow.hasClass('is-expanded')){nextRow.removeClass('is-expanded').hide();toggleButton.removeClass('is-expanded');}else{nextRow.addClass('is-expanded').show();toggleButton.addClass('is-expanded');}});});}};})(jQuery);; 13(function(Drupal){'use strict';Drupal.fidesConsent={hasConsent:function(){return document.cookie.indexOf('fides_consent=')!==-1;},gate:function(callback,delay){var ms=delay!==undefined?delay:10000;if(this.hasConsent()){callback(0);return;}var self=this;window.addEventListener('FidesUpdated',function onConsent(){if(!self.hasConsent())return;window.removeEventListener('FidesUpdated',onConsent);callback(ms);});}};})(Drupal);; 14const cookieName='proNewsletterModalSeen';(function($){function initNewsletterModal(proSiteHeader,delay){var ms=delay!==undefined?delay:10000;if(!getNewsletterCookie())if(!document.referrer||(document.referrer&&document.referrer.indexOf(window.location.hostname)===-1))setTimeout(function(){showNewsletterModal();},ms);}Drupal.behaviors.newsletterModal={attach:function(context,settings){once('newsletterModal','#newsletter-modal',context).forEach(function(proSiteHeader){Drupal.fidesConsent.gate(function(delay){initNewsletterModal(proSiteHeader,delay);});});}};function showNewsletterModal(){$('#newsletter-modal-opener').click();setNewsletterCookie(7);}function getNewsletterCookie(){const value='; '+document.cookie;const parts=value.split('; '+cookieName+'=');if(parts.length===2)return parts.pop().split(';').shift();}})(jQuery);window.setNewsletterCookie=function(days){let expires='Fri, 31 Dec 9999 23:59:59 GMT';if(days){const date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));expires=date.toUTCString();}document.cookie=`${cookieName}=true; expires=${expires}; path=/`;};; 15(function($){Drupal.behaviors.newsletter={attach:function(context,settings){once('newsletter','.newsletter',context).forEach(function(newsletterElement){replaceButton(newsletterElement);});}};function replaceButton(newsletterElement){const maxWaitTime=20000;const intervalTime=100;let intervalId=null;let elapsedTime=0;function waitForOriginalButton(){const originalButton=$(newsletterElement).find('.hs_submit .actions .hs-button');if(originalButton.length){replaceWithButton(originalButton);clearInterval(intervalId);}else{if(elapsedTime>=maxWaitTime)clearInterval(intervalId);}elapsedTime+=intervalTime;}function replaceWithButton(originalButton){if(!$(newsletterElement).find('.hs-button-clone').length){const buttonClone
15=$('<button>').addClass('button button--secondary hs-button-clone').text(originalButton.val());buttonClone.on('click',function(){originalButton.click();});originalButton.hide();originalButton.after(buttonClone);}}intervalId=setInterval(waitForOriginalButton,intervalTime);}})(jQuery);; 16!function(t,o){"use strict";t.behaviors.registrationStateCta={attach:function(t){if(o("registration-state-cta","body",t).length){var e,n=(e=document.body.classList).contains("registration-state--sold_out")?"sold_out":e.contains("registration-state--closed")?"closed":"open";"sold_out"!==n&&"closed"!==n||document.querySelectorAll('[data-cta="notify-me"]').forEach((function(t){t.addEventListener("click",(function(t){t.preventDefault(),document.dispatchEvent(new CustomEvent("ironman:open-hubspot-modal",{detail:{source:"notify-me"}}));}));}));}}};}(Drupal,once);; 17!function(t,e){"use strict";t.behaviors.registrationMissedOut={attach:function(t){var i=e("registration-missed-out",'[class*="registraion-page_missed-out"]',t);i.length&&i.forEach((function(t){null!==t.offsetParent&&requestAnimationFrame((function(){t.querySelectorAll(".swiper").forEach((function(t){t.swiper&&"function"==typeof t.swiper.update&&t.swiper.update();}));}));}));}};}(Drupal,once);; 18!function(e){"use strict";e.behaviors.ironman={attach:function(e,t){}},e.behaviors.responsiveTables={attach:function(e,t){document.body.classList.contains("ps-site-body")||once("responsiveTableInit","table",e).forEach((function(e){var t=document.createElement("div");t.classList.add("responsive-table-wrapper"),e.parentNode.insertBefore(t,e),t.appendChild(e);}));}},e.behaviors.footerMobileInteractions={attach:function(e,t){once("footer-mobile-init",".footer-navigation",e).forEach((function(e){e.querySelectorAll(".menu-item--expanded > a").forEach((function(e){e.addEventListener("click",(function(e){e.preventDefault(),e.target.classList.toggle("menu-item--active"),e.target.nextElementSibling.classList.toggle("menu--opened");}));}));}));}};}(Drupal);; 19jQuery,Drupal.behaviors.heroBgVideoLoader={attach:function(e,a){var r=[".hero-bg-video-loader .media-wrapper video",".hero .media--type-video video"].join(", "),o=jQuery(once("hero-bg-video-loader",r,e));o.length&&o.each((function(){var e=jQuery(this)[0],a=0,r=setInterval((function(){a+=200,(e.readyState>=4||a>=2e4)&&(jQuery(e).addClass("is-fully-loaded"),clearInterval(r));}),200);}));}};; 20(function($,Drupal,once){function setCookie(name,value,days){var expires='';if(days){var date=new Date();date.setTime(date.getTime()+days*24*60*60*1000);expires='; expires='+date.toUTCString();}document.cookie=name+'='+encodeURIComponent(value)+expires+'; path=/';}function getCookie(name){var match=document.cookie.match(new RegExp('(^|; )'+name+'=([^;]+)'));return match?decodeURIComponent(match[2]):null;}function isWithinDateRange(modalElement){var wrapper=modalElement.closest('[data-start-date], [data-end-date]');if(!wrapper.length)return true;var startDateAttr=wrapper.attr('data-start-date')||null;var endDateAttr=wrapper.attr('data-end-date')||null;if(startDateAttr||endDateAttr)return validateDateRange(startDateAttr,endDateAttr);return true;}function validateDateRange(startDateAttr,endDateAttr){const currentTimestamp=Math.floor(Date.now()/1000);const startDate=startDateAttr?parseInt(startDateAttr,10):0;const endDate=endDateAttr?parseInt(endDateAttr,10):Number.MAX_SAFE_INTEGER;return currentTimestamp>=startDate&¤tTimestamp<=endDate;}function replaceHubSpotButton(modalElement){const maxWaitTime=20000;const intervalTime=100;let intervalId=null;let elapsedTime=0;function waitForOriginalButton(){const originalButton=$(modalElement).find('.image-hubspot-form .actions input.hs-button');if(originalButton.length){replaceWithButton(originalButton);clearInterval(intervalId);}else{if(elapsedTime>=maxWaitTime)clearInterval(intervalId);}elapsedTime+=intervalTime;}function replaceWithButton(originalButton){if(!$(modalElement).find('.hs-button-clone').length){const buttonClone=$('<button>').addClass('button button--secondary hs-button-clone modal-signup-button').text(originalButton.val());buttonClone.on('click',function(){originalButton.click();});originalButton.hide();originalButton.after(buttonClone);originalButton.closest('.actions').addClass('has-cloned-button');}}intervalId=setInterval(waitForOriginalButton,intervalTime);}Drupal.behaviors.promoImgModal={attach:function(context,settings){if(context!==document)return;once('promoImgModal','body',context).forEach(function(){Drupal.fidesConsent.gate(function(delay){initPromoModal(context,delay);});});function initPromoModal(ctx,delay){var ms=delay!==undefined?delay:10000;var opener=$('#promo-img-modal-opener',ctx);var modal=$('#promo-img-modal',ctx);if(!isWithinDateRange(modal))return;if(getCookie('promoImgModalClickedLink'))return;if(getCookie('promoImgModalShown'))return;if(modal.length&&opener.length)setTimeout(function(){opener.trigger('click');setTimeout(function(){replaceHubSpotButton(modal);syncCtaHeight();},500);},ms);opener.on('click',function(){if(!isWithinDateRange(modal))return false;setTimeout(function(){replaceHubSpotButton(modal);syncCtaHeight();},500);});function handleClose(){setCookie('promoImgModalShown','1',1);setTimeout(function(){opener.trigger('click');},24*60*60*1000);}modal.on('click','.coh-modal-close-button, .coh-modal-overlay',handleClose);$(document).on('keyup.promoModal',function(e){if(e.key==='Escape'&&modal.is(':visible'))handleClose();});modal.on('click','a.promo-img-link',function(){setCookie('promoImgModalClickedLink','1',3650);modal.find('.coh-modal-close-button').trigger('click');});modal.on('click','.modal-signup-button',function(e){var form=$(this).closest('form');if(form.length&&!form.data('cookie-listener-added')){form.data('cookie-listener-added',true);form.on('submit',function(){var requiredFields=form.find('[required]');var isValid=true;requiredFields.each(function(){if(!$(this).val().trim()){isValid=false;return false;}});if(isValid)setTimeout(function(){setCookie('promoImgModalClickedLink','1',3650);},2000);});}});}function syncCtaHeight(){const containers=document.querySelectorAll('.image-hubspot-form');
20containers.forEach((container)=>{const image=container.querySelector('.panel__image');const cta=container.querySelector('.panel__cta');if(image&&cta){cta.style.height='auto';const imageHeight=image.offsetHeight;cta.style.height=imageHeight+'px';cta.style.overflowY='auto';}});}window.addEventListener('load',syncCtaHeight);window.addEventListener('resize',syncCtaHeight);}};})(jQuery,Drupal,once);; 21(function(Drupal,drupalSettings,once){Drupal.behaviors.smartDateLocalize={attach(context,settings){function date(format,date){if(!date||date==='')date=new Date();else{if(!(date instanceof Date))date=new Date(date.replace(/-/g,'/'));}const locale=document.documentElement.lang;let string='';const mo=date.getMonth();const m1=mo+1;const dow=date.getDay();const d=date.getDate();const y=date.getFullYear();const h=date.getHours();const mi=date.getMinutes();const s=date.getSeconds();const tzs=Intl.DateTimeFormat(locale,{timeZoneName:'short',weekday:'short',month:'short'});const tzl=Intl.DateTimeFormat(locale,{timeZoneName:'long',weekday:'long',month:'long'});for(let i of format.match(/(\\)*./g))switch(i){case 'j':string+=d;break;case 'S':switch(d.toString().slice(-1)){case '1':string+=d===11?'th':'st';break;case '2':string+=d===12?'th':'nd';break;case '3':string+=d===13?'th':'rd';break;default:string+='th';break;}break;case 'd':string+=d<10?`0${d}`:d;break;case 'l':string+=tzl.formatToParts(date).find((part)=>part.type==='weekday').value;break;case 'w':string+=dow;break;case 'D':string+=tzs.formatToParts(date).find((part)=>part.type==='weekday').value;break;case 'm':string+=m1<10?`0${m1}`:m1;break;case 'n':string+=m1;break;case 'F':string+=tzl.formatToParts(date).find((part)=>part.type==='month').value;break;case 'M':string+=tzs.formatToParts(date).find((part)=>part.type==='month').value;break;case 'Y':string+=y;break;case 'y':string+=y.toString().slice(-2);break;case 'H':string+=h<10?`0${h}`:h;break;case 'g':{const hourNoZero=h===0?12:h;string+=hourNoZero>12?hourNoZero-12:hourNoZero;break;}case 'h':{let hour=h===0?12:h;hour=hour>12?hour-12:hour;string+=hour<10?`0${hour}`:hour;break;}case 'a':string+=h<12?'am':'pm';break;case 'i':string+=mi<10?`0${mi}`:mi;break;case 's':string+=s<10?`0${s}`:s;break;case 'c':string+=date.toISOString();break;case 'T':string+=tzs.formatToParts(date).find((part)=>part.type==='timeZoneName').value;break;case 'e':string+=tzl.formatToParts(date).find((part)=>part.type==='timeZoneName').value;break;default:if(i.startsWith('\\'))i=i.substr(1);string+=i;}return string;}function localizeDate(element){if(!element.dataset.format||!element.dateTime)return;const when=new Date(element.dateTime);const offset=element.dataset.tzoffset;if(when.getTimezoneOffset()===offset)return;element.textContent=date(element.dataset.format,when);}once('smartDateLocalize','time.smart-date--localize',context).forEach(function(element){localizeDate(element);});}};})(Drupal,drupalSettings,once);;
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.