PageSourceSearch

https://www.botanicchoice.com/assets/main.js?v=639217144893012855

js botanicchoice.com collected 2026-09-26 02:16:26 UTC 4,314 bytes, 16 lines download raw bytes

1import{m as u,h as m}from"./module.esm.D-P867oX.js";import{i as g}from"./sentry.Bdw53eRD.js";g();window.Alpine=u;u.start();function h(){const t=document.querySelector('dialog[x-ref="ageDialog"]'),e=document.querySelector("#ageConfirmYes"),n=document.querySelector("#ageConfirmNo");return!t||!e||!n?Promise.resolve(!1):new Promise(o=>{let i=!1;const r=d=>{i||(i=!0,e.removeEventListener("click",a),n.removeEventListener("click",c),t.removeEventListener("close",s),t.close(),o(d))},a=()=>r(!0),c=()=>r(!1),s=()=>r(!1);e.addEventListener("click",a),n.addEventListener("click",c),t.addEventListener("close",s),t.showModal()})}async function y(t){var i,r,a,c;document.dispatchEvent(new CustomEvent("cart:add",{detail:t}));const e=t.qty??1,n=s=>{const d=new URLSearchParams({edp_no:t.product.id.toString(),qty:e.toString()});return s&&d.set("age_confirmed","1"),fetch(`/shop.axd/AddToMiniCartBP?${d}`,{method:"POST",headers:{"X-Requested-With":"XMLHttpRequest"}})};let o=await n(!1);if(o.status===409){if(!await h())return;o=await n(!0)}if(!o.ok){console.error("Error adding item to cart");return}window.dataLayer&&window.dataLayer.push({event:"add_to_cart",ecommerce:{currency:"USD",value:(i=t.product)==null?void 0:i.price,items:[{item_id:t.product.id,item_name:t.product.name,item_brand:((r=t.product)==null?void 0:r.brand)||"",price:(a=t.product)==null?void 0:a.price,quantity:((c=t.product)==null?void 0:c.qty)||1}]}}),t.showCart&&await f(!0),document.dispatchEvent(new CustomEvent("cart:add:success",{detail:t}))}async function v(t){if(!(await fetch("/shop.axd/UpdateCartBP",{method:"POST",body:new URLSearchParams({delete_cart_line_id:t.lineItemId.toString(),id:t.lineItemId.toString()})})).ok){console.error("Error removing item to cart");return}}async function L(){document.querySelector("#signupDialogContent").innerHTML="",await m.ajax("GET","/shop.axd/Partial?component=signup",{target:"#signupDialogContent",swap:"innerHTML",indicator:"#signupLoading"})}async function w(){document.querySelector("#cartDialogItems").innerHTML="",await m.ajax("GET","/shop.axd/Partial?component=cart",{target:"#cartDialogItems",swap:"innerHTML",indicator:"#cartLoading"});const t=document.querySelector("#cart-qty-val"),e=document.querySelector(".cart-qty-indicator");e.innerHTML=t.value,parseInt(t.value)>0?e.classList.remove("hidden"):e.classList.add("hidden")}async function f(t=!1){t&&await w(),document.querySelector('dialog[x-ref="cartDialog"]').showModal()}document.addEventListener("scroll",function(){const t=document.documentElement.scrollTop||document.body.scrollTop,e=document.querySelector("#headerNav"),n=document.querySelector("#shopByButton");t>200&&(e.classList.add("lg:hidden"),n.classList.add("lg:block")),t<100&&(e.classList.remove("lg:hidden"),n.classList.remove("lg:block"))});document.addEventListener("DOMContentLoaded",function(){window.AddToCart=y,window.RefreshCart=w,window.ShowCart=f,window.RemoveFromCart=v,window.ShowSignup=L,setTimeout(p,6e3)});function l(t){p(),t.currentTarget.removeEventListener(t.type,l)}document.addEventListener("scroll",l);document.addEventListener("mousemove",l);document.addEventListener("touchstart",l);function p(){var n;if(window.gtmDidInit)return!1;window.gtmDidInit=!0,console.log("GTM Initialized"),(n=document.getElementById("hs_show_banner_button"))==null||n.addEventListener("click",()=>{var o;(o=window==null?void 0:window._hsp)==null||o.push(["showBanner"])});const t=document.createElement("script");t.type="text/javascript",t.async=!0,t.onload=()=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"gtm.js","gtm.start":new Date().getTime(),"gtm.uniqueEventId":0})},t.src="https://www.googletagmanager.com/gtm.js?id=GTM-MBWD3C",document.head.appendChild(t);const e=document.createElement("style");e.textContent=`
2      @font-face {
3        font-display: swap;
4        font-family: 'PT Sans';
5        font-style: normal;
6        font-weight: 400;
7        src: url('https://www.botanicchoice.com/fonts/pt-sans-v18-latin-regular.woff2') format('woff2');
8      }
9      @font-face {
10        font-display: swap;
11        font-family: 'PT Sans';
12        font-style: normal;
13        font-weight: 700;
14        src: url('https://www.botanicchoice.com/fonts/pt-sans-v18-latin-700.woff2') format('woff2');
15      }
16    `,document.head.appendChild(e)}

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.