PageSourceSearch

https://www.naturemade.com/cdn/shop/t/520/assets/theme-bundle.pdp.js?v=115301625535108794581789405693

js naturemade.com collected 2026-09-24 18:50:30 UTC 135,580 bytes, 2 lines download raw bytes

1/*! For license information please see theme-bundle.pdp.js.LICENSE.txt */
2(()=>{var e,t,n,r,o,i={2634:()=>{},5180:(e,t,n)=>{"use strict";var r,o,i=n(6777),a=n(9994),c=n(3223);function l(e){if(null==e)return"";e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=String(e)).replace(/&amp;reg;/g,"&reg;")).replace(/&amp;trade;/g,"&trade;")).replace(/&amp;dagger;/g,"&dagger;")).replace(/&amp;Dagger;/g,"&Dagger;")).replace(/&amp;diams;/g,"&diams;")).replace(/&amp;#174;/g,"&#174;")).replace(/&amp;#8482;/g,"&#8482;")).replace(/&amp;#8224;/g,"&#8224;")).replace(/&amp;#8225;/g,"&#8225;")).replace(/&amp;#9830;/g,"&#9830;")).replace(/&amp;#x25B2;/g,"&#x25B2;")).replace(/&reg;/g,"®")).replace(/&#174;/g,"®")).replace(/&trade;/g,"™")).replace(/&#8482;/g,"™")).replace(/&dagger;/g,"†")).replace(/&#8224;/g,"†")).replace(/&Dagger;/g,"‡")).replace(/&#8225;/g,"‡")).replace(/&diams;/g,"♦")).replace(/&#9830;/g,"♦")).replace(/&#x25B2;/g,"▲");var t=window.metafieldGlobalSettings.superscriptCharacters||["◾","▲","◆","★","†","‡","®","™","♦","*","�"],n=[];e=(e=e.replace(/<small\b[^>]*>[\s\S]*?<\/small>/gi,(function(e){var t="__SMALL_BLOCK__".concat(n.length,"__");return n.push({token:t,match:e}),t}))).replace(/<sup>|<\/sup>/g,"");var r=new RegExp("[".concat(t.map((function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})).join(""),"]"),"g");return e=e.replace(r,(function(e){return"<sup>".concat(e,"</sup>")})),n.forEach((function(t){var n=t.token,r=t.match;e=e.replace(n,r)})),e}window.searchCardConfig;var s=null===(r=window.algoliaShopify)||void 0===r||null===(r=r.config)||void 0===r?void 0:r.app_id,d=null===(o=window.algoliaShopify)||void 0===o||null===(o=o.config)||void 0===o?void 0:o.search_api_key,u=((0,c.lF)(new URLSearchParams(window.location.search).get("q")||""),s&&d?(0,a.w)(s,d):null),p={appId:s,apiKey:d,search:function(e){if(!u)return Promise.resolve({results:[]});var t=e.map((function(e){return e.params.query&&0!==e.params.query.length?(e.params.analytics=!0,e.params.clickAnalytics=!0,e.params.userToken=window.user_id):e.params.analytics=!1,e}));return u.search(t)}},f=new Map,v=function(){for(var e=document.querySelector("#compareProducts .ais-Hits-list"),t=document.querySelectorAll(".item-row"),n=document.querySelectorAll(".item-compare-container .item-compare-rows .item-row[data-title]","::before"),r=0;r<t.length;r++)t[r].style.height="";for(var o=[],i=document.querySelectorAll(".item-compare-rows"),a=!!e.querySelectorAll(".show-more-ingredients").length,c=0;c<i.length;c++)for(var l=i[c].querySelectorAll(".item-row"),s=0;s<l.length;s++){var d=!!l[s].classList.contains("item-row-ingredients");(0==c||o[s]<parseInt(l[s].offsetHeight))&&(o[s]=parseInt(l[s].offsetHeight)+(a&&d?30:20))}for(var u=0;u<n.length;u++)n[u].classList.contains("upper-row")||(n[u].style.height=o[u]+"px");for(var p=1;p<e.children.length;p++)for(var f=e.children[p].querySelectorAll(".item-row"),v=0;v<f.length;v++)f[v].classList.contains("upper-row")||(f[v].style.height=o[v]+"px")},m=function(){document.querySelectorAll(".show-more-ingredients").forEach((function(e){e.addEventListener("click",(function(){var t=e.closest(".ais-Hits-list");t&&(t.querySelectorAll(".ingredients_list").forEach((function(t){t.classList.toggle("collapse");var n=t.classList.contains("collapse")?"false":"true";e.setAttribute("aria-expanded",n)})),v())}))}))},y=function e(t,n,r,o,i){var a="",c=t.handle,s=t.product_image,d=t.product_type,u=t.option1,p=t.title,y=t.price,h=t.tags,w=(t.sku,t.published_at),b=t.inventory_available,g=t.compare_at_price,_=(t.barcode,t.collections),S=t.id,q=t.objectID,L=t.__queryID,E=(t.position,t.meta),k=E.filter&&E.filter.pill_type?"".concat(E.filter.pill_type.join(", ")):"",A=E.pdp,O=E.accentuate,x=E.coming_soon,I=!1,P="Notify Me",C="",T=document.getElementById("compareProducts");O&&(C=(I=!(!O.disable_bis||"true"!=O.disable_bis))?"Not Available":"Notify Me",P=O.bis_plp_cta_copy&&""!=O.bis_plp_cta_copy?O.bis_plp_cta_copy:C);var j=null==A?void 0:A.number_of_serving_per_day,M=2===j?", ".concat(window.productString.servingSize.twice_daily):j>2?", ".concat(window.productString.servingSize.more_daily.replace("#number_of_serving_per_day",j)):"";if(void 0===L&&sessionStorage.hasOwnProperty("aa_query_id")&&(L=sessionStorage.getItem("aa_query_id")),0==n&&(a=e(t,-1,r,o,i)),-1==n){
2if(T&&(C=(I=!(!T.dataset.disableBis||"true"!=T.dataset.disableBis))?"Not Available":"Notify Me",P=T.dataset.bisCta&&""!=T.dataset.bisCta?T.dataset.bisCta:C),c=r.handle,s=r.featured_image,d=r.type,k=o&&o.pill_type?"".concat(o.pill_type.join(", ")):"",u=r.variants[0].title,p=r.title,y=r.price/100,r.variants[0].sku,b=r.available,r.variants[0].barcode,h=r.tags,q=r.objectID,r.position,S=r.id,o&&(E={serving_size:o.serving_size?o.serving_size:[],benefits_new:o.benefits_new?o.benefits_new:[],ingredients_new:o.ingredients_new?o.ingredients_new:[],free_from:o.free_from?o.free_from:[]}),"{}"!=i){E.secondary_pill_type=i.secondary_pill_type?i.secondary_pill_type.toLowerCase():"",E.secondary_serving_size=i.secondary_serving_size?parseInt(i.secondary_serving_size):0;var D=null==i?void 0:i.number_of_serving_per_day;M=2===D?", ".concat(window.productString.servingSize.twice_daily):D>2?", ".concat(window.productString.servingSize.more_daily.replace("#number_of_serving_per_day",D)):""}}else E=E.filter,A&&(E.secondary_pill_type=A.secondary_pill_type?A.secondary_pill_type.toLowerCase():"",E.secondary_serving_size=A.secondary_serving_size?parseInt(A.secondary_serving_size):0);var B,N=window.location.pathname.match(/\/collections\/([^/]+)/i),R=Boolean(N)&&2===N.length?N[1]:"all-products",V="/collections/".concat(R,"/products/").concat(c,"?queryID=").concat(L,"&c=1"),H='<a href="'.concat(V,'" class="button button-primary" aria-label="Buy Now Button" >').concat(l(h.includes("FREESAMPLE")?"Try Now":"Buy Now"),"</a>"),F="",z="",G="",U="";if(B=new Date(w),((new Date).getTime()-B.getTime())/864e5<30&&(z="NEW"),g>0&&(z="SALE"),E){var J=-1==n?o.featured:E.featured;if(J){var W,Q=null===(W=J.sort()[0])||void 0===W?void 0:W.toUpperCase();"TRENDING"!=Q&&(z=Q,G="has-green-background")}}var X="";if(_){var $=_.filter((function(e){return e.includes("wellblends")}));$.length>0&&(X=$[0].replace("wellblends","wb_card_").replace(/-/g,""))}var K="";E.serving_size&&E.serving_size.length&&(K=E.serving_size[0]);var Y="<ul id='benefit-row' class='benefits_list'>";if(E.benefits_new&&E.benefits_new.length)for(var Z=0;Z<E.benefits_new.length;Z++)Y+="<li>".concat(l(E.benefits_new[Z]),"</li>");Y+="</ul>";var ee='<div class="ingredients-container"><ul class=\'ingredients_list '.concat(E.ingredients_new&&E.ingredients_new.length>3?"collapse":"","'>");if(E.ingredients_new&&E.ingredients_new.length)for(var te=0;te<E.ingredients_new.length;te++)ee+="<li>".concat(l(E.ingredients_new[te]),"</li>");ee+="</ul>",E.ingredients_new&&E.ingredients_new.length>3&&(ee+='<button type="button" class="show-more-ingredients view-more--button uppercase" aria-expanded="false">\n                <span class="view-more styled-link-primary">\n                    <span>'.concat(window.accessibilityString.view_more,'</span>\n                </span>\n                <span class="view-less styled-link-primary">\n                    <span>').concat(window.accessibilityString.view_less,'</span>\n                </span>\n                <span class="sr-only">Ingredients</span>\n            </button>\n        ')),ee+="</div>";var ne="<ul class='highlights_list'>";if(E.free_from&&E.free_from.length)for(var re=0;re<E.free_from.length;re++)ne+="<li>".concat(l(E.free_from[re].replace(":","").replace(/-/g," ")),"</li>");ne+="</ul>",F=X,"EXCLUSIVE"==z&&(z="ONLINE ONLY"),"SALE"!=z&&"NEW"!=z&&"ONLINE ONLY"!=z||(G="has-red-background");var oe=h.filter((function(e){return e.includes("force-sold-out")}));if(0==b||oe.length>0){(function(e){e&&(f.has(e)||f.set(e,fetch("/products/".concat(e,".js")).then((function(e){return e.json()})).then((function(e){return e.available})).catch((function(t){return console.error(t),f.delete(e),null}))),f.get(e).then((function(t){null===t||t||document.querySelectorAll(".soldout-flag_".concat(e)).forEac
2h((function(e){e.style.display="flex"}))})))})(c),z=h.includes("free-sample")?"OUT OF STOCK":"SOLD OUT",G="has-dark-gray-text has-white-background soldout-flag soldout-flag_".concat(c),F="is-sold-out ${wb_compare_tag_name}";var ie=window.location.pathname.match(/\/collections\/([^/]+)/i);Boolean(ie)&&2===ie.length&&ie[1],H='\n        <a class="wtb-card-button button button-primary" href="'.concat(V,"&variant=").concat(q).concat(I?"":"&nm=1",'">\n                <span class="find-store-label">').concat(l(P),"</span>\n      </a>")}var ae,ce,le,se,de=window.metafieldGlobalSettings.storeDate,ue="";if(-1==n&&T){var pe=T.dataset.releaseDate,fe=T.dataset.badgeCopy,ve=T.dataset.comingSoonBadgeBgColor;if(pe&&de<pe){z=fe||"Coming<br>Soon",G="coming-soon-flag has-blue-background";var me=ve&&["#fdca21","#ffffff"].includes(ve.toLowerCase());ue=ve?'style="background-color:'.concat(ve,"!important;").concat(me?"color:rgb(var(--color-dark-grey));":"",'"'):""}}else if(O){var ye=O.coming_soon_release_date,he=O.coming_soon_product_card_badge_copy,we=null==x?void 0:x.product_card_badge_bg_color,be=(null==x?void 0:x.plp_button_label)||window.metafieldGlobalSettings.coming_soon_cta;if(ye&&de<(ae=ye,ce=window.metafieldGlobalSettings.storeOffset,le=ce.slice(0,3)+":"+ce.slice(3),se=new Date("".concat(ae,"T00:00:00").concat(le)),Math.floor(se.getTime()/1e3))){z=he||"Coming<br>Soon",G="coming-soon-flag has-blue-background";var ge=we&&["#fdca21","#ffffff"].includes(we.toLowerCase());ue=we?'style="background-color:'.concat(we,"!important;").concat(ge?"color:rgb(var(--color-dark-grey));":"",'"'):"",H='<a href="'.concat(V,'" class="button button-primary" aria-label="').concat(be,'">').concat(l(be),"</a>")}}var _e=z?'<p class="item-status '.concat(G,'" ').concat(ue,">").concat(l(z),"</p>"):"";""!=z&&(U="has-status-flag");var Se='\n    <div class="item-compare-container " id="compare-product-'.concat(S,'" data-queryid="').concat(L,'">\n        <').concat(-1==n?"div":"a",' class="compare-image-wrapper ').concat(F," ").concat(U," ").concat(X,'" \n        href="').concat(V).concat("SOLD OUT"==z||"OUT OF STOCK"==z?"&variant=".concat(q).concat(I?"":"&nm=1"):"",'">\n        ').concat(_e,"\n        ")+(s?'<img src="'.concat(s).concat(-1==s.indexOf("?")?"?&width=240":"&width=240",'" height="240" width="240" loading="lazy" alt="').concat(p.replace('"',""),'"/>'):"")+"\n        </".concat(-1==n?"div":"a",'>\n        <div class="title-wrapper">\n        <').concat(-1==n?"div":"a",' href="').concat(V).concat("SOLD OUT"==z||"OUT OF STOCK"==z?"&variant=".concat(q).concat(I?"":"&nm=1"):"",'" >\n            <h3 class="title-item">').concat(-1==n?"<b>This Product:</b>":""," ").concat(l(p),"</h3>\n        </").concat(-1==n?"div":"a",'>\n        </div>\n        <div class="item-compare-rows">\n            <div class="item-row-header">\n            ').concat(-1==n?"":H,"\n            </div>\n    "),qe='data-bv-redirect-url="/products/'.concat(c,"?queryID=").concat(L,'"');Se+='\n         <div class="item-row upper-row" '.concat(-1==n?'data-title="Price"':"",">\n                <div><span>$</span>").concat(y,'</div>\n            </div>\n            <div class="item-row upper-row" ').concat(-1==n?'data-title="Rating"':"",'>\n            <div data-bv-show="inline_rating" data-bv-product-id="').concat(S,'" ').concat(-1==n?"":qe,' data-bv-seo="false"></div>\n            </div>\n            <div class="item-row upper-row" ').concat(-1==n?'data-title="Type"':"",">\n                        ").concat(l(""!=k?k:d),'\n            </div>\n            <div class="item-row upper-row" ').concat(-1==n?'data-title="Count"':"",">\n                        ").concat("Default Title"!=u?l(u):"","\n          </div>              \n    "),K>1&&("gummy"==d?d="gummies":d+="s");var Le=K?"".concat(K," ").concat(d):"";if(E.secondary_pill_type&&""!=E.secondary_pill_type&&(Le+=K?" & ":"",E.secondary_serving_size>1?"gummy"==E.secondary_pill_type?E.secondary_pill_type="gummies":E.secondary_pill_type+="s":0==E.secondary_serving_size&&(E.secondary_serving_size=K),Le+="".concat(E.secondary_serving_size," ").concat(E.secondary_pill_type)),Le+=M,Se+='\n        <div class="item-row" '.concat(-1==n?'data-title="Key Be
2nefits"':"",">\n        ").concat(Y,'\n        </div>\n        <div class="item-row item-row-ingredients" ').concat(-1==n?'data-title="Ingredients"':"",">\n        ").concat(ee,'\n        </div>\n        <div class="item-row" ').concat(-1==n?'data-title="Serving Size"':"",">\n        ").concat(l(Le),'\n        </div>\n        <div class="item-row" ').concat(-1==n?' data-title="Free From "':"",">\n        ").concat(ne,"                    \n        </div>\n    "),Se+="</div></div>",0==n){var Ee=document.createElement("li");Ee.classList.add("ais-Hits-item"),Ee.innerHTML=a,window.natureMade.waitForElm(".compare-products-loaded .ais-Hits-list li.ais-Hits-item:not(.compare-product-placeholder)").then((function(e){var t;e.parentElement.prepend(Ee),v(),window.addEventListener("resize",window.debounce((function(e){v()}),50));var n=null===(t=e.closest("#compare-products"))||void 0===t?void 0:t.querySelector("comparison-table-arrows");n&&(n.toggleCompareProductsAriaVisibility(),m())}))}return Se},h=function(e,t){t?(e.removeAttribute("disabled"),e.setAttribute("aria-hidden",!1)):(e.setAttribute("disabled",!0),e.setAttribute("aria-hidden",!0)),e.style.opacity=t?1:0,e.style.visibility=t?"visible":"hidden"},w=function(e,t,n,r,o,i){if(!e)throw new Error("Please make sure to provide a valid value for glideInstance, recieved ".concat(e));if(!t)throw new Error("Please make sure to provide a valid value for totalSlides, recieved ".concat(t));if(!n)throw new Error("Please make sure to provide a valid value for leftArrow, recieved ".concat(n));if(!r)throw new Error("Please make sure to provide a valid value for rightArrow, recieved ".concat(r));h(n,0!==e.index);var a=e.index,c=e.settings.perView;h(r,t>1&&a+c<t),e.on(["move","resize"],(function(){var o=e.index,i=e.settings.perView,a=t>1&&o+i<t;h(n,o>0),h(r,a)})),o||i&&i.forEach((function(t){t.addEventListener("click",(function(){if(t.hasAttribute("data-media-id")){var n,r=t.closest("li"),o=Array.from(null===(n=t.closest(".product-thumbnails"))||void 0===n?void 0:n.querySelectorAll(".glide__slide:not(.hide)")).indexOf(r);e.go("="+o)}else e.go("="+t.dataset.glideIndex),e.update({startAt:t.dataset.glideIndex})}))}))};function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}var g=function(e){document.querySelectorAll(".quantity__button[name=plus]").forEach((function(t){e?t.disabled=!0:t.removeAttribute("disabled")}))};const _=function(){var e,t=window.globalSettings.maxQtyLimit,n=null,r=null,o=null,i=document.querySelector('input[class~="quantity__input"]');if(i){var a=parseInt(i.value),c=new URLSearchParams(window.location.search),l=null===(e=document.getElementById(c.get("variant")))||void 0===e?void 0:e.value;if(l){var s=document.querySelectorAll('input[type="radio"][selected]')[0];if(s||(s=document.querySelectorAll('input[type="radio"][checked]')[0]),window.location.href.indexOf("variant=")>-1)n=/variant=([^&]+)/.exec(window.location.href)[1];else{var d=document.querySelector("variant-radios");if(d){var u=d.getAttribute("data-default-variant");n=b(u.length)>0?parseInt(u):null}}r=document.querySelectorAll('#cart-preview-product [data-variant-id="'+n+'"]'),o=0;var p=0;r.forEach((function(e){"true"==e.getAttribute("two-pack")?o+=2*parseInt(e.dataset.count):o+=parseInt(e.dataset.count),p+=parseInt(e.dataset.count)})),l-=o;var f=document.querySelector(".quantity__button[name=plus]");a>=l&&f&&i?(g(!0),i.value=l):f&&g(!1);var v=document.querySelector('input[class~="rc_widget__option__input--subsave"]');v&&v.checked&&s&&"true"==s.getAttribute("two-pack-item")&&f&&(a>=Math.floor(l/2)?g(!0):g(!1)),p+a==t&&f?g(!0):p+a>t&&f&&i&&(i.value=t-p,g(!0)),"true"==s.getAttribute("two-pack-item")&&2*a==l&&f&&v&&v.checked&&g(!0),"true"==s.getAttribute("two-pack-item")&&2*a>l&&f&&v&&v.checked&&(i.value=Math.floor(l/2),g(!0));var m=document.querySelector(".main-product__buttons .product-form__submit"),y=document.querySelector(".sticky-addtocart");if(l<=0&&m&&f&&i)"submit"==m.getAttribute("type")&&(m.disabled=!0),y&&(y.disabled=!y.classList.contains("notify-me")),g(!0),i.value=0;else if(l<2&&"true"==s.getAttribute("two-pack-item")){v&&(v.disabled=!0);var h=document.querySelector('input[class~="rc_widget__option__input--onetime"]');h&&(h.click(),document.querySelector("#cart-notification-product").childElementCount>0&&!event&&(document.querySelector("cart-notification").classList.remove("hide"),document.querySelector("#cart-notification").classList.add("active")));var w=document.querySelector(".subscribe-save");w&&(w.style.color="#C6C6CB");var _=new URLSearchParams(window.location.search);_.delete("selling-plan"),window.history.pushState(null,null,"?".concat(_.toString())),f&&g(!0)}m&&m.addEventListener("click",(function(e){window.natureMade.isAddToCartBtnClicked=!0}));var S=document.querySelector(".sticky-quantity__input");
2S&&(S.value=document.querySelector(".quantity__input").value)}}};var S=n(5012),q=n(9775),L=n(8467),E=n(6566),k=n(3157),A=n(9587);const O=function(){document.getElementById("refinement-list");var e=document.querySelector("[data-algolia-compare-products]"),t=function(e){var t=e.getBoundingClientRect();return t.bottom>0&&t.top<window.innerHeight},n=!!document.querySelector("[data-render-discontinued-swap-items]"),r=function(e){var t=document.getElementById("discontinued-metaobject");return t?JSON.parse(t.dataset.metaobjects).filter((function(t){if(t.product_variant){var n,r,o,i,a,c,l=e.find((function(e){return t.product=="gid://shopify/Product/".concat(e.id)}));if(l)return n=t,r=l,o=(new Date).setHours(0,0,0,0),i=new Date(n.new_subscription_discontinuation_date).setHours(0,0,0,0)<=o,a=new Date(n.new_one_time_purchase_discontinuation_date).setHours(0,0,0,0)<=o,c=r.inventory_quantity<=0||r.tags.includes("force-sold-out"),i&&a||!a&&c}})):[]},o=function(){var e,t=null===(e=document.getElementById("compareProducts"))||void 0===e?void 0:e.closest(".algolia-compare-products");t&&!t.classList.contains("compare-products-loaded")&&(document.querySelectorAll(".ais-Hits-item.compare-product-placeholder").forEach((function(e){e.remove()})),t.classList.add("compare-products-loaded"),function(){var e=document.querySelector(".algolia-compare-products");if(e){var t,n=document.querySelectorAll(".comparison-bullet-nav .slider__bullet");n.forEach((function(t,r){t.addEventListener("click",(function(){!function(t){var r=e.querySelectorAll(".ais-Hits-item"),o=Array.from(r).slice(0,t).reduce((function(e,t){return e+t.offsetWidth}),0);2==t?o=e.scrollWidth:t>0&&(o=screen.width>536?e.scrollWidth:o+102),e.scrollTo({left:o,behavior:"smooth"}
2),n.forEach((function(e,n){n===t?e.classList.add("glide__bullet--active"):e.classList.remove("glide__bullet--active")}))}(r)}))})),e.addEventListener("scroll",(function(){clearTimeout(t),t=setTimeout((function(){var t=e.querySelectorAll(".ais-Hits-item");if(t.length){var r=e.scrollLeft,o=0,i=0;Array.from(t).some((function(e,t){return o+=e.offsetWidth,r<o&&(i=t,!0)})),n.forEach((function(e,t){t===i||t===n.length-1&&i>=3?e.classList.add("glide__bullet--active"):e.classList.remove("glide__bullet--active")})),document.dispatchEvent(new CustomEvent("gTagging_user_action",{detail:{target:e,dataset:{event_type:"comparison table slide"}}}))}}),300)}))}}(),m())},i=function(e,t,n,r){var o=e.map((function(e){return e.product})),i=e.map((function(e){return e.swaps})).filter((function(e){return e&&e.length>0})).join(",").split(","),a=o.concat(i).filter((function(e){return e})),c="{\n                    nodes(ids: ".concat(JSON.stringify(a),') {\n                         ... on Product {\n                            id\n                            title\n                            variants(first: 10) {\n                                edges {\n                                    node {\n                                        id\n                                        title\n                                       \tprice {\n                                            amount\n                                            currencyCode\n                                        }\n                                    }\n                                }\n                            }\n                        }\n                        ... on ProductVariant {\n                            id\n                            title\n                            image {\n                                url\n                                altText\n                                width\n                                height\n                            }\n                            price {\n                                amount\n                                currencyCode\n                            }\n                          \tbarcode\n                          \tcompareAtPrice {\n                                amount\n                                currencyCode\n                            }\n                          \tsku\n                          \tselectedOptions {\n                              value\n                            }\n                            product {\n                                id\n                                title\n                                handle\n                                tags\n                                publishedAt\n                                totalInventory\n                                productType\n                                pill_type: metafield(namespace: "filter", key: "pill_type") {\n                                    value\n                                }\n                                benefits_filtering: metafield(namespace: "filter", key: "benefits_filtering") {\n                                    value\n                                }\n                                benefits_new: metafield(namespace: "filter", key: "benefits_new") {\n                                    value\n                                }\n                                free_from: metafield(namespace: "filter", key: "free_from") {\n                                    value\n                                }\n                                ingredients_new: metafield(namespace: "filter", key: "ingredients_new") {\n                                    value\n                                }\n                                price: metafield(namespace: "filter", key: "price") {\n                                    value\n                                }\n                                secondary_pill_type: metafield(namespace: "filter", key: "secondary_pill_type") {\n                                    value\n                                }\n                                secondary_serving_size: metafield(namespace: "filter", key: "secondary_serving_size") {\n                                    value\n                                }\n                                serving_size: metafield(namespace: "filter", key: "serving_size") {\n                                    value\n                                }\n                                disable_bis: metafield(namespace: "accentuate", key: "disable_bis") {\n                                    value\n                                }\n                                bis_plp_cta_copy: metafield(namespace: "accentuate", key: "bis_plp_cta_copy") {\n                                    value\n                                }\n                                suggested_use_is_twice_per_day: metafield(namespace: "pdp", key: "suggested_use_is_twice_per_day") {\n                                    value\n                                }\n                                collections(first: 100) {\n                                    edges {\n                                        node {\n                                            handle\n                                        }\n                                    }\n                                }\n                            }\n                        }\n                    }\n                }');
2fetch("/api/2024-10/graphql.json",{method:"POST",headers:{"X-Shopify-Storefront-Access-Token":window.metafieldGlobalSettings.storefrontAccessToken,"Content-Type":"application/graphql"},body:c}).then((function(e){return e.json()})).then((function(o){if(o.data){var i=o.data.nodes;i.forEach((function(o){var a;if(!o.id.includes("ProductVariant")){var c=null===(a=document.getElementById("compare-product-".concat(o.id.split("/").reverse()[0])))||void 0===a?void 0:a.closest("li");if(c)if(void o.variants.edges.length)c.classList.remove("hidden");else{var l=function(o,i){var a,c,l,s,d=null===(a=e.find((function(e){return e.product==o.id})))||void 0===a?void 0:a.swaps;if(d&&d.length){var u=i.filter((function(e){return d.find((function(t){return t==e.id}))}));if(u.length&&!document.querySelector("#compare-product-".concat(u[0].product.id.split("/").reverse()[0]))){var p={handle:u[0].product.handle,product_image:u[0].image.url,product_type:u[0].product.productType,option1:u[0].selectedOptions[0].value,title:u[0].product.title,price:u[0].price.amount,tags:u[0].product.tags,sku:u[0].sku,published_at:u[0].product.publishedAt,inventory_available:u[0].product.publishedAt.totalInventory,compare_at_price:u[0].compareAtPrice,barcode:u[0].barcode,collections:u[0].product.collections.edges.map((function(e){return e.node.handle})),id:u[0].product.id.split("/").reverse()[0],objectID:u[0].id.split("/").reverse()[0],__queryID:void 0,position:"",meta:{filter:{pill_type:u[0].product.pill_type?JSON.parse(u[0].product.pill_type.value):[],secondary_pill_type:u[0].product.secondary_pill_type?JSON.parse(u[0].product.secondary_pill_type.value):[],secondary_serving_size:u[0].product.secondary_serving_size?JSON.parse(u[0].product.secondary_serving_size.value):[],serving_size:u[0].product.serving_size?JSON.parse(u[0].product.serving_size.value):[],benefits_filtering:u[0].product.benefits_filtering?JSON.parse(u[0].product.benefits_filtering.value):[],benefits_new:u[0].product.benefits_new?JSON.parse(u[0].product.benefits_new.value):[],free_from:u[0].product.free_from?JSON.parse(u[0].product.free_from.value):[],ingredients_new:u[0].product.ingredients_new?JSON.parse(u[0].product.ingredients_new.value):[],price:u[0].product.price?JSON.parse(u[0].product.price.value):[]},accentuate:{bis_plp_cta_copy:null===(c=u[0].product.bis_plp_cta_copy)||void 0===c?void 0:c.value,disable_bis:null===(l=u[0].product.disable_bis)||void 0===l?void 0:l.value},pdp:{suggested_use_is_twice_per_day:null===(s=u[0].product.suggested_use_is_twice_per_day)||void 0===s?void 0:s.value}}};return y(p,1,t,n,r)}}}(o,i);if(l)return c.innerHTML=l,void c.classList.remove("hidden");var s=function(e){var t=e.parentElement,n=Array.from(t.querySelectorAll(".ais-Hits-item:not(.compare-product-placeholder)"));return!(n.length<=4||n.reverse()[0].classList.contains("discontinued")||(e.remove(),0))}(c);s||function(e,t){var n=t.querySelector(".button.button-primary");if(!n)return console.error("CTA button is missing on the discontinued product comparison card"),void t.classList.remove("hidden");var r=window.accessibilityString.discontinued.replace("#title",e.title);n.innerHTML='\n                            <span aria-hidden="true">'.concat(window.variantStrings.discontinued,'</span>\n                            <span class="visually-hidden visually-hidden--inline">').concat(r,"</span>\n                        "),t.classList.remove("hidden")}(o,c)}}}));var a=new CustomEvent("discontinued-products-replaced");document.dispatchEvent(a)}}))},a=function(){var e=document.querySelectorAll("[data-algolia-compare-products]"),t="NOT tags:bundle AND inventory_available:true AND ";n||(t+="NOT meta.prodFields.discontinued:true AND ");var a="";e.forEach((function(e){var c=JSON.parse(e.dataset.algoliaCompareProducts),l=JSON.parse(e.dataset.meta),s=e.dataset.secondaryMeta?JSON.parse(e.dataset.secondaryMeta):{},d=JSON.parse(e.dataset.settings),u=e.dataset.collectionBenefits?JSON.parse(e.dataset.collectionBenefits):"",f=(0,k.default)(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"shopify_products";return{insightsClient:window.aa,indexName:e,searchClient:p}}()),v=window.location.pathname.match(/\/collections\/([^/]+)/i),m=Boolean(v)&&2===v.length?v[1]:null,h="";
2if(c.handle,c.type,c.tags,c.title,c.vendor,c.variants.forEach((function(e,n){0!==n&&(t+=" AND ",a+=" AND "),t+="NOT objectID:"+e.id,a+="NOT objectID:"+e.id})),"default"==d.search_settings){if(u&&u.length>0){var w=u.map((function(e){return"meta.prodFields.support_items:'[\"".concat(e.replace(/'/g,"\\'").replace(/^-/,"\\-"),"\"]'<score=1>")})),b=u.flatMap((function(e,t){return u.slice(t+1).map((function(t){return"meta.prodFields.support_items:'[\"".concat(e.replace(/'/g,"\\'").replace(/^-/,"\\-"),'","').concat(t.replace(/'/g,"\\'").replace(/^-/,"\\-"),"\"]'<score=2>")}))}));t+=" AND ( ".concat(b.join(" OR "))+(w.length>1?" OR ":"")+"".concat(w.join(" OR "))}var g=document.getElementsByTagName("body")[0].className.match(/wbcollection/);m=null!=g?"wellblends-"+g.input.split("wbcollection_")[1].split(" ")[0]:null!==window.productCollections.collectionHandle?window.productCollections.collectionHandle:"all",t+=" OR collections:'".concat(m,"'<score=3>").concat(u&&u.length>0?")":"")}else if("keyword"==d.search_settings&&d.keyword_search_override)h=d.keyword_search_override.replace(/[^\w\s]/gi,"");else if("list"==d.search_settings){t=a;for(var _=!1,E=1;E<=3;E++)e.getAttribute("data-object-"+E)&&(1==E?(t+=" AND (",_=!0):t+=" OR ",t+="objectID:"+e.getAttribute("data-object-"+E));_&&(t+=")")}e.dataset.filterOutTags&&(t+=" AND ".concat(e.dataset.filterOutTags));var A=function(e,t,n){var r=document.createElement("li");return r.classList.add("ais-Hits-item"),n&&r.classList.add("hidden","discontinued"),r.innerHTML=y(e,t,c,l,s),r},O=(0,L.A)((function(e,t){var a=e.hits,d=e.widgetParams;if(!t||0!=a.length){var u=document.querySelector("".concat(d.container)).querySelector(".ais-Hits-list");if(u){var p=r(a);a.forEach((function(e,t){var n=p.find((function(t){return t.product=="gid://shopify/Product/".concat(e.id)}));0==t&&u.appendChild(A(e,-1)),u.appendChild(A(e,t+1,n)),A(e)})),p.length&&n?(document.addEventListener("discontinued-products-replaced",(function(){o()})),i(p,c,l,s)):o()}}}));f.addWidgets([(0,S.A)({filters:t,distinct:!0,hitsPerPage:3,clickAnalytics:!0,query:h}),(0,q.A)({indexName:"shopify_products"}).addWidgets([O({container:"#compareProducts"})])]),f.start()}))},c=function(){var e="NOT tags:bundle AND inventory_available:true AND ";n||(e+="NOT meta.prodFields.discontinued:true AND "),document.querySelectorAll("[data-algolia-use-recommend]").forEach((function(t){var a=JSON.parse(t.dataset.algoliaCompareProducts),c=JSON.parse(t.dataset.meta),l=t.dataset.secondaryMeta?JSON.parse(t.dataset.secondaryMeta):{},s=window.metafieldGlobalSettings,d=s.algoliaAppId,u=s.algoliaApiKey,p=(0,A.p)(d,u),f=function(e,t,n){var r=document.createElement("li");return r.classList.add("ais-Hits-item"),n&&r.classList.add("hidden","discontinued"),r.innerHTML=y(e,t,a,c,l),r};
2a.variants.forEach((function(t,n){0!==n&&(e+=" AND "),e+="NOT objectID: ".concat(t.id)})),t.dataset.filterOutTags&&(e+=" AND ".concat(t.dataset.filterOutTags));var m=(0,E.A)((function(e){if(e.items.length){var t=e.items,s=e.widgetParams,d=r(t);t.forEach((function(e,t){var n=d.find((function(t){return t.product=="gid://shopify/Product/".concat(e.id)}));0==t&&s.container.appendChild(f(e,-1)),s.container.appendChild(f(e,t+1,n))})),d.length&&n?(document.addEventListener("discontinued-products-replaced",(function(){o()})),i(d,a,c,l)):o(),v(),window.addEventListener("resize",window.debounce((function(e){v()}),50))}})),h=(0,k.default)({searchClient:p,indexName:"shopify_products"});h.addWidgets([m({container:document.querySelector("#recommendContainer"),objectIDs:["".concat(a.variants[0].id)],limit:4,queryParameters:{filters:e}})]),h.start()}))},l=document.querySelector("#compareProducts");if(e){var s=window.debounce((function(){t(l)&&(l.hasAttribute("data-algolia-use-recommend")?c():a(),window.removeEventListener("scroll",s))}),25);t(l)?l.hasAttribute("data-algolia-use-recommend")?c():a():window.addEventListener("scroll",s)}};function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I(Object(n),!0).forEach((function(t){C(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function C(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=x(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=x(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==x(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function j(e){return j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},j(e)}function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function D(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach((function(t){B(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function B(e,t,n){return(t=F(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(e,t)||R(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function R(e,t){if(e){if("string"==typeof e)return V(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?V(e,t):void 0}}function V(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function H(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,F(r.key),r)}}function F(e){var t=function(e,t){if("object"!=j(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=j(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==j(t)?t:t+""}function z(e){var t="function"==typeof Map?new Map:void 0;return z=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(G())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var o=new(e.bind.apply(e,r));return n&&U(o,n.prototype),o}(e,arguments,J(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),U(n,e)},z(e)}function G(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(G=function(){return!!e})()}
2function U(e,t){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},U(e,t)}function J(e){return J=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},J(e)}const W=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=J(t),function(e,t){if(t&&("object"==j(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,G()?Reflect.construct(t,n||[],J(e).constructor):t.apply(e,n))}(this,t)).form=e.querySelector("form"),e.form.addEventListener("submit",e.onSubmitHandler.bind(e)),e.cartNotification=document.querySelector("cart-notification"),e.serializeForm=function(e){var t,n={},r=new FormData(e),o=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=R(e))){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw i}}}}(r.keys());try{for(o.s();!(t=o.n()).done;){var i=t.value,a=/(?:^(properties\[))(.*?)(?:\]$)/;a.test(i)?(n.properties=n.properties||{},n.properties[a.exec(i)[2]]=r.get(i)):n[i]=r.get(i)}}catch(e){o.e(e)}finally{o.f()}return JSON.stringify(n)},e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&U(e,t)}(t,e),n=t,r=[{key:"updateCartNotification",value:function(){var e=this;fetch("/cart.js").then((function(e){return e.text()})).then((function(t){var n=JSON.parse(t),r=n.item_count,o=n.items;r>0&&document.getElementById("nm-cart-bubble").querySelector(".cart-count-bubble").classList.remove("is-empty"),e.cartNotification.updateShippingThreshold(n.total_price);var i=!1;n.items.forEach((function(e){for(var t=e.properties,n=0,r=Object.entries(t);n<r.length;n++){var o=N(r[n],2),a=o[0];if(o[1],"_freeGift"===a||0===e.line_price&&e.discounts.length>0){i=!0;break}}})),e.cartNotification.updateFreeGift(n.total_price,i),window.natureMade.updateCustomerCart(o)})).catch((function(e){console.error(e)}))}},{key:"onSubmitHandler",value:function(e){var t=this;if(e.preventDefault(),!e.target.classList.contains("disabled")){var n=!1,r=document.getElementById("lip-selling-plan"),o=this.hasAttribute("data-disable-twopack"),i=this.form,a=document.querySelector("[data-radio-subsave]"),c=document.querySelector("[data-price-onetime]");c&&(c=parseFloat(c.textContent.replace("$","")));var l=parseFloat(window.metafieldGlobalSettings.twoPackMaxPrice),s=parseFloat(window.metafieldGlobalSettings.twoPackMinPrice);e.target.classList.contains("bundle-form")&&(n=!0);var d=this.querySelector('[type="submit"]'),u=document.querySelector(".sticky-addtocart");this.cartNotification.setActiveElement(document.activeElement),d.setAttribute("disabled",!0),u&&u.setAttribute("disabled",!0),d.classList.add("loading"),u&&u.classList.add("loading");var p=D(D({},JSON.parse(this.serializeForm(i))),{},{sections:this.cartNotification.getSectionsToRender().map((function(e){return e.id})),sections_url:window.location.pathname});if(r&&"true"==r.dataset.twoPack&&a&&a.checked&&c<=l&&c>s&&!o){var f=2*parseInt(document.querySelector('[name="quantity"]').value);p.quantity=f.toString(),p.properties._two_pack_id="".concat(p.id,"-").concat(p.properties._selling_plan_id)}if(p=JSON.stringify(p),n){for(var v=window.bundleData,m=[],y=v.id,h=v.bundled_products,w=parseInt(document.querySelector('[name="quantity"]').value),b=0;b<h.length;b++){var g={id:h[b],quantity:w,properties:{_bundle_id:y,_bundle_variant_id:v.variant_id,_bundle_name:v.bundle_name,_bundle_image:v.bundle_image,_bundle_price:v.bundle_price,_bundle_url:v.bundle_url}};m.push(g)}p=JSON.stringify({items:m,sections:this.cartNotification.getSectionsToRender().map((function(e){return e.id})),sections_url:window.location.pathname})}window.natureMade.setCookie("submitBody",p),fetch("".concat(routes.cart_add_url),D(D({},window.natureMade.fetchConfig("javascript")),{},{body:p}
2)).then((function(e){return e.json()})).then((function(e){if(document.body.classList.contains("page-type__cart"))window.location.reload();else{if(e.status&&422==e.status){var r=JSON.parse(window.natureMade.getCookie("submitBody"));e.items=r.items,e.variant_id=r.items?r.items[0].properties._bundle_variant_id:r.id,e.sections=r.sections,e.quantity=0}if(n){var o=e.status&&422==e.status?e:e.items[0],i=e.sections;o.sections=i,e.status&&(o.status=e.status),e.message&&(o.message=e.message);var a={image:window.bundleData.bundle_image,title:window.bundleData.bundle_name};if(t.cartNotification.renderContents(o,a),o.quantity>=window.globalSettings.maxQtyLimit||422==e.status){d.setAttribute("disabled",!0),u&&u.setAttribute("disabled",!0);var c=document.querySelector("[data-max-qty-message]"),l=document.querySelector('[name="quantity"]');c&&c.classList.remove("is-hidden"),l&&(l.value=0)}}else t.cartNotification.renderContents(e);if(!e.status||422!=e.status){if(window.customerData){var s=document.querySelector("#cart-notification-button");if(!s)return;s.style["pointer-events"]="none"}t.updateCartNotification(),document.querySelectorAll(".quantity__input").forEach((function(e){e.value=1})),window.natureMade.updateQtySelector(),document.dispatchEvent(new CustomEvent("addedToCart"))}}})).catch((function(e){console.error(e)})).finally((function(){window.natureMade.setCookie("submitBody","");var e=document.querySelector("[data-max-qty-message]");e&&e.classList.contains("is-hidden")&&(d.removeAttribute("disabled"),u&&u.removeAttribute("disabled")),d.classList.remove("loading"),u&&u.classList.remove("loading"),_()}))}}}],r&&H(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(z(HTMLElement));function Q(e){return Q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Q(e)}function X(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,$(r.key),r)}}function $(e){var t=function(e,t){if("object"!=Q(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Q(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Q(t)?t:t+""}function K(e,t,n){return t=ee(t),function(e,t){if(t&&("object"==Q(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Y()?Reflect.construct(t,n||[],ee(e).constructor):t.apply(e,n))}function Y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Y=function(){return!!e})()}function Z(){return Z="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ee(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},Z.apply(null,arguments)}function ee(e){return ee=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ee(e)}function te(e,t){return te=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},te(e,t)}function ne(e){return ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ne(e)}function re(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,oe(r.key),r)}}function oe(e){var t=function(e,t){if("object"!=ne(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=ne(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ne(t)?t:t+""}function ie(e){var t="function"==typeof Map?new Map:void 0;return ie=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(ae())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var o=new(e.bind.apply(e,r));return n&&ce(o,n.prototype),o}(e,arguments,le(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),ce(n,e)},ie(e)}function ae(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ae=function(){return!!e})()}function ce(e,t){return ce=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ce(e,t)}function le(e){return le=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},le(e)}const se=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=le(t),function(e,t){if(t&&("object"==ne(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ae()?Reflect.construct(t,n||[],le(e).constructor):t.apply(e,n))}
2(this,t)).input=e.querySelector("input"),e.changeEvent=new Event("change",{bubbles:!0}),e.querySelectorAll("button").forEach((function(t){return t.addEventListener("click",e.onButtonClick.bind(e))})),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ce(e,t)}(t,e),n=t,(r=[{key:"onButtonClick",value:function(e){e.preventDefault();var t=this.input.value,n="SPAN"==e.target.nodeName?e.target.parentNode:e.target;if(this.input.classList.contains("quantity__input-2pack")){var r=2*window.globalSettings.maxQtyLimit,o=parseInt(this.input.dataset.value),i="plus"===n.name?o+2:o-2;i<=r&&(this.input.dataset.value=i)}"plus"===n.name?this.input.stepUp():this.input.stepDown();var a="plus"===n.name?parseInt(t)+1:parseInt(t)-1;a<=0?a=1:a>=window.globalSettings.maxQtyLimit&&(a=window.globalSettings.maxQtyLimit);var c=document.querySelector(".bundle-form"),l=document.querySelector(".quantity__button[name=plus]");c&&l&&"plus"===n.name&&(l.disabled=a>=window.globalSettings.maxQtyLimit),t!==this.input.value&&this.input.dispatchEvent(this.changeEvent);var s=new URLSearchParams(window.location.search);if(null!=document.getElementById(s.get("variant"))){if(document.getElementById(s.get("variant")).value>10)document.getElementById("inventory-status").classList.add("hidden");else{document.getElementById("inventory-status").classList.remove("hidden");var d=document.querySelectorAll('input[type="radio"][selected]')[0];d||(d=document.querySelectorAll('input[type="radio"][checked]')[0]);var u=document.querySelector('input[class~="rc_widget__option__input--subsave"]'),p=document.querySelector(".subscribe-save"),f=document.querySelector('input[class~="rc_widget__option__input--onetime"]'),v=document.querySelector('input[class~="quantity__input"]'),m=document.querySelector(".quantity__button[name=plus]"),y=document.getElementById("inventory-quantity");if(!(u&&p&&f&&m&&y&&v))return;u&&u.checked&&d.getAttribute("two-pack-item")&&"true"==d.getAttribute("two-pack-item")?2*a==parseInt(y.value)?document.querySelectorAll(".quantity__button[name=plus]").forEach((function(e){e.disabled=!0})):2*a>parseInt(y.value)&&(v.value=v.value-1,document.querySelectorAll(".quantity__button[name=plus]").forEach((function(e){e.disabled=!0}))):null!=document.querySelector('span[class~="two-pack-cta"]')?2*a>parseInt(y.value)?(u.disabled=!0,f.click(),p.style.color="#C6C6CB",s.delete("selling-plan"),window.history.pushState(null,null,"?".concat(s.toString()))):2*a==parseInt(y.value)?(u.removeAttribute("disabled"),p.style.color="",document.querySelectorAll(".quantity__button[name=plus]").forEach((function(e){e.disabled=!0}))):2*a<parseInt(y.value)&&(u.removeAttribute("disabled"),p.style.color=""):(u.removeAttribute("disabled"),p.style.color="");var h=document.querySelector(".ss-learn-more");if(!h)return;u.checked?h.classList.remove("hide"):h.classList.add("hide")}_()}}}])&&re(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(ie(HTMLElement));var de={youtube_containers:document.querySelectorAll("[data-youtube-video-id]")};var ue,pe=n(197);function fe(){var e=be(),t=e.m(fe),n=(Object.getPrototypeOf?Object.getPrototypeOf(t):t.__proto__).constructor;function r(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===n||"GeneratorFunction"===(t.displayName||t.name))}var o={throw:1,return:2,break:3,continue:3};function i(e){var t,n;return function(r){t||(t={stop:function(){return n(r.a,2)},catch:function(){return r.v},abrupt:function(e,t){return n(r.a,o[e],t)},delegateYield:function(e,o,i){return t.resultName=o,n(r.d,ve(e),i)},finish:function(e){return n(r.f,e)}},n=function(e,n,o){r.p=t.prev,r.n=t.next;try{return e(n,o)}finally{t.next=r.n}}),t.resultName&&(t[t.resultName]=r.v,t.resultName=void 0),t.sent=r.v,t.next=r.n;try{return e.call(this,t)}finally{r.p=t.prev,r.n=t.next}}}return(fe=function(){return{wrap:function(t,n,r,o){return e.w(i(t),n,r,o&&o.reverse())},isGeneratorFunction:r,mark:e.m,awrap:function(e,t){return new _e(e,t)},AsyncIterator:we,async:function(e,t,n,o,a){return(r(t)?he:ye)(i(e),t,n,o,a)},keys:me,values:ve}})()}function ve(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);
vendor: 7,125 bytes, line 2
2if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(De(e)+" is not iterable")}function me(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function e(){for(;n.length;)if((r=n.pop())in t)return e.value=r,e.done=!1,e;return e.done=!0,e}}function ye(e,t,n,r,o){var i=he(e,t,n,r,o);return i.next().then((function(e){return e.done?e.value:i.next()}))}function he(e,t,n,r,o){return new we(be().w(e,t,n,r),o||Promise)}function we(e,t){function n(r,o,i,a){try{var c=e[r](o),l=c.value;return l instanceof _e?t.resolve(l.v).then((function(e){n("next",e,i,a)}),(function(e){n("throw",e,i,a)})):t.resolve(l).then((function(e){c.value=e,i(c)}),(function(e){return n("throw",e,i,a)}))}catch(e){a(e)}}var r;this.next||(ge(we.prototype),ge(we.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",(function(){return this}))),ge(this,"_invoke",(function(e,o,i){function a(){return new t((function(t,r){n(e,i,t,r)}))}return r=r?r.then(a,a):a()}),!0)}function be(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var l=r&&r.prototype instanceof c?r:c,s=Object.create(l.prototype);return ge(s,"_invoke",function(n,r,o){var i,c,l,s=0,d=o||[],u=!1,p={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,n){return i=t,c=0,l=e,p.n=n,a}};function f(n,r){for(c=n,l=r,t=0;!u&&s&&!o&&t<d.length;t++){var o,i=d[t],f=p.p,v=i[2];n>3?(o=v===r)&&(l=i[(c=i[4])?5:(c=3,3)],i[4]=i[5]=e):i[0]<=f&&((o=n<2&&f<i[1])?(c=0,p.v=r,p.n=i[1]):f<v&&(o=n<3||i[0]>r||r>v)&&(i[4]=n,i[5]=r,p.n=v,c=0))}if(o||n>1)return a;throw u=!0,r}return function(o,d,v){if(s>1)throw TypeError("Generator is already running");for(u&&1===d&&f(d,v),c=d,l=v;(t=c<2?e:l)||!u;){i||(c?c<3?(c>1&&(p.n=-1),f(c,l)):p.n=l:p.v=l);try{if(s=2,i){if(c||(o="next"),t=i[o]){if(!(t=t.call(i,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,c<2&&(c=0)}else 1===c&&(t=i.return)&&t.call(i),c<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),c=1);i=e}else if((t=(u=p.n<0)?l:n.call(r,p))!==a)break}catch(t){i=e,c=1,l=t}finally{s=1}}return{value:t,done:u}}}(n,o,i),!0),s}var a={};function c(){}function l(){}function s(){}t=Object.getPrototypeOf;var d=[][r]?t(t([][r]())):(ge(t={},r,(function(){return this})),t),u=s.prototype=c.prototype=Object.create(d);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,s):(e.__proto__=s,ge(e,o,"GeneratorFunction")),e.prototype=Object.create(u),e}return l.prototype=s,ge(u,"constructor",s),ge(s,"constructor",l),l.displayName="GeneratorFunction",ge(s,o,"GeneratorFunction"),ge(u),ge(u,o,"Generator"),ge(u,r,(function(){return this})),ge(u,"toString",(function(){return"[object Generator]"})),(be=function(){return{w:i,m:p}})()}function ge(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}ge=function(e,t,n,r){function i(t,n){ge(e,t,(function(e){return this._invoke(t,n,e)}))}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},ge(e,t,n,r)}function _e(e,t){this.v=e,this.k=t}function Se(e,t,n,r,o,i,a){try{var c=e[i](a),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,o)}function qe(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Se(i,r,o,a,c,"next",e)}function c(e){Se(i,r,o,a,c,"throw",e)}a(void 0)}))}}function Le(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ke(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Oe(r.key),r)}}function Ae(e,t,n){return t&&ke(e.prototype,t),n&&ke(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Oe(e){var t=function(e,t){if("object"!=De(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=De(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==De(t)?t:t+""}function xe(e,t,n){return t=Me(t),Ie(e,Te()?Reflect.construct(t,n||[],Me(e).constructor):t.apply(e,n))}function Ie(e,t){if(t&&("object"==De(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Pe(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&je(e,t)}function Ce(e){var t="function"==typeof Map?new Map:void 0;return Ce=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(Te())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var o=new(e.bind.apply(e,r));return n&&je(o,n.prototype),o}(e,arguments,Me(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),je(n,e)},Ce(e)}function Te(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Te=function(){return!!e})()}function je(e,t){return je=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},je(e,t)}function Me(e){return Me=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Me(e)}function De(e){return De="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},De(e)}window.onpageshow=function(e){e.persisted&&-1!==navigator.userAgent.indexOf("Safari")&&window.location.reload()},customElements.define("product-form",W),customElements.define("quantity-input",se),function(){var e=5500,t=document.querySelector(".coming-soon-pdp"),n=document.querySelector(".product-form__buttons .notify-coming-soon"),r=!1,o=function(e){e&&(window._klOnsite=window._klOnsite||[],document.body.classList.contains("klaviyo-popups-suppressed")?document.addEventListener("klaviyoPopupsSuppressionRemoved",(function t(){window._klOnsite.push(["openForm",e]),document.removeEventListener("klaviyoPopupsSuppressionRemoved",t)})):window._klOnsite.push(["openForm",e]))};document.addEventListener("DOMContentLoaded",(function(){var i=document.querySelector(".product-form__buttons .button-primary.notify-me");
2if(void 0!==i&&null!=i||t){var a=null==document.querySelector(".discontinue-flag.hide"),c=new URL(window.location.href);if(c.searchParams.get("nm")&&!a||t){document.addEventListener("popUpClose",(function(e){if((c.searchParams.has("nm")||t)&&!r){var i=document.getElementById("onetrust-banner-sdk"),a=document.querySelectorAll('[data-testid="POPUP"]');if("klaviyo"==e.detail.targetModal&&a.length<=1&&(!i||"hidden"==i.style.visibility)&&!document.body.classList.contains("BIS-modal-was-opened")){if(t)return o(n.dataset.csFormId),void(r=!0);var l=document.querySelector("#klaviyo-bis-button-container button");if(!l||t)return;l.click(),c.searchParams.delete("nm")}}})),window.addEventListener("klaviyoForms",(function(e){"close"==e.detail.type&&document.dispatchEvent(new CustomEvent("popUpClose",{detail:{targetModal:"klaviyo"}})),t&&!r&&n&&n.classList.remove("inactive","loading")}));var l=function(){window.bisDisplayTimer=setTimeout((function(){if(document.body.classList.contains("klaviyo-popups-suppressed"))return clearTimeout(window.bisDisplayTimer),void s();var e=document.querySelector("#klaviyo-bis-button-container button"),r=document.getElementById("onetrust-banner-sdk");r&&"hidden"!=r.style.visibility?new MutationObserver((function(e,t){var n,o=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return T(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?T(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw i}}}}(e);try{for(o.s();!(n=o.n()).done;)"attributes"===n.value.type&&"hidden"==r.style.visibility&&document.dispatchEvent(new CustomEvent("popUpClose",{detail:{targetModal:"onetrust"}}))}catch(e){o.e(e)}finally{o.f()}t.disconnect()})).observe(r,{attributes:!0,childList:!0,subtree:!0}):t?o(n.dataset.csFormId):null==e||e.click()}),e)},s=function(){e=2e3;var t=function e(){console.info("Klaviyo popups suppression removed, triggering Klaviyo BIS"),document.removeEventListener("klaviyoPopupsSuppressionRemoved",e),document.body.classList.contains("notify-coming-soon-clicked")||document.body.classList.contains("notify-me-clicked")||l()};document.removeEventListener("klaviyoPopupsSuppressionRemoved",t),document.addEventListener("klaviyoPopupsSuppressionRemoved",t)};document.body.classList.contains("klaviyo-popups-suppressed")?s():l()}}})),document.querySelector(".product-form__buttons .button-primary").addEventListener("click",(function(e){var n=document.querySelector("#klaviyo-bis-button-container button");n&&e.target.classList.contains("notify-me")?(window.bisDisplayTimer&&clearTimeout(window.bisDisplayTimer),document.body.classList.add("notify-me-clicked"),document.body.classList.remove("klaviyo-popups-suppressed"),document.dispatchEvent(new Event("klaviyoPopupsSuppressionRemoved")),n.click()):t&&e.target.classList.contains("notify-coming-soon")&&(document.body.classList.add("notify-coming-soon-clicked"),document.body.classList.remove("klaviyo-popups-suppressed"),o(e.target.dataset.csFormId),document.dispatchEvent(new Event("klaviyoPopupsSuppressionRemoved")))}));var i=document.querySelector(".product-form__buttons .notify-coming-soon");t&&i&&i.addEventListener("click",(function(e){if(!i.classList.contains("inactive")){var t=e.target.dataset.csFormId;o(t)}}));!function(){var e,n,r,o,i,a,c,l,s=document.getElementById("tab-content-tab-recently-viewed"),d=document.querySelector('form[id^="product-form-template"]'),u=d.querySelector('[name="id"]').value;!function(e){if(e){var t=window.customerData,n=window.natureMade.getCookie("recently_viewed_ids"),r=parseInt(e.dataset.currentlyViewed),o=e.dataset.countLimit?parseInt(e.dataset.countLimit):4,i=n?JSON.parse(n):[],a=e.querySelector(".recently-viewed-mc-container");if(t){var c=t.recently_viewed;i=window.natureMade.getRecentlyViewedIds(c)}if((1!=i.length||i[0]!=r)&&i.length){if(document.getElementById("tab-header-tab-recently-viewed").classList.remove("hide"),i.includes(r)){var l=i.indexOf(r);i.splice(l,1)}i=i.slice(0,o),fetch("/pages/recent-products").then((function(e){return e.json()})).then((function(t){var n="",r=0,o=document.getElementById("recentProducts"),c=0,l=1,s=!1;if(a){c+=1;var d=a.dataset.mcPosition;d&&(l=parseInt(d)),l>=i.length&&(s=!0)}for(var u=0,p=i.length;u<p;u++){var f=i[u],v=getObjects(t,"product_id",f);v.length&&(r+=1,n+='\n                        <li class="ais-Hits-item glide__slide">\n                            '.concat(v[0].product_html,"\n                        </li>\n                    "),c+=1)}if(r>0&&o){var m;if(o.innerHTML='\n                        <ol class="ais-Hits-list glide__slides">\n                            '.concat(n,"\n                        </ol>\n                    "),a){var y=o.querySelector(".ais-Hits-list"),h=a.querySelector(".marketing-card");s?null==y||y.appendChild(h):null==y||y.insertBefore(h,y.children[l])}window.natureMade.generateSliderBullets(null===(m=e.querySelector(".slider-bullets-container"))||void 0===m?void 0:m.querySelector(".glide__bullets"),c),document.dispatchEvent(new CustomEvent("recentlyViewedProductsRetrieved",{detail:{count:i.length}}));var w=o.closest(".collapsible-container");w&&r>4&&(w.classList.add("collapsible","listing-folded"),window.natureMade.initCollapsibleProductListing(w))}})).catch((function(e){console.error(e)})).finally((function(){var t=window.customerData;
2if(t){var n=t.wishlist;if(!n)return;e.querySelectorAll(".btn-heart").forEach((function(e){var t=e.dataset.handle;n.includes(t)&&e.classList.add("active")}))}}))}}}(s),(l=document.querySelectorAll(".rc-radio__input"))&&l.forEach((function(e){e.addEventListener("change",(function(e){var n,r,o,i=e.target,a=i.value;n=a,(o=(r=new URLSearchParams(window.location.search)).get("selling-plan"))&&"onetime"===n?r.delete("selling-plan"):o||"subsave"!==n||r.append("selling-plan",n),window.history.replaceState(null,null,"?".concat(r.toString()));var c=document.querySelector(".rc-selling-plans__dropdown-custom"),l=document.getElementById("lip-selling-plan"),s=document.getElementById("lip-selling-plan-name"),d=i.closest(".rc-radio"),u=document.querySelector(".product-form__submit"),p=document.querySelector(".sticky-title-2pack")||null,f=i.closest(".rc-template__legacy-radio");i.setAttribute("checked","");var v=f.querySelector(".rc_widget__option--active");v&&v.classList.remove("rc_widget__option--active","rc-option--active"),d.classList.add("rc_widget__option--active","rc-option--active");var m=document.querySelector(".ss-learn-more");if("onetime"==a){var y;if(c.removeAttribute("name"),l.value="",s.value="",null!==p&&p.classList.add("hide"),m&&m.classList.add("hide"),null===(y=f.querySelector("[data-radio-subsave]"))||void 0===y||y.removeAttribute("checked"),u.classList.contains("notify-me"))return}else{var h;if(c.setAttribute("name","selling_plan"),l.value=c.value,s.value=c.options[c.selectedIndex].text,m&&m.classList.remove("hide"),null===(h=f.querySelector("[data-radio-onetime]"))||void 0===h||h.removeAttribute("checked"),u.classList.contains("notify-me"))return;if(null!==p&&"true"==l.getAttribute("data-two-pack")){p.classList.remove("hide");var w=document.querySelector('#pdp-product-form input[name="id"]');window.natureMade.updateDefaultSubscriptionDay(!0,w?w.value:"")}}window.natureMade.updateQtySelector(t),window.natureMade.updatePlusIconColor()}))})),function(e){var t=document.querySelector(".rc-selling-plans__dropdown-custom"),n=document.querySelector(".rc-selling-plans__dropdown-custom");t&&t.addEventListener("change",(function(t){var r=t.target.value,o=document.getElementById("lip-selling-plan"),i=document.getElementById("lip-selling-plan-name"),a=document.querySelector('[name="selling_plan_'.concat(e.dataset.productid,'"]:checked'));o&&a&&("onetime"!=a.value?(o.value=r,i.value=n.options[n.selectedIndex].text):o.value="")}))}(d),document.querySelectorAll(".nice-select.select__select .option").forEach((function(e){e.addEventListener("click",(function(e){e.stopPropagation(),e.target.closest("nm-select").closeSortDropdown()}))})),(e=document.querySelector(".sticky-dropdown"))&&e.addEventListener("change",(function(e){var t=e.target,n=t.dataset.name,r=t.value,o=document.querySelector('variant-radios input[name="'+n+'"][value="'+r+'"]');o&&o.click();var i=document.querySelector("variant-selects .name_"+n);i&&(i.value=r)})),n=document.querySelector(".sticky-addtocart"),r=document.querySelector('#pdp-product-form button[name="add"]'),n&&r&&n.addEventListener("click",(function(){r.click(),window.scrollTo({top:0,behavior:"smooth"})})),o=document.querySelector('.quantity__input[name="quantity"]'),i=document.querySelector(".sticky-quantity__input"),o&&i&&(o.addEventListener("change",(function(e){var t=e.target.value;i.value=t})),i.addEventListener("change",(function(e){var t=e.target.value;o.value=t}))),a=document.querySelector(".show-more-desc"),(c=document.querySelector(".description-copy"))&&a&&a.addEventListener("click",(function(e){e.preventDefault(),c.classList.contains("truncated")?(c.classList.remove("truncated"),a.setAttribute("aria-expanded",!0),a.classList.add("active")):(c.classList.add("truncated"),a.setAttribute("aria-expanded",!1),a.classList.remove("active"))})),document.querySelectorAll(".main-product-image-wrapper .yt_play_button").forEach((function(e){e.addEventListener("click",(function(e){!function(e){window.natureMade.pauseAllMedia();var t=document.querySelector('.deferred-media[data-media-id="'.concat(e,'"]'));if(t)if(t.getAttribute("loaded")){var n=t.querySelector("iframe");n&&n.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}else{var r=document.createElement("div");r.appendChild(t.querySelector("template").content.firstElementChild.cloneNode(!0)),t.setAttribute("loaded",!0),t.appendChild(r.querySelector("video, model-viewer, iframe")).focus()}}(e.target.dataset.mediaId)}))}));var p=window.location.href,f=p.indexOf("&c="),v=p.indexOf("&p="),m=f>0?"clickedObjectIDs":"viewedObjectIDs",y=f>0?" (Comparison Table)":"",h=v>0&&"clickedObjectIDs"==m?{positions:[parseInt(new URL(p).searchParams.get("p"))]}:{};if(window.query_id.length>1&&window.aa(m,P({userToken:window.user_id,index:"shopify_products",eventName:"Product Page Visited"+y,queryID:window.query_id,objectIDs:[u]},h)),document.querySelector(".product-form__buttons.main-product__buttons")){var w=p.indexOf("&queryID=");m=w>0?"convertedObjectIDsAfterSearch":"convertedObjectIDs";var b=w>0?"PDP: Product Added to Cart after Search":"PDP: Product Added to Cart";document.querySelector(".product-form__buttons.main-product__buttons").addEventListener("click",(function(e){!1===e.target.classList.contains("notify-me")&&e.target.classList.contains("product-form__submit")&&window.query_id.length>1&&!e.target.classList.contains("notify-coming-soon")&&setTimeout((function(){window.aa(m,P({userToken:window.user_id,index:"shopify_products",eventName:b,queryID:window.query_id,objectIDs:[u]},h))}),25)}))}var g=[],_=parseInt(d.dataset.productid),S=window.natureMade.getCookie("recently_viewed_ids");if(S&&(g=JSON.parse(S)),g.includes(_)){var q=g.indexOf(_);g.splice(q,1)}if(g.unshift(_),window.natureMade.setCookie("recently_viewed_ids",JSON.stringify(g.slice(0,20))),window.customerData){var L={product_ids:[_]};"true"==window.natureMade.getCookie("combined_recently_viewed")&&function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e){var n="".concat(window.metafieldGlobalSettings.nm_shopify_app_proxy,"/recently-viewed-products"),r=-1===n.indexOf("topaz")&&-1===n.indexOf("amber");fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}).then((function(e){return e.json()})).then((function(e){if("success"==(r?e.status:e.body.message)&&t){window.natureMade.setCookie("combined_recently_viewed","true");var n=document.getElementById("custom-tab-recently-viewed"),o=document.getElementById("tab-content-tab-recently-viewed"),i=n||o;if(!i||""==window.natureMade.getCookie("recently_viewed_ids"))return;var a=new XMLHttpRequest;a.onload=function(){var e=(new DOMParser).parseFromString(this.responseText,"text/html"),t=JSON.parse(e.getElementById("shopify-section-customer-updated-recently-viewed-cards").innerHTML);rebuildRecentlyViewedModule(t,i)},a.open("GET","?section_id=customer-updated-recently-viewed-cards",!0),a.send()}})).catch((function(e){console.error("Error:",e)}))}}(L)}}()}(),customElements.get("product-model")||customElements.define("product-model",function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),K(this,t)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&te(e,t)}(t,DeferredMedia),n=t,(r=[{key:"loadContent",value:function(){Z(ee(t.prototype),"loadContent",this).call(this),Shopify.loadFeatures([{name:"model-viewer-ui",ver
2sion:"1.0",onLoad:this.setupModelViewerUI.bind(this)}])}},{key:"setupModelViewerUI",value:function(e){e||(this.modelViewerUI=new Shopify.ModelViewerUI(this.querySelector("model-viewer")))}}])&&X(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}()),window.ProductModel={loadShopifyXR:function(){Shopify.loadFeatures([{name:"shopify-xr",version:"1.0",onLoad:this.setupShopifyXR.bind(this)}])},setupShopifyXR:function(e){var t=this;e||(window.ShopifyXR?(document.querySelectorAll('[id^="ProductJSON-"]').forEach((function(e){window.ShopifyXR.addModels(JSON.parse(e.textContent)),e.remove()})),window.ShopifyXR.setupXRElements()):document.addEventListener("shopify_xr_initialized",(function(){return t.setupShopifyXR()})))}},window.addEventListener("DOMContentLoaded",(function(){window.ProductModel&&window.ProductModel.loadShopifyXR()})),ue=function(e){if(e){var t=e.id;if(!window.updateSlider||!window.updateSlider[t]){var n,r=function(){(n=new i.A(e,{type:"slider",perView:4,gap:0,breakpoints:{645:{perView:2},989:{perView:3},99999:{perView:4}},rewind:!1,bound:!0}).mount()).glideIsInitialized=!0,window.updateSlider[t]=n;var o=e.querySelector(".glide__arrow--left"),a=e.querySelector(".glide__arrow--right"),c=e.querySelectorAll(".glide__slide").length;w(n,c,o,a),function(e){if(e&&e.selector.closest(".horizontal-on-mobile")){var t=window.innerWidth;!e.glideIsInitialized&&t>=750?(r(),e.glideIsInitialized=!0):e.glideIsInitialized&&t<750&&(window.natureMade.toggleGlideItemsAriaAttributes(e),e.destroy(),e.glideIsInitialized=!1)}}(n),n.on("move.after",(function(){window.natureMade.toggleGlideItemsAriaAttributes(n)}))};r(),window.natureMade.toggleSliderBullets(window.updateSlider[t]),window.addEventListener("resize",window.debounce((function(){var e=n.index;window.updateSlider[t]||0==e||n.go("=0"),window.natureMade.toggleSliderBullets(window.updateSlider[t])}),300))}}},document.addEventListener("DOMContentLoaded",(function(){window.updateSlider||(window.updateSlider={}),document.querySelectorAll(".tab-component__tabs .glide").forEach((function(e){"glide-recently-viewed"!=e.id&&("glide-related"==e.id?window.natureMade.waitForElm("#glide-related .glide__slides").then((function(){ue(e)})):"glide-related-collections"==e.id?window.natureMade.waitForElm("#glide-related-collections .glide__slides").then((function(){ue(e)})):ue(e))})),document.addEventListener("recentlyViewedProductsRetrieved",(function(e){var t;if(0!=e.detail.count&&(ue(document.getElementById("glide-recently-viewed")),!(e.detail.count<=4))){var n=null===(t=document.getElementById("tab-content-tab-recently-viewed"))||void 0===t?void 0:t.querySelector(".collapsible-container");n&&(n.classList.add("collapsible","listing-folded"),window.natureMade.initCollapsibleProductListing(n))}}))})),de.youtube_containers.length&&(function(){var e=document.createElement("script");e.src="https://www.youtube.com/iframe_api";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}(),window.onYouTubeIframeAPIReady=function(){de.youtube_containers.forEach((function(e,t){var n=e.dataset.youtubeVideoId,r=document.querySelector('[data-cover-for-video-id="'.concat(n,'"]'));e.id="youtube_player_"+t;var o=new YT.Player(e.id,{height:"390",width:"640",videoId:n,playerVars:{rel:0,showinfo:0,ecver:2,playsinline:1,autoplay:0,modestbranding:1}});r.addEventListener("click",(function(){r.classList.add("is-playing"),o.playVideo()}))}))}),window.natureMade.updateQtySelector=function(e){if(!e){var t,n=null,r=document.querySelector(".quantity__input"),o=document.querySelector(".sticky-quantity__input"),i=document.querySelector("[data-radio-subsave]"),a=!1,c=document.getElementById("lip-selling-plan");c&&"true"==c.dataset.twoPack&&i&&i.checked&&(a=!0);var l=document.getElementById("pdp-product-form");if(l){var s=l.querySelector('.product-form__submit[type="submit"]'),d=document.querySelector(".sticky-addtocart"),u=0;if(window.location.href.indexOf("variant=")>-1)n=/variant=([^&]+)/.exec(window.location.href)[1];else{var p=document.querySelector("variant-radios");if(p){var f=p.getAttribute("data-default-variant");n=De(f.length)>0?parseInt(f):null}}if(null==n)void 0!==r&&null!=r&&(r.max=window.globalSettings.maxQtyLimit,r.min=1,o&&(o.max=window.globalSettings.maxQtyLimit,o.min=1));
2else if((t=document.querySelectorAll('#cart-preview-product [data-variant-id="'+n+'"]'))&&r){u=0,t.forEach((function(e){u+=parseInt(e.dataset.count)}));var v=document.querySelector(".product__info-wrapper.free-sample-product");u>=window.globalSettings.maxQtyLimit?(r.value=0,r.max=0,r.min=0,o&&(o.value=0,o.max=0,o.min=0),document.querySelector("[data-max-qty-message]").classList.remove("is-hidden"),document.querySelector(".quantity__button[name=plus]").setAttribute("disabled",!0),s&&!s.classList.contains("unavailable")&&s.setAttribute("disabled",!0),d&&!d.classList.contains("unavailable")&&d.setAttribute("disabled",!0),v&&(v.setAttribute("data-user-free-sample-restricted",""),s&&(s.textContent=window.variantStrings.limitReached),d&&(d.textContent=window.variantStrings.limitReached))):(r.max=window.globalSettings.maxQtyLimit-u,r.min=1,o&&(o.max=window.globalSettings.maxQtyLimit-u,o.min=1),document.querySelector("[data-max-qty-message]").classList.add("is-hidden"),document.querySelector(".quantity__button[name=plus]").removeAttribute("disabled"),s&&!s.classList.contains("unavailable")&&s.removeAttribute("disabled"),d&&!d.classList.contains("unavailable")&&d.removeAttribute("disabled"),0==r.value&&(r.value=1),v&&(v.removeAttribute("data-user-free-sample-restricted"),s&&(s.textContent=window.variantStrings.addToCart),d&&(d.textContent=window.variantStrings.addToCart)))}else r.max=window.globalSettings.maxQtyLimit,r.min=1,o&&(o.max=window.globalSettings.maxQtyLimit,o.min=1),document.querySelector("[data-max-qty-message]").classList.add("is-hidden"),document.querySelector(".quantity__button[name=plus]").removeAttribute("disabled"),s&&!s.classList.contains("unavailable")&&s.removeAttribute("disabled"),d&&!d.classList.contains("unavailable")&&d.removeAttribute("disabled"),a&&0==r.value&&(r.value=1);_()}}},window.natureMade.updatePlusIconColor=function(){var e=document.querySelector(".rc-radio__input[data-radio-subsave]:checked"),t=document.getElementById("inventory-quantity"),n=document.querySelector('[name="quantity"]'),r=document.querySelector(".sticky-quantity__input"),o=document.getElementById("lip-selling-plan");if(t&&n&&o&&(n.classList.remove("max-qty"),null==r||r.classList.remove("max-qty"),"false"!=o.dataset.twoPack)){var i=parseInt(t.value),a=2*parseInt(n.value);e&&a>=i&&(n.classList.add("max-qty"),null==r||r.classList.add("max-qty"))}},document.querySelector('#pdp-product-form .product-form__submit[type="submit"]')&&document.querySelector('#pdp-product-form .product-form__submit[type="submit"]').addEventListener("click",(function(e){var t=document.querySelector(".rc_widget__option__plans__dropdown li.selected"),n=document.querySelector("input[data-radio-subsave]"),r=new URLSearchParams(window.location.search);!0===r.has("ot")&&r.delete("ot"),!0===r.has("dc")&&r.delete("dc"),null!==t&&null!==n&&n.checked?(r.append("ot","sub"),r.append("dc",t.innerText.replace(/[^0-9]/g,""))):r.append("ot","otp"),window.history.replaceState("",document.title,window.location.pathname+"?"+r.toString())})),window.natureMade.isAddToCartBtnClicked=!1,window.addEventListener("click",(function(){if(window.natureMade.isAddToCartBtnClicked){var e=document.querySelector('input[class~="rc_widget__option__input--subsave"]');e&&e.disabled&&(document.querySelector("cart-notification").classList.remove("hide"),document.querySelector("#cart-notification").classList.add("active"));var t=document.getElementById("pdp-product-form");if(0==document.querySelector('input[class~="quantity__input"]').value&&t){var n=t.querySelector('.product-form__submit[type="submit"]');null==n||n.setAttribute("disabled",!0)}window.natureMade.isAddToCartBtnClicked=!1}})),window.addEventListener("mouseover",(function(){var e=document.getElementById("pdp-product-form");if(window.natureMade.isAddToCartBtnClicked&&0==document.querySelector('input[class~="quantity__input"]').value&&e){var t=e.querySelector('.product-form__submit[type="submit"]');null==t||t.setAttribute("disabled",!0)}})),window.natureMade.updateDefaultSubscriptionDay=function(e,t){var n=Ne(t),r=e?n||"60":"30",o=document.querySelector("select.rc-selling-plans__dropdown"),i=document.querySelector(".rc-selling-plans__dropdown.nice-select");if(o)for(var a=0;a<o.options.length;a++)if(-1!==o.options[a].text.indexOf(r)){var c;if(o.selectedIndex=a,o.dispatchEvent(new Event("change")),!i)continue;null===(c=i.querySelectorAll(".selected"))||void 0===c||c.forEac
2h((function(e){e.classList.remove("focus","selected")}));var l=i.querySelector(".current"),s=i.querySelectorAll(".option")[a];l.textContent=s.textContent,s.classList.add("selected"),s.classList.add("focus");break}};var Be,Ne=function(e){var t;if(e&&window.variantsMFData&&window.variantsMFData.length)return window.variantsMFData.forEach((function(n){n.variantId!=e||(t=n.daysToRecharge)})),t},Re=function(e){function t(){var e;return Ee(this,t),(e=xe(this,t)).addEventListener("change",e.onVariantChange.bind(e)),e.addEventListener("load",e.updateThumbnailList),e.moneyFormat="${{amount}}",e.quantityInput=e.parentElement.querySelector(".quantity__input"),navigator.userAgent.toLocaleLowerCase().includes("safari")&&e.onVariantChange(),e.variantDiscontinuationSet=!1,e}return Pe(t,e),Ae(t,[{key:"switchToNonDiscontinuedVariant",value:function(){var e=this,t=document.querySelector("variant-radios");if(!document.querySelector(".product-form__submit.discontinued")&&!document.querySelector(".discontinue-flag:not(.hide)")&&!document.querySelector(".rc_widget__option_disabled"))return this.variantDiscontinuationSet=!0,void(t&&(t.variantDiscontinuationSet=!0));var n=this.currentVariant.id;this.getVariantData().forEach((function(r){if(r.id!=n){var o=e.getDiscontinuedOptions(r);"discontinued"==o.otpOptionDiscontinued&&"discontinued"==o.subsOptionDiscontinued||(r.options.forEach((function(e,t){var n;(n=document.querySelector('[type="radio"][value="'.concat(e,'"]')))&&(n.checked=!0)})),r.options.forEach((function(t){var n=e.querySelector('option[selected="selected"]');n&&n.removeAttribute("selected");var r=e.querySelector('option[value="'.concat(t,'"]'));r&&r.setAttribute("selected","selected")})),t&&(t.variantDiscontinuationSet=!0),e.variantDiscontinuationSet=!0,e.dispatchEvent(new Event("change")),Ve(e.querySelectorAll("select")))}}))}},{key:"onVariantChange",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(document.querySelectorAll('input[type="radio"][selected=true]').forEach((function(e){e.removeAttribute("selected")})),e&&e.target.setAttribute("selected",!0),"SELECT"==(null==e?void 0:e.target.nodeName)){var t=document.querySelector('variant-radios input[value="'.concat(e.target.value,'"]'));t&&(t.checked=!0)}else if("INPUT"==(null==e?void 0:e.target.nodeName)){document.querySelectorAll("variant-selects select").forEach((function(t){t.querySelector('option[value="'.concat(e.target.value,'"]'))&&(t.value=e.target.value)}));var n=document.querySelector(".product-image-preview-wrapper"),r=document.querySelector(".show-sticky-bar");if(n&&!r){var o=n.getBoundingClientRect().top;requestAnimationFrame((function(){var e=n.getBoundingClientRect().top-o;window.scrollBy({top:e,behavior:"instant"})}))}}var i=document.querySelector(".coming-soon-pdp");if(this.updateOptions(),this.updateMasterId(),this.update2Pack(),this.updatePickupAvailability(),this.currentVariant){var a;this.updateSku(),this.updateThumbnailList(null==e||null===(a=e.target)||void 0===a?void 0:a.value),this.updateMedia(),this.updateURL(),this.updateVariantInput(),this.renderProductInfo(),window.natureMade.updateQtySelector(i);var c,l=document.querySelector(".inventory-alert"),s=document.getElementById("inventory-status"),d=document.querySelector(".pdp-badge-sold-out"),u=document.querySelector(".pdp-badge");if(i)this.toggleAddButton(!0,"",!0,null,i);else if((null===(c=document.getElementById(new URLSearchParams(window.location.search).get("variant")))||void 0===c?void 0:c.value)<=0&&!i?(l&&(l.innerText="Out of stock"),s&&s.classList.remove("hidden")):l&&(l.innerText="Low in stock"),this.currentVariant.available?(null==d||d.classList.add("hide"),null==u||u.classList.remove("hide")):(null==d||d.classList.remove("hide"),null==u||u.classList.add("hide")),this.currentVariant.available)this.quantityInput&&(this.quantityInput.max>0?this.toggleAddButton(!1,"",!0):this.toggleAddButton(!0,window.variantStrings.addToCart,!1));else{var p=document.querySelector("#product-form-".concat(this.dataset.section,' [name="add"].discontinued'));!p||p&&window.variantsMFData.length>1?this.toggleAddButton(!0,"",!0,this.currentVariant.id):this.variantDiscontinuationSet=!0}this.variantDiscontinuationSet&&this.updateSubscriptionWidgetPrices(i)}else this.toggleAddButton(!0,"",i,!1),this.setUnavailable();this.inventoryStatus(i),document.dispatchEvent(new CustomEvent("variantChange")),window.natureMade.updatePlusIconColor()}},{key:"inventoryStatus",value:function(e){var t;if(!e){var n=document.querySelector('input[class~="quantity__input"]');
2if(!n||0!==Number(n.value)){var r=new URLSearchParams(window.location.search),o=null===(t=document.getElementById(r.get("variant")))||void 0===t?void 0:t.value,i=document.getElementById("inventory-quantity");if(o){var a=document.getElementById("inventory-status");i&&(i.value=o),o>10?a.classList.add("hidden"):a.classList.remove("hidden")}var c=document.querySelector(".quantity__input").value,l=document.querySelector('input[class~="rc_widget__option__input--subsave"]'),s=document.querySelector(".subscribe-save"),d=document.querySelector(".ss-learn-more");null!=document.querySelector('span[class~="two-pack-cta"]')?i&&2*c>parseInt(i.value)?(l&&(l.disabled=!0),document.querySelector('input[class~="rc_widget__option__input--onetime"]').click(),s&&(s.style.color="#C6C6CB"),r.delete("selling-plan"),window.history.pushState(null,null,"?".concat(r.toString()))):i&&2*c<=parseInt(i.value)&&(l&&(l.disabled=!1),s&&(s.style.color="")):(l&&(l.disabled=!1),s&&(s.style.color="")),l&&l.checked&&d?d.classList.remove("hide"):d&&d.classList.add("hide")}}}},{key:"formatMoney",value:function(e,t){"string"==typeof e&&(e=e.replace(".",""));var n=/\{\{\s*(\w+)\s*\}\}/,r=t||this.moneyFormat;function o(e,t,n,r){if(n=n||",",r=r||".",isNaN(e)||null===e)return 0;var o=(e=(e/100).toFixed(t)).split(".");return o[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+n)+(o[1]?r+o[1]:"")}var i="";switch(r.match(n)[1]){case"amount":i=o(e,2);break;case"amount_no_decimals":i=o(e,0);break;case"amount_with_comma_separator":i=o(e,2,".",",");break;case"amount_no_decimals_with_comma_separator":i=o(e,0,".",",");break;case"amount_no_decimals_with_space_separator":i=o(e,0," ");break;case"amount_with_apostrophe_separator":i=o(e,2,"'")}return r.replace(n,i)}},{key:"getDiscontinuedOptions",value:function(e){var t=window.swapData,n=!1,r=!1;if(t){var o=t.discontinuedVariantIds;if(o&&o.includes(e.id)){var i=t.currentDate,a=t.subDiscontinuationDates,c=t.otpDiscontinuationDates,l=o.indexOf(e.id);if(c.length){var s=c[l].split("||"),d=s[0],u=s[1];""!=d&&""!=u&&i>=d&&(n="discontinued")}if(a.length){var p=a[l].split("||"),f=p[0],v=p[1];""!=f&&""!=v&&i>=f&&(r="discontinued")}else r="not-available"}}return{subsOptionDiscontinued:r,otpOptionDiscontinued:n}}},{key:"showSoldOutBadge",value:function(e){var t=document.querySelector(".main-product-image-wrapper"),n=document.querySelector(".product-main-image-carousel");if(t&&n)if(e)e.classList.remove("hide");else{var r=document.createElement("p");r.className="pdp-badge-sold-out item-status has-white-background has-dark-gray-text",r.innerHTML="Sold<br>Out",t.insertBefore(r,n)}}},{key:"updateSubscriptionWidgetPrices",value:function(e){var t=this,n=window.metafieldGlobalSettings,r=100*n.subscription_threshold,o=this.currentVariant.price,i=this.currentVariant.id,a=document.querySelector("[data-price-onetime]"),c=document.querySelectorAll("[data-price-subsave]");if(a&&c.length){var l=parseFloat(c[0].getAttribute("data-save"));if(l){var s=o*l;"true"==document.getElementById("lip-selling-plan").dataset.twoPack&&(s*=2),a.innerHTML=this.formatMoney(o,this.moneyFormat),c.forEach((function(e){e.innerHTML=t.formatMoney(s,t.moneyFormat)}));var d=document.querySelector("[data-option-subsave]");if(o<=r||n.subscription_custom_variant_exceptions.includes(i)?(d.style.display="none",document.querySelector("[data-radio-onetime]").click()):d.style.display="",!e){var u=this.closest(".product");if(u){var p=u.querySelector(".swap-products-wrapper");p.innerHTML="",p.classList.add("hide");var f=u.querySelectorAll(".discontinue-flag"),v=u.querySelector(".pdp-badge-sold-out"),m=u.querySelector(".product-form form"),y=u.querySelectorAll(".rc_widget__option"),h=u.querySelector("[data-option-onetime]"),w=u.querySelector("[data-option-subsave]"),b=u.querySelector(".product-form__submit"),g=document.querySelector(".sticky-addtocart"),_=document.querySelector(".sticky-discontinued-copy"),S=u.querySelector(".product-form__quantity"),q=document.querySelector(".sticky-product-buttons quantity-input"),L=document.querySelector('.sticky-product-buttons [for^="Quantity-"]');null==S||S.classList.remove("hidden"),null==q||q.classList.remove("hidden"),null==L||L.classList.remove("hidden"),null==_||_.classList.add("hide"),null==g||g.classList.remove("hide"),f.forEach((function(e){e.classList.add("hide")}
2)),m&&m.classList.remove("hide"),y.length&&y.forEach((function(e){e.classList.remove("rc_widget__option_disabled")}));var E=window.swapData;if(E){var k=E.discontinuedVariantIds;if(k&&k.includes(i)){var A=E.currentDate,O=!1,x=!1,I=E.subDiscontinuationDates,P=E.otpDiscontinuationDates,C=E.swapVariantIds,T=u.querySelector(".swap-pdp-message-container"),j=k.indexOf(i);if(P.length){var M=P[j].split("||"),D=M[0],B=M[1];""!=D&&""!=B&&A>=D&&(O=!0)}if(I.length){var N=I[j].split("||"),R=N[0],V=N[1];if(""!=R&&""!=V&&A>=R&&(x=!0),x&&w&&h&&(w.classList.add("rc_widget__option_disabled"),h.querySelector("[data-radio-onetime]").click(),b&&g&&!this.currentVariant.available&&(b.disabled=!0,b.textContent=window.variantStrings.discontinued,b.classList.add("discontinued"),g.disabled=!0,g.textContent=window.variantStrings.discontinued)),(x&&O||!x&&O||document.querySelector(".pdp-badge-sold-out:not(.hide)"))&&(null==S||S.classList.add("hidden"),null==q||q.classList.add("hidden"),null==L||L.classList.add("hidden"),null==g||g.classList.add("hide"),null==_||_.classList.remove("hide"),T.classList.remove("hide"),f.forEach((function(e){e.classList.remove("hide")})),this.showSoldOutBadge(v),m&&m.classList.add("hide"),C.length&&p)){var H=C[j];""!=H?(p.classList.remove("hide"),this.build_swap_products(p,H)):p.classList.add("hide")}}}}document.querySelectorAll(".swap-pdp-message").forEach((function(e){e.classList.contains("discontinue-message-".concat(i))?e.classList.remove("hide"):e.classList.add("hide")}))}}}}}},{key:"build_swap_products",value:function(e,t){var n=e.closest(".product__info-container");if(n){var r=t.split("||");e.setAttribute("data-swap-active","false"),e.innerHTML="",e.classList.add("loading");var o="",i=new AbortController,a=n.querySelectorAll(".product-form__input input"),c=n.querySelectorAll(".product-form__input--dropdown select");a.forEach((function(e){e.addEventListener("change",(function(){i.abort()}))})),c.length&&c.forEach((function(e){e.addEventListener("change",(function(){i.abort()}))}));var l=[];if(r.length){var s=0;e.setAttribute("data-swap-active","true"),function t(){if(r.length){var a=r.shift().split("|"),c=parseInt(a[0]),d=parseInt(a[1]);if(!c||!d)return;fetch("/pages/favorites-products",{signal:i.signal}).then((function(e){return e.json()})).then((function(e){var t=e.products;if(t.length){var n=getObjects(t,"swap_id",c);if(n.length){var r=n[0],i=r.product_url,a=getObjects(r.swap_variant,"id",d)[0],u=a.name;l.push(u);var p=a.featured_image.src;p=p.replace(".png","_150x.png");var f=a.featured_image.alt||u;o+='\n                    <div class="swap-product-item">\n                        <a href="'.concat(i,"?variant=").concat(d,'" class="swap-product ').concat(0==s?"margin-top-0":"",'">\n                        <div class="swap-product__media">\n                            <img class="swap-product__image" src="').concat(p,'" alt="').concat(f,'" width="100" height="100" loading="lazy">\n                        </div>\n                        <div class="swap-product__text">\n                            <span>\n                            ').concat(u,'\n                            <svg width="13" height="12" viewBox="0 0 13 12" fill="none" xmlns="http://www.w3.org/2000/svg">\n                                <title>Right Arrow</title>\n                                <path d="M1 6H10" stroke="black" stroke-width="1.6" stroke-linecap="square"></path>\n                                <path d="M7 2L11 6L7 10" stroke="black" stroke-width="1.6" stroke-linecap="square"></path>\n                            </svg>\n                            </span>\n                        </div>\n                        </a>\n                    </div>\n                    ')}}})).catch((function(e){console.error(e)})).finally((function(){e.setAttribute("data-init","false"),s+=1,t()}))}else{e.innerHTML=o;var u=n.querySelector(".swap-product-title");if(l.length&&u){var p=l[0];if(l.length>1&&2==l.length)p=l.join(" or ");else if(l.length>2){var f=l[l.length-1];l.pop(),p=l.join(", "),p="".concat(p," or ").concat(f)}u.textContent=p}e.classList.remove("loading")}}()}}}},{key:"updateOptions",value:function(){this.options=Array.from(this.querySelectorAll("select"),(function(e){return e.value}))}},{key:"updateSku",value:function(){var e=document.querySelector(".sku-number");e&&!e.closest(".bundle-product-tabs")&&(e.innerHTML="Item #".concat(this.currentVariant.sku))}},{key:"updateMasterId",value:function(){var e=this;this.currentVariant=this.getVariantData().find((function(t){return!t.options.map((function(t,n){return e.options[n]===t})).includes(!1)}))}},{key:"update2Pack",value:function(){if(this.currentVariant){var e=document.getElementById("lip-selling-plan"),t=document.querySelector("[data-label-text-subsave]"),n=(this.currentVariant.price/100).toFixed(2),r=window.metafieldGlobalSettings.twoPackMaxPrice,o=window.metafieldGlobalSettings.twoPackMinPrice,i=document.querySelector(".subscribe-cta-text");t&&!window.metafieldGlobalSettings.twoPackExlusionList.includes(this.currentVariant.id)&&(parseFloat(n)<=r&&parseFloat(n)>o?(t.classList.add("two-pack-cta"),e.setAttribute("data-two-pack","true"),i.textContent=window.metafieldGlobalSettings.twoPackCta,window.natureMade.updateDefaultSubscriptionDay(!0,this.currentVariant.id)):(t.classList.remove("two-pack-cta"),e.setAttribute("data-two-pack","false"),i.textContent="Subscribe",window.natureMade.updateDefaultSubscriptionDay(!1,this.currentVariant.id)))}}},{key:"updateGallery",value:function(e,t,n){var r,o=e.querySelector(".product-thumbnails"),i=e.querySelector(".product-main-image-carousel .glide__slides");if(o&&i){e.querySelectorAll(".product__thumbnail-item:not(.pdp-thumbn
2ail-placeholder)").forEach((function(r){var o=r.querySelector("img"),i=null==o?void 0:o.getAttribute("data-variant-group"),a=e.querySelectorAll(".pdp-thumbnail-placeholder");if(""===i||isNaN(i)||!n.includes(i)||i===t)return a.forEach((function(e){return e.remove()})),void r.classList.remove("hide");r.classList.add("hide")}));var a=e.querySelectorAll('.product__media-item[data-variant-group="'.concat(t,'"]')),c=e.querySelectorAll('.variant_images a[data-variant-group="'.concat(t,'"]'));a.length!==c.length&&(e.querySelectorAll(".product__media-item[data-variant-group]").forEach((function(e){var r=e.getAttribute("data-variant-group");r&&""!==r&&!Number.isNaN(Number(r))&&n.includes(r)&&r!==t&&e.remove()})),(r=c,function(e){if(Array.isArray(e))return Le(e)}(r)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return Le(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Le(e,t):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).reverse().forEach((function(e){var n=e.cloneNode(!0);n.classList.add("glide__slide","product__media-item"),n.classList.remove("hide"),n.setAttribute("data-variant-group",t),i.prepend(n)})));var l=e.querySelectorAll(".glide__bullet"),s=e.querySelectorAll(".product__thumbnail-item:not(.hide)").length;l.forEach((function(e,t){e.classList.toggle("hide",t>=s)}))}}},{key:"updateThumbnailList",value:function(e){var t=this,n=document.querySelector("fieldset.product-form__input input:checked");n&&!e&&(e=n.value),e&&document.querySelectorAll(".product-image-preview-wrapper").forEach((function(n){var r,o=null===(r=n.querySelector(".product-thumbnails"))||void 0===r||null===(r=r.dataset.variantList)||void 0===r?void 0:r.split("|");o&&t.updateGallery(n,e,o)}))}},{key:"updateMedia",value:function(){if(this.currentVariant&&this.currentVariant.featured_media){var e=document.querySelector('[data-media-id="'.concat(this.dataset.section,"-").concat(this.currentVariant.featured_media.id,'"]'));e.click(),e&&e.parentElement.firstChild!=e&&(this.stickyHeader=this.stickyHeader||document.querySelector("sticky-header"),this.stickyHeader&&this.stickyHeader.dispatchEvent(new Event("preventHeaderReveal")))}}},{key:"updateURL",value:function(){if(this.currentVariant&&"false"!==this.dataset.updateUrl){var e=new URLSearchParams(window.location.search);e.set("variant",this.currentVariant.id),window.history.replaceState({},"",decodeURIComponent("".concat(window.location.pathname,"?").concat(e)))}}},{key:"updateVariantInput",value:function(){var e=this;document.querySelectorAll("#product-form-".concat(this.dataset.section,", #product-form-installment")).forEac
2h((function(t){var n=t.querySelector('input[name="id"]');n.value=e.currentVariant.id,n.dispatchEvent(new Event("change",{bubbles:!0}))}))}},{key:"updatePickupAvailability",value:function(){var e=document.querySelector("pickup-availability");e&&(this.currentVariant&&this.currentVariant.available?e.fetchAvailability(this.currentVariant.id):(e.removeAttribute("available"),e.innerHTML=""))}},{key:"renderProductInfo",value:function(){var e=this;fetch("".concat(this.dataset.url,"?variant=").concat(this.currentVariant.id,"&section_id=").concat(this.dataset.section)).then((function(e){return e.text()})).then((function(t){var n="price-".concat(e.dataset.section),r=(new DOMParser).parseFromString(t,"text/html"),o=document.getElementById(n),i=r.getElementById(n);i&&o&&(o.innerHTML=i.innerHTML);var a=document.getElementById("price-".concat(e.dataset.section));a&&a.classList.remove("visibility-hidden")}))}},{key:"toggleAddButton",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i=document.getElementById("product-form-".concat(this.dataset.section));if(i){var a=i.querySelector('[name="add"]'),c=document.querySelector(".sticky-addtocart"),l=document.getElementById("wtb-link"),s=document.getElementById("lip-selling-plan"),d=document.querySelector("[data-radio-subsave]"),u=document.querySelector("[data-label-text-subsave]"),p=document.querySelector(".sticky-title-2pack"),f=document.querySelector(".subscribe-cta-text");if(a){var v=!!a.classList.contains("bundle-no-stock");if(n){if(v&&!o||(a.removeAttribute("disabled"),c.removeAttribute("disabled")),o)return;a.classList.remove("unavailable"),a.classList.remove("discontinued"),c.classList.remove("unavailable");var m=document.querySelector(".product__info-wrapper.free-sample-product.free-sample-user-restricted"),y=!1,h="Email Me When Available";if(r&&window.variantsMFData){var w=variantsMFData.findIndex((function(e){return parseInt(e.variantId)===r}));if(-1!==w){var b=(y=variantsMFData[w].disableBIS)?"Not Available":h;h=""!=variantsMFData[w].notifyMeText?variantsMFData[w].notifyMeText:b}}e||v?(y?(a.classList.remove("notify-me"),c.classList.remove("notify-me","notify-me-alt"),a.classList.add("unavailable-btn"),c.classList.add("unavailable-btn")):(a.classList.add("notify-me"),c.classList.add("notify-me","notify-me-alt"),a.classList.remove("unavailable-btn"),c.classList.remove("unavailable-btn")),h=v?"Not Available":h,a.textContent=m?window.variantStrings.limitReached:h,a.setAttribute("type","button"),c.textContent=m?window.variantStrings.limitReached:h,l&&l.classList.remove("hide"),u&&f&&!a.classList.contains("notify-me")&&(u.classList.remove("two-pack-cta"),f.textContent="Subscribe"),p.classList.add("hide")):(a.classList.remove("notify-me","unavailable-btn"),s&&"true"==s.dataset.twoPack&&d&&d.checked?p.classList.remove("hide"):(null==u||u.classList.remove("two-pack-cta"),p.classList.add("hide")),a.textContent=window.variantStrings.addToCart,a.setAttribute("type","submit"),c.classList.remove("notify-me","notify-me-alt","unavailable-btn"),c.textContent=window.variantStrings.addToCart,l&&l.classList.add("hide")),_()}else e?(a.setAttribute("disabled",!0),""!=t&&(a.textContent=t,c.textContent=t),c.setAttribute("disabled",!0),l&&l.classList.remove("hide")):(a.removeAttribute("disabled"),s&&"true"==s.dataset.twoPack&&d&&d.checked?p.classList.remove("hide"):(a.textContent=window.variantStrings.addToCart,p.classList.add("hide"),l&&l.classList.add("hide")),c.removeAttribute("disabled"),c.textContent=window.variantStrings.addToCart,l&&l.classList.add("hide"))}}}},{key:"setUnavailable",value:function(){var e=document.getElementById("product-form-".concat(this.dataset.section)).querySelector('[name="add"]'),t=document.getElementById("price-".concat(this.dataset.section)),n=document.querySelector(".sticky-addtocart"),r=document.getElementById("wtb-link");e&&(e.textContent=window.variantStrings.unavailable,e.classList.add("unavailable"),n&&(n.classList.add("unavailable"),n.textContent=window.variantStrings.unavailable),t&&t.classList.add("visibility-hidden"),r&&r.classList.remove("hide"))}},{key:"getVariantData",value:function(){return this.variantData=this.variantData||JSON.parse(this.querySelector('[type="application/json"]').textContent),this.variantData}}])}(Ce(HTMLElement));customElements.define("variant-selects",Re),(Be=document.querySelectorAll("variant-selects select")).forEac
2h((function(e){e.addEventListener("change",(function(e){Ve(Be)}))}));var Ve=function(e){var t=[];e.forEach((function(e){var n=e.value;t.push(n)})),document.querySelectorAll("select.sticky-dropdown").forEach((function(e,n){e.value=t[n]})),document.querySelectorAll(".nice-select.sticky-dropdown").forEach((function(e,n){e&&(e.querySelector(".option.selected").classList.remove("selected","focus"),e.querySelector('.option[data-value="'+t[n]+'"]').classList.add("selected","focus"),e.querySelector(".current").textContent=t[n])}))},He=function(e){function t(){return Ee(this,t),xe(this,t)}return Pe(t,e),Ae(t,[{key:"updateOptions",value:function(){var e=Array.from(this.querySelectorAll("fieldset"));this.options=e.map((function(e){return Array.from(e.querySelectorAll("input")).find((function(e){return e.checked})).value})),Ve(this.querySelectorAll('input[type="radio"]:checked'))}}])}(Re);customElements.define("variant-radios",He),window.VariantRadios=He,window.natureMade.saveRecentlyViewedProducts=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e&&t){var r="".concat(window.metafieldGlobalSettings.nm_shopify_app_proxy,"/recently-viewed-products"),o=-1===r.indexOf("topaz")&&-1===r.indexOf("amber");fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then((function(e){return e.json()})).then((function(e){if("success"==(o?e.status:e.body.message)&&n){window.natureMade.setCookie("combined_recently_viewed","true");var t=document.getElementById("custom-tab-recently-viewed"),r=document.getElementById("tab-content-tab-recently-viewed"),i=t||r;if(!i||""==window.natureMade.getCookie("recently_viewed_ids"))return;var a=new XMLHttpRequest;a.onload=function(){var e=(new DOMParser).parseFromString(this.responseText,"text/html");!function(e,t){if(e&&t){var n=window.natureMade.getRecentlyViewedIds(e);if(n&&n.length){if("custom-tab-recently-viewed"==t.id)document.querySelector(".tablinks-recent").classList.remove("hide");else if("tab-content-tab-recently-viewed"==t.id){var r=parseInt(document.getElementById("tab-content-tab-recently-viewed").dataset.currentlyViewed);if(1==n.length&&n[0]==r||!n.length)return;if(document.getElementById("tab-header-tab-recently-viewed").classList.remove("hide"),n.includes(r)){var o=n.indexOf(r);n.splice(o,1)}n=n.slice(0,4)}fetch("/pages/recent-products").then((function(e){return e.json()})).then((function(e){for(var r,o="",i=0,a=0,c=n.length;a<c;a++){var l=n[a],s=getObjects(e,"product_id",l);s.length&&(o+='\n                <li class="ais-Hits-item glide__slide">\n                    '.concat(s[0].product_html,"\n                </li>\n                "),i+=1)}t.querySelector(".recent-items").innerHTML='\n            <ol class="glide__slides">\n                '.concat(o,"\n            </ol>\n            "),window.natureMade.generateSliderBullets(null===(r=t.querySelector(".slider-bullets-container"))||void 0===r?void 0:r.querySelector(".glide__bullets"),i),document.dispatchEvent(new CustomEvent("recentlyViewedProductsRetrieved",{detail:{count:n.length}}))})).catch((function(e){console.error(e)})).finally((function(){if(window.customerData&&window.customerData.wishlist){var e=window.customerData.wishlist;document.querySelectorAll(".recently-viewed-carousel .btn-heart").forEach((function(t){var n=t.dataset.handle;e.includes(n)&&t.classList.add("active")}))}}))}}}(JSON.parse(e.getElementById("shopify-section-customer-updated-recently-viewed-cards").innerHTML),i)},a.open("GET","?section_id=customer-updated-recently-viewed-cards",!0),a.send()}})).catch((function(e){console.error("Error:",e)}))}};var Fe,ze=function(){var e=document.querySelector(".default-gallery"),t=document.querySelector(".alternate-gallery");t&&e&&(t.classList.remove("hide"),Ue(t),e.classList.add("hide"))},Ge=setInterval((function(){var e=document.querySelector(".default-gallery"),t=document.querySelector(".alternate-gallery");null!=e&&e.querySelector(".main-product-image-wrapper .glide")&&null!=e&&e.querySelector(".main-product-image-wrapper .glide .glide__arrow--left")&&null!=e&&e.querySelector(".main-product-image-wrapper .glide .glide__arrow--right")&&(clearInterval(Ge),Ue(e),t&&Ue(t),document.addEventListener("variantChange",(function(){Ue(e),t&&Ue(t)})),window.addEventListener("vwo-media-test-ready",ze,{once:!0}))}),125),Ue=function(e){var t=e.querySelector(".main-product-image-wrapper .glide");if(t){e.galleryGlide&&e.galleryGlide.destroy(),e.galleryGlide=new i.A(t,{type:"slider",perView:1,focusAt:"center",gap:0,swipeThreshold:80,perTouch:1,touchRatio:.5,touchAngle:45,rewind:!0}),e.galleryGlide.on("move.after",(function(){window.natureMade.toggleGlideItemsAriaAttributes(e.galleryGlide)}
2));var n=t.querySelector(".main-product-image-wrapper .glide .glide__arrow--left"),r=t.querySelector(".main-product-image-wrapper .glide .glide__arrow--right"),o=t.querySelectorAll(".main-product-image-wrapper .glide__slide").length,a=document.querySelectorAll(".product-thumbnails li button[data-glide-index]");w(e.galleryGlide,o,n,r,!1,a),e.galleryGlide.mount()}},Je=setInterval((function(){var e=document.querySelector(".bv-write-review");e&&(clearInterval(Je),e.addEventListener("click",(function(){Xe()})))}),1e3),We=setInterval((function(){var e=document.querySelectorAll(".bv_button_component_container button");e&&(clearInterval(We),e.forEach((function(e){e.addEventListener("click",(function(){Xe()}))})))}),1e3),Qe=setInterval((function(){var e=document.querySelector("#first-to-write");e&&(clearInterval(Qe),e.addEventListener("click",(function(){Xe()})))}),1e3),Xe=function(){var e=setInterval((function(){var t=document.querySelector(".bv-mbox-lightbox");t&&(clearInterval(e),t.addEventListener("click",(function(e){e.target.classList.contains("bv-mbox-lightbox")&&document.querySelector(".bv-mbox-close").click()})))}),1e3)};if(window.location.href.indexOf("variant=")>-1)Fe=/variant=([^&]+)/.exec(window.location.href)[1];else{var $e=document.querySelector("variant-radios");Fe=$e?$e.getAttribute("data-default-variant"):null}var Ke=document.querySelector('#cart-preview-product [data-variant-id="'+Fe+'"]');Ke&&parseInt(Ke.getAttribute("data-count"));var Ye=function(e){var t=e.querySelector(".product-thumbnails-glide.glide");if(t){var n=t.querySelectorAll("li"),r=t.querySelector("ul"),o=n.length,a=function(){return window.innerWidth>=990?8.5:5.5},c=a(),l=o-c,s=new i.A(t,{type:"slider",perView:c,bound:!0,dragThreshold:!1,swipeThreshold:!1,rewind:!1,gap:0}).on("build.after",(function(){s.on(["move"],(function(){if(!(l<=0)){var e=s.index>=l?l:s.index;s.index>Math.ceil(l)&&(s.index=l);var t=e*(-100/c/(o/c));r.style.transform="translate3d(0, "+t+"% , 0)"}}))}));s.mount(),window.addEventListener("resize",window.debounce((function(){var e=a();l=o-(c=e),s.update({perView:c})}),300));var d=t.querySelector(".glide__arrow--left"),u=t.querySelector(".glide__arrow--right"),p=t.querySelectorAll(".glide__slide:not(.hide)").length;w(s,p,d,u,!0),document.querySelector("variant-selects")&&document.addEventListener("variantChange",(function(){0!=s.index&&s.go("=0"),p=t.querySelectorAll(".glide__slide:not(.hide)").length,w(s,p,d,u,!0)}))}};document.addEventListener("DOMContentLoaded",(function(){var e,t,n,r=document.querySelector("variant-selects"),o=document.querySelector("variant-radios"),i=window.swapData;document.querySelector(".product-form__submit.discontinued")||document.querySelector(".discontinue-flag:not(.hide)")||document.querySelector(".rc_widget__option_disabled")&&o&&o.querySelectorAll('input[type="radio"]').length>1&&r&&i&&o.querySelectorAll('input[type="radio"]').length!=i.discontinuedVariantIds.length?r.switchToNonDiscontinuedVariant():(o&&(o.variantDiscontinuationSet=!0),r.variantDiscontinuationSet=!0,r.dispatchEvent(new Event("change"))),e=new URLSearchParams(window.location.search).get("selling-plan"),t=document.querySelector("[data-radio-subsave]"),n=document.querySelector("[data-radio-onetime]"),t&&n&&(e?(t.setAttribute("checked",""),n.removeAttribute("checked"),t.dispatchEvent(new Event("change"))):(n.setAttribute("checked",""),t.removeAttribute("checked"),n.dispatchEvent(new Event("change"))));var a=document.querySelector(".default-gallery"),c=document.querySelector(".alternate-gallery");a&&Ye(a),c&&Ye(c),O()}));var Ze=function(e,t){if(e&&t){var n,r,o,i,a,c=document.body,l=window.scrollY,s=t.offsetHeight||0,d=(r=(n=e.getBoundingClientRect()).top,o=n.bottom,i=s,a=window.innerHeight,!(o>i&&r<a)&&l>650),u=c.classList.contains("show-sticky-bar");d&&!u&&(c.classList.add("show-sticky-bar"),document.dispatchEvent(new Event("stickyBarShown"))),!d&&u&&c.classList.remove("show-sticky-bar")}},et=setInterval((function(){if(void 0!==window.debounce){clearInterval(et);var e=document.getElementById("pdp-product-form"),t=document.getElementById("nm-header"),n=window.debounce((function(){Ze(e,t)}),100);document.addEventListener("scroll",n);var r=window.debounce((function(){Ze(e,t)}),100);document.addEventListener("resize",r)}}),1e3),tt=function(e){var t=e.closest(".tab-child-customize");if(t){var n=t.querySelector(".tab-dropdown");
2if(n){n.value=e.textContent,e.classList.add("selected","focus");var r=t.querySelector(".nice-select.tab-dropdown .current");r&&(r.textContent=e.textContent,n.classList.remove("open"))}}};window.addEventListener("DOMContentLoaded",(function(){document.querySelectorAll(".yt_play_button").forEach((function(e){e.addEventListener("click",(function(){document.body.classList.contains("youtube-lib-loaded")||window.natureMade.youtube_setup_scripts()}))})),document.addEventListener("addedToCart",(function(){fetch("".concat(window.location.origin,"/cart.js")).then((function(e){return e.clone().json().then((function(e){var t={total_price:e.total_price/100,$value:e.total_price/100,total_discount:e.total_discount,original_total_price:e.original_total_price/100,items:e.items};"undefined"!==item&&(t=Object.assign(t,item)),klaviyo.push(["track","Added to Cart",t])}))}))}));var e=document.getElementById("bundle-review-container"),t=function(){var e;null===(e=document.querySelector(".pdp-reviews-placeholder"))||void 0===e||e.addEventListener("transitionend",r,{once:!0})},r=function(e){if("opacity"===(null==e?void 0:e.propertyName)){var n=document.querySelector(".pdp-reviews-placeholder"),r=document.querySelector(".pdp-reviews-real");n&&r&&(n.style.display="none",r.classList.remove("hide"),r.classList.remove("fadeOut"))}else t()},o=function(){window.natureMade.waitForElm('[data-bv-show="inpage_submission"]').then((function(){var e=setInterval((function(){var t=document.querySelector('[data-bv-show="inpage_submission"]');t.shadowRoot&&(c(t),clearInterval(e))}),125)}))},a=function(n){BV.ui("rr","show_reviews",{productId:n,contentContainerDiv:e}).then((function(){var e,n=document.querySelector('[data-bv-show="reviews"]');c(n),null===(e=document.querySelector(".pdp-reviews-placeholder"))||void 0===e||e.classList.add("fadeOut"),t(),o()}))};!function(){var e=document.getElementById("glide-product-benefits"),t=e.querySelectorAll(".glide__slide"),n=new i.A(e,{type:"slider",perView:4,gap:0,breakpoints:{499:{perView:4},599:{perView:5},749:{perView:6},989:{perView:3},99999:{perView:4}},rewind:!1,bound:!0});n.on("move.after",(function(){window.natureMade.toggleGlideItemsAriaAttributes(n)})),n.mount();var r=function(){t.length<=n._o.perView?(n.disable(),e.classList.remove("glide--slider")):(n.enable(),e.classList.add("glide--slider"))};window.addEventListener("resize",window.debounce((function(){0!=n.index&&n.update({startAt:0}),r()}),300)),r();var o=e.querySelector(".glide__arrow--left"),a=e.querySelector(".glide__arrow--right"),c=e.querySelectorAll(".glide__slide").length;w(n,c,o,a)}();var c=function(){var e=qe(fe().mark((function e(t){var r;return fe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise((function(e){try{new CSSStyleSheet,e()}catch(t){console.warn("Browser does not support the CSSStyleSheet constructor, loading polyfill"),n.e(742).then(n.t.bind(n,3742,19)).then((function(){return e()}))}}));case 2:if(t&&window.bvCustomStyles){e.next=4;break}return e.abrupt("return");case 4:(r=new CSSStyleSheet).replaceSync(window.bvCustomStyles),t.shadowRoot.adoptedStyleSheets=[r];case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),l=function(){var e,t=document.querySelector(".pdp-reviews-real");if(t){var n=t.querySelector(".view-more--button");n&&((null===(e=t.querySelector('[data-bv-show="reviews"]'))||void 0===e||null===(e=e.shadowRoot)||void 0===e?void 0:e.querySelectorAll("#reviews_container > section").length)<=2?n.parentElement.classList.add("hidden"):n.parentElement.classList.remove("hidden"))}};window.bvCallback=function(n){if(e){var r=e.dataset.firstId;if(!r)return;a(r);var i=document.getElementById("reviewsTabDropdown");if(!i)return;i.addEventListener("change",(function(t){var n,r;r=t.target.value,document.querySelector("#product-bundle-reviews")&&e&&(e.innerHTML="",a(r));var o=null===(n=document.querySelectorAll('.tabcontent-bundle-child[data-product-id="'.concat(t.target.value,'"]'))[0])||void 0===n?void 0:n.dataset.id;o&&(document.querySelectorAll(".tab-bundle-dropdown li").forEach((function(e){return e.classList.remove("selected","focus")})),document.querySelectorAll('.tab-bundle-dropdown li[data-value="'.concat(o,'"]')).forEac
2h((function(e){tt(e)})))}))}else n.configure("global",{events:{bvRender:function(e){var n,r=document.querySelector('[data-bv-show="reviews"]');c(r),null===(n=document.querySelector(".pdp-reviews-placeholder"))||void 0===n||n.classList.add("fadeOut"),t(),0==e.TotalReviewCount&&o(),function(e){var t=document.querySelector('[data-bv-show="reviews"]').shadowRoot;if(t&&0!=e){var n="",r=t.querySelector('[aria-labelledby="bv-reviews-rating-snapshot-container"]');null==r||r.querySelectorAll('[role="button"]').forEach((function(t,r){var o=t.querySelectorAll(".primary-rating-count span");if(o.length){var i=parseInt(o[0].textContent),a=i/e*100;n+='\n        <div class="bv_histogram_row_container" aria-label="'.concat(i,' reviews with 5 stars. " aria-expanded="false" tabindex="0" role="menuitem">\n          <div class="bv_histogram_row_prefix">\n            ').concat(5-r,'\n            <span class="bv_histogram_row_star">\n              <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25" focusable="false" aria-hidden="true" class="bv-rnr__jcyw8r-0 foDTVQ"><polygon points="25 9.12 15.5669599 9.12 12.512219 0 9.40860215 9.12 0 9.12 7.55131965 14.856 4.47214076 24 12.512219 18.216 20.5522972 24 17.4731183 14.856" class="bv-rnr__jcyw8r-1 kyQYOS"></polygon><path d="" class="bv-rnr__jcyw8r-2 dolCTl"></path></svg>\n            </span>\n          </div>\n          <div class="bv_histogram_row_full_bar">\n            <div class="bv_histogram_row_bar_empty">\n              <div class="bv_histogram_row_bar_filled" style="width: ').concat(a,'% !important;"></div>\n            </div>\n          </div>\n          <div class="bv_histogram_row_rating">').concat(i,"</div>\n        </div>\n      ")}})),document.querySelectorAll(".ratingModalContainer:not(.enhanced-quote-cta)").forEach((function(t){t.innerHTML='\n        <span class="visually-hidden">Scroll down to overall review ratings block.</span>\n        <div data-bv-modal="true" class="bv_modal_component_container" role="navigation">\n          <div class="bv_modal_outer_content">\n            <div class="bv_modal_inner_content">\n              <div class="bv_histogram_component_container">\n                <div>\n                  '.concat(n,'\n                </div>\n              </div>\n              <div class="bv_button_component_container" style="text-align: center;"><button type="button" class="bv_button_buttonFull" aria-expanded="false">Read ').concat(e," Reviews</button></div>\n            </div>\n          </div>\n        </div>\n      ")}))}}(e.TotalReviewCount),function(){var e,t=document.querySelector(".pdp-reviews-real");if(t){var n,r=t.querySelector(".view-more--button");r&&((null===(e=t.querySelector('[data-bv-show="reviews"]'))||void 0===e||null===(e=e.shadowRoot)||void 0===e?void 0:e.querySelector("#reviews_container"))?r.addEventListener("click",(function(){var e,n;if(t.classList.toggle("expanded"),t.classList.contains("expanded"))return null===(n=t.querySelector('[data-bv-show="reviews"]'))||void 0===n||null===(n=n.shadowRoot)||void 0===n||null===(n=n.querySelector("#reviews_container"))||void 0===n||n.classList.add("expanded"),void r.setAttribute("aria-expanded","true");null===(e=t.querySelector('[data-bv-show="reviews"]'))||void 0===e||null===(e=e.shadowRoot)||void 0===e||null===(e=e.querySelector("#reviews_container"))||void 0===e||e.classList.remove("expanded"),r.setAttribute("aria-expanded","false"),r.scrollIntoView({behavior:"smooth",block:"center"})})):null===(n=r.closest(".view-more-button--container"))||void 0===n||n.remove())}}(),l(),function(){var e,t=document.querySelector(".pdp-reviews-real");if(t){var n,r=(null===(e=t.querySelector('[data-bv-show="reviews"]'))||void 0===e||null===(e=e.shadowRoot)||void 0===e?void 0:e.querySelector("#bv_review_maincontainer")).parentElement.querySelector('[role="alert"]');r&&(n=r,new MutationObserver((function(e){!function(){if(e[0].target.textContent.includes("filtered")){var n;if(t.classList.contains("expanded"))return;null===(n=t.querySelector('[data-bv-show="reviews"]'))||void 0===n||null===(n=n.shadowRoot)||void 0===n||null===(n=n.querySelector("#reviews_container"))||void 0===n||n.classList.add("expanded"),t.classList.add("expanded")}else{var r;if(!t.classList.contains("expanded"))return;null===(r=t.querySelector('[data-bv-show="reviews"]'))||void 0===r||null===(r=r.shadowRoot)||void 0===r||null===(r=r.querySelector("#reviews_container"))||void 0===r||r.classList.remove("expanded"),t.classList.remove("expanded")}}(),l()})).observe(n,{attributes:!1,childList:!0,subtree:!1}))}}()},submissionLoad:function(){var e=document.querySelector('[data-bv-show="inpage_submission"]');c(e)}}})}}));var nt=function(e){function t(){var e,n,r,o,i,a;return Ee(this,t),o=r=xe(this,t),i="onScrollHandler",a=window.debounce(r.toggleButtons.bind(r),100),(i=Oe(i))in o?Object.defineProperty(o,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):o[i]=a,r.container=document.getElementById("compare-products"),r.container?(r.arrowLeft=null===(e=r.container.querySelector(".comparison-table-arrows"))||void 0===e?void 0:e.querySelector(".glide__arrow--left"),r.arrowRight=null===(n=r.container.querySelector(".comparison-table-arrows"))||void 0===n?void 0:n.querySelector(".glide__arrow--right"),r.scrollableParent=r.container.querySelector(".algolia-compare-products"),r.showMoreBtn=r.container.querySelector(".comparison-show-more"),r.arrowRight&&r.arrowLeft&&r.scrollableParent?r:Ie(r)):Ie(r)}
2return Pe(t,e),Ae(t,[{key:"connectedCallback",value:function(){var e=this;this.arrowLeft.style=this.arrowRight.style="",this.arrowLeft.addEventListener("click",this.onArrowClickHandler.bind(this)),this.arrowRight.addEventListener("click",this.onArrowClickHandler.bind(this)),this.scrollableParent.addEventListener("scroll",this.onScrollHandler.bind(this)),new ResizeObserver((function(t){return e.onResize()})).observe(this.scrollableParent),this.updateShowMoreButtonPosition()}},{key:"onResize",value:function(){this.scrollableParent.scrollWidth>this.scrollableParent.clientWidth?this.toggleButtons():(this.hideButtons(),this.toggleCompareProductsAriaVisibility())}},{key:"toggleButtons",value:function(){this.toggleCompareProductsAriaVisibility(),Math.floor(this.scrollableParent.scrollLeft<=0)?this.arrowLeft.classList.add("hidden"):this.arrowLeft.classList.contains("hidden")&&this.arrowLeft.classList.remove("hidden"),Math.ceil(this.scrollableParent.scrollLeft)+this.scrollableParent.clientWidth>=this.scrollableParent.scrollWidth&&!this.arrowRight.classList.contains("hidden")?this.arrowRight.classList.add("hidden"):this.arrowRight.classList.contains("hidden")&&this.arrowRight.classList.remove("hidden")}},{key:"hideButtons",value:function(){this.arrowLeft.classList.add("hidden"),this.arrowRight.classList.add("hidden")}},{key:"isInViewportCheckX",value:function(e){var t=e.getBoundingClientRect();return t.left>=-10&&t.right<=(window.innerWidth||document.documentElement.clientWidth)+.35*e.offsetWidth}},{key:"toggleCompareProductsAriaVisibility",value:function(){var e,t=this,n=null===(e=this.container.querySelector(".ais-Hits-list"))||void 0===e?void 0:e.querySelectorAll("li.ais-Hits-item");n&&n.forEach((function(e){t.isInViewportCheckX(e)?(e.removeAttribute("aria-hidden"),e.querySelectorAll("a,button,input").forEach((function(e){e.removeAttribute("tabindex")}))):(e.setAttribute("aria-hidden",!0),e.querySelectorAll("a,button,input").forEach((function(e){e.setAttribute("tabindex",-1)})))}))}},{key:"onArrowClickHandler",value:function(e){var t,n,r=document.getElementById("compare-products"),o=(null===(t=r.querySelector("ol.ais-Hits-list"))||void 0===t?void 0:t.querySelector("li.ais-Hits-item"))||(null===(n=r.querySelector("ul.ais-Hits-list"))||void 0===n?void 0:n.querySelector("li.ais-Hits-item")),i=0==o.offsetWidth?300:o.offsetWidth,a=e.currentTarget.classList.contains("glide__arrow--right");this.scrollableParent.scroll({top:this.scrollableParent.scrollTop,left:this.scrollableParent.scrollLeft+(a?i:-1*i),behavior:"smooth"})}},{key:"updateShowMoreButtonPosition",value:function(){/iPad|iPhone|iPod/.test(navigator.userAgent)&&this.showMoreBtn.classList.add("ios")}}])}(Ce(HTMLElement));customElements.define("comparison-table-arrows",nt);var rt=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;t.addEventListener("transitionend",(function(r){"height"===(null==r?void 0:r.propertyName)?window.natureMade.scrollToElm(n):e(t)}),{once:!0})},ot=document.querySelector(".algolia-compare-products-wrapper");if(ot){var it=ot.querySelector(".algolia-compare-products"),at=document.querySelector(".comparison-show-more-btn");at.addEventListener("click",(function(){var e=at.querySelector(".btn-label");if(e&&it){var t=at.getBoundingClientRect().top;ot.classList.contains("show-all")?(ot.classList.remove("show-all"),e.innerText="View More",at.setAttribute("aria-expanded",!1),requestAnimationFrame((function(){var e=at.getBoundingClientRect().top-t;window.scrollBy({top:e,behavior:"instant"})}))):(ot.classList.add("show-all"),e.innerText="View Less",at.setAttribute("aria-expanded",!0)),v()}}))}window.addEventListener("load",(function(){if(document.body.classList.contains("page-type__product")&&fetch(window.location.href).then((function(e){return e.text()})).then((function(e){var t=e,n=(new DOMParser).parseFromString(t,"text/html").querySelector(".cart-preview-products");document.querySelector(".cart-preview-products").innerHTML=n.innerHTML;var r=document.querySelector(".coming-soon-pdp");window.natureMade.updateQtySelector(r)})),/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){var e=document.querySelector(".tap-to-zoom");e&&(e.style.display="block")}})),document.querySelectorAll(".button-modal").forEach((function(e){e.addEventListener("click",(function(){var t="#".concat(e.dataset.open);pe.lX.show([{src:t,type:"inline"}],{mainClass:"more-information-modal",compact:!0})}
2))}));var ct=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e){var n=e.querySelector(".extend-bundle-module"),r=e.querySelectorAll(".pdp-details-section");n&&(t?(n.classList.remove("extended"),r.forEach((function(e){return e.classList.remove("full-height")})),rt(e)):(n.classList.add("extended"),r.forEach((function(e){return e.classList.add("full-height")}))))}};document.querySelectorAll(".btn-extend-module").forEach((function(e){e.addEventListener("click",(function(){if(!(window.innerWidth>=640)){var t=e.closest(".pdp-details-section"),n=t.querySelector(".pdp-details-section-inner"),r=t.closest(".bundle-product-tabs");t&&n&&(t.classList.contains("full-height")?(ct(r,!0),r||(t.classList.remove("full-height"),rt(t))):(t.classList.add("full-height"),ct(r)),e.setAttribute("aria-expanded",t.classList.contains("full-height")))}}))})),document.querySelectorAll(".extend-bundle-module").forEach((function(e){e.addEventListener("click",(function(){var t=e.closest(".bundle-product-tabs");window.innerWidth>=640||!t||(e.classList.contains("extended")?t.querySelectorAll(".pdp-details-section").forEach((function(t){e.classList.remove("extended"),t.classList.remove("full-height"),e.setAttribute("aria-expanded","false")})):t.querySelectorAll(".pdp-details-section").forEach((function(t){e.classList.add("extended"),t.classList.add("full-height"),e.setAttribute("aria-expanded","true")})))}))})),document.querySelectorAll(".tab-bundle-dropdown").forEach((function(e){e.addEventListener("change",(function(e){!function(e){var t=document.querySelectorAll(".".concat(e));if(t.length){var n=document.querySelectorAll('.nice-select.tab-bundle-dropdown li[data-value="'.concat(e,'"]'));document.querySelectorAll(".tabcontent-bundle-child").forEach((function(e){return e.classList.add("hide")})),document.querySelectorAll(".tab-bundle-dropdown li").forEach((function(e){return e.classList.remove("selected","focus")})),t.forEach((function(e){e.classList.remove("hide")})),n.forEach((function(e){tt(e)})),document.getElementById("bundle-review-container")&&t.length&&(window.natureMade.waitForElm(".pdp-reviews-placeholder.fadeOut").then((function(){var e=t[0].dataset.productId;if(e){var n=document.querySelector('#bundle-reviews-tabs nm-select .list li[data-value="'.concat(e,'"]'));document.querySelectorAll("#bundle-reviews-tabs nm-select .list li.focus").forEach((function(e){e.classList.remove("selected","focus")})),n&&tt(n)}})),document.dispatchEvent(new CustomEvent("bundle tab:change")))}}(e.target.value)}))})),document.querySelectorAll(".ratingModalContainer").forEach((function(e){e.addEventListener("click",(function(){var e=document.getElementById("pdp-reviews-section");if(e){var t=document.getElementById("nm-header"),n=null;screen.width<=767&&(n=t?"".concat(t.offsetHeight+32):null),window.natureMade.scrollToElm(e,n),function(){var e,t=document.querySelector(".pdp-reviews-real");if(t){var n=null===(e=t.querySelector('[data-bv-show="reviews"]'))||void 0===e||null===(e=e.shadowRoot)||void 0===e?void 0:e.querySelector("#reviews_container");n&&(n.classList.add("expanded"),t.classList.add("expanded"))}}()}}))})),document.querySelectorAll(".pdp-glide-marketing-slider").forEach((function(e){return function(e){var t=e.id;if(t){window.updateSlider||(window.updateSlider={});var n=function(){var t=e.querySelector(".marketing-slide.glide__slide--active a"),n=e.querySelector(".glide__track-marketing");t&&n&&(n.style.height="".concat(t.offsetHeight,"px"))},r=new i.A(e,{type:"slider",perView:1,gap:0,rewind:!1,bound:!0}).mount();n(),window.updateSlider[t]=r;var o=e.querySelector(".glide__arrow--left"),a=e.querySelector(".glide__arrow--right"),c=e.querySelectorAll(".glide__slide").length;w(r,c,o,a),r.on("move.after",(function(){n(),window.natureMade.toggleGlideItemsAriaAttributes(r)})),window.natureMade.toggleSliderBullets(window.updateSlider[t]),window.addEventListener("resize",window.debounce((function(){var e=r.index;window.updateSlider[t]||0==e||r.go("=0"),n()}),300))}}(e)})),document.querySelectorAll(".share-btn").forEach((function(e){var t;navigator.share&&(null===(t=e.closest("li"))||void 0===t||t.classList.remove("hide"),e.addEventListener("click",qe(fe().mark((function e(){return fe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,navigator.share({title:window.metafieldGlobalSettings.product_share_subject,text:window.metafieldGlobalSettings.product_share_body});case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.error("Share failed:",e.t0);case 8:case"end":return e.stop()}}),e,null,[[0,5]])})))))}))}},a={};function c(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={exports:{}};return i[e](n,n.exports,c),n.exports}c.m=i,e=[],c.O=(t,n,r,o)=>{if(!n){var i=1/0;for(d=0;d<e.length;d++){for(var[n,r,o]=e[d],a=!0,l=0;l<n.length;l++)(!1&o||i>=o)&&Object.keys(c.O).every((e=>c.O[e](n[l])))?n.splice(l--,1):(a=!1,o<i&&(i=o));if(a){e.splice(d--,1);var s=r();void 0!==s&&(t=s)}}return t}o=o||0;for(var d=e.length;d>0&&e[d-1][2]>o;d--)e[d]=e[d-1];e[d]=[n,r,o]},n=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,c.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;
2if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var o=Object.create(null);c.r(o);var i={};t=t||[null,n({}),n([]),n(n)];for(var a=2&r&&e;"object"==typeof a&&!~t.indexOf(a);a=n(a))Object.getOwnPropertyNames(a).forEach((t=>i[t]=()=>e[t]));return i.default=()=>e,c.d(o,i),o},c.d=(e,t)=>{for(var n in t)c.o(t,n)&&!c.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},c.f={},c.e=e=>Promise.all(Object.keys(c.f).reduce(((t,n)=>(c.f[n](e,t),t)),[])),c.u=e=>"theme-bundle."+e+".js",c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},o="nature-made-shopify-theme:",c.l=(e,t,n,i)=>{if(r[e])r[e].push(t);else{var a,l;if(void 0!==n)for(var s=document.getElementsByTagName("script"),d=0;d<s.length;d++){var u=s[d];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==o+n){a=u;break}}a||(l=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,c.nc&&a.setAttribute("nonce",c.nc),a.setAttribute("data-webpack",o+n),a.src=e),r[e]=[t];var p=(t,n)=>{a.onerror=a.onload=null,clearTimeout(f);var o=r[e];if(delete r[e],a.parentNode&&a.parentNode.removeChild(a),o&&o.forEach((e=>e(n))),t)return t(n)},f=setTimeout(p.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=p.bind(null,a.onerror),a.onload=p.bind(null,a.onload),l&&document.head.appendChild(a)}},c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;c.g.importScripts&&(e=c.g.location+"");var t=c.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c.p=e})(),(()=>{var e={185:0};c.f.j=(t,n)=>{var r=c.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise(((n,o)=>r=e[t]=[n,o]));n.push(r[2]=o);var i=c.p+c.u(t),a=new Error;c.l(i,(n=>{if(c.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;a.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",a.name="ChunkLoadError",a.type=o,a.request=i,r[1](a)}}),"chunk-"+t,t)}},c.O.j=t=>0===e[t];var t=(t,n)=>{var r,o,[i,a,l]=n,s=0;if(i.some((t=>0!==e[t]))){for(r in a)c.o(a,r)&&(c.m[r]=a[r]);if(l)var d=l(c)}for(t&&t(n);s<i.length;s++)o=i[s],c.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return c.O(d)},n=self.webpackChunknature_made_shopify_theme=self.webpackChunknature_made_shopify_theme||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var l=c.O(void 0,[466,636,534,777,197,532],(()=>c(5180)));l=c.O(l)})();

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.