1class ScheduledContent{constructor(){this.observer=null,this.onDomReady=this.onDomReady.bind(this),this.promoFilters=null}parseInteger(value){const parsed=parseInt(value,10);return Number.isNaN(parsed)?null:parsed}getDateFromAttributes(el,prefix){const month=this.parseInteger(el.getAttribute("data-"+prefix+"-month")),day=this.parseInteger(el.getAttribute("data-"+prefix+"-day")),year=this.parseInteger(el.getAttribute("data-"+prefix+"-year"));return month==null||day==null||year==null?null:prefix==="start"?new Date(year,month-1,day,0,0,0,0):new Date(year,month-1,day,23,59,59,999)}parseCsvToArray(value){if(value==null)return[];try{return(Array.isArray(value)?value.join(","):String(value)).split(",").map(s=>s.trim()).filter(s=>s.length>0)}catch{return[]}}getPromoFilters(){if(this.promoFilters)return this.promoFilters;const globalFilters=typeof window<"u"&&window.ProductPromoFilters||{},included=this.parseCsvToArray(globalFilters.included),excluded=this.parseCsvToArray(globalFilters.excluded);return this.promoFilters={included,excluded},this.promoFilters}shouldShow(el,now){const showAlwaysAttr=el.getAttribute("data-show-always");if(showAlwaysAttr&&showAlwaysAttr.toString().toLowerCase()==="true")return!0;const audienceMode=(el.getAttribute("data-default-visibility")||"hide").toLowerCase()==="show"?"blacklist":"whitelist",promoIdAttr=el.getAttribute("data-promo-id"),promoId=promoIdAttr?promoIdAttr.toString().trim():"",{included,excluded}=this.getPromoFilters();if(promoId){const inExcluded=excluded.indexOf(promoId)!==-1,inIncluded=included.indexOf(promoId)!==-1;if(inExcluded||audienceMode==="whitelist"&&!inIncluded)return!1}const scheduleType=(el.getAttribute("data-schedule-type")||"show").toLowerCase(),startDate=this.getDateFromAttributes(el,"start"),endDate=this.getDateFromAttributes(el,"end");if(!startDate&&!endDate)return!0;let inRange=!1;return startDate&&endDate?inRange=now>=startDate&&now<=endDate:startDate&&!endDate?inRange=now>=startDate:!startDate&&endDate&&(inRange=now<=endDate),scheduleType==="hide"?!inRange:inRange}setVisibility(el,visible){visible?(el.style.removeProperty("display"),el.hidden=!1,el.setAttribute("aria-hidden","false")):(el.style.display="none",el.hidden=!0,el.setAttribute("aria-hidden","true"))}process(root){const now=new Date,elements=(root||document).querySelectorAll("[data-schedule-type]");elements.forEach?elements.forEach(el=>{const visible=this.shouldShow(el,now);this.setVisibility(el,visible)}):Array.prototype.forEach.call(elements,el=>{const visible=this.shouldShow(el,now);this.setVisibility(el,visible)})}observe(){window.MutationObserver&&(this.observer=new MutationObserver(mutations=>{let needsScan=!1;for(let i=0;i<mutations.length;i++){const m=mutations[i];if(m.addedNodes&&m.addedNodes.length||m.type==="childList"||m.type==="attributes"){needsScan=!0;break}}needsScan&&this.process(document)}),this.observer.observe(document.documentElement||document.body,{childList:!0,subtree:!0,attributes:!1}))}refresh(root){this.process(root||document)}onDomReady(){this.process(document),this.observe()}}const scheduledContent=new ScheduledContent;document.readyState==="loading"?document.addEventListener("DOMContentLoaded",scheduledContent.onDomReady):scheduledContent.onDomReady(),window.ScheduledContent=scheduledContent; 2//# sourceMappingURL=/cdn/shop/t/314/assets/scheduled-content.js.map?v=42366426468300278571789060864
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.