(globalThis.webpackChunksakurairo_scripts=globalThis.webpackChunksakurairo_scripts||[]).push([[2091],{2091:(t,e,i)=>{i.d(e,{default:()=>v});var s=i(8064);const n=/([\p{Ll}\d])(\p{Lu})/gu,o=/(\p{Lu})([\p{Lu}][\p{Ll}])/gu,r=/(\d)\p{Ll}|(\p{L})\d/u,l=/[^\p{L}\d]+/giu,a="$1\0$2",d="";function g(t){let e=t.trim();e=e.replace(n,a).replace(o,a),e=e.replace(l,"\0");let i=0,s=e.length;for(;"\0"===e.charAt(i);)i++;if(i===s)return[];for(;"\0"===e.charAt(s-1);)s--;return e.slice(i,s).split(/\0/g)}function h(t){const e=g(t);for(let t=0;tt.toLowerCase():e=>e.toLocaleLowerCase(t)}function m(t,e={}){const i=e.split??(e.separateNumbers?h:g),s=e.prefixCharacters??d,n=e.suffixCharacters??d;let o=0,r=t.length;for(;oo;){const e=r-1,i=t.charAt(e);if(!n.includes(i))break;r=e}return[t.slice(0,o),i(t.slice(o,r)),t.slice(r)]}function p(t){const e=u(t,{delimiter:"-",...i});var i;return`${t[2].toLowerCase()+t.replace(/^lg\w/,"")}/${e}`}const f=t=>"fulfilled"==t.status?t.value.default:console.error("加载lightGallery的插件时出错啦!",t.reason);async function v(){const{plugins:t,...e}=_iro.lightGallery;(0,s.A)(document.querySelector(".entry-content"),{plugins:t&&(await Promise.allSettled(t.map((t=>i(4141)("./"+p(t)+".min.js"))))).map(f),...e})}},8064:(t,e,i)=>{var s=i(9920);e.A=function(t,e){return new s.LightGallery(t,e)}},9825:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.lGEvents=void 0,e.lGEvents={afterAppendSlide:"lgAfterAppendSlide",init:"lgInit",hasVideo:"lgHasVideo",containerResize:"lgContainerResize",updateSlides:"lgUpdateSlides",afterAppendSubHtml:"lgAfterAppendSubHtml",beforeOpen:"lgBeforeOpen",afterOpen:"lgAfterOpen",slideItemLoad:"lgSlideItemLoad",beforeSlide:"lgBeforeSlide",afterSlide:"lgAfterSlide",posterClick:"lgPosterClick",dragStart:"lgDragStart",dragMove:"lgDragMove",dragEnd:"lgDragEnd",beforeNextSlide:"lgBeforeNextSlide",beforePrevSlide:"lgBeforePrevSlide",beforeClose:"lgBeforeClose",afterClose:"lgAfterClose",rotateLeft:"lgRotateLeft",rotateRight:"lgRotateRight",flipHorizontal:"lgFlipHorizontal",flipVertical:"lgFlipVertical",autoplay:"lgAutoplay",autoplayStart:"lgAutoplayStart",autoplayStop:"lgAutoplayStop"}},3065:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.lightGalleryCoreSettings=void 0,e.lightGalleryCoreSettings={mode:"lg-slide",easing:"ease",speed:400,licenseKey:"0000-0000-000-0000",height:"100%",width:"100%",addClass:"",startClass:"lg-start-zoom",backdropDuration:300,container:"",startAnimationDuration:400,zoomFromOrigin:!0,hideBarsDelay:0,showBarsAfter:1e4,slideDelay:0,supportLegacyBrowser:!0,allowMediaOverlap:!1,videoMaxSize:"1280-720",loadYouTubePoster:!0,defaultCaptionHeight:0,ariaLabelledby:"",ariaDescribedby:"",resetScrollPosition:!0,hideScrollbar:!1,closable:!0,swipeToClose:!0,closeOnTap:!0,showCloseIcon:!0,showMaximizeIcon:!1,loop:!0,escKey:!0,keyPress:!0,trapFocus:!0,controls:!0,slideEndAnimation:!0,hideControlOnEnd:!1,mousewheel:!1,getCaptionFromTitleOrAlt:!0,appendSubHtmlTo:".lg-sub-html",subHtmlSelectorRelative:!1,preload:2,numberOfSlideItemsInDom:10,selector:"",selectWithin:"",nextHtml:"",prevHtml:"",index:0,iframeWidth:"100%",iframeHeight:"100%",iframeMaxWidth:"100%",iframeMaxHeight:"100%",download:!0,counter:!0,appendCounterTo:".lg-toolbar",swipeThreshold:50,enableSwipe:!0,enableDrag:!0,dynamic:!1,dynamicEl:[],extraProps:[],exThumbImage:"",isMobile:void 0,mobileSettings:{controls:!1,showCloseIcon:!1,download:!1},plugins:[],strings:{closeGallery:"Close gallery",toggleMaximize:"Toggle maximize",previousSlide:"Previous slide",nextSlide:"Next slide",download:"Download",playVideo:"Play video",mediaLoadingFailed:"Oops... Failed to load content..."}}},347:function(t,e,i){var s=this&&this.__spreadArrays||function(){for(var t=0,e=0,i=arguments.length;el){o=d;break}a===r.length-1&&(o=d)}var g=o.split("-"),h=parseInt(g[0],10),u=parseInt(g[1],10),c=e.width(),m=e.height()-i,p=Math.min(c,h),f=Math.min(m,u),v=Math.min(p/h,f/u);return{width:h*v,height:u*v}}},getTransform:function(t,e,i,s,o){if(o){var r=n.$LG(t).find("img").first();if(r.get()){var l=e.get().getBoundingClientRect(),a=l.width,d=e.height()-(i+s),g=r.width(),h=r.height(),u=r.style(),c=(a-g)/2-r.offset().left+(parseFloat(u.paddingLeft)||0)+(parseFloat(u.borderLeft)||0)+n.$LG(window).scrollLeft()+l.left,m=(d-h)/2-r.offset().top+(parseFloat(u.paddingTop)||0)+(parseFloat(u.borderTop)||0)+n.$LG(window).scrollTop()+i;return"translate3d("+(c*=-1)+"px, "+(m*=-1)+"px, 0) scale3d("+g/o.width+", "+h/o.height+", 1)"}}},getIframeMarkup:function(t,e,i,s,n,o){return'
\n \n
'},getImgMarkup:function(t,e,i,s,n,o){var r="',l="";o&&(l=("string"==typeof o?JSON.parse(o):o).map((function(t){var e="";return Object.keys(t).forEach((function(i){e+=" "+i+'="'+t[i]+'"'})),""})));return""+l+r},getResponsiveSrc:function(t){for(var e=[],i=[],s="",n=0;nr){s=i[l];break}return s},isImageLoaded:function(t){return!!t&&(!!t.complete&&0!==t.naturalWidth)},getVideoPosterMarkup:function(t,e,i,s,n){return'
\n
\n \n '+s+'\n \n \n \n \n \n \n \n
\n '+(e||"")+'\n \n
'},getFocusableElements:function(t){var e=t.querySelectorAll('a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])');return[].filter.call(e,(function(t){var e=window.getComputedStyle(t);return"none"!==e.display&&"hidden"!==e.visibility}))},getDynamicOptions:function(t,e,i,l){var a=[],d=s(o,e);return[].forEach.call(t,(function(t){for(var e={},s=0;s-1&&(h=g),h&&(e[h]=o.value)}}var u=n.$LG(t),c=u.find("img").first().attr("alt"),m=u.attr("title"),p=l?u.attr(l):u.find("img").first().attr("src");e.thumb=p,i&&!e.subHtml&&(e.subHtml=m||c||""),e.alt=c||m||"",a.push(e)})),a},isMobile:function(){return/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)},isVideo:function(t,e,i){if(!t)return e?{html5:!0}:void console.error("lightGallery :- data-src is not provided on slide item "+(i+1)+". Please make sure the selector property is properly configured. More info - https://www.lightgalleryjs.com/demos/html-markup/");var s=t.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com|be-nocookie\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)([\&|?][\S]*)*/i),n=t.match(/\/\/(?:www\.)?(?:player\.)?vimeo.com\/(?:video\/)?([0-9a-z\-_]+)(.*)?/i),o=t.match(/https?:\/\/(.+)?(wistia\.com|wi\.st)\/(medias|embed)\/([0-9a-z\-_]+)(.*)/);return s?{youtube:s}:n?{vimeo:n}:o?{wistia:o}:void 0}};e.default=l},7591:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.$LG=e.lgQuery=void 0;var i=function(){function t(t){return this.cssVenderPrefixes=["TransitionDuration","TransitionTimingFunction","Transform","Transition"],this.selector=this._getSelector(t),this.firstElement=this._getFirstEl(),this}return t.generateUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))},t.prototype._getSelector=function(t,e){return void 0===e&&(e=document),"string"!=typeof t?t:(e=e||document,"#"===t.substring(0,1)?e.querySelector(t):e.querySelectorAll(t))},t.prototype._each=function(t){return this.selector?(void 0!==this.selector.length?[].forEach.call(this.selector,t):t(this.selector,0),this):this},t.prototype._setCssVendorPrefix=function(t,e,i){var s=e.replace(/-([a-z])/gi,(function(t,e){return e.toUpperCase()}));-1!==this.cssVenderPrefixes.indexOf(s)?(t.style[s.charAt(0).toLowerCase()+s.slice(1)]=i,t.style["webkit"+s]=i,t.style["moz"+s]=i,t.style["ms"+s]=i,t.style["o"+s]=i):t.style[s]=i},t.prototype._getFirstEl=function(){return this.selector&&void 0!==this.selector.length?this.selector[0]:this.selector},t.prototype.isEventMatched=function(t,e){var i=e.split(".");return t.split(".").filter((function(t){return t})).every((function(t){return-1!==i.indexOf(t)}))},t.prototype.attr=function(t,e){return void 0===e?this.firstElement?this.firstElement.getAttribute(t):"":(this._each((function(i){i.setAttribute(t,e)})),this)},t.prototype.find=function(t){return s(this._getSelector(t,this.selector))},t.prototype.first=function(){return this.selector&&void 0!==this.selector.length?s(this.selector[0]):s(this.selector)},t.prototype.eq=function(t){return s(this.selector[t])},t.prototype.parent=function(){return s(this.selector.parentElement)},t.prototype.get=function(){return this._getFirstEl()},t.prototype.removeAttr=function(t){var e=t.split(" ");return this._each((function(t){e.forEach((function(e){return t.removeAttribute(e)}))})),this},t.prototype.wrap=function(t){if(!this.firstElement)return this;var e=document.createElement("div");return e.className=t,this.firstElement.parentNode.insertBefore(e,this.firstElement),this.firstElement.parentNode.removeChild(this.firstElement),e.appendChild(this.firstElement),this},t.prototype.addClass=function(t){return void 0===t&&(t=""),this._each((function(e){t.split(" ").forEach((function(t){t&&e.classList.add(t)}))})),this},t.prototype.removeClass=function(t){return this._each((function(e){t.split(" ").forEach((function(t){t&&e.classList.remove(t)}))})),this},t.prototype.hasClass=function(t){return!!this.firstElement&&this.firstElement.classList.contains(t)},t.prototype.hasAttribute=function(t){return!!this.firstElement&&this.firstElement.hasAttribute(t)},t.prototype.toggleClass=function(t){return this.firstElement?(this.hasClass(t)?this.removeClass(t):this.addClass(t),this):this},t.prototype.css=function(t,e){var i=this;return this._each((function(s){i._setCssVendorPrefix(s,t,e)})),this},t.prototype.on=function(e,i){var s=this;return this.selector?(e.split(" ").forEach((function(e){Array.isArray(t.eventListeners[e])||(t.eventListeners[e]=[]),t.eventListeners[e].push(i),s.selector.addEventListener(e.split(".")[0],i)})),this):this},t.prototype.once=function(t,e){var i=this;return this.on(t,(function(){i.off(t),e(t)})),this},t.prototype.off=function(e){var i=this;return this.selector?(Object.keys(t.eventListeners).forEach((function(s){i.isEventMatched(e,s)&&(t.eventListeners[s].forEach((function(t){i.selector.removeEventListener(s.split(".")[0],t)})),t.eventListeners[s]=[])})),this):this},t.prototype.trigger=function(t,e){if(!this.firstElement)return this;var i=new CustomEvent(t.split(".")[0],{detail:e||null});return this.firstElement.dispatchEvent(i),this},t.prototype.load=function(t){var e=this;return fetch(t).then((function(t){return t.text()})).then((function(t){e.selector.innerHTML=t})),this},t.prototype.html=function(t){return void 0===t?this.firstElement?this.firstElement.innerHTML:"":(this._each((function(e){e.innerHTML=t})),this)},t.prototype.append=function(t){return this._each((function(e){"string"==typeof t?e.insertAdjacentHTML("beforeend",t):e.appendChild(t)})),this},t.prototype.prepend=function(t){return this._each((function(e){e.insertAdjacentHTML("afterbegin",t)})),this},t.prototype.remove=function(){return this._each((function(t){t.parentNode.removeChild(t)})),this},t.prototype.empty=function(){return this._each((function(t){t.innerHTML=""})),this},t.prototype.scrollTop=function(t){return void 0!==t?(document.body.scrollTop=t,document.documentElement.scrollTop=t,this):window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},t.prototype.scrollLeft=function(t){return void 0!==t?(document.body.scrollLeft=t,document.documentElement.scrollLeft=t,this):window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},t.prototype.offset=function(){if(!this.firstElement)return{left:0,top:0};var t=this.firstElement.getBoundingClientRect(),e=s("body").style().marginLeft;return{left:t.left-parseFloat(e)+this.scrollLeft(),top:t.top+this.scrollTop()}},t.prototype.style=function(){return this.firstElement?this.firstElement.currentStyle||window.getComputedStyle(this.firstElement):{}},t.prototype.width=function(){var t=this.style();return this.firstElement.clientWidth-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight)},t.prototype.height=function(){var t=this.style();return this.firstElement.clientHeight-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom)},t.eventListeners={},t}();function s(t){return function(){if("function"==typeof window.CustomEvent)return!1;window.CustomEvent=function(t,e){e=e||{bubbles:!1,cancelable:!1,detail:null};var i=document.createEvent("CustomEvent");return i.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),i}}(),Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),new i(t)}e.lgQuery=i,e.$LG=s},9920:function(t,e,i){var s=this&&this.__assign||function(){return s=Object.assign||function(t){for(var e,i=1,s=arguments.length;i '+this.settings.prevHtml+' \n "),".lg-item"!==this.settings.appendSubHtmlTo&&(i='
');var s="";this.settings.allowMediaOverlap&&(s+="lg-media-overlap ");var n=this.settings.ariaLabelledby?'aria-labelledby="'+this.settings.ariaLabelledby+'"':"",o=this.settings.ariaDescribedby?'aria-describedby="'+this.settings.ariaDescribedby+'"':"",r="lg-container "+this.settings.addClass+" "+(document.body!==this.settings.container?"lg-inline":""),a=this.settings.closable&&this.settings.showCloseIcon?'':"",d=this.settings.showMaximizeIcon?'':"",g='\n \n ";l.$LG(this.settings.container).append(g),document.body!==this.settings.container&&l.$LG(this.settings.container).css("position","relative"),this.outer=this.getElementById("lg-outer"),this.$lgComponents=this.getElementById("lg-components"),this.$backdrop=this.getElementById("lg-backdrop"),this.$container=this.getElementById("lg-container"),this.$inner=this.getElementById("lg-inner"),this.$content=this.getElementById("lg-content"),this.$toolbar=this.getElementById("lg-toolbar"),this.$backdrop.css("transition-duration",this.settings.backdropDuration+"ms");var h=this.settings.mode+" ";this.manageSingleSlideClassName(),this.settings.enableDrag&&(h+="lg-grab "),this.outer.addClass(h),this.$inner.css("transition-timing-function",this.settings.easing),this.$inner.css("transition-duration",this.settings.speed+"ms"),this.settings.download&&this.$toolbar.append(''),this.counter(),l.$LG(window).on("resize.lg.global"+this.lgId+" orientationchange.lg.global"+this.lgId,(function(){t.refreshOnResize()})),this.hideBars(),this.manageCloseGallery(),this.toggleMaximize(),this.initModules()}},t.prototype.refreshOnResize=function(){if(this.lgOpened){var t=this.galleryItems[this.index].__slideVideoInfo;this.mediaContainerPosition=this.getMediaContainerPosition();var e=this.mediaContainerPosition,i=e.top,s=e.bottom;if(this.currentImageSize=r.default.getSize(this.items[this.index],this.outer,i+s,t&&this.settings.videoMaxSize),t&&this.resizeVideoSlide(this.index,this.currentImageSize),this.zoomFromOrigin&&!this.isDummyImageRemoved){var o=this.getDummyImgStyles(this.currentImageSize);this.outer.find(".lg-current .lg-dummy-img").first().attr("style",o)}this.LGel.trigger(n.lGEvents.containerResize)}},t.prototype.resizeVideoSlide=function(t,e){var i=this.getVideoContStyle(e);this.getSlideItem(t).find(".lg-video-cont").attr("style",i)},t.prototype.updateSlides=function(t,e){if(this.index>t.length-1&&(this.index=t.length-1),1===t.length&&(this.index=0),t.length){var i=this.galleryItems[e].src;this.galleryItems=t,this.updateControls(),this.$inner.empty(),this.currentItemsInDom=[];var s=0;this.galleryItems.some((function(t,e){return t.src===i&&(s=e,!0)})),this.currentItemsInDom=this.organizeSlideItems(s,-1),this.loadContent(s,!0),this.getSlideItem(s).addClass("lg-current"),this.index=s,this.updateCurrentCounter(s),this.LGel.trigger(n.lGEvents.updateSlides)}else this.closeGallery()},t.prototype.getItems=function(){if(this.items=[],this.settings.dynamic)return this.settings.dynamicEl||[];if("this"===this.settings.selector)this.items.push(this.el);else if(this.settings.selector)if("string"==typeof this.settings.selector)if(this.settings.selectWithin){var t=l.$LG(this.settings.selectWithin);this.items=t.find(this.settings.selector).get()}else this.items=this.el.querySelectorAll(this.settings.selector);else this.items=this.settings.selector;else this.items=this.el.children;return r.default.getDynamicOptions(this.items,this.settings.extraProps,this.settings.getCaptionFromTitleOrAlt,this.settings.exThumbImage)},t.prototype.shouldHideScrollbar=function(){return this.settings.hideScrollbar&&document.body===this.settings.container},t.prototype.hideScrollbar=function(){if(this.shouldHideScrollbar()){this.bodyPaddingRight=parseFloat(l.$LG("body").style().paddingRight);var t=document.documentElement.getBoundingClientRect(),e=window.innerWidth-t.width;l.$LG(document.body).css("padding-right",e+this.bodyPaddingRight+"px"),l.$LG(document.body).addClass("lg-overlay-open")}},t.prototype.resetScrollBar=function(){this.shouldHideScrollbar()&&(l.$LG(document.body).css("padding-right",this.bodyPaddingRight+"px"),l.$LG(document.body).removeClass("lg-overlay-open"))},t.prototype.openGallery=function(t,e){var i=this;if(void 0===t&&(t=this.settings.index),!this.lgOpened){this.lgOpened=!0,this.outer.removeClass("lg-hide-items"),this.hideScrollbar(),this.$container.addClass("lg-show");var s=this.getItemsToBeInsertedToDom(t,t);this.currentItemsInDom=s;var o="";s.forEach((function(t){o=o+'
'})),this.$inner.append(o),this.addHtml(t);var a="";this.mediaContainerPosition=this.getMediaContainerPosition();var d=this.mediaContainerPosition,g=d.top,h=d.bottom;this.settings.allowMediaOverlap||this.setMediaContainerPosition(g,h);var u=this.galleryItems[t].__slideVideoInfo;this.zoomFromOrigin&&e&&(this.currentImageSize=r.default.getSize(e,this.outer,g+h,u&&this.settings.videoMaxSize),a=r.default.getTransform(e,this.outer,g,h,this.currentImageSize)),this.zoomFromOrigin&&a||(this.outer.addClass(this.settings.startClass),this.getSlideItem(t).removeClass("lg-complete"));var c=this.settings.zoomFromOrigin?100:this.settings.backdropDuration;setTimeout((function(){i.outer.addClass("lg-components-open")}),c),this.index=t,this.LGel.trigger(n.lGEvents.beforeOpen),this.getSlideItem(t).addClass("lg-current"),this.lGalleryOn=!1,this.prevScrollTop=l.$LG(window).scrollTop(),setTimeout((function(){if(i.zoomFromOrigin&&a){var e=i.getSlideItem(t);e.css("transform",a),setTimeout((function(){e.addClass("lg-start-progress lg-start-end-progress").css("transition-duration",i.settings.startAnimationDuration+"ms"),i.outer.addClass("lg-zoom-from-image")})),setTimeout((function(){e.css("transform","translate3d(0, 0, 0)")}),100)}setTimeout((function(){i.$backdrop.addClass("in"),i.$container.addClass("lg-show-in")}),10),setTimeout((function(){i.settings.trapFocus&&document.body===i.settings.container&&i.trapFocus()}),i.settings.backdropDuration+50),i.zoomFromOrigin&&a||setTimeout((function(){i.outer.addClass("lg-visible")}),i.settings.backdropDuration),i.slide(t,!1,!1,!1),i.LGel.trigger(n.lGEvents.afterOpen)})),document.body===this.settings.container&&l.$LG("html").addClass("lg-on")}},t.prototype.getMediaContainerPosition=function(){if(this.settings.allowMediaOverlap)return{top:0,bottom:0};var t=this.$toolbar.get().clientHeight||0,e=this.outer.find(".lg-components .lg-sub-html").get(),i=this.settings.defaultCaptionHeight||e&&e.clientHeight||0,s=this.outer.find(".lg-thumb-outer").get();return{top:t,bottom:(s?s.clientHeight:0)+i}},t.prototype.setMediaContainerPosition=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.$content.css("top",t+"px").css("bottom",e+"px")},t.prototype.hideBars=function(){var t=this;setTimeout((function(){t.outer.removeClass("lg-hide-items"),t.settings.hideBarsDelay>0&&(t.outer.on("mousemove.lg click.lg touchstart.lg",(function(){t.outer.removeClass("lg-hide-items"),clearTimeout(t.hideBarTimeout),t.hideBarTimeout=setTimeout((function(){t.outer.addClass("lg-hide-items")}),t.settings.hideBarsDelay)})),t.outer.trigger("mousemove.lg"))}),this.settings.showBarsAfter)},t.prototype.initPictureFill=function(t){if(this.settings.supportLegacyBrowser)try{picturefill({elements:[t.get()]})}catch(t){console.warn("lightGallery :- If you want srcset or picture tag to be supported for older browser please include picturefil javascript library in your document.")}},t.prototype.counter=function(){if(this.settings.counter){var t='
\n '+(this.index+1)+' /\n '+this.galleryItems.length+"
";this.outer.find(this.settings.appendCounterTo).append(t)}},t.prototype.addHtml=function(t){var e,i;if(this.galleryItems[t].subHtmlUrl?i=this.galleryItems[t].subHtmlUrl:e=this.galleryItems[t].subHtml,!i)if(e){var s=e.substring(0,1);"."!==s&&"#"!==s||(e=this.settings.subHtmlSelectorRelative&&!this.settings.dynamic?l.$LG(this.items).eq(t).find(e).first().html():l.$LG(e).first().html())}else e="";if(".lg-item"!==this.settings.appendSubHtmlTo)i?this.outer.find(".lg-sub-html").load(i):this.outer.find(".lg-sub-html").html(e);else{var o=l.$LG(this.getSlideItemId(t));i?o.load(i):o.append('
'+e+"
")}null!=e&&(""===e?this.outer.find(this.settings.appendSubHtmlTo).addClass("lg-empty-html"):this.outer.find(this.settings.appendSubHtmlTo).removeClass("lg-empty-html")),this.LGel.trigger(n.lGEvents.afterAppendSubHtml,{index:t})},t.prototype.preload=function(t){for(var e=1;e<=this.settings.preload&&!(e>=this.galleryItems.length-t);e++)this.loadContent(t+e,!1);for(var i=1;i<=this.settings.preload&&!(t-i<0);i++)this.loadContent(t-i,!1)},t.prototype.getDummyImgStyles=function(t){return t?"width:"+t.width+"px;\n margin-left: -"+t.width/2+"px;\n margin-top: -"+t.height/2+"px;\n height:"+t.height+"px":""},t.prototype.getVideoContStyle=function(t){return t?"width:"+t.width+"px;\n height:"+t.height+"px":""},t.prototype.getDummyImageContent=function(t,e,i){var s;if(this.settings.dynamic||(s=l.$LG(this.items).eq(e)),s){var n=void 0;if(!(n=this.settings.exThumbImage?s.attr(this.settings.exThumbImage):s.find("img").first().attr("src")))return"";var o="';return t.addClass("lg-first-slide"),this.outer.addClass("lg-first-slide-loading"),o}return""},t.prototype.setImgMarkup=function(t,e,i){var s=this.galleryItems[i],n=s.alt,o=s.srcset,l=s.sizes,a=s.sources,d=n?'alt="'+n+'"':"",g=' '+(this.isFirstSlideWithZoomAnimation()?this.getDummyImageContent(e,i,d):r.default.getImgMarkup(i,t,d,o,l,a))+"";e.prepend(g)},t.prototype.onSlideObjectLoad=function(t,e,i,s){var n=t.find(".lg-object").first();r.default.isImageLoaded(n.get())||e?i():(n.on("load.lg error.lg",(function(){i&&i()})),n.on("error.lg",(function(){s&&s()})))},t.prototype.onLgObjectLoad=function(t,e,i,s,n,o){var r=this;this.onSlideObjectLoad(t,o,(function(){r.triggerSlideItemLoad(t,e,i,s,n)}),(function(){t.addClass("lg-complete lg-complete_"),t.html(''+r.settings.strings.mediaLoadingFailed+"")}))},t.prototype.triggerSlideItemLoad=function(t,e,i,s,o){var r=this,l=this.galleryItems[e],a=o&&"video"===this.getSlideType(l)&&!l.poster?s:0;setTimeout((function(){t.addClass("lg-complete lg-complete_"),r.LGel.trigger(n.lGEvents.slideItemLoad,{index:e,delay:i||0,isFirstSlide:o})}),a)},t.prototype.isFirstSlideWithZoomAnimation=function(){return!(this.lGalleryOn||!this.zoomFromOrigin||!this.currentImageSize)},t.prototype.addSlideVideoInfo=function(t){var e=this;t.forEach((function(t,i){t.__slideVideoInfo=r.default.isVideo(t.src,!!t.video,i),t.__slideVideoInfo&&e.settings.loadYouTubePoster&&!t.poster&&t.__slideVideoInfo.youtube&&(t.poster="//img.youtube.com/vi/"+t.__slideVideoInfo.youtube[1]+"/maxresdefault.jpg")}))},t.prototype.loadContent=function(t,e){var i=this,s=this.galleryItems[t],o=l.$LG(this.getSlideItemId(t)),a=s.poster,d=s.srcset,g=s.sizes,h=s.sources,u=s.src,c=s.video,m=c&&"string"==typeof c?JSON.parse(c):c;if(s.responsive){var p=s.responsive.split(",");u=r.default.getResponsiveSrc(p)||u}var f=s.__slideVideoInfo,v="",y=!!s.iframe,b=!this.lGalleryOn,C=0;if(b&&(C=this.zoomFromOrigin&&this.currentImageSize?this.settings.startAnimationDuration+10:this.settings.backdropDuration+10),!o.hasClass("lg-loaded")){if(f){var I=this.mediaContainerPosition,S=I.top,w=I.bottom,x=r.default.getSize(this.items[t],this.outer,S+w,f&&this.settings.videoMaxSize);v=this.getVideoContStyle(x)}if(y){var L=r.default.getIframeMarkup(this.settings.iframeWidth,this.settings.iframeHeight,this.settings.iframeMaxWidth,this.settings.iframeMaxHeight,u,s.iframeTitle);o.prepend(L)}else if(a){var G="";b&&this.zoomFromOrigin&&this.currentImageSize&&(G=this.getDummyImageContent(o,t,""));L=r.default.getVideoPosterMarkup(a,G||"",v,this.settings.strings.playVideo,f);o.prepend(L)}else if(f){L='
';o.prepend(L)}else if(this.setImgMarkup(u,o,t),d||h){var E=o.find(".lg-object");this.initPictureFill(E)}(a||f)&&this.LGel.trigger(n.lGEvents.hasVideo,{index:t,src:u,html5Video:m,hasPoster:!!a}),this.LGel.trigger(n.lGEvents.afterAppendSlide,{index:t}),this.lGalleryOn&&".lg-item"===this.settings.appendSubHtmlTo&&this.addHtml(t)}var T=0;C&&!l.$LG(document.body).hasClass("lg-from-hash")&&(T=C),this.isFirstSlideWithZoomAnimation()&&(setTimeout((function(){o.removeClass("lg-start-end-progress lg-start-progress").removeAttr("style")}),this.settings.startAnimationDuration+100),o.hasClass("lg-loaded")||setTimeout((function(){if("image"===i.getSlideType(s)){var e=s.alt,n=e?'alt="'+e+'"':"";if(o.find(".lg-img-wrap").append(r.default.getImgMarkup(t,u,n,d,g,s.sources)),d||h){var l=o.find(".lg-object");i.initPictureFill(l)}}("image"===i.getSlideType(s)||"video"===i.getSlideType(s)&&a)&&(i.onLgObjectLoad(o,t,C,T,!0,!1),i.onSlideObjectLoad(o,!(!f||!f.html5||a),(function(){i.loadContentOnFirstSlideLoad(t,o,T)}),(function(){i.loadContentOnFirstSlideLoad(t,o,T)})))}),this.settings.startAnimationDuration+100)),o.addClass("lg-loaded"),this.isFirstSlideWithZoomAnimation()&&("video"!==this.getSlideType(s)||a)||this.onLgObjectLoad(o,t,C,T,b,!(!f||!f.html5||a)),this.zoomFromOrigin&&this.currentImageSize||!o.hasClass("lg-complete_")||this.lGalleryOn||setTimeout((function(){o.addClass("lg-complete")}),this.settings.backdropDuration),this.lGalleryOn=!0,!0===e&&(o.hasClass("lg-complete_")?this.preload(t):o.find(".lg-object").first().on("load.lg error.lg",(function(){i.preload(t)})))},t.prototype.loadContentOnFirstSlideLoad=function(t,e,i){var s=this;setTimeout((function(){e.find(".lg-dummy-img").remove(),e.removeClass("lg-first-slide"),s.outer.removeClass("lg-first-slide-loading"),s.isDummyImageRemoved=!0,s.preload(t)}),i+300)},t.prototype.getItemsToBeInsertedToDom=function(t,e,i){var s=this;void 0===i&&(i=0);var n=[],o=Math.max(i,3);o=Math.min(o,this.galleryItems.length);var r="lg-item-"+this.lgId+"-"+e;if(this.galleryItems.length<=3)return this.galleryItems.forEach((function(t,e){n.push("lg-item-"+s.lgId+"-"+e)})),n;if(t<(this.galleryItems.length-1)/2){for(var l=t;l>t-o/2&&l>=0;l--)n.push("lg-item-"+this.lgId+"-"+l);var a=n.length;for(l=0;l')})),this.currentItemsInDom.forEach((function(t){-1===s.indexOf(t)&&l.$LG("#"+t).remove()})),s},t.prototype.getPreviousSlideIndex=function(){var t=0;try{var e=this.outer.find(".lg-current").first().attr("id");t=parseInt(e.split("-")[3])||0}catch(e){t=0}return t},t.prototype.setDownloadValue=function(t){if(this.settings.download){var e=this.galleryItems[t];if(!1===e.downloadUrl||"false"===e.downloadUrl)this.outer.addClass("lg-hide-download");else{var i=this.getElementById("lg-download");this.outer.removeClass("lg-hide-download"),i.attr("href",e.downloadUrl||e.src),e.download&&i.attr("download",e.download)}}},t.prototype.makeSlideAnimation=function(t,e,i){var s=this;this.lGalleryOn&&i.addClass("lg-slide-progress"),setTimeout((function(){s.outer.addClass("lg-no-trans"),s.outer.find(".lg-item").removeClass("lg-prev-slide lg-next-slide"),"prev"===t?(e.addClass("lg-prev-slide"),i.addClass("lg-next-slide")):(e.addClass("lg-next-slide"),i.addClass("lg-prev-slide")),setTimeout((function(){s.outer.find(".lg-item").removeClass("lg-current"),e.addClass("lg-current"),s.outer.removeClass("lg-no-trans")}),50)}),this.lGalleryOn?this.settings.slideDelay:0)},t.prototype.slide=function(t,e,i,s){var o=this,l=this.getPreviousSlideIndex();if(this.currentItemsInDom=this.organizeSlideItems(t,l),!this.lGalleryOn||l!==t){var a=this.galleryItems.length;if(!this.lgBusy){this.settings.counter&&this.updateCurrentCounter(t);var d=this.getSlideItem(t),g=this.getSlideItem(l),h=this.galleryItems[t],u=h.__slideVideoInfo;if(this.outer.attr("data-lg-slide-type",this.getSlideType(h)),this.setDownloadValue(t),u){var c=this.mediaContainerPosition,m=c.top,p=c.bottom,f=r.default.getSize(this.items[t],this.outer,m+p,u&&this.settings.videoMaxSize);this.resizeVideoSlide(t,f)}if(this.LGel.trigger(n.lGEvents.beforeSlide,{prevIndex:l,index:t,fromTouch:!!e,fromThumb:!!i}),this.lgBusy=!0,clearTimeout(this.hideBarTimeout),this.arrowDisable(t),s||(tl&&(s="next")),e){this.outer.find(".lg-item").removeClass("lg-prev-slide lg-current lg-next-slide");var v=void 0,y=void 0;a>2?(v=t-1,y=t+1,(0===t&&l===a-1||t===a-1&&0===l)&&(y=0,v=a-1)):(v=0,y=1),"prev"===s?this.getSlideItem(y).addClass("lg-next-slide"):this.getSlideItem(v).addClass("lg-prev-slide"),d.addClass("lg-current")}else this.makeSlideAnimation(s,d,g);this.lGalleryOn?setTimeout((function(){o.loadContent(t,!0),".lg-item"!==o.settings.appendSubHtmlTo&&o.addHtml(t)}),this.settings.speed+50+(e?0:this.settings.slideDelay)):this.loadContent(t,!0),setTimeout((function(){o.lgBusy=!1,g.removeClass("lg-slide-progress"),o.LGel.trigger(n.lGEvents.afterSlide,{prevIndex:l,index:t,fromTouch:e,fromThumb:i})}),(this.lGalleryOn?this.settings.speed+100:100)+(e?0:this.settings.slideDelay))}this.index=t}},t.prototype.updateCurrentCounter=function(t){this.getElementById("lg-counter-current").html(t+1+"")},t.prototype.updateCounterTotal=function(){this.getElementById("lg-counter-all").html(this.galleryItems.length+"")},t.prototype.getSlideType=function(t){return t.__slideVideoInfo?"video":t.iframe?"iframe":"image"},t.prototype.touchMove=function(t,e,i){var s=e.pageX-t.pageX,n=e.pageY-t.pageY,o=!1;if(this.swipeDirection?o=!0:Math.abs(s)>15?(this.swipeDirection="horizontal",o=!0):Math.abs(n)>15&&(this.swipeDirection="vertical",o=!0),o){var r=this.getSlideItem(this.index);if("horizontal"===this.swipeDirection){null==i||i.preventDefault(),this.outer.addClass("lg-dragging"),this.setTranslate(r,s,0);var l=r.get().offsetWidth,a=15*l/100-Math.abs(10*s/100);this.setTranslate(this.outer.find(".lg-prev-slide").first(),-l+s-a,0),this.setTranslate(this.outer.find(".lg-next-slide").first(),l+s+a,0)}else if("vertical"===this.swipeDirection&&this.settings.swipeToClose){null==i||i.preventDefault(),this.$container.addClass("lg-dragging-vertical");var d=1-Math.abs(n)/window.innerHeight;this.$backdrop.css("opacity",d);var g=1-Math.abs(n)/(2*window.innerWidth);this.setTranslate(r,0,n,g,g),Math.abs(n)>100&&this.outer.addClass("lg-hide-items").removeClass("lg-components-open")}}},t.prototype.touchEnd=function(t,e,i){var s,o=this;"lg-slide"!==this.settings.mode&&this.outer.addClass("lg-slide"),setTimeout((function(){o.$container.removeClass("lg-dragging-vertical"),o.outer.removeClass("lg-dragging lg-hide-items").addClass("lg-components-open");var r=!0;if("horizontal"===o.swipeDirection){s=t.pageX-e.pageX;var a=Math.abs(t.pageX-e.pageX);s<0&&a>o.settings.swipeThreshold?(o.goToNextSlide(!0),r=!1):s>0&&a>o.settings.swipeThreshold&&(o.goToPrevSlide(!0),r=!1)}else if("vertical"===o.swipeDirection){if(s=Math.abs(t.pageY-e.pageY),o.settings.closable&&o.settings.swipeToClose&&s>100)return void o.closeGallery();o.$backdrop.css("opacity",1)}if(o.outer.find(".lg-item").removeAttr("style"),r&&Math.abs(t.pageX-e.pageX)<5){var d=l.$LG(i.target);o.isPosterElement(d)&&o.LGel.trigger(n.lGEvents.posterClick)}o.swipeDirection=void 0})),setTimeout((function(){o.outer.hasClass("lg-dragging")||"lg-slide"===o.settings.mode||o.outer.removeClass("lg-slide")}),this.settings.speed+100)},t.prototype.enableSwipe=function(){var t=this,e={},i={},s=!1,o=!1;this.settings.enableSwipe&&(this.$inner.on("touchstart.lg",(function(i){t.dragOrSwipeEnabled=!0;var s=t.getSlideItem(t.index);!l.$LG(i.target).hasClass("lg-item")&&!s.get().contains(i.target)||t.outer.hasClass("lg-zoomed")||t.lgBusy||1!==i.touches.length||(o=!0,t.touchAction="swipe",t.manageSwipeClass(),e={pageX:i.touches[0].pageX,pageY:i.touches[0].pageY})})),this.$inner.on("touchmove.lg",(function(n){o&&"swipe"===t.touchAction&&1===n.touches.length&&(i={pageX:n.touches[0].pageX,pageY:n.touches[0].pageY},t.touchMove(e,i,n),s=!0)})),this.$inner.on("touchend.lg",(function(r){if("swipe"===t.touchAction){if(s)s=!1,t.touchEnd(i,e,r);else if(o){var a=l.$LG(r.target);t.isPosterElement(a)&&t.LGel.trigger(n.lGEvents.posterClick)}t.touchAction=void 0,o=!1}})))},t.prototype.enableDrag=function(){var t=this,e={},i={},s=!1,o=!1;this.settings.enableDrag&&(this.outer.on("mousedown.lg",(function(i){t.dragOrSwipeEnabled=!0;var o=t.getSlideItem(t.index);(l.$LG(i.target).hasClass("lg-item")||o.get().contains(i.target))&&(t.outer.hasClass("lg-zoomed")||t.lgBusy||(i.preventDefault(),t.lgBusy||(t.manageSwipeClass(),e={pageX:i.pageX,pageY:i.pageY},s=!0,t.outer.get().scrollLeft+=1,t.outer.get().scrollLeft-=1,t.outer.removeClass("lg-grab").addClass("lg-grabbing"),t.LGel.trigger(n.lGEvents.dragStart))))})),l.$LG(window).on("mousemove.lg.global"+this.lgId,(function(r){s&&t.lgOpened&&(o=!0,i={pageX:r.pageX,pageY:r.pageY},t.touchMove(e,i),t.LGel.trigger(n.lGEvents.dragMove))})),l.$LG(window).on("mouseup.lg.global"+this.lgId,(function(r){if(t.lgOpened){var a=l.$LG(r.target);o?(o=!1,t.touchEnd(i,e,r),t.LGel.trigger(n.lGEvents.dragEnd)):t.isPosterElement(a)&&t.LGel.trigger(n.lGEvents.posterClick),s&&(s=!1,t.outer.removeClass("lg-grabbing").addClass("lg-grab"))}})))},t.prototype.triggerPosterClick=function(){var t=this;this.$inner.on("click.lg",(function(e){!t.dragOrSwipeEnabled&&t.isPosterElement(l.$LG(e.target))&&t.LGel.trigger(n.lGEvents.posterClick)}))},t.prototype.manageSwipeClass=function(){var t=this.index+1,e=this.index-1;this.settings.loop&&this.galleryItems.length>2&&(0===this.index?e=this.galleryItems.length-1:this.index===this.galleryItems.length-1&&(t=0)),this.outer.find(".lg-item").removeClass("lg-next-slide lg-prev-slide"),e>-1&&this.getSlideItem(e).addClass("lg-prev-slide"),this.getSlideItem(t).addClass("lg-next-slide")},t.prototype.goToNextSlide=function(t){var e=this,i=this.settings.loop;t&&this.galleryItems.length<3&&(i=!1),this.lgBusy||(this.index+10?(this.index--,this.LGel.trigger(n.lGEvents.beforePrevSlide,{index:this.index,fromTouch:t}),this.slide(this.index,!!t,!1,"prev")):i?(this.index=this.galleryItems.length-1,this.LGel.trigger(n.lGEvents.beforePrevSlide,{index:this.index,fromTouch:t}),this.slide(this.index,!!t,!1,"prev")):this.settings.slideEndAnimation&&!t&&(this.outer.addClass("lg-left-end"),setTimeout((function(){e.outer.removeClass("lg-left-end")}),400)))},t.prototype.keyPress=function(){var t=this;l.$LG(window).on("keydown.lg.global"+this.lgId,(function(e){t.lgOpened&&!0===t.settings.escKey&&27===e.keyCode&&(e.preventDefault(),t.settings.allowMediaOverlap&&t.outer.hasClass("lg-can-toggle")&&t.outer.hasClass("lg-components-open")?t.outer.removeClass("lg-components-open"):t.closeGallery()),t.lgOpened&&t.galleryItems.length>1&&(37===e.keyCode&&(e.preventDefault(),t.goToPrevSlide()),39===e.keyCode&&(e.preventDefault(),t.goToNextSlide()))}))},t.prototype.arrow=function(){var t=this;this.getElementById("lg-prev").on("click.lg",(function(){t.goToPrevSlide()})),this.getElementById("lg-next").on("click.lg",(function(){t.goToNextSlide()}))},t.prototype.arrowDisable=function(t){if(!this.settings.loop&&this.settings.hideControlOnEnd){var e=this.getElementById("lg-prev"),i=this.getElementById("lg-next");t+1===this.galleryItems.length?i.attr("disabled","disabled").addClass("disabled"):i.removeAttr("disabled").removeClass("disabled"),0===t?e.attr("disabled","disabled").addClass("disabled"):e.removeAttr("disabled").removeClass("disabled")}},t.prototype.setTranslate=function(t,e,i,s,n){void 0===s&&(s=1),void 0===n&&(n=1),t.css("transform","translate3d("+e+"px, "+i+"px, 0px) scale3d("+s+", "+n+", 1)")},t.prototype.mousewheel=function(){var t=this,e=0;this.outer.on("wheel.lg",(function(i){if(i.deltaY&&!(t.galleryItems.length<2)){i.preventDefault();var s=(new Date).getTime();s-e<1e3||(e=s,i.deltaY>0?t.goToNextSlide():i.deltaY<0&&t.goToPrevSlide())}}))},t.prototype.isSlideElement=function(t){return t.hasClass("lg-outer")||t.hasClass("lg-item")||t.hasClass("lg-img-wrap")},t.prototype.isPosterElement=function(t){var e=this.getSlideItem(this.index).find(".lg-video-play-button").get();return t.hasClass("lg-video-poster")||t.hasClass("lg-video-play-button")||e&&e.contains(t.get())},t.prototype.toggleMaximize=function(){var t=this;this.getElementById("lg-maximize").on("click.lg",(function(){t.$container.toggleClass("lg-inline"),t.refreshOnResize()}))},t.prototype.invalidateItems=function(){for(var t=0;t{var s={"./autoplay/lg-autoplay.min.js":[842,5459],"./comment/lg-comment.min.js":[8478,6458],"./fullscreen/lg-fullscreen.min.js":[6621,2065],"./hash/lg-hash.min.js":[2154,9256],"./mediumZoom/lg-medium-zoom.min.js":[4725,8279],"./pager/lg-pager.min.js":[8490,5470],"./relativeCaption/lg-relative-caption.min.js":[1092,2661],"./rotate/lg-rotate.min.js":[7506,8268],"./share/lg-share.min.js":[9082,7435],"./thumbnail/lg-thumbnail.min.js":[2896,3042],"./video/lg-video.min.js":[8906,9438],"./vimeoThumbnail/lg-vimeo-thumbnail.min.js":[6861,8599],"./zoom/lg-zoom.min.js":[7002,2236]};function n(t){if(!i.o(s,t))return Promise.resolve().then((()=>{var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}));var e=s[t],n=e[0];return i.e(e[1]).then((()=>i.t(n,23)))}n.keys=()=>Object.keys(s),n.id=4141,t.exports=n}}]); //# sourceMappingURL=2091.js.map