PageSourceSearch

https://www.sennheiser-hearing.cn/cdn/shop/t/2/assets/developer_general.js?v=92095788694641733401788173146

js sennheiser-hearing.cn collected 2026-10-09 04:12:28 UTC 31,529 bytes, 2 lines download raw bytes

1document.addEventListener("DOMContentLoaded",function(){document.querySelectorAll(".product-grid-list .product-list-card").forEach(function(card){productDataUpdate(card,!1)}),document.querySelectorAll(".related-product-card").forEach(function(card){productDataUpdate(card,!1)}),document.querySelectorAll(".pdp-main-wrapper").forEach(function(card){productDataUpdate(card,!0)}),document.querySelectorAll(".custom-pdp-two-col-section:not(.new-pdp-layout-section)").forEach(function(card){productDataUpdate(card,!0)}),document.querySelectorAll(".product-card-wrapper").forEach(function(card){productDataUpdate(card,!1)})});function productDataUpdate(card,isPDP){let buttons=card.querySelectorAll(".product-selector-color");buttons.length===0&&(buttons=card.querySelectorAll(".product-selector-options"));const imageEl=card.querySelector("[data-product-image]"),priceEl=card.querySelector("[data-actual-price]"),comparePriceEl=card.querySelector("[data-compare-price]"),pdpImageEls=card.querySelectorAll(".pdp-image-video-wrap"),buyButtonEl=card.querySelector("[data-buyButton]"),cardAnchorEls=card.querySelectorAll("a[data-product-url]"),productInfoTextEl=card.querySelector(".product-details .product-info-text[data-product-info]"),addToCartText=card.getAttribute("data-addToCartText"),soldOutText=card.getAttribute("data-soldOutText");buttons.forEach(function(btn){btn.addEventListener("click",function(){buttons.forEach(b=>b.classList.remove("active")),btn.classList.add("active");const productId=btn.getAttribute("data-product-id"),variantId=btn.getAttribute("data-variant-id"),img=btn.getAttribute("data-image"),price=btn.getAttribute("data-price"),compareAtPrice=btn.getAttribute("data-compare-at-price"),availability=btn.getAttribute("data-availability"),buy_link=btn.getAttribute("data-buy-link"),variantURL=btn.getAttribute("data-url"),product_color=btn.getAttribute("data-color"),isComingSoon=btn.getAttribute("data-coming-soon")=="true",isPreorder=btn.getAttribute("data-is-preorder")==="true",rawPrice=btn.getAttribute("data-raw-price"),rawCompareAtPrice=btn.getAttribute("data-raw-compare-at-price"),formatRawPrice=Number(rawPrice),savePrice=Number(rawCompareAtPrice)-formatRawPrice;if(isPDP){if(pdpImageEls){const btnDataLink=btn.getAttribute("data-link");pdpImageEls.forEach(el=>{el.getAttribute("data-id")===btnDataLink?el.classList.add("active"):el.classList.remove("active")})}const colorText=document.querySelector(".color-text");if(colorText&&(colorText.textContent=product_color),product_color){const variantGalleryImages=document.querySelectorAll(".variant-color-image-"+product_color);variantGalleryImages.length>0&&($(".variant-gallery-images").hide(),variantGalleryImages.forEach(el=>{el.style.display="block"}))}const pdpTopBarEl=document.querySelector(".pdp-top-sticky-bar");if(pdpTopBarEl){const pdpTopBuyButtonEl=pdpTopBarEl.querySelector("[data-buyButton]"),pdpTopBuyButtonTextEls=pdpTopBuyButtonEl?.querySelectorAll("[data-buyButtonText]"),actualPriceEl=pdpTopBarEl.querySelector("[data-actual-price]"),comparePriceEle=pdpTopBarEl.querySelector("[data-compare-price]");
1pdpTopBuyButtonEl&&pdpTopBuyButtonTextEls&&!isComingSoon&&(buy_link!="0"&&buy_link!=""?(pdpTopBuyButtonTextEls.forEach(el=>{el.textContent=isPreorder?"Preorder":addToCartText||"Buy now"}),pdpTopBuyButtonEl.removeAttribute("disabled")):(pdpTopBuyButtonTextEls.forEach(el=>{el.textContent=soldOutText||"Not available"}),pdpTopBuyButtonEl.setAttribute("disabled",""))),actualPriceEl&&(actualPriceEl.textContent=price),comparePriceEle&&(compareAtPrice&&savePrice>0?(comparePriceEle.style.display="inline-block",comparePriceEle.textContent=compareAtPrice):comparePriceEle.style.display="none")}document.querySelectorAll(".form-variant-id-"+productId).forEach(el=>{el.value=variantId});const newUrl=new URL(window.location.href);newUrl.searchParams.set("variant",variantId),window.history.replaceState({},"",newUrl)}else{const input=document.querySelector(".form-variant-id-"+productId);input?input.value=variantId:console.warn("No element found with class: .form-variant-id-"+productId),img&&imageEl&&(imageEl.src=img),cardAnchorEls.forEach(el=>{el.href=variantURL})}if(buyButtonEl&&!isComingSoon){const buttonTextEls=buyButtonEl.querySelectorAll("[data-buyButtonText]");buy_link!="0"&&buy_link!=""&&buy_link!=null?(buttonTextEls.forEach(el=>{el.textContent=isPreorder?"Preorder":addToCartText||"Buy now"}),buyButtonEl.removeAttribute("disabled"),productInfoTextEl&&(productInfoTextEl.style.display="none")):(buttonTextEls.forEach(el=>{el.textContent=soldOutText||"Not available"}),buyButtonEl.setAttribute("disabled",""),productInfoTextEl&&(productInfoTextEl.style.display="block"))}priceEl&&(priceEl.textContent=price),comparePriceEl&&(compareAtPrice&&savePrice>0?(comparePriceEl.style.display="inline-block",comparePriceEl.textContent=compareAtPrice):comparePriceEl.style.display="none")})})}let lastBannerKey=null;function getMenuBannerURL(newButtonURL){if(!newButtonURL||newButtonURL.startsWith("http"))return newButtonURL;let finalURL=newButtonURL;if(window.Weglot){const currentLanguage=Weglot.getCurrentLang(),langPrefix=`/${currentLanguage}`;currentLanguage!=="en"&&!newButtonURL.startsWith(langPrefix)&&(finalURL=`${langPrefix}${newButtonURL}`)}return finalURL}function getTodayStore(){if(!window.storeNow||!window.storeOffset)return null;const offset=window.storeOffset,sign=offset[0]==="-"?-1:1,hours=parseInt(offset.slice(1,3),10),minutes=parseInt(offset.slice(3,5),10),offsetMs=sign*((hours*60+minutes)*6e4),utc=window.storeNow*1e3,storeTime=new Date(utc+offsetMs);return`${storeTime.getUTCFullYear()}-${String(storeTime.getUTCMonth()+1).padStart(2,"0")}-${String(storeTime.getUTCDate()).padStart(2,"0")}`}function getGlobalPromoBanner(){const el=document.getElementById("global-promo-banner-data");if(!el||el.dataset.enabled!=="true")return null;const today=getTodayStore();if(!today)return null;const start=el.dataset.start,end=el.dataset.end;return start&&today<start||end&&today>end?null:{heading:el.dataset.heading,description:el.dataset.description,buttonLabel:el.dataset.buttonLabel,buttonURL:el.dataset.buttonUrl,image:el.dataset.image}}function applyBannerData(mainMenuId,data){const key=JSON.stringify({mainMenuId,...data});if(lastBannerKey===key)return;lastBannerKey=key;const $button=$("#hover-button-"+mainMenuId),$heading=$("#hover-heading-"+mainMenuId),$description=$("#hover-description-"+mainMenuId),$image=$("#hover-image-"+mainMenuId);if($heading.text(data.heading||""),$description.text(data.description||""),data.buttonLabel&&data.buttonURL){const finalURL=getMenuBannerURL(data.buttonURL);$button.text(data.buttonLabel).attr("href",finalURL).css("visibility","visible")}else $button.css("visibility","hidden");data.image&&$image.attr("src")!==data.image&&$image.attr("src",data.image)}function setupMenuHoverEvents(){$(".mega-menu-links-col a").off("click"),$(document).on("mouseenter",".main-nav-list a, .mega-menu-links-col a",function(){if(window.innerWidth<=1023)return;const $this=$(this),mainMenuId=$this.data("id");if(!mainMenuId)return;const banner=getGlobalPromoBanner();if(banner){applyBannerData(mainMenuId,banner);return}const isMainNav=$this.closest(".main-nav-list").length>0,isSubMenu=$this.closest(".mega-menu-links-col").length>0,$mainMenu=$(`.main-nav-list a[data-id="${mainMenuId}"]`),mainData={image:$mainMenu.data("image"),heading:$mainMenu.data("heading"),description:$mainMenu.data("description"),buttonLabel:$mainMenu.data("button-label"),buttonURL:$mainMenu.data("button-url")};if(mainData.image||mainData.heading||mainData.description||mainData.buttonLabel||mainData.buttonURL){applyBannerData(mainMenuId,mainData);return}if(!isMainNav&&isSubMenu){const data={image:$this.data("image"),heading:"",description:"",buttonLabel:"",buttonURL:""};if(!data.image)return;applyBannerData(mainMenuId,data)}})}$(document).ready(setupMenuHoverEvents),$(document).ready(function(){$(".shopping-btn").on("click",function(){const cartDrawerCloseBtn=$(".cart-drawer__close-button");cartDrawerCloseBtn.length&&setTimeout(()=>{cartDrawerCloseBtn.trigger("click")},300)}),$(".cart-drawer .cart-overlay").on("click",function(e){console.log("body click");const $cartDrawer=$(".cart-drawer");$(".cart-drawer__close-button").trigger("click")}),$(".cart-drawer").on("click",function(e){e.stopPropagation()})}),document.addEventListener("DOMContentLoaded",function(){document.querySelectorAll(".quantity-select").forEach(function(selectEl){selectEl.addEventListener("change",function(event){const quantity=event.target.value,dataId=selectEl.dataset.id,quantityWrapper=selectEl.closest(".cart-item")?.querySelector("quantity-selector-component");if(!quantityWrapper)return;const inputEl=quantityWrapper.querySelector(".quantity_input"+dataId);inputEl&&(inputEl.value=quantity,inputEl.dispatchEvent(new Event("blur",{bubbles:!0})))})})}),document.addEventListener("change",function(event){if(event.target.matches(".quantity-select")){const selectEl=event.target,quantity=selectEl.value,dataId=selectEl.dataset.id,inputEl=(selectEl.closest(".cart-item")?.querySelector("quantity-selector-component")).querySelector(".quantity_input"+dataId);if(!inputEl)return;inputEl.value=quantity,inputEl.dispatchEvent(new Event("blur",{bubbles:!0}))}}),$(document).ready(function(){const currentUrl=window.location.pathname;$(".inner-page-navbar ul li a").removeClass("active"),$(".inner-page-navbar ul li a").each(function(){const linkHref=$(this).attr("href");!linkHref||linkHref==="#"||currentUrl.indexOf(linkHref)!==-1&&linkHref!=="/"&&$(this).addClass("active")})}),document.addEventListener("DOMContentLoaded",function(){const currentUrl=window.location.href;document.querySelectorAll(".blog-listing-filter ul li a").forEach(function(link){const linkHref=link.getAttribute("href");currentUrl.includes(linkHref)&&linkHref.includes("/tagged/")&&(document.querySelectorAll(".blog-listing-filter ul li").forEach(el=>el.classList.remove("current")),link.closest("li").classList.add("current"))})}),document.addEventListener("DOMContentLoaded",function(){const tocList=document.querySelector(".top-content .sidebar"),article=document.querySelector(".article-template");if(!tocList||!article)return;const headings=article.querySelectorAll("h2.scroll-section, h3.scroll-section");function generateId(text){return text.split(",")[0].toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-")}const usedIds=new Set;
1headings.forEach((heading,index)=>{let id=generateId(heading.textContent),uniqueId=id,suffix=1;for(;usedIds.has(uniqueId);)uniqueId=`${id}-${suffix++}`;usedIds.add(uniqueId),heading.setAttribute("id",uniqueId);const li=document.createElement("li");li.setAttribute("data-target",`#${uniqueId}`),index===0&&li.classList.add("active-slide");const button=document.createElement("button");button.textContent=heading.textContent,li.appendChild(button),tocList.appendChild(li)}),document.querySelectorAll(".toc-list li button").forEach(btn=>{btn.addEventListener("click",function(){const targetId=this.parentElement.getAttribute("data-target"),target=document.querySelector(targetId);target&&target.scrollIntoView({behavior:"smooth",block:"start"}),document.querySelectorAll(".toc-list li").forEach(li=>li.classList.remove("active-slide")),this.parentElement.classList.add("active-slide")})})});function applyFilters(){console.log("applyFilters");const selectedColors=[...document.querySelectorAll(".filter-color:checked")].map(el=>el.value.toLowerCase()),selectedCategories=[...document.querySelectorAll(".filter-category:checked")].map(el=>el.value.toLowerCase()),selectedFeatures=[...document.querySelectorAll(".filter-feature:checked")].map(el=>el.value.toLowerCase());let visibleCount=0;console.log(selectedColors),document.querySelectorAll(".product-list-card.collection_page").forEach(card=>{const productTags=(card.dataset.tags||"").split(",").map(tag=>tag.trim().toLowerCase()),productColor=(card.dataset.color||"").split(",").map(color=>color.trim().toLowerCase()),title=card.dataset.title||"No Title",categoryTagMatch=selectedCategories.length===0||selectedCategories.some(cat=>productTags.includes(`category-${cat}`)),colorMatch=selectedColors.length===0||selectedColors.some(color=>productColor.includes(color)),featuresTagMatch=selectedFeatures.length===0||selectedFeatures.some(feature=>productTags.includes(`feature-${feature}`));console.log(colorMatch+title),categoryTagMatch&&colorMatch&&featuresTagMatch?(card.style.display="block",visibleCount++):card.style.display="none"});const countElement=document.getElementById("filter-result-count");countElement&&(countElement.textContent=`${visibleCount} Product${visibleCount!==1?"s":""}`)}const applyFiltersButton=document.getElementById("apply-filters");applyFiltersButton&&applyFiltersButton.addEventListener("click",applyFilters),document.querySelectorAll('input[type="radio"][name="sort_by"]').forEach(radio=>{radio.addEventListener("change",function(){const selectedValue=this.value;console.log("Selected sort option:",selectedValue);const filterUrl=`${window.location.pathname}?sort_by=${selectedValue}`;filterCollectionList(filterUrl),document.querySelector(".sort-by-filter").textContent=this.dataset.sortby})});function contentanimationForAjax(){const observer=new IntersectionObserver(function(entries,observer2){entries.forEach(function(entry){entry.isIntersecting&&($(entry.target).addClass("content-animate"),observer2.unobserve(entry.target))})},{threshold:.05});$(".content-visible").each(function(){observer.observe(this)})}function filterCollectionList(filterUrl){fetch(filterUrl).then(res=>res.text()).then(html=>{const newProducts=new DOMParser().parseFromString(html,"text/html").querySelector("#filtered-products");document.getElementById("filtered-products").innerHTML=newProducts.innerHTML;const selectedColors=[...document.querySelectorAll(".filter-color:checked")].map(el=>el.value.toLowerCase()),selectedCategories=[...document.querySelectorAll(".filter-category:checked")].map(el=>el.value.toLowerCase()),selectedFeatures=[...document.querySelectorAll(".filter-feature:checked")].map(el=>el.value.toLowerCase());console.log(selectedColors+selectedCategories);const count=document.querySelectorAll("#filtered-products li").length;document.querySelector("#filter-result-count").textContent=count+" Products",applyFilters(),contentanimationForAjax(),document.querySelectorAll(".product-grid-list .product-list-card").forEach(function(card){productDataUpdate(card,!1)})})}function updateFilterCounts(){const checkboxes=document.querySelectorAll(".filter-checkbox-input"),counts={};let anyChecked=!1;
1checkboxes.forEach(cb=>{if(cb.checked){anyChecked=!0;const type=cb.dataset.filtertype;counts[type]=(counts[type]||0)+1}}),["color","category","feature"].forEach(type=>{document.querySelectorAll(`.${type}-filter-badge`).forEach(badgeType=>{badgeType.style.display=counts[type]?"inline-flex":"none"}),document.querySelectorAll(`#${type}-filter-badge-count`).forEach(badge=>{badge.textContent=counts[type]||0})});const sortTab=document.querySelector(".sort-by-tab");sortTab&&sortTab.classList.toggle("disabled",anyChecked)}document.addEventListener("change",function(event){event.target.classList.contains("filter-checkbox-input")&&updateFilterCounts()}),document.getElementById("clear-filter")?.addEventListener("click",()=>{const filterUrl=`${window.location.pathname}`;filterCollectionList(filterUrl),document.querySelector(".sort-by-filter").textContent=""}),document.getElementById("clear-all-filters")?.addEventListener("click",()=>{document.querySelectorAll(".filter-color, .filter-category, .filter-feature").forEach(input=>input.checked=!1),document.querySelectorAll(".filter-badge").forEach(badge=>{badge.style.display="none"}),document.querySelectorAll(".filter-badge-count").forEach(el=>{el.textContent=""}),applyFilters()}),document.querySelectorAll(".close-icon-btn").forEach(button=>{button.addEventListener("click",()=>{const filterType=button.dataset.filterType;document.querySelectorAll(`.filter-${filterType}`).forEach(input=>{input.checked=!1});const badge=button.closest(".filter-badge");if(badge){badge.style.display="none";const countSpan=badge.querySelector("span");countSpan&&(countSpan.textContent="")}applyFilters()})}),$(".showIframeBtn").on("click",function(){$(".consumer-ambassador-iframe").toggleClass("active"),$("body").toggleClass("consumer-ambassador-iframe-open")}),document.addEventListener("click",function(e){e.target.matches(".custom-collection-product-grid button.more-product[data-product-count-limit]")&&(console.log("SHOW MORE CLICK"),document.querySelectorAll(".custom-collection-product-grid .product-grid-list .product-list-card.hidden").forEach(item=>{item.classList.remove("hidden")}),e.target.style.display="none",eqHeight())});function closeSortingDetailsMobile(){document.querySelectorAll(".no-filter-yes-sorting .sorting-filter details[open]").forEach(el=>el.removeAttribute("open"))}window.addEventListener("DOMContentLoaded",closeSortingDetailsMobile),window.addEventListener("resize",closeSortingDetailsMobile);var pricelist=getCookie("pricelist");if((()=>{let external_price,external_token;const buildCustomProperties=(external_price2,external_token2,pricelist2)=>{const properties={};return external_price2&&(properties._external_price=external_price2),external_token2&&(properties._external_token=external_token2),pricelist2&&(properties._external_pricelist=pricelist2),properties},updateCartCount=async onReload=>{try{const cart=await(await fetch("/cart.js",{headers:{Accept:"application/json"}})).json(),countElem=document.querySelector(".header-actions__cart-icon .cart-bubble__text-count");countElem?countElem.textContent=cart.item_count:(document.querySelector(".header-actions__cart-icon").classList.add("header-actions__cart-icon--has-cart"),document.querySelector(".header-actions__cart-icon .cart-bubble").classList.remove("visually-hidden"),document.querySelector(".header-actions__cart-icon .cart-bubble__text").innerHTML='<span class="visually-hidden">Total items in cart:'+cart.item_count+'</span><span class="cart-bubble__text-count" aria-hidden="true">'+cart.item_count+"</span>"),onReload||(document.querySelector(".header-actions__cart-icon .cart-bubble").classList.toggle("cart-bubble--animating"),setTimeout(function(){document.querySelector(".header-actions__cart-icon .cart-bubble").classList.remove("cart-bubble--animating")},300))}catch(err){console.error("\u274C Error updating cart count:",err)}};updateCartCount(!0);const buttons=document.querySelectorAll("product-form-component add-to-cart-component button[data-addToCartCustom]");if(!buttons.length){console.warn("\u26A0\uFE0F No add-to-cart buttons found on page.");return}buttons.forEach((button,index)=>{button.addEventListener("click",async e=>{e.preventDefault();const form=button.closest("product-form-component");if(!form){console.error("\u274C product-form-component not found for this button");return}const variantInput=form.querySelector('input[name="id"]');if(!variantInput||!variantInput.value){console.error("\u274C Variant ID not found inside form");return}const variant=parseInt(variantInput.value);typeof pricelist<"u"&&benefits[variant]&&benefits[variant][pricelist]&&(external_price=benefits[variant][pricelist].closed_shop_price,external_token=benefits[variant][pricelist].closed_shop_token);const properties=buildCustomProperties(external_price,external_token,pricelist),data={id:variant,quantity:1,properties};console.log(data);try{const response=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(data)});if(!response.ok){const text=await response.text();throw new Error(`HTTP ${response.status}: ${text}`)}updateCartCount();const responseJson=await response.json();let toastMessageSuffix="added to cart";window.Weglot&&typeof Weglot.getCurrentLang=="function"&&Weglot.getCurrentLang()==="fr-ca"&&(toastMessageSuffix="ajout\xE9 au panier"),document.dispatchEvent(new CustomEvent("ShowToast",{detail:{titleText:`${responseJson.product_title} ${toastMessageSuffix}`}}))}catch(error){console.error("\u274C Error adding to cart:",error)}})})})(),pricelist!=null){var c_variant_id;document.querySelector(".pdp-main-wrapper")?c_variant_id=parseFloat(document.querySelector(".pdp-main-wrapper product-form-component form.shopify-product-form input[name=id]").value):document.querySelector(".custom-pdp-two-col-section")&&(c_variant_id=parseFloat(document.querySelector(".custom-pdp-two-col-section product-form-component form.shopify-product-form input[name=id]").value));for(var prop in benefits){var closed_shop=benefits[prop][pricelist];if(closed_shop!=null){var money_formatted=formatMoney(closed_shop.closed_shop_price,theme.moneyFormat),compare_at_price_formatted=formatMoney(closed_shop.compare_price,theme.moneyFormat);document.querySelectorAll('.product-price[data-variant-id="'+prop+'"] span[data-compare-price]').forEach(el=>{el.innerText=compare_at_price_formatted}),document.querySelectorAll('.product-price[data-variant-id="'+prop+'"] span[data-actual-price]').forEach(el=>{el.innerText=money_formatted}),document.querySelectorAll('.product-price[data-variant-id="'+prop+'"] span[data-compare-price]').forEach(el=>{el.style.removeProperty("display")}),document.querySelectorAll('.product-price[data-variant-id="'+prop+'"]').forEach(el=>{const next=el.nextElementSibling;(!next||!next.classList.contains("promotional-price"))&&el.insertAdjacentHTML("afterend",'<p class="promotional-price">Promotional price</p>')}
1),prop==c_variant_id&&(document.querySelectorAll(".closed_shop_price").forEach(el=>{el.value=closed_shop.closed_shop_price,el.disabled=!1}),document.querySelectorAll(".closed_shop_token").forEach(el=>{el.value=closed_shop.closed_shop_token,el.disabled=!1}),document.querySelectorAll(".closed_shop_pricelist").forEach(el=>{el.value=pricelist,el.disabled=!1}))}}}var getUrlParameter=function(sParam){var sPageURL=window.location.search.substring(1),sURLVariables=sPageURL.split("&"),sParameterName,i;for(i=0;i<sURLVariables.length;i++)if(sParameterName=sURLVariables[i].split("="),sParameterName[0]===sParam)return sParameterName[1]===void 0?!0:decodeURIComponent(sParameterName[1])},display_price=function(current_variant_id,isPDP){var variant_id=getUrlParameter("variant");variant_id==null&&(variant_id=current_variant_id);var variant=benefits[variant_id];if(variant!=null&&variant!=null){var pricelist2=getCookie("pricelist"),closed_shop2=variant[pricelist2];if(document.querySelectorAll(".closed_shop_pricelist").forEach(el=>{el.value=pricelist2,el.disabled=!1}),closed_shop2!=null&&closed_shop2!=null){var money_formatted2=formatMoney(closed_shop2.closed_shop_price,theme.moneyFormat),compare_at_price_formatted2=formatMoney(closed_shop2.compare_price,theme.moneyFormat);isPDP?(document.querySelectorAll(".pdp-main-wrapper .product-price[data-variant-id] span[data-compare-price], .pdp-top-sticky-bar .product-price[data-variant-id] span[data-compare-price], .custom-pdp-two-col-section .product-price[data-variant-id] span[data-compare-price]").forEach(el=>{el.innerText=compare_at_price_formatted2}),document.querySelectorAll(".pdp-main-wrapper .product-price[data-variant-id] span[data-actual-price], .pdp-top-sticky-bar .product-price[data-variant-id] span[data-actual-price], .custom-pdp-two-col-section .product-price[data-variant-id] span[data-actual-price]").forEach(el=>{el.innerText=money_formatted2}),document.querySelectorAll(".pdp-main-wrapper .product-price[data-variant-id] span[data-compare-price], .pdp-top-sticky-bar .product-price[data-variant-id] span[data-compare-price], .custom-pdp-two-col-section .product-price[data-variant-id] span[data-compare-price]").forEach(el=>{el.style.removeProperty("display")}),document.querySelectorAll(".pdp-main-wrapper .product-price[data-variant-id], .pdp-top-sticky-bar .product-price[data-variant-id], .custom-pdp-two-col-section .product-price[data-variant-id]").forEach(el=>{el.nextElementSibling.classList.contains("promotional-price")||el.insertAdjacentHTML("afterend",'<p class="promotional-price">Promotional price</p>')}),document.querySelectorAll(".closed_shop_price").forEach(el=>{el.value=closed_shop2.closed_shop_price,el.disabled=!1}),document.querySelectorAll(".closed_shop_token").forEach(el=>{el.value=closed_shop2.closed_shop_token,el.disabled=!1})):(document.querySelectorAll('.product-price[data-variant-id="'+variant_id+'"] span[data-compare-price]').forEach(el=>{el.innerText=compare_at_price_formatted2}),document.querySelectorAll('.product-price[data-variant-id="'+variant_id+'"] span[data-actual-price]').forEach(el=>{el.innerText=money_formatted2}),document.querySelectorAll('.product-price[data-variant-id="'+variant_id+'"] span[data-compare-price]').forEach(el=>{el.style.removeProperty("display")}),document.querySelectorAll('.product-price[data-variant-id="'+variant_id+'"]').forEach(el=>{const next=el.nextElementSibling;(!next||!next.classList.contains("promotional-price"))&&el.insertAdjacentHTML("afterend",'<p class="promotional-price">Promotional price</p>')}))}}};document.getElementById("cookie-settings").addEventListener("click",function(e){e.preventDefault(),window.OneTrust?OneTrust.ToggleInfoDisplay():console.warn("OneTrust not found.")}),document.addEventListener("DOMContentLoaded",function(){const select=document.getElementById("language-select");select&&setTimeout(function(){select.value="en"},2e3)});function showMoreProducts(){document.getElementById("more-products").style.display="flex",document.getElementById("show-more-button").style.display="none"}function productrotation(){console.log("productrotation"),document.querySelectorAll(".product360Canvas").forEach(canvas=>{if(!canvas)return;const ctx=canvas.getContext("2d"),productNumber=canvas.dataset.product||"1",frameCount=parseInt(canvas.dataset.framecount,10)||1,imageBase=canvas.dataset.imageurl;console.log(imageBase);const images=[];let currentFrame=0,isDragging=!1,startX=0;for(let i=0;i<frameCount;i++){const img=new Image,fileimage="//sennheiser-pim.myshopify.com/cdn/shop/files/0_267.webp?v=3841086156881147033",fileimage2="//sennheiser-pim.myshopify.com/cdn/shop/files/";img.src=`${imageBase}0_${i+1}.webp`,images.push(img)}images[0].onload=function(){ctx.drawImage(images[0],0,0,canvas.width,canvas.height)};function drawFrame(frameIndex){ctx.clearRect(0,0,canvas.width,canvas.height),ctx.drawImage(images[frameIndex],0,0,canvas.width,canvas.height)}canvas.addEventListener("mousedown",e=>{isDragging=!0,startX=e.pageX}),canvas.addEventListener("mouseup",()=>{isDragging=!1}),canvas.addEventListener("mousemove",e=>{if(!isDragging)return;let delta=e.pageX-startX;const sensitivity=1;if(Math.abs(delta)>1){const framesToMove=Math.floor(Math.abs(delta)*sensitivity);currentFrame=delta>0?(currentFrame-framesToMove+frameCount)%frameCount:(currentFrame+framesToMove)%frameCount,drawFrame(currentFrame),startX=e.pageX}})})}window.addEventListener("DOMContentLoaded",productrotation),document.addEventListener("DOMContentLoaded",function(){const supportLink=document.getElementById("external-support-link"),mobilesupportLink=document.getElementById("mobile-external-support-link");if(!supportLink)return;let locale=document.documentElement.lang.toLowerCase();var currentCountry=Shopify.country.toLowerCase();if(locale!=""&&currentCountry!="")var newurl="https://support.sennheiser-hearing.com/hc/"+locale+"-cn";else var newurl="https://support.sennheiser-hearing.com/";supportLink.href=newurl,mobilesupportLink.href=newurl}),document.addEventListener("DOMContentLoaded",function(){console.log("JS Loaded");const ctaButton=document.querySelector(".custom-countdown-slide-btn");if(console.log("CTA Button:",ctaButton),!ctaButton)return;const currentLang=typeof Weglot<"u"?Weglot.getCurrentLang().toLowerCase():"en";console.log("Current Lang:",currentLang);const langClassMap={en:"hs-cta-trigger-button-395281377490",de:"hs-cta-trigger-button-395411473650",fr:"hs-cta-trigger-button-4
104548245700",nl:"hs-cta-trigger-button-404548518134",hu:"hs-cta-trigger-button-404548519141",it:"hs-cta-trigger-button-404548519153",pt:"hs-cta-trigger-button-404550840547",es:"hs-cta-trigger-button-404550841538",zh:"hs-cta-trigger-button-404549540056","zh-hk":"hs-cta-trigger-button-404549540089",ja:"hs-cta-trigger-button-404549541059","zh-tw":"hs-cta-trigger-button-404549541077",th:"hs-cta-trigger-button-404549541084",ar:"hs-cta-trigger-button-404549542078",vi:"hs-cta-trigger-button-404549544158"};ctaButton.classList.add("hs-cta-trigger-button"),Object.values(langClassMap).forEach(className=>{ctaButton.classList.remove(className)}),console.log("Old lang classes removed"),langClassMap[currentLang]&&ctaButton.classList.add(langClassMap[currentLang]),console.log("Updated Classes:",ctaButton.className)}),document.addEventListener("DOMContentLoaded",()=>{const ctaButtons=document.querySelectorAll(".m5-hubspot-form-cta");if(!ctaButtons.length)return;const langClassMap={en:"hs-cta-trigger-button-395281377490",de:"hs-cta-trigger-button-395411473650",fr:"hs-cta-trigger-button-404548245700",nl:"hs-cta-trigger-button-404548518134",hu:"hs-cta-trigger-button-404548519141",it:"hs-cta-trigger-button-404549519153",pt:"hs-cta-trigger-button-404550840547",es:"hs-cta-trigger-button-404550841538",zh:"hs-cta-trigger-button-404549540056","zh-hk":"hs-cta-trigger-button-404549540089",ja:"hs-cta-trigger-button-404549541059","zh-tw":"hs-cta-trigger-button-404549541077",th:"hs-cta-trigger-button-404549541084",ar:"hs-cta-trigger-button-404549542078",vi:"hs-cta-trigger-button-404549544158"},CTA_CLASS_PREFIX="hs-cta-trigger-button-";function getCurrentLanguage(){return typeof Weglot<"u"&&typeof Weglot.getCurrentLang=="function"?(Weglot.getCurrentLang()||"en").toLowerCase():"en"}function updateCTAButton(){const currentLang=getCurrentLanguage(),langClass=langClassMap[currentLang];ctaButtons.forEach(button=>{button.className=button.className.split(" ").filter(cls=>!cls.startsWith(CTA_CLASS_PREFIX)).join(" "),button.classList.add("hs-cta-trigger-button"),langClass&&button.classList.add(langClass)})}updateCTAButton(),typeof Weglot<"u"&&typeof Weglot.on=="function"&&Weglot.on("languageChanged",updateCTAButton)}),document.addEventListener("DOMContentLoaded",function(){const video=document.getElementById("mtw5-slide-desk"),mobVideo=document.getElementById("mtw5-slide-mob"),source=document.getElementById("mtw5-slide-desk-video-source"),mobSource=document.getElementById("mtw5-slide-mob-video-source");if(!video||!source)return;const userAgent=navigator.userAgent||navigator.vendor||window.opera,isIOS=/iPad|iPhone|iPod/.test(userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,isMacOS=/Macintosh/.test(userAgent);isIOS||isMacOS?(source.src=source.dataset.hevc,source.src="https://cdn.shopify.com/videos/c/o/v/16ac47700db142c19e8a9ad7720dbc06.mp4",source.type="video/mp4",mobSource.src=mobSource.dataset.hevc,mobSource.src="https://cdn.shopify.com/videos/c/o/v/08f92aafccca4a6db2d0b2b2af6dd569.mp4",mobSource.type="video/mp4"):(source.src=source.dataset.webm,source.src="https://cdn.shopify.com/videos/c/o/v/7e2fcc310986484ea2f32a29e4bb3906.webm",source.type="video/webm",mobSource.src=mobSource.dataset.hevc,mobSource.src="https://cdn.shopify.com/videos/c/o/v/c59975a4485d4a15acc559264a40b859.webm",mobSource.type="video/webm"),video.load(),mobVideo.load()});
2//# sourceMappingURL=/cdn/shop/t/2/assets/developer_general.js.map?v=92095788694641733401788173146

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.