((a,o)=>{'use strict';const n=ThemifyBuilderModuleJs.cssUrl+'gallery_styles/',r=new Set;let c=o.tfId('tb_inline_styles');a.on('builder_load_module_partial',(e,l)=>{if(!0!==l||e.classList.contains('module-gallery')){const t=a.selectWithParent('module-gallery',e),i=[];for(let e=t.length-1;-1.gutter-sizer{width:'+a+'%}'),!r.has(t)){r.add(t);let e=parseFloat((100-(t-1)*a)/t).toFixed(2).replace('.00','');l+='.gallery-columns-'+t+'.masonry-done .gallery-item{width:'+e+'%}'}''!==l&&(null===c?((c=o.createElement('style')).textContent=l,o.head.prepend(c)):c.innerText+=l),i.push(s)}}}0{if(l){let e=t.className.match(/tb_?.[^\s]+/);e=null!==e&&void 0!==e[0]?e[0]:'module-gallery',t.innerHTML=l.querySelector('.'+e).innerHTML,a.lazyLoading(t)}}).finally(()=>{l.remove('builder_gallery_load')})}).on('click','.layout-showcase.module-gallery a',function(e){e.preventDefault(),e.stopPropagation();const l=this.closest('.gallery').tfClass('gallery-showcase-image')[0],t=l.tfClass('gallery-showcase-title')[0],a=l.tfClass('gallery-showcase-title-text')[0],s=l.tfClass('gallery-showcase-caption')[0],i=l.tfTag('img')[0],o=this.dataset.image,n=new Image;if(t){const r=t.style;t.innerText.trim()?r.opacity=r.visibility='':(r.opacity=0,r.visibility='hidden')}l.classList.add('tf_lazy'),n.decoding='async',n.alt=this.tfTag('img')[0].alt,a&&(a.innerHTML=this.title),s&&(s.innerHTML=this.dataset.caption),n.src=o,n.decode().catch(()=>{}).finally(()=>{i.replaceWith(n),l.classList.remove('tf_lazy')})})})(Themify,document);