!function(e,t){var i=document.createElement("div"),s=function(t){this.options=e.extend(!0,{id:"__MUI_PREVIEWIMAGE",zoom:!0,header:'',footer:""},t||{}),this.init(),this.initEvent()},n=s.prototype;n.init=function(){var t=this.options,s=document.getElementById(this.options.id);s||(i.innerHTML='
{{header}}
'.replace(/\{\{id\}\}/g,this.options.id).replace("{{header}}",t.header).replace("{{footer}}",t.footer),document.body.appendChild(i.firstElementChild),s=document.getElementById(this.options.id)),this.element=s,this.scroller=this.element.querySelector(e.classSelector(".slider-group")),this.indicator=this.element.querySelector(e.classSelector(".preview-indicator")),this.loader=this.element.querySelector(e.classSelector(".preview-loading")),t.footer&&this.element.querySelector(e.classSelector(".preview-footer")).classList.remove(e.className("hidden")),this.addImages()},n.initEvent=function(){var t=this;e(document.body).on("click","img[data-preview-src]",function(){return!t.isAnimationing()&&(t.open(this),!1)});var i=null,s=function(){!i&&(i=e.later(function(){t.isInAnimation=!0,t.loader.removeEventListener("tap",s),t.scroller.removeEventListener("tap",s),t.close()},300))};this.scroller.addEventListener("doubletap",function(){i&&(i.cancel(),i=null)}),this.element.addEventListener("webkitAnimationEnd",function(){t.element.classList.contains(e.className("preview-out"))?(t.element.style.display="none",t.element.classList.remove(e.className("preview-out")),i=null):(t.loader.addEventListener("tap",s),t.scroller.addEventListener("tap",s)),t.isInAnimation=!1}),this.element.addEventListener("slide",function(i){if(t.options.zoom){var s=t.element.querySelector(".mui-zoom-wrapper:nth-child("+(t.lastIndex+1)+")");s&&e(s).zoom().setZoom(1)}var n=i.detail.slideNumber;t.lastIndex=n,t.indicator&&(t.indicator.innerText=n+1+"/"+t.currentGroup.length),t._loadItem(n)})},n.isAnimationing=function(){return!!this.isInAnimation||(this.isInAnimation=!0,!1)},n.addImages=function(e,t){this.groups={};var i=[];if((i=e?"__DEFAULT"===e?document.querySelectorAll("img[data-preview-src]:not([data-preview-group])"):document.querySelectorAll("img[data-preview-src][data-preview-group='"+e+"']"):document.querySelectorAll("img[data-preview-src]")).length)for(var s=0,n=i.length;st.innerHeight||o>t.innerWidth||l<0||o<0?(n.style.opacity=0,n.style.webkitTransitionDuration="0.5s",n.style.webkitTransform="scale("+a.sScale+")"):(this.options.zoom&&e(n.parentNode.parentNode).zoom().toggleZoom(0),n.style.webkitTransitionDuration="0.5s",n.style.webkitTransform="translate3d("+r.x+"px,"+r.y+"px,0) scale("+a.sScale+")")}for(var d=this.element.querySelectorAll(e.classSelector(".zoom-wrapper")),c=0,m=d.length;c