"use strict";(self.webpackChunk_brizy_builder_free=self.webpackChunk_brizy_builder_free||[]).push([["139"],{6942(e,t,r){r.r(t),r.d(t,{default:()=>a});var n=r(1669),o=r.n(n);function l(e){let t=document.createElement("div");return t.innerHTML=e.trim(),t.firstElementChild}let i=()=>{let e=1,t=document.querySelector(".mfp-content .mfp-figure");if(!t)return;let r=(e=>{let t=l('<svg viewBox="0 0 16 16" width="1em" height="1em" class="zoom-in" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6.667 1.333a5.333 5.333 0 1 1 0 10.667 5.333 5.333 0 0 1 0-10.667z" stroke="currentColor"/><path d="m14 14-2.9-2.9M6.667 4.667v4m-2-2h4" stroke="currentColor" stroke-linecap="round"/></svg>'),r=l('<svg viewBox="0 0 16 16" width="1em" height="1em" class="zoom-out" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6.667 1.333a5.333 5.333 0 1 1 0 10.667 5.333 5.333 0 0 1 0-10.667z" stroke="currentColor"/><path d="m14 14-2.9-2.9M4.667 6.667h4" stroke="currentColor" stroke-linecap="round"/></svg>');if(!t||!r)return null;let n=document.createElement("div");return n.className="brz-lightbox-controls",n.append(t),n.append(r),e.insertAdjacentElement("afterbegin",n),n})(t);if(!r)return;let n=r.querySelector(".zoom-in"),o=r.querySelector(".zoom-out");n&&o&&(n.addEventListener("click",t=>{t.stopPropagation(),e=Math.min(e+.2,3);let r=document.querySelector(".mfp-img");r&&(r.style.transform=`scale(${e})`,r.style.transformOrigin="center center")}),o.addEventListener("click",t=>{t.stopPropagation(),e=Math.max(e-.2,1);let r=document.querySelector(".mfp-img");r&&(r.style.transform=`scale(${e})`,r.style.transformOrigin="center center")}))};function a(e){let t=e.get(0);t&&t.querySelectorAll(".brz-image__lightbox").forEach(e=>{e.addEventListener("click",t=>{t.preventDefault(),t.stopPropagation(),e.querySelector("a")&&o()(e).magnificPopup({delegate:"a",type:"image",closeOnContentClick:!0,callbacks:{open:i}}).magnificPopup("open")})})}}}]);