(function () { 'use strict'; /* * medium-zoom v0.2.0 * Medium zoom on your images in vanilla JavaScript * Copyright 2017 Francois Chalifour * https://github.com/francoischalifour/medium-zoom * MIT License */function __$styleInject(a,b){if('undefined'==typeof document){ return b; }a=a||'';var c=document.head||document.getElementsByTagName('head')[0],d=document.createElement('style');return d.type='text/css',c.appendChild(d),d.styleSheet?d.styleSheet.cssText=a:d.appendChild(document.createTextNode(a)),b}function createCommonjsModule(a,b){return b={exports:{}},a(b,b.exports),b.exports}var _extends=Object.assign||function(a){for(var b,c=1;cz.scrollOffset&&r(150);}},x=function(a){c.includes(a.keyCode||a.which)&&r();},y=function(){var a=Math.min;if(C.template){var b=window.innerWidth,c=window.innerHeight,d=b-2*z.margin,e=c-2*z.margin,f=C.zoomedHd||C.template,g=f.naturalWidth,h=void 0===g?d:g,i=f.naturalHeight,j=void 0===i?e:i,k=f.getBoundingClientRect(),l=k.top,m=k.left,n=k.width,o=k.height,p=a(h,d)/n,q=a(j,e)/o,r=a(p,q)||1,s=(-m+(d-n)/2+z.margin)/r,t=(-l+(e-o)/2+z.margin)/r,u='scale('+r+') translate3d('+s+'px, '+t+'px, 0)';C.zoomed.style.transform=u,C.zoomedHd&&(C.zoomedHd.style.transform=u);}},z={margin:j,background:l,scrollOffset:n,metaClick:void 0===o||o};a instanceof Object&&_extends(z,a);var A=function(a){try{return Array.isArray(a)?a.filter(d):f(a)?[].concat(toConsumableArray(a)).filter(d):g(a)?[a].filter(d):'string'==typeof a?[].concat(toConsumableArray(document.querySelectorAll(a))).filter(d):[].concat(toConsumableArray(document.querySelectorAll(b.map(function(a){return a.toLowerCase()}).join(',')))).filter(e)}catch(a){throw new TypeError('The provided selector is invalid.\nExpects a CSS selector, a Node element, a NodeList, an HTMLCollection or an array.\nSee: https://github.com/francoischalifour/medium-zoom')}}(a),B=function(a){var b=document.createElement('div');return b.classList.add('medium-zoom-overlay'),b.style.backgroundColor=a,b}(z.background),C={template:null,zoomed:null,zoomedHd:null},D=0,E=!1;return A.forEach(function(a){a.classList.add('medium-zoom-image'),a.addEventListener('click',t);}),B.addEventListener('click',r),document.addEventListener('scroll',w),document.addEventListener('keyup',x),window.addEventListener('resize',r),{show:s,hide:r,toggle:s,update:function(){var a=0