((t,e,o,i)=>{"use strict";let l,n,r=null;const s=o.createElement("div"),f=e=>{requestAnimationFrame((()=>{let o=e.clientX,i=e.clientY;l===o&&n===i||(l=o,n=i,s.style.left=o+"px",s.style.top=i+"px",s.classList.toggle("left",o>t.w/2),s.classList.toggle("top",i>t.h/2))}))},p=(e,i)=>{i.tfOn("pointerenter",(function(l){if(!0===r){e.classList.remove("tf_hide"),f(l);const n=()=>{i.tfOff("pointermove",f),e.classList.add("tf_hide")};this.tfOn("pointermove",f,{passive:!0}),(t.isTouch?o.body:this).tfOn("pointerleave",n,{once:!0,passive:!0}),t.isTouch&&o.tfOn("scroll",n,{once:!0,passive:!0})}}),{passive:!0})},m=()=>{null===r&&t.loadCss("tooltip").then((()=>{r=!0}));const e=i.builder_tooltips,l=o.createDocumentFragment();if(e)for(let t in e){let i=o.tfClass("themify_builder_content-"+t),n=e[t];for(let t=i.length-1;t>-1;--t)for(let e in n){const r=i[t].tfClass("tb_"+e);if(!(r.length<1))for(let t=r.length-1;t>-1;--t){let i=o.createElement("div"),s=r[t].classList,f=1;s.contains("module_row")?f=5:s.contains("tb-column")?f=4:s.contains("module_subrow")?f=3:s.contains("sub_column")&&(f=2),i.className="tf_tooltip tf_hide order-"+f,n[e].c&&(i.style.color=n[e].c),n[e].bg&&(i.style.backgroundColor=n[e].bg),n[e].w&&(i.style.width=n[e].w),i.insertAdjacentHTML("beforeend",n[e].t),p(i,r[t]),l.appendChild(i)}}}const n=i.menu_tooltips;if(n?.length>0)for(let t=n.length-1;t>-1;--t){let e=o.querySelector(n[t]);if(e)for(let t=e.querySelectorAll(".menu-item a[title]"),i=t.length-1;i>-1;--i){let e=o.createElement("div");e.className="tf_tooltip tf_hide",e.textContent=t[i].title||"",p(e,t[i]),t[i].removeAttribute("title"),l.appendChild(e)}}s.className="tf_tooltip_wrap",s.appendChild(l),requestAnimationFrame((()=>{o.body.appendChild(s)}))};!0===e.loaded?t.requestIdleCallback(m,200):e.tfOn("load",m,{once:!0,passive:!0})})(Themify,window,document,themify_vars);