1/* @license GPL-2.0-or-later https://www.drupal.org/licensing/faq */ 2((window,drupalSettings)=>{'use strict';if(typeof drupalSettings.mparticle!=='undefined'){window.mParticle={config:{isDevelopmentMode:drupalSettings.mparticle.is_development_mode}};if(drupalSettings.mparticle.data_plan_id){window.mParticle.config.dataPlan={planId:drupalSettings.mparticle.data_plan_id};if(drupalSettings.mparticle.data_plan_version)window.mParticle.config.dataPlan.planVersion=parseInt(drupalSettings.mparticle.data_plan_version);}(function(t){window.mParticle=window.mParticle||{};window.mParticle.EventType={Unknown:0,Navigation:1,Location:2,Search:3,Transaction:4,UserContent:5,UserPreference:6,Social:7,Other:8};window.mParticle.eCommerce={Cart:{}};window.mParticle.Identity={};window.mParticle.config=window.mParticle.config||{};window.mParticle.config.rq=[];window.mParticle.config.snippetVersion=2.2;window.mParticle.ready=function(t){window.mParticle.config.rq.push(t);};var e=['endSession','logError','logBaseEvent','logEvent','logForm','logLink','logPageView','setSessionAttribute','setAppName','setAppVersion','setOptOut','setPosition','startNewSession','startTrackingLocation','stopTrackingLocation'];var o=['setCurrencyCode','logCheckout'];var i=['identify','login','logout','modify'];e.forEach(function(t){window.mParticle[t]=n(t);});o.forEach(function(t){window.mParticle.eCommerce[t]=n(t,'eCommerce');});i.forEach(function(t){window.mParticle.Identity[t]=n(t,'Identity');});function n(e,o){return function(){if(o)e=o+'.'+e;var t=Array.prototype.slice.call(arguments);t.unshift(e);window.mParticle.config.rq.push(t);};}var mp=document.createElement('script');mp.type='text/javascript';mp.async=true;mp.src=('https:'===document.location.protocol?'https://jssdkcdns':'http://jssdkcdn')+'.mparticle.com/js/v2/'+t+'/mparticle.js';var c=document.getElementsByTagName('script')[0];c.parentNode.insertBefore(mp,c);})(drupalSettings.mparticle.api_key);}})(window,drupalSettings);; 3(function($,Drupal){Drupal.theme.progressBar=function(id){const escapedId=Drupal.checkPlain(id);return (`<div id="${escapedId}" class="progress" aria-live="polite">`+'<div class="progress__label"> </div>'+'<div class="progress__track"><div class="progress__bar"></div></div>'+'<div class="progress__percentage"></div>'+'<div class="progress__description"> </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}
5function 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;for(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(){Array.prototype.forEach.call(this.messageWrapper.querySelectorAll('[data-drupal-message-id]'),(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})=>
9{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}`;once('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={};elementSettings.url=$(el.form).attr('action');elementSettings.setClick=true;elementSettings.event='click';elementSettings.progress={type:'throbber'};elementSettings.base=el.id;elementSettings.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&&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=$.parseJSON(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"> </div>';return `<div class="ajax-progress ajax-progress-throbber">${throbber}${messageMarkup}</div>`;};Drupal.theme.ajaxProgressIndicatorFullscreen=()=>'<div class="ajax-progress ajax-progress-fullscreen"> </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 tempDiv=fragment.appendChild(document.createElement('div'));tempDiv.innerHTML=htmlString;return tempDiv.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){if(typeof response.data==='string'){Drupal.deprecationError({message:'Passing a string to the Drupal.ajax.add_css() method is deprecated in 10.1.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/3154948.'});$('head').prepend(response.data);return;}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;
10if(!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)=>{const onSuccess=()=>{Drupal.attachBehaviors(parentEl,settings);resolve();};loadjs.ready(allUniqueBundleIds,{success(){onSuccess();},error(depsNotFound){const allExternal=depsNotFound.reduce((carry,depNotFound)=>carry&&isExternalUrl(depNotFound),true);const message=Drupal.t(`The following files could not be loaded: @dependencies`,{'@dependencies':depsNotFound.join(', ')});if(allExternal){console.error(Drupal.t('A recoverable error occurred during the execution of the Ajax response: !error',{'!error':message}));onSuccess();return;}reject(message);}});});},scrollTop(ajax,response){const offset=$(response.selector).offset();let scrollTarget=response.selector;while($(scrollTarget).scrollTop()===0&&$(scrollTarget).parent())scrollTarget=$(scrollTarget).parent();if(offset.top-10<$(scrollTarget).scrollTop())scrollTarget.get(0).scrollTo({top:offset.top-10,behavior:'smooth'});}};const stopEvent=(xhr,settings)=>{return (xhr.getResponseHeader('X-Drupal-Ajax-Token')==='1'&&settings.isInProgress&&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;}}}});const isExternalUrl=(url,currentDomain=null)=>{try{if(!url.startsWith('//')&&!/^https?:\/\//i.test(url))return false;const domain=currentDomain||window.location.hostname;const domainRegex=new RegExp(`^`+`(https?:)?`+`\/\/`+`(`+`([^@\n]+@)?`+`(`+`([-\\w]+\\.)*`+`${domain.replace(/[.*+?^${}()|[\]\\]/g,'\\$&')}`+`|localhost`+`)`+`)`+`(:\\d+)?`+`([/\\?].*)?`+`$`,'i');return !domainRegex.test(url);}catch(e){console.error('Error checking URL:',e);return true;}};})(jQuery,window,Drupal,drupalSettings,loadjs,window.tabbable);; 11(function(Drupal){Drupal.theme.ajaxProgressBar=function($element){return $element.addClass('ajax-progress ajax-progress-bar');};})(Drupal);; 12((Drupal,drupalSettings)=>{'use strict';const mParticle=(Drupal.mParticle=Drupal.mParticle||{});mParticle.getBrand=()=>{return drupalSettings.ls_site.network_name;};mParticle.hasLocalStorage=()=>{try{localStorage.setItem('test','test');localStorage.removeItem('test');return true;}catch(e){return false;}};})(Drupal,drupalSettings);; 13/* @license MIT https://raw.githubusercontent.com/js-cookie/js-cookie/v3.0.5/LICENSE */ 14!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
14URIComponent);}},{path:"/"});return t;}));; 15/* @license GPL-2.0-or-later https://www.drupal.org/licensing/faq */ 16((Drupal,drupalSettings,$,cookies)=>{'use strict';const mParticle=(Drupal.mParticle=Drupal.mParticle||{});let isFirstVisit=true;let initializationPromise;let isInitialized=false;mParticle.initialize=()=>{initializationPromise=initializationPromise||new Promise((resolve,reject)=>{let retryCount=0;const retryInterval=250;const maxRetries=40;const checkMParticle=()=>{if(window.mParticle){setTimeout(reject,retryInterval*maxRetries,new Error(`mParticle did not become ready in ${(retryInterval*maxRetries)/1000} seconds. Aborting.`));window.mParticle.ready(()=>{isInitialized=true;return resolve(window.mParticle);});}else if(retryCount<maxRetries){retryCount++;setTimeout(checkMParticle,retryInterval);}else reject(new Error('mParticle SDK could not be found in DOM.'));};checkMParticle();});return initializationPromise;};mParticle.logout=()=>mParticle.initialize().then((mp)=>new Promise((resolve,reject)=>{mp.Identity.logout({},(result)=>{if(result.httpCode===200)resolve();reject(`An error occurred during mParticle.logout: ${result.httpCode} ${result.body}`);});}));mParticle.fallbackIdentify=()=>
16{if(mParticle.isFirstVisit())return mParticle.identifyIdentity(mParticle.getAdobeAudience());return Promise.resolve();};mParticle.identifyIdentity=(identityRequest)=>mParticle.initialize().then((mp)=>new Promise((resolve,reject)=>{mp.Identity.identify({userIdentities:{...identityRequest}},(result)=>{if(result.httpCode===200)resolve();reject(`An error occurred during mParticle.identify: ${result.httpCode} ${result.body}`);});})).catch((e)=>{console.error(e);});mParticle.getMparticleUser=()=>mParticle.initialize().then((mp)=>mp.Identity&&mp.Identity.getCurrentUser());mParticle.getMparticleId=async()=>{const mpCurrentUser=await mParticle.getMparticleUser();return mpCurrentUser?.getMPID?mpCurrentUser.getMPID():'';};mParticle.getUserAudiences=async()=>{const currentUser=await mParticle.getMparticleUser();const {currentAudienceMemberships:audiences}=await new Promise((resolve,reject)=>{try{currentUser?currentUser.getUserAudiences(resolve):resolve([]);}catch(e){reject(e);}});return audiences.map(({audience_id})=>audience_id);};function getCoreAttributes(mParticle,document,window){const vars={Platform:mParticle.getPlatform(),Product:mParticle.getProduct()||null,'Page Name':mParticle.getAdobeAnalyticsValue('articleTitle'),'Page Type':mParticle.getAdobeAnalyticsValue('contentType'),'Referring Page':document.referrer,Orientation:window.innerHeight>window.innerWidth?'Portrait':'Landscape','Ad Tracking Opt-Out':'False','First Visit':mParticle.isDayZeroUser()?'True':'False','UTM Source':mParticle.getUtmParam('source'),'UTM Medium':mParticle.getUtmParam('medium'),'UTM Campaign':mParticle.getUtmParam('campaign'),'UTM Term':mParticle.getUtmParam('term'),'UTM Content':mParticle.getUtmParam('content'),'Article ID':mParticle.getAdobeAnalyticsValue('contentID'),Author:mParticle.getAdobeAnalyticsValue('author'),Category:mParticle.getAdobeAnalyticsValue('category'),People:mParticle.getAdobeAnalyticsValue('people'),'Published Date':mParticle.getAdobeAnalyticsValue('publishedDate'),Show:mParticle.getAdobeAnalyticsValue('showSite'),Topics:mParticle.getAdobeAnalyticsValue('topic'),'Vertical Name':mParticle.getAdobeAnalyticsValue('customSubSection')};if(vars['Page Type']==='Blog Post'){vars['Functional Tag']=mParticle.getAdobeAnalyticsValue('functionaltag');vars['Related Show']=mParticle.getAdobeAnalyticsValue('relatedShows');}return vars;}mParticle.trackEvent=async({type,name,attributes,customFlags=null})=>{const coreAttributes=getCoreAttributes(mParticle,document,window);try{const mp=await mParticle.initialize();console.log('yielding in mParticle.trackEvent');await scheduler.yield();coreAttributes.MVPD=await mParticle.getMvpd();coreAttributes.Profile='anonymous';const branchData=await mParticle.getBranchData();coreAttributes['Branch Feature']=branchData.feature||'None';coreAttributes['Branch Campaign']=branchData.campaign||'None';coreAttributes['Branch Channel']=branchData.channel||'None';coreAttributes['Branch Tags']=branchData.tags?branchData.tags.join(','):'None';if(drupalSettings.lsExperiments?.featureFlag){const ldFlagValue=await mParticle.getLaunchDarklyFeatureFlag();coreAttributes['LD Feature Flag']=ldFlagValue?`${drupalSettings.lsExperiments?.featureFlag}::${ldFlagValue}`:'';}mp.logEvent(name,mp.EventType[type],Object.assign({},coreAttributes,attributes),customFlags);}catch(error){console.debug('ls_mparticle','There was an error collecting the event data.',error);}};mParticle.trackClickEvent=(selector,attributesBuilder,context=document)=>{const listener=async(clickEvent)=>{console.log('yielding mParticle.trackClickEvent in click event');const attributes=attributesBuilder(clickEvent.currentTarget);attributes.URL=attributes.URL??document.location.href;await scheduler.yield();return mParticle.trackEvent({type:'Navigation',name:'Click Action',attributes});};const elements=once('mparticle-click-element',selector,context);if(elements){for(const element of elements)element.addEventListener('click',listener);}return elements;};mParticle.getAamId=()=>cookies.get('aam_uuid')||null;mParticle.getMcmId=()=>{const orgId=drupalSettings.ls_site.org_id;const mcmId=(cookies.get(`AMCV_${orgId}@AdobeOrg`)||'').split('|');const index=mcmId.indexOf('MCMID')+1;return (index>1&&mcmId[index])||null;};mParticle.getAdobeAudience=()=>{const aamId=mParticle.getAamId();const mcmId=mParticle.getMcmId();const audience={};if(aamId)audience.other3=aamId;if(mcmId)audience.other4=mcmId;return audience;};mParticle.getAdobeAnalyticsValue=(key)=>{if(typeof drupalSettings.ls_adobe_analytics!=='undefined'&&typeof drupalSettings.ls_adobe_analytics[`${key}`]!=='undefined')return drupalSettings.ls_adobe_analytics[`${key}`];return null;};mParticle.getPlatform=()=>{const os=navigator.appVersion;return os.match(/Windows Phone/i)?'Windows Phone':os.match(/Kindle|Silk/i)?'Kindle':os.match(/iPhone|iPad|iPod/i)?'iOS':os.match(/Mac OS|Macintosh/i)?'Mac OS X':os.match(/Windows/i)?'Windows':os.match(/Android/i)?'Android':os.match(/mobile|opera m/i)?'Other Mobile':os.match(/AppleTV|SMART-TV|SmartTV/i)?'tvOS':os.match(/Linux|X11/i)?'Linux':'Unknown OS';};mParticle.getProduct=()=>{switch(drupalSettings.ls_site.site){case 'bravo':return 'bravotv.com';case 'oxygen':return 'oxygen.com';case 'nbc':return 'nbc.com';}};mParticle.getBranchData=()=>{const nullObject={feature:null,campaign:null,channel:null,tags:null};if(typeof window.branch!=='undefined'){const branchPromise=new Promise((resolve,reject)=>{window.branch.data((err,data)=>{const dataParsed=data.data_parsed;resolve({feature:dataParsed['~feature']||null,campaign:dataParsed['~campaign']||null,channel:dataParsed['~channel']||null,tags:dataParsed['~tags']||null});});});const timerPromise=new Promise((resolve,reject)=>{setTimeout(resolve,1000,nullObject);});return Promise.race([branchPromise,timerPromise]);}else return Promise.resolve(nullObject);};mParticle.getLaunchDarklyFeatureFlag=()=>{const featureFlag=drupalSettings.lsExperiments?.featureFlag;return Drupal.launchDarkly&&featureFlag?Drupal.launchDarkly.getFlag(featureFlag):Promise.resolve(null);};mParticle.isDayZeroUser=()=>{const firstVisitDate=mParticle.hasLocalStorage()&&localStorage.getItem('first
16VisitDate');return (!!firstVisitDate&&Date.now()<firstVisitDate+24*60*60*1000);};mParticle.isFirstVisit=()=>{return isFirstVisit;};mParticle.getUtmParam=(key)=>{const urlParams=new URLSearchParams(window.location.search);const value=urlParams.get(`utm_${key}`);return value||'None';};if(mParticle.hasLocalStorage())if(!localStorage.getItem('firstVisitDate')){isFirstVisit=true;localStorage.setItem('firstVisitDate',Date.now());}else isFirstVisit=false;mParticle.initialize().then(()=>{try{const mParticleUsers=window.mParticle?.Identity?.getUsers?.()||[];for(let i=0;i<mParticleUsers.length;i++){const mPCurrentUser=mParticleUsers[i].getUserIdentities?.();if(mPCurrentUser?.userIdentities?.email){console.log('Found stored email in mParticle, clearing...');mParticle.clearStoredUserEmail();const apiKey=drupalSettings.ls_mparticle?.apiKey||'';const newConfig={...window.mParticle.config,identityCallback:undefined};window.mParticle.reset();if(apiKey)window.mParticle.init(apiKey,newConfig);break;}}}catch(e){console.debug('Error checking mParticle user email on init:',e);}}).catch(()=>{});})(Drupal,drupalSettings,jQuery,window.Cookies);; 17((Drupal,drupalSettings)=>{'use strict';const launchDarkly=(Drupal.launchDarkly=Drupal.launchDarkly||{});const ldClientSideId=drupalSettings.ls_launchdarkly?.client_side_id;const cachedClients=new Map();const cachedFlagValues=new Map();function createFallbackClient(){return {waitUntilReady:()=>Promise.resolve(),variationDetail:(featureFlag,defaultVar)=>Promise.resolve({value:defaultVar,variationIndex:0,reason:{kind:'ERROR',errorKind:'CLIENT_NOT_READY'},flagName:featureFlag})};}function initializeClient(ldClientSideId,user){const cacheKey=`${ldClientSideId}::${user.key}`;if(cachedClients.has(cacheKey))return cachedClients.get(cacheKey);if(typeof LDClient==='undefined'||typeof LDClient.initialize!=='function'){console.error('LaunchDarkly client is not available. Using fallback client.');return createFallbackClient();}try{const client=LDClient.initialize(ldClientSideId,user);cachedClients.set(cacheKey,client);return client;}catch(error){console.error('Error initializing LaunchDarkly client:',error);return createFallbackClient();}}function handleError(featureFlag,defaultVariation,error,errorKind='UNKNOWN_ERROR'){console.error(`LaunchDarkly error (${errorKind}):`,error);return {value:defaultVariation,variationIndex:0,reason:{kind:'ERROR',errorKind:error.message||errorKind},flagName:featureFlag};}launchDarkly.getFlag=async(featureFlag,defaultVariation,includeDetails=false)=>{try{if(typeof LDClient==='undefined'||typeof LDClient.initialize!=='function')throw new Error('LaunchDarkly client not loaded');if(!ldClientSideId)throw new Error('LaunchDarkly client side ID not available');const mParticleId=await Drupal.mParticle.getMparticleId();const user={kind:'user',key:mParticleId};const cacheKey=`${user.key}::${ldClientSideId}::${featureFlag}::${defaultVariation}`;if(cachedFlagValues.has(cacheKey)){const details=cachedFlagValues.get(cacheKey);return includeDetails?details:details.value;}const client=initializeClient(ldClientSideId,user);let details;try{await client.waitUntilReady();const variationDetails=await client.variationDetail(featureFlag,defaultVariation);variationDetails.flagName=featureFlag;details=variationDetails;}catch(clientError){details=handleError(featureFlag,defaultVariation,clientError,'CLIENT_ERROR');}cachedFlagValues.set(cacheKey,details);return includeDetails?details:details.value;}catch(error){const fallbackDetails=handleError(featureFlag,defaultVariation,error);return includeDetails?fallbackDetails:defaultVariation;}};})(Drupal,drupalSettings);; 18((Drupal)=>{'use strict';Drupal.behaviors.mParticlePeacockSubscription={async attach(context,{ls_mparticle:{peacockAudienceId}}){const audience_ids=await Drupal.mParticle.getUserAudiences();audience_ids.includes(peacockAudienceId)&&console.log('[LS mParticle] The user is a Peacock subscriber',(await Drupal.mParticle.getMparticleUser()).getUserIdentities());}};})(Drupal);; 19((Drupal,once)=>{'use strict';const mParticle=(Drupal.mParticle=Drupal.mParticle||{});function addHeaderClickTracking(context){mParticle.trackClickEvent('.header__logo',()=>({'Custom Shelf Title':'Header','Item Clicked Name':'Logo'}),context);const selector='nav#block-mainmenu li:not(.menu-item--expanded) > a:not(.parent-all):not(.expanded-item-link-processed)';const clickTrackingElements=context.querySelectorAll(selector);
19clickTrackingElements.forEach((clickTrackingElement)=>{clickTrackingElement.addEventListener('click',function(event){const link=event.target;const breadcrumbs=[mParticle.trackingTextForAnchor(link)];const headerItem=link.closest('.menu-item--expanded');if(headerItem){const headerLink=headerItem.querySelector('a[role="menuitem"]');if(headerLink)breadcrumbs.push(mParticle.trackingTextForAnchor(headerLink));}mParticle.trackEvent({type:'Navigation',name:'Click Action',attributes:{'Custom Shelf Title':'Header','Item Clicked Name':breadcrumbs.reverse().join(' | '),URL:link.href}});});});mParticle.trackClickEvent('.identity__insider__wrapper .identity__menu-cta a',(clickedElement)=>({'Custom Shelf Title':'Header','Item Clicked Name':`Navigation: ${mParticle.trackingTextForAnchor(clickedElement)}`}),context);const myInsiderHubButtonParent=document.querySelector('.identity__profile__wrapper .identity__menu-cta');if(myInsiderHubButtonParent)myInsiderHubButtonParent.addEventListener('click',function(event){if(event.target.tagName==='A'){const link=event.target;const linkText=mParticle.trackingTextForAnchor(link);mParticle.trackEvent({type:'Navigation',name:'Click Action',attributes:{'Custom Shelf Title':'Header','Item Clicked Name':'Navigation: '+linkText}});}});}function addInsiderOverlayTracking(context){mParticle.trackClickEvent('#insider-exclusive__subscription__link a',(clickedElement)=>({'Custom Shelf Title':'Unlock Bravo Insider Exclusive','Item Clicked Name':clickedElement.innerText}),context);}function addFooterClickTracking(context){const clickTrackingElements=context.querySelectorAll('footer.site-footer a:not([data-identity-context])');clickTrackingElements.forEach((clickTrackingElement)=>{clickTrackingElement.addEventListener('click',function(){const breadcrumbs=[mParticle.trackingTextForAnchor(this)];const menuItem=this.closest('.primary-menu-item');if(menuItem)breadcrumbs.push(menuItem.querySelector('span').innerText.trim());mParticle.trackEvent({type:'Navigation',name:'Click Action',attributes:{'Custom Shelf Title':'Footer','Item Clicked Name':breadcrumbs.reverse().join(' | '),URL:this.href}});});});}Drupal.behaviors.lsMparticlePage={attach(context,settings){if(!mParticle?.trackEvent&&!mParticle?.trackClickEvent)return;const [body]=once('mparticle-page-load','body',context);if(body){const additionalAttributes=settings?.ls_mparticle?.additional_attributes||{};const attributes={URL:document.location.href,...additionalAttributes};const featureFlag=settings.ab_tests?.deciderSettings?.feature_flag;if(featureFlag)attributes['LD Feature Flag']=featureFlag;mParticle.trackEvent({type:'Navigation',name:'Page Load',attributes,customFlags:{'Facebook.EventSourceUrl':document.location.href}});mParticle.trackClickEvent('.page-show-main .teaser-promo--hero a[href*="peacocktv.com"]',(clickedElement)=>({'Custom Shelf Title':'Show Hero','Item Clicked Name':'Stream Now',URL:clickedElement.href}),context);}const [domElement]=once('mparticle-click',context instanceof Document?document.body:context);if(domElement){mParticle.trackClickEvent('[data-identity-context]',(clickedElement)=>{const attributes={URL:document.location.href};if(clickedElement){attributes['Item Clicked Name']=clickedElement.dataset.identityContext;attributes['Custom Shelf Title']=clickedElement.dataset.identityShelfTitle;}else{console.warn('clickedElement is null in trackClickEvent',new Error().stack);attributes['Item Clicked Name']='unknown';attributes['Custom Shelf Title']='unknown';}return attributes;},domElement);addHeaderClickTracking(domElement);addInsiderOverlayTracking(domElement);addFooterClickTracking(domElement);}}};mParticle.toCapitalized=(text)=>{return text.toLowerCase().split(' ').map((word)=>word.charAt(0).toUpperCase()+word.slice(1)).join(' ');};mParticle.getContentPositionAmongSameElements=(element,selector,parentElement)=>{const elements=parentElement.querySelectorAll(selector);const elementsArray=Array.from(elements);return elementsArray.indexOf(element)+1;};mParticle.getContentPosition=(element)=>{let position=0;let children=element.parentNode.children;while(children[position]!==element)position++;position++;return position;};mParticle.heroCarouselPosition=(element)=>{return element.getAttribute('data-swiper-slide-index')?parseInt(element.getAttribute('data-swiper-slide-index'))+1:mParticle.getContentPosition(element);};mParticle.getContentHeadline=(element)=>{return element.querySelector('.headline')?.innerText?element.querySelector('.headline').innerText.trim():element.closest('.teaser').querySelector('.teaser__meta-wrapper .headline').innerText?element.closest('.teaser').querySelector('.teaser__meta-wrapper .headline').innerText.trim():'';};mParticle.trackingTextForAnchor=(element)=>{const article=element.closest('article');if(article){const headline=article.querySelector('.headline');if(headline)return headline.innerText.trim();}const text=element.innerText.trim();if(text.length)return text;const title=element.getAttribute('title');if(title)return title;const href=element.getAttribute('href');if(href)try{const url=new URL(href);return url.hostname;}catch(e){return window.location.hostname;}return 'Unk';};mParticle.trackingTextWithInnerContent=(element)=>{let text=element.textContent.trim();const img=element.querySelector('img');if(img&&img.alt)text+=' '+img.alt.trim();return text;};mParticle.getInsiderLandingSectionTitle=(element)=>{const sectionClass=element.closest('.insider-section')?.classList[1];switch(sectionClass){case 'insider-section__hero-panel':return 'Hero';case 'insider-section__virtual-events-panel':return 'Virtual Events';case 'insider-section__live-events-panel':return 'Live Events';case 'insider-section__upcoming-events-panel':return 'Upcoming Events';case 'insider-section__peacock-panel':return 'Peacock';case 'insider-section__perks-panel':return 'Perks';case 'insider-section__editorial-panel':return 'Editorial';case 'insider-section__plans-panel':return 'Plans';default:return 'Insider Landing Section';}};mParticle.getSectionTitle=(element)=>{return element.closest('.site-section-wrapper').querySelector('.section__title')?.innerText?element.closest('.site-section-wrapper').querySelector('.section__title').innerText.trim():element.closest('.homepage-section').querySelector('.section__title .inner').innerText?element.closest('.homepage-section').querySelector('.section__title .inner').innerText.trim():element.closest('.blog-post-section').querySelector('.section__title .inner').innerText.trim()?element.closest('.blog-post-section').querySelector('.section__title .inner').innerText.trim():element.closest('.section__title').innerText?element.closest('.section__title').innerText.trim():'';};})(Drupal,once);; 20((Drupal,once)=>{'use strict';const mParticle=(Drupal.mParticle=Drupal.mParticle||{});Drupal.behaviors.lsMparticleClickHelper={attach(context,settings){mParticle.trackClickEvent('.analytics-click-tracking article a:not(.ab-test-block__link)',(clickedElement)=>{const attributes={'Content Position':mParticle.getContentPosition(clickedElement.closest('.carousel__item')),'Custom Shelf Title':mParticle.getSectionTitle(clickedElement),'Item Clicked Name':mParticle.getContentHeadline(clickedElement)};if(clickedElement.href.indexOf('peacocktv.com')>-1)attributes['URL']=clickedElement.href;return attributes;},context);}};})(Drupal,once);; 21((Drupal,once)=>{'use strict';const mParticle=(Drupal.mParticle=Drupal.mParticle||{});function addHomepageClickTracking(context){mParticle.trackClickEvent('.carousel-container-video .slide-description a',(clickedElement)=>({'Content Position':mParticle.getContentPosition(clickedElement.closest('.slide-description')),'Custom Shelf Title':'Home Hero Full Width','Item Clicked Name':clickedElement.classList.contains('button')?clickedElement.innerText.trim():clickedElement.closest('.slide-description').querySelector('.slide-title').innerText.trim(),URL:clickedElement.href}),context);mParticle.trackClickEvent('.teaser--hero-carousel a',(clickedElement)=>({'Content Position':mParticle.heroCarouselPosition(clickedElement.closest('.swiper-slide')),'Custom Shelf Title':'Home Hero','Item Clicked Name':mParticle.getContentHeadline(clickedElement)}),context);mParticle.trackClickEvent('.teaser-promo--hero a',(clickedElement)=>({'Custom Shelf Title':'Home Hero','Item Clicked Name':mParticle.getContentHeadline(clickedElement)}),context);mParticle.trackClickEvent('.homepage-section__featured-links a',(clickedElement)=>({'Custom Shelf Title':'Featured Links','Item Clicked Name':clickedElement.innerText.trim(),'Content Position':mParticle.getContentPosition(clickedElement)}),context);mParticle.trackClickEvent('.analytics-click-tracking .section__cta a, .analytics-click-tracking .section__link a',(clickedElement)=>({'Custom Shelf Title':mParticle.getSectionTitle(clickedElement),'Item Clicked Name':mParticle.trackingTextForAnchor(clickedElement)}),context);document.addEventListener('visual-stories-view',function(event){mParticle.trackEvent({type:'Navigation',name:'Click Action',attributes:{'Custom Shelf Title':'Home Visual Stories','Item Clicked Name':event.detail.title,'Content Position':event.detail.index+1}});});mParticle.trackClickEvent('.homepage-section__large-featured-promo a[href*="peacocktv.com"]',(clickedElement)=>({'Custom Shelf Title':'Watch Bravo on Peacock','Item Clicked Name':'Stream Now',URL:clickedElement.href}),context);}Drupal.behaviors.lsMparticleHome={attach(context,settings){const [domElement]=once('mparticle-click-home',context instanceof Document?document.body:context);if(domElement)addHomepageClickTracking(domElement);}};})(Drupal,once);; 22(function(drupalSettings,$,Drupal,once,Identity){'use strict';Drupal.behaviors.oneTrustInit={attach:function(context,settings){$(once('onetrust-init','#ot-sdk-btn')).click((e)=>{if(typeof window.OneTrust==='object')e.preventDefault();});const [canDo]=once('lsOneTrust_lazy_loaded','body',context);if(canDo){const listenerWithCondition=(waitForCallback)=>async(event)=>{if(!window.OneTrust)return;await Drupal.waitFor(()=>typeof window.OneTrust!=='undefined'&&waitForCallback(event));if(Drupal.oneTrust.hasConsent()){window.OneTrust.AllowAll();context.querySelectorAll('script[src="text/plain"]').forEach((el)=>{console.log('[OneTrust] embed fallback. Swapping script type text/plain with text/javascript.',el);el.type='text/javascript';});context.querySelectorAll('iframe[data-src]').forEach((el)=>{console.log('[OneTrust] embed fallback. Swapping iframe data-src with src.',el);el.src=el.dataset.src;el.removeAttribute('data-src');});}};document.addEventListener('ab_tests:abTestFinished',listenerWithCondition(()=>document.querySelector('[data-ab-tests-decider-status="success"]')!==null));document.addEventListener('ls_continuous_scroll:postLoaded',listenerWithCondition((event)=>typeof document.querySelectorAll('[data-view-mode="lazyloaded"]')[event.detail.postNumber]!=='undefined'));}}};Drupal.oneTrust=Drupal.oneTrust?Drupal.oneTrust:{};Drupal.oneTrust.hasConsent=function(){if(typeof window.OneTrust!=='object')return false;const categoryId=drupalSettings?.lsOnetrust?.optanonCategoryId;if(!categoryId)return false;try{const domainData=window.OneTrust.GetDomainData();if(!domainData||!domainData.Groups)return false;
22if(domainData?.ForceConsent===true&&!window.OneTrust.IsAlertBoxClosedAndValid())return false;const socialMediaCategory=domainData.Groups.find((group)=>group.CustomGroupId===categoryId);if(!socialMediaCategory)return false;return (socialMediaCategory.HasConsentOptOut===false||socialMediaCategory.Status==='always active');}catch(error){console.warn('Error checking OneTrust social media consent:',error);return false;}};})(drupalSettings,jQuery,Drupal,once,window.nbc?.identity);;
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.