{"version":3,"sources":["20250130Activity_functions.js"],"names":["swiperFreeMode","Swiper","slidesPerView","spaceBetween","freeMode","enabled","sticky","grabCursor","loop","breakpoints","600","900","productPickers","document","querySelectorAll","sliderSlot","forEach","productPicker","productIdNumber","dataset","productId","addEventListener","e","preventDefault","window","jwsdwMediator","publish","getElementById","catLandingMiddle","sliderSlot2","appendChild","catLandingBottom1"],"mappings":"AAqGA,IAAMA,eAAiB,IAAIC,OAAO,mBAAoB,CACpDC,cAAe,KACfC,aAAc,GACdC,SAAU,CACRC,SAAS,EACTC,QAAQ,GAEVC,YAAY,EACZC,MAAM,EACNC,YAAa,CACXC,IAAK,CACHR,cAAe,IACfC,aAAc,IAEhBQ,IAAK,CACHT,cAAe,KACfC,aAAc,OAuCdS,eAAiBC,SAASC,iBAAiB,+BAkD3CC,YAhDNH,eAAeI,QAAQ,SAAAC,GACrB,IAAMC,EAAkBD,EAAcE,QAAQC,UAC9CH,EAAcI,iBAAiB,QAAS,SAACC,GACvCA,EAAEC,iBACFC,OAAOC,cAAcC,QAAQ,aAAc,sBAAuB,CAChEN,UAAaF,QA2CAL,SAASc,eAAe,mBACrCC,iBAAmBf,SAASc,eAAe,sBAG3CE,aAFND,kBAAoBb,WAAWe,YAAYF,kBAEvBf,SAASc,eAAe,oBACtCI,kBAAoBlB,SAASc,eAAe,uBAClDI,mBAAqBF,YAAYC,YAAYC","file":"20250130Activity_functions.min.js","sourcesContent":["// TOUCH OR NO-TOUCH, THAT IS THE QUESTION!\r\n// SCROLL-TO ANIMATION FOR ANCHOR LINKS\r\n// FADE-IN-UP ELEMENTS ON SCROLL\r\n// SLIDER (SWIPER JS)\r\n// SLIDER (SLICK JS)\r\n// PRODUCT PICKER\r\n// NEWSLETTER PICKER\r\n\r\n\r\n\r\n//\r\n// =TOUCH OR NO-TOUCH, THAT IS THE QUESTION!\r\n// --------------------------------------------------\r\n\r\n// function isTouchDevice() {\r\n// return true == (\"ontouchstart\" in window || window.DocumentTouch && document instanceof DocumentTouch);\r\n// }\r\n// if (isTouchDevice() === true) {\r\n// $(\"body\").toggleClass(\"touch\");\r\n// } else {\r\n// $(\"body\").toggleClass(\"no-touch\");\r\n// }\r\n\r\n\r\n//\r\n// =SCROLL-TO ANIMATION FOR ANCHOR LINKS\r\n// --------------------------------------------------\r\n\r\n// $('.msdw-page-scroll').click(function() {\r\n// if (location.pathname.replace(/^\\//,'') == this.pathname.replace(/^\\//,'') && location.hostname == this.hostname) {\r\n// var target = $(this.hash);\r\n// target = target.length ? target : $('[name=' + this.hash.slice(1) +']');\r\n// if (target.length) {\r\n// var offsetValue = 0;\r\n// if ( window.innerWidth <= 767 ) {\r\n// offsetValue;\r\n// // console.log(offsetValue);\r\n// } else {\r\n// offsetValue = 59;\r\n// // console.log(offsetValue);\r\n// }\r\n\r\n// $('html,body').animate({\r\n// scrollTop: target.offset().top - offsetValue\r\n// }, 900);\r\n// return false;\r\n// }\r\n// }\r\n// });\r\n\r\n\r\n//\r\n// =FADE-IN-UP ELEMENTS ON SCROLL\r\n// --------------------------------------------------\r\n\r\n// *** IntersectionObserver ***\r\n\r\n// const elements = document.querySelectorAll(\".msdw-animate\");\r\n\r\n// function check(entries) {\r\n// entries.map((entry) => {\r\n// if (entry.isIntersecting) {\r\n// entry.target.classList.add(\"msdw-animated\");\r\n// observer.unobserve(entry.target);\r\n// }\r\n// });\r\n// }\r\n\r\n// const observer = new IntersectionObserver(check);\r\n\r\n// elements.forEach((elem) => observer.observe(elem));\r\n\r\n\r\n// *** requestAnimationFrame ***\r\n\r\n// const scroll = window.requestAnimationFrame;\r\n\r\n// function showOnScroll() {\r\n// const elems = document.querySelectorAll('.msdw-animate');\r\n\r\n// elems.forEach((el) => {\r\n// const elPosition = el.getBoundingClientRect().top\r\n// const elScreen = window.innerHeight / .9\r\n\r\n// if (elPosition < elScreen) {\r\n// el.classList.add('msdw-animated')\r\n// }\r\n// });\r\n\r\n// scroll(showOnScroll);\r\n// }\r\n\r\n// showOnScroll();\r\n\r\n\r\n//\r\n// =SLIDER (SWIPER JS)\r\n// --------------------------------------------------\r\n\r\n\r\n\r\nconst swiperFreeMode = new Swiper('.swiper-freemode', {\r\n slidesPerView: 1.11,\r\n spaceBetween: 10,\r\n freeMode: {\r\n enabled: true,\r\n sticky: true,\r\n },\r\n grabCursor: true,\r\n loop: false,\r\n breakpoints: {\r\n 600: {\r\n slidesPerView: 2.5,\r\n spaceBetween: 15,\r\n },\r\n 900: {\r\n slidesPerView: 3.33,\r\n spaceBetween: 20,\r\n },\r\n },\r\n});\r\n\r\n\r\n//\r\n// =SLIDER (SLICK JS)\r\n// --------------------------------------------------\r\n\r\n// $('.msdw-slider-jacket').slick({\r\n// slidesToShow: 1,\r\n// slidesToScroll: 1,\r\n// swipe: false,\r\n// arrows: false,\r\n// swipeToSlide: true, // in case, 2 or more slides at a time\r\n// autoplay: true, // if autoplay...\r\n// accessibility: false // use this to avoid page jumping bug\r\n// });\r\n\r\n// $('.slick-prev').click(function() {\r\n// $('.msdw-slider-jacket').slick('slickPrev');\r\n// });\r\n//\r\n// $('.slick-next').click(function() {\r\n// $('.msdw-slider-jacket').slick('slickNext');\r\n// });\r\n\r\n// UNSLICK\r\n// If needed, here's a fix for window resizing\r\n// $(window).on('orientationchange resize', function() {\r\n// $('.msdw-slider-jacket').slick('resize');\r\n// });\r\n\r\n\r\n//\r\n// =PRODUCT PICKER\r\n// --------------------------------------------------\r\n\r\nconst productPickers = document.querySelectorAll('.msdw-product-detail-picker');\r\n\r\nproductPickers.forEach(productPicker => {\r\n const productIdNumber = productPicker.dataset.productId;\r\n productPicker.addEventListener('click', (e) => {\r\n e.preventDefault();\r\n window.jwsdwMediator.publish('openPicker', 'productDetailPicker', {\r\n 'productId': productIdNumber\r\n });\r\n });\r\n});\r\n\r\n\r\n//\r\n// =NEWSLETTER PICKER\r\n// --------------------------------------------------\r\n\r\n// var campaignId = 'familyAndFriends',\r\n// pickerTag = document.getElementById(\"openPicker\"),\r\n// newsletterConfig = {},\r\n// baseUrl = jwsdwSettings.baseUrl;\r\n\r\n// $.ajax({\r\n// type: 'GET',\r\n// url: baseUrl + '/Newsletter-getNewsletterConfig',\r\n// data: {\r\n// campaignId: campaignId\r\n// },\r\n// success: function(response) {\r\n// newsletterConfig = response\r\n// },\r\n// error: function(response) {\r\n// jwsdwApi.popup.showHttpError(response.status)\r\n// }\r\n// });\r\n\r\n// pickerTag.addEventListener(\"click\", function(){\r\n// window.jwsdwMediator.publish('openPicker', 'newsletterSignupPicker', {\r\n// \"campaign\": newsletterConfig.id,\r\n// \"introduction\": newsletterConfig.introduction,\r\n// \"disclaimerOne\": newsletterConfig.disclaimerOne,\r\n// \"disclaimerTwo\": newsletterConfig.disclaimerTwo\r\n// });\r\n// });\r\n\r\n\r\n//\r\n// =PLACE SLOT MODULE INSIDE THE LP\r\n// --------------------------------------------------\r\n\r\nconst sliderSlot = document.getElementById('msdwSlidetSlot');\r\nconst catLandingMiddle = document.getElementById('cat-landing-middle');\r\ncatLandingMiddle && sliderSlot.appendChild(catLandingMiddle);\r\n\r\nconst sliderSlot2 = document.getElementById('msdwSlidetSlot2');\r\nconst catLandingBottom1 = document.getElementById('cat-landing-bottom1');\r\ncatLandingBottom1 && sliderSlot2.appendChild(catLandingBottom1);\r\n\r\n\r\n//\r\n// =VIDEO MODAL\r\n// --------------------------------------------------\r\n\r\n// const playVideoBtns = document.querySelectorAll(\".msdw-play-video\");\r\n// const msdwPopupVideoWrapper = document.querySelector(\r\n// \".msdw-popup-video-wrapper\"\r\n// );\r\n// const msdwPopupVideoBackDrop = document.querySelector(\r\n// \".msdw-popup-video-backdrop\"\r\n// );\r\n// const msdwPopupVideo = document.getElementById(\"msdwPopupVideo\");\r\n\r\n// if (document.contains(msdwPopupVideoWrapper)) {\r\n// // open\r\n// playVideoBtns.forEach((playVideoBtn) => {\r\n// playVideoBtn.addEventListener(\"click\", (e) => {\r\n// e.preventDefault();\r\n// const videoUrl = playVideoBtn.href;\r\n// msdwPopupVideo.setAttribute(\"src\", videoUrl);\r\n// msdwPopupVideoWrapper.classList.add(\"msdw-active\");\r\n// document.body.classList.add(\"jws-overflowHidden\");\r\n// msdwPopupVideo.muted = false;\r\n// msdwPopupVideo.play();\r\n// });\r\n// });\r\n\r\n// // close\r\n// const closePopUpVideo = () => {\r\n// document.body.classList.remove(\"jws-overflowHidden\");\r\n// msdwPopupVideo.muted = true;\r\n// msdwPopupVideo.pause();\r\n// msdwPopupVideo.currentTime = 0;\r\n\r\n// msdwPopupVideoWrapper.classList.remove(\"msdw-active\");\r\n// };\r\n\r\n// msdwPopupVideoBackDrop.addEventListener(\"click\", () => {\r\n// closePopUpVideo();\r\n// });\r\n\r\n// window.onkeydown = (e) => {\r\n// if (e.keyCode == 27) closePopUpVideo();\r\n// };\r\n// }\r\n"]}