File: /var/www/html/wptoho/wp-content/themes/themify-ultra/themify/js/modules/sticky-buy.js
((t,$,e)=>{"use strict";const i=(t,e,i)=>{t.style.paddingBottom="show"===i?e.getBoundingClientRect().height+"px":""},o=(t,o,r)=>{const s=e.tfId("tf_sticky_form_wrap"),_="hide"===r?o.querySelector("form.cart"):e.querySelector("form.cart"),c=$(".variations_form");_&&("hide"===r?(s.appendChild(_),s.style.height=""):(s.style.height=_.getBoundingClientRect().height+"px",o.tfClass("product")[0].appendChild(_)),c.length>0&&c.trigger("check_variations"),i(t,o,r))};t.on("tf_sticky_buy_init",(r=>{const s=e.querySelector("#content .product,.tbp_template.product"),_=s.classList.contains("tbp_template")?s:e.tfId("pagewrap"),c=e.createElement("div");c.id="tf_sticky_buy",c.className="tf_opacity tf_abs tf_w",s.after(c),t.on("tfsmartresize",(()=>{i(_,c,c.classList.contains("tf_st_show")?"show":"hide")})),((t,o)=>{const r=e.createElement("div"),s=e.createElement("div"),_=e.createElement("div"),c=e.createElement("div"),p=t.querySelector("form.cart"),a=t.classList.contains("tbp_template")?t.querySelector(".module-product-title .tbp_title"):t.querySelector(".product_title"),f=t.tfClass("price")[0],m=t.tfClass("woocommerce-product-gallery__image")[0],d=e.tfId("tf_sticky_form_wrap");if(r.className="tf_box pagewidth clearfix",s.id=t.id,s.className=t.classList,_.className="tf_sticky_prod_img",void 0!==m){const t=e.createElement("div");t.className="images",t.appendChild(m.cloneNode(!0)),_.appendChild(t)}if(c.className="summary entry-summary",null!==a){const t=e.createElement("span");t.className=a.className,t.innerHTML=a.innerHTML,c.appendChild(t)}void 0!==f&&c.appendChild(f.cloneNode(!0)),_.appendChild(c),s.appendChild(_),d.style.height=p.getBoundingClientRect().height+"px",s.appendChild(p),r.appendChild(s),o.appendChild(r),i(t.classList.contains("tbp_template")?t:e.tfId("pagewrap"),o,"show")})(s,c);new IntersectionObserver((t=>{!t[0].isIntersecting&&t[0].boundingClientRect.top<0?(o(_,c,"show"),c.classList.add("tf_st_show")):(o(_,c,"hide"),c.classList.remove("tf_st_show"))})).observe(r)}),!0)})(Themify,jQuery,document);