(()=>{"use strict";var a={n:e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return a.d(o,{a:o}),o},d:(e,o)=>{for(var n in o)a.o(o,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:o[n]})},o:(a,e)=>Object.prototype.hasOwnProperty.call(a,e)};const e=window.jQuery;var o=a.n(e);function n(){const a=o()("#sugar-calendar-bookings-image-modal");a.length&&(a.removeClass("sugar-calendar-bookings-image-modal--opened").addClass("sugar-calendar-bookings-image-modal--closed"),setTimeout((()=>{o()("body").removeClass("modal-open"),a.hide(),a.removeClass("sugar-calendar-bookings-image-modal--closed")}),300))}o()(document).on("click",".sugar-calendar-bookings-image-modal-trigger",(function(a){a.preventDefault();const e=o()(this);!function(a){const{imageUrl:e="",imageAlt:n=""}=a,r=o()("#sugar-calendar-bookings-image-modal");if(!r.length)return;const t=r.find(".sugar-calendar-bookings-image-modal-image");t.attr("src",e).attr("alt",n),o()("body").addClass("modal-open"),setTimeout((()=>{r.fadeIn(200),r.addClass("sugar-calendar-bookings-image-modal--opened")}),10),setTimeout((()=>{t.focus()}),350)}({imageUrl:e.attr("href"),imageAlt:e.attr("data-image-alt")||e.find("img").attr("alt")||""})})),o()(document).on("keydown.imagemodal",(function(a){"Escape"===a.key&&o()("#sugar-calendar-bookings-image-modal").length&&n()})),o()(document).on("click","#sugar-calendar-bookings-image-modal",(function(a){o()(a.target).is(".sugar-calendar-bookings-image-modal-wrap")&&n()}))})();