'use strict';((n,t,d)=>{const v=(a,b)=>{const c=d.createElement("div"),e=d.createElement("div"),f=d.createElement("div"),g=d.createElement("div"),p=a.querySelector("form.cart"),k=a.classList.contains("tbp_template")?a.querySelector(".module-product-title .tbp_title"):a.querySelector(".product_title"),q=a.getElementsByClassName("price")[0];var h=a.getElementsByClassName("woocommerce-product-gallery__image")[0];const u=d.getElementById("tf_sticky_form_wrap");c.className="tf_box pagewidth clearfix";
e.id=a.id;e.className=a.classList;f.className="tf_sticky_prod_img";if(void 0!==h){const l=d.createElement("div");l.className="images";l.appendChild(h.cloneNode(!0));f.appendChild(l)}g.className="summary entry-summary";null!==k&&(h=d.createElement("span"),h.className=k.className,h.innerHTML=k.innerHTML,g.appendChild(h));void 0!==q&&g.appendChild(q.cloneNode(!0));f.appendChild(g);e.appendChild(f);u.style.height=p.getBoundingClientRect().height+"px";e.appendChild(p);c.appendChild(e);b.appendChild(c);
m(a.classList.contains("tbp_template")?a:d.getElementById("pagewrap"),b,"show")},m=(a,b,c)=>{a.style.paddingBottom="show"===c?b.getBoundingClientRect().height+"px":""},r=(a,b,c)=>{const e=d.getElementById("tf_sticky_form_wrap"),f="hide"===c?b.querySelector("form.cart"):d.querySelector("form.cart"),g=t(".variations_form");f&&("hide"===c?(e.appendChild(f),e.style.height=""):(e.style.height=f.getBoundingClientRect().height+"px",b.getElementsByClassName("product")[0].appendChild(f)),0<g.length&&g.trigger("check_variations"),
m(a,b,c))};n.on("tf_sticky_buy_init",(a,b)=>{const c=a.classList.contains("tbp_template")?a:d.getElementById("pagewrap");n.on("tfsmartresize",()=>{m(c,b,b.classList.contains("tf_st_show")?"show":"hide")});v(a,b);(new IntersectionObserver(e=>{!e[0].isIntersecting&&0>e[0].boundingClientRect.top?(r(c,b,"show"),b.classList.add("tf_st_show")):(r(c,b,"hide"),b.classList.remove("tf_st_show"))})).observe(d.getElementById("tf_sticky_buy_observer"))},!0)})(Themify,jQuery,document);
