old_contents: "use strict";function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var _createClass=function(){function e(e,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,i,a){return i&&e(t.prototype,i),a&&e(t,a),t}}(),GalleryModal=function(){function e(t){_classCallCheck(this,e),this.document=document,this.options=t,this.page=this.document.querySelector(".page"),this.triggers=Array.from(this.document.querySelectorAll(this.options.trigger)),this.mount(),this.modal=this.document.querySelector(".modal"),this.overlay=this.modal.querySelector(".modal__overlay"),this.picture=this.modal.querySelector(".modal__picture"),this.registerListeners()}return _createClass(e,[{key:"mount",value:function(){this.page.insertAdjacentHTML("beforeEnd",'\n            <div class="modal" tabindex="-1" role="dialog">\n                <div class="modal__container">\n                    <img class="modal__picture" src="">\n                </div>\n                <div class="modal__overlay"></div>\n            </div>\n        ')}},{key:"registerListeners",value:function(){var e=this;this.document.addEventListener("keyup",this.closeByEsc.bind(this)),this.triggers.forEach(function(t){t.addEventListener("click",e.open.bind(e))}),this.overlay.addEventListener("click",this.close.bind(this))}},{key:"preventTouchMove",value:function(e){e.preventDefault()}},{key:"fixPageScroll",value:function(){this.page.classList.add("page_fixed"),this.page.addEventListener("touchmove",this.preventTouchMove)}},{key:"unfixPageScroll",value:function(){this.page.classList.remove("page_fixed"),this.page.removeEventListener("touchmove",this.preventTouchMove)}},{key:"open",value:function(e){this.setModalPicture(e.target.src),this.fixPageScroll(),this.modal.classList.add("modal_visible")}},{key:"close",value:function(){this.unfixPageScroll(),this.modal.classList.remove("modal_visible")}},{key:"closeByEsc",value:function(e){27===e.keyCode&&this.close()}},{key:"setModalPicture",value:function(e){this.picture.src=e}}]),e}(),lazyLoader=new LazyLoad({callback_load:function(e){}}),galleryModal=new GalleryModal({trigger:".gallery__item-picture"});
new_contents: "use strict";function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var _createClass=function(){function e(e,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,i,a){return i&&e(t.prototype,i),a&&e(t,a),t}}(),GalleryModal=function(){function e(t){_classCallCheck(this,e),this.document=document,this.options=t,this.page=this.document.querySelector(".page"),this.triggers=Array.from(this.document.querySelectorAll(this.options.trigger)),this.mount(),this.modal=this.document.querySelector(".modal"),this.overlay=this.modal.querySelector(".modal__overlay"),this.picture=this.modal.querySelector(".modal__picture"),this.registerListeners()}return _createClass(e,[{key:"mount",value:function(){this.page.insertAdjacentHTML("beforeEnd",'\n            <div class="modal" tabindex="-1" role="dialog">\n                <div class="modal__container">\n                    <img class="modal__picture" src="">\n                </div>\n                <div class="modal__overlay"></div>\n            </div>\n        ')}},{key:"registerListeners",value:function(){var e=this;this.document.addEventListener("keyup",this.closeByEsc.bind(this)),this.triggers.forEach(function(t){t.addEventListener("click",e.open.bind(e))}),this.overlay.addEventListener("click",this.close.bind(this))}},{key:"preventTouchMove",value:function(e){e.preventDefault()}},{key:"fixPageScroll",value:function(){this.page.classList.add("page_fixed"),this.page.addEventListener("touchmove",this.preventTouchMove)}},{key:"unfixPageScroll",value:function(){this.page.classList.remove("page_fixed"),this.page.removeEventListener("touchmove",this.preventTouchMove)}},{key:"open",value:function(e){this.setModalPicture(e.target.src),this.fixPageScroll(),this.modal.classList.add("modal_visible")}},{key:"close",value:function(){this.unfixPageScroll(),this.modal.classList.remove("modal_visible")}},{key:"closeByEsc",value:function(e){27===e.keyCode&&this.close()}},{key:"setModalPicture",value:function(e){this.picture.src=e}}]),e}();objectFitImages();var lazyLoader=new LazyLoad({callback_load:function(e){}}),galleryModal=new GalleryModal({trigger:".gallery__item-picture"});
subject: Add call object-fit polyfill