!function(){document&&document.currentScript&&document.currentScript.src;(window.webpackJsonpruntime=window.webpackJsonpruntime||[]).push([[3],{DI7c:function(t,e,i){"use strict";i.r(e),i.d(e,"init",(function(){return O})),i.d(e,"insert",(function(){return B})),i.d(e,"clean",(function(){return N})),i.d(e,"getCurrentGallery",(function(){return M})),i.d(e,"initGallery",(function(){return D}));var a=i("yXPU"),s=i.n(a),o=i("DzJC"),n=i.n(o);class l{constructor(t){this.images=void 0,this.gallery=void 0,this.wrapImage=t=>{const e=t.find(">");return e.is(".thumbnailInnerWrapper")||e.wrapAll('
'),t},this.add=(t,e)=>{const i=e?0:this.images.length;return this.images.splice(i,0,this.wrapImage(t)),this.images},this.get=()=>this.images,this.getAsJQuery=()=>{const t=this.get();return $(t).map((function(){return this.toArray()}))},this.clear=()=>{this.images=[]},this.swap=(t,e)=>{const i=this.images[e];return this.images.splice(e,1),this.images.splice(t,0,i),this.images},this.remove=t=>(this.images=this.images.filter(e=>e.attr("id")!==t),this.images),this.getImageAt=t=>t{const e=t.attr("id"),i=Array.from(this.images).findIndex(t=>t.attr("id")===e);return i<0||i===this.images.length-1?null:this.images[i+1]},this.gallery=t;let e=Array.from(this.gallery.find("li.photoGalleryThumbs"));e.length&&e[0].hasAttribute("data-index")&&(e=e.sort((t,e)=>(Number(t.dataset.index)||-1)>(Number(e.dataset.index)||-1)?1:-1)),this.images=e.map(t=>this.wrapImage($(t)))}}l.displayName="ImagesStack";var r=i("NO3N"),h=i("foIZ");const{SQUARE:g,VERTICAL:d,PINTEREST:c,PANORAMIC:u,ASYMETRIC:m,ASYMETRIC2:y,ASYMETRIC3:p,CLASSIC_ROUNDED:w,CLASSIC_DROPS:f,PINTEREST_ROUNDED:v,VERTICAL_ROUNDED:I}=r.f;class S{constructor(t,e){this.device=void 0,this.layout=void 0,this.gallery=void 0,this.textLayout=void 0,this.imagesStack=void 0,this.layoutContainer=void 0,this.viewAll=void 0,this.galleryHolder=void 0,this.updateCaptionAlignment=()=>"captionAlignment-"+this.gallery.attr(`data-${this.device}-caption-alignment`)||!1,this.updateTextLayout=()=>{let t=this.gallery.attr(`data-${this.device}-text-layout`);return t||this.gallery.hasClass("upgradedGallery")&&(t=this.gallery.attr("data-text-layout")),t||r.g.BOTTOM},this.getNumberOfRow=(t,e)=>{const i=this.layout.numberOfImagesPerColumn,a=Math.floor(e/i);return 1===t?a:Math.floor(a/t)},this.setLayout=t=>{t&&(this.gallery.attr("data-"+this.device+"-layout",t),this.layout=t)},this.get=()=>this.layout,this.getTextLayout=()=>this.textLayout,this.generateRow=(t,e="")=>$(``),this.generateColumn=(t,e="")=>$(``),this.generateImage=(t,e,i)=>(t.removeClass().addClass("photoGalleryThumbs "+(i||"")),t.attr("data-index",e),t),this.appendColumnsToRow=(t,e,i="")=>{for(let a=0;a{let e=0;return t.each((t,i)=>{const a=$(i).height();a>e&&(e=a)}),e},this.generateLayoutContainer=()=>$(''),this.clearCaptionInlineHeight=t=>{this.getRows(t).find(".photogallery-column .caption-container").css("height","")},this.getRows=t=>t?t.closest(".photogallery-row"):this.gallery.find(".photogallery-row"),this.equalCaptionsHeight=t=>{const e=this.getRows(t);if(this.textLayout===r.g.OVER)e.find(".photogallery-column .caption-container").css("height","100%");else if(this.textLayout===r.g.FIXED)e.find(".photogallery-column .caption-container").css("height","auto");else switch(this.layout){case c:case v:e.each((t,e)=>{const i=$(e).find(".photogallery-column >:first-child .caption-container");i.css("height",""),i.height(this.getMaxHeight(i));const a=$(e).find(".photogallery-column >:last-child .caption-container");a.height(this.getMaxHeight(a))});break;case y:case p:e.each((t,e)=>{const i=$(e).find(".caption-container");i.css("height","");let a=0;i.each((t,e)=>{const i=$(e).height();i>a&&(a=i)}),i.height(a),$(e).find(".asymetric-big-image .caption-container").height(2*a)});break;default:e.each((t,e)=>{const i=$(e).find(".photogallery-column .caption-container");i.css("height",""),i.height(this.getMaxHeight(i))})}},this.isEven=t=>t%2==0,this.findColumnByIndex=(t,e)=>t.find('.photogallery-column[data-index="'+e+'"]'),this.drawSquare=()=>{const t=this.imagesStack.get(),e=this.getNumberOfColumns();let i;for(let a=0;a{const e=t.find("img"),i=e.attr("data-src");let a=t.attr("data-ratio");if(a)this.updateImageHeightByRatio(a,t);else{const s=e.attr("irh"),o=e.attr("irw");if(s&&o)a=s/o,this.updateImageHeightByRatio(a,t);else{const e=new Image;e.onload=()=>{const i=e.naturalHeight,s=e.naturalWidth;a=i/s,this.updateImageHeightByRatio(a,t)},e.src=i}}},this.updateImageHeightByRatio=(t,e)=>{const i=e.find("a");i.css("padding","inherit"),i.css("height",t*e.width())},this.drawPinterest=()=>{const t=this.imagesStack.get(),e=1*this.getNumberOfColumns();let i,a,s,o=0;const n=0===this.isEven(e),l=1===e?e:2*e;for(let r=0;r{const t=this.imagesStack.get();let e;for(let i=0;i{const t=this.imagesStack.get(),e=this.getNumberOfColumns();let i;for(let a=0;a{const t=1*this.getNumberOfColumns();if(1===t||this.layout!==y&&this.layout!==p)return;const e=this.layout===p?2:1.5;let i;const a=100/t,s=Math.ceil(t/2),o=40/Math.floor(t/2),n=60/s,l=this.gallery.find(".photogallery-column"),r=l.eq(0).find("li").css("padding")||"0px";l.each((t,s)=>{const l=$(s),h=l.find(".image-container a");if(l.hasClass("row-direction")){if(l.css("width",n+"%"),i=a/n*100+"%",h.css("padding-top",i),this.layout===p){l.find(".asymetric3-long-image .image-container a").css("padding-top",a/n*50+"%")}}else l.css("width",o+"%"),i=`calc(${a/o*100}% + ${r.replace("px","")*e}px)`,h.css("padding-top",i)})},this.drawAsymetric2=()=>{const t=this.imagesStack.get(),e=this.getNumberOfColumns();let i,a=0,s=this.generateRow(a),o=0,n=0,l=this.isEven(a);for(let r=0;r{const t=this.imagesStack.get(),e=this.getNumberOfColumns();let i,a=0,s=this.generateRow(a),o=0,n=0,l=!this.isEven(a);for(let r=0;r{let e=this.gallery.attr("data-"+this.device+"-columns");const i="true"===this.gallery.attr("data-auto-adjust-columns");if(this.device===r.b.MOBILE&&(this.layout===y||this.layout===p))return"1";if(!e)if(this.device===r.b.DESKTOP)e="4";else if(this.device===r.b.TABLET)e=this.gallery.attr("data-desktop-columns")||"4";else{const t=1*(this.gallery.attr("data-desktop-columns")||4);e=Math.min(2,t).toString()}const a=t||this.layout===y||this.layout===p||this.layout===u;if(i&&!a){const t=this.imagesStack.images.length,i=parseInt(e,10);return""+this.getAutoAdjustedNumberOfColumns(t,i)}return e},this.getAutoAdjustedNumberOfColumns=(t,e)=>{if(t<=e)return t;if(0===t%e)return e;let i=1;for(i=1;i<3;i++){if(e-i>1&&t%(e-i)==0)return e-i;if(t%(e+i)==0)return e+i}return e},this.draw=()=>{this.layoutContainer&&this.layoutContainer.remove(),this.layoutContainer=this.generateLayoutContainer();const t=this.imagesStack.getAsJQuery();switch(t.css("background-image",""),t.find("a").attr("style",""),this.layout){case g:case w:case f:case m:this.drawSquare();break;case c:case v:this.drawPinterest();break;case u:this.drawPanoramic();break;case d:case I:this.drawVertical();break;case y:this.drawAsymetric2();break;case p:this.drawAsymetric3()}this.viewAll.length?this.layoutContainer.insertBefore(this.viewAll):this.layoutContainer.insertAfter(this.galleryHolder),this.calculateAsymetricsColumns(),this.gallery.removeClass("text-layout-"+this.textLayout),this.gallery.removeClass(this.captionAlignment),this.textLayout=this.updateTextLayout(),this.captionAlignment=this.updateCaptionAlignment(),this.gallery.addClass("text-layout-"+this.textLayout),this.gallery.addClass(this.captionAlignment),this.layoutContainer.find(".photogallery-row").addClass("photogallery-hidden-row")},this.isCaptionElementVisible=(t,e)=>{const i=t.find(".caption-inner"),a=t.find(".caption-container");return i.length>0&&("none"!==i.css("display")&&"none"!==a.css("display")&&"none"!==t.find(e).css("display"))},this.gallery=t,this.device=h.b.getCurrentLayoutDevice(),this.layout=this.gallery.attr("data-"+this.device+"-layout")||this.gallery.attr("data-desktop-layout")||g,this.textLayout=this.updateTextLayout(),this.captionAlignment=this.updateCaptionAlignment(),this.imagesStack=e,this.viewAll=this.gallery.find(".photoGalleryViewAll"),this.galleryHolder=this.gallery.find(".dmPhotoGalleryHolder"),this.gallery.find(".layout-container").length&&this.gallery.find(".layout-container").remove()}}S.displayName="LayoutProvider";var C=i("cU+2"),b=i("LyWx"),A=i("Z0cf"),k=i("ddYX"),L=i("9iID");const{inEditorMode:T,inPreviewMode:P,inRuntimeMode:x}=h.b;class E{constructor(t){var e=this;this.layoutProvider=void 0,this.device=void 0,this.imagesStack=void 0,this.gallery=void 0,this.galleryType=void 0,this.galleryId=void 0,this.rowsToShow=void 0,this.rows=void 0,this.imagesToUnveil=void 0,this.viewImagesButton=void 0,this.animationDelay=0,this.enableLazyLoading=void 0,this.unveilThreshold=void 0,this.init=t=>{this.getElementDimensions=this.getElementDimensions.bind(this),this.gallery=t,this.galleryId=this.gallery.attr("id"),this.galleryType=this.gallery.attr("data-link-gallery")&&"true"===this.gallery.attr("data-link-gallery")?"link":"photoSwipe",this.device=h.b.getCurrentLayoutDevice(),this.rowsToShow=this.getRowsToShow(),this.enableLazyLoading=this.getLazyLoading(),this.viewImagesButton=this.gallery.find(".photoGalleryViewAll"),this.imagesStack=new l(this.gallery),this.imagesToUnveil=[],this.animation=this.gallery.attr("data-image-animation")||"none",this.layoutProvider=new S(this.gallery,this.imagesStack),this.initLayout()},this.initLayout=(t,e)=>{this.unveilThreshold=this.animation?0:500,this.cleanAnchors(),this.layoutProvider.setLayout(t),this.layoutProvider.draw(),this.rows=this.gallery.find(".photogallery-row"),this.manageRowsVisibility(),this.initUnveilImages({skipAnimation:e}),this.addEvents(e),this.initLinks()},this.getLazyLoading=()=>{const t=this.gallery.attr("data-enable-lazy-loading");return!t||"true"===t},this.initLinks=()=>{this.imagesStack.get().forEach(t=>{const e=$(t).find(".image-container a"),i=e.find("img"),a=e.attr("href")||"",s=i.attr("data-src")||"";a&&s===a&&a.length&&e.attr("href","")})},this.changeRowsToShow=t=>{const e=this.isInstagramConnected()?"data-"+this.device+"-rows-to-show":"data-rows-to-show";this.gallery.attr(e,t),this.rowsToShow=t,this.initLayout()},this.getRowsToShow=()=>this.isInstagramConnected()?this.gallery.attr("data-"+this.device+"-rows-to-show"):this.gallery.attr("data-rows-to-show")||"4",this.manageRowsVisibility=()=>{let t;const e=this.gallery.attr(b.b.VIEW_MORE_VISIBILITY_ATTRIBUTE);if("100"===this.rowsToShow)t=this.rows;else{"all"===(this.viewImagesButton.attr("data-mode")||"all")?(t=this.rows.slice(0,this.rowsToShow),this.viewImagesButton.text(this.viewImagesButton.attr("data-viewall"))):(t=this.rows,this.viewImagesButton.text(this.viewImagesButton.attr("data-viewless")))}"false"!==e&&this.rows.length>this.rowsToShow?this.viewImagesButton.show():this.viewImagesButton.hide(),t.removeClass("photogallery-hidden-row")},this.handleViewMoreVisibleChange=t=>{"false"===t&&this.viewImagesButton.attr("data-mode","all"),this.initLayout()},this.onUnveil=t=>{if(!this.enableLazyLoading)return this.imagesToUnveil=[],void this.revealElements(this.imagesStack.getAsJQuery(),t);if(!C.a.isElementInViewport(this.gallery[0],this.unveilThreshold))return;const e=this.imagesToUnveil.filter((t,e)=>C.a.isElementInViewport(e,this.unveilThreshold));e.length&&(this.imagesToUnveil=this.imagesToUnveil.not(e),this.revealElements(this.isInPopup()?this.imagesStack.getAsJQuery():e,t))},this.initUnveilImages=(t={})=>{const e=h.b.getSiteLayout(this.device),i=8===e||7===e?$("#iscrollBody"):$(window);this.imagesToUnveil=this.imagesStack.getAsJQuery();const a=`touchmove.unveil-${this.galleryId} \n scroll.unveil-${this.galleryId} \n resize.unveil-${this.galleryId} \n lookup.unveil-${this.galleryId} `;return i.off(a).on(a,n()(()=>this.onUnveil(t.skipAnimation),500)),this.onUnveil(t.skipAnimation),this},this.getImagePhotoswipeObject=t=>{if(!t.length)return null;const e=t.find("img"),i=t.find(".caption-title"),a=e.attr("data-src");let s="";this.layoutProvider.isCaptionElementVisible(t,".caption-text")&&t.find(".caption-text").contents().filter(t=>3!==t.nodeType).each((t,e)=>{s+=e.textContent.trim()+" "});const o=new Image;return o.src=a,{w:o.width,h:o.height,src:a,el:t,author:i.length?i.text().trim():"",title:s||""}},this.getImagesAsPhotoswipeItems=t=>t.map(t=>this.getImagePhotoswipeObject($(t))),this.initPhotoSwipeFromDOM=t=>{this.imagesStack.getAsJQuery().off("click.photoSwipe").on("click.photoSwipe",t=>{t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation();const e=t.target||t.srcElement,i=$(e).closest("li"),a=i.attr("data-index");this.openPhotoSwipe(a,i)})},this.openPhotoSwipe=(t,e)=>{const i=document.querySelectorAll(".pswp")[0],a={galleryUID:this.galleryId,index:1*t,shareEl:!this.gallery.attr("data-hide-share")},s=this.getImagesAsPhotoswipeItems(this.imagesStack.get());this.photoSwipeGallery=new window.PhotoSwipe(i,window.PhotoSwipeUI_Default,s,a),this.photoSwipeGallery.listen("gettingData",(t,e)=>{if(e.w<1||e.h<1){const t=new Image,i=this.photoSwipeGallery;t.onload=function(){e.w=this.width,e.h=this.height,e.needsUpdate=!0,i.updateSize(!0)},t.src=e.src}}),this.photoSwipeGallery.init()},this.revealElements=(t,i)=>{let a=100;Array.from(t).filter(t=>t.querySelector("[data-src]")).forEach(function(){var t=s()((function*(t){const i=$(t);e.animation&&(t.style.setProperty("animation-delay",a+"ms"),a+=100);if(!t.querySelector("[data-src]").getAttribute("data-src"))return;const s=t.querySelector(".image-container");if(s.querySelectorAll("a").forEach(t=>{const a=t.querySelector("[data-src]").getAttribute("data-src");if(!a)return;const s=e.getSourceByDevice(a,i),o=new window.Image;o.onload=()=>{t.style.setProperty("background-image",`url('${s}')`)},L.a.get("feature.flag.logPhotoGalleryErrors")&&(o.onerror=()=>{k.b({logLevel:k.a.WARN,dataString:{type:"image failed to load",eventType:"photo gallery",image:s,href:window.location.href}})}),o.src=s}),yield h.a.loadImage($(s),{background:!0}),s.classList.add("revealed"),e.layoutProvider.get()===r.f.ASYMETRIC){e.oldLayoutFix({thumb:i})&&(yield e.waitForTransition(s))}s.closest(".thumbnailInnerWrapper").style.setProperty("opacity","1")}));return function(e){return t.apply(this,arguments)}}()),this.layoutProvider.getTextLayout()===r.g.BOTTOM?this.layoutProvider.equalCaptionsHeight(t):this.layoutProvider.clearCaptionInlineHeight(t),i||(t.removeClass("animated "+this.animation),t.addClass("animated "+this.animation))},this.getSourceByDevice=(t,e)=>{if(T()&&!P())return t;{const{width:i,height:a}=this.getElementDimensions(e);return i>=a?i<=160&&a<=90?this.replaceSourcePath(t,"thumbnail"):i<=640?this.replaceSourcePath(t,"mobile"):i<=1280?this.replaceSourcePath(t,"tablet"):t:i<=160&&a<=90?this.replaceSourcePath(t,"thumbnail"):"mobile"===this.device?this.replaceSourcePath(t,"mobile"):i<=1280?this.replaceSourcePath(t,"tablet"):t}},this.updateLazyLoading=t=>{this.enableLazyLoading=t},this.changeTextLayout=t=>{this.gallery.attr("data-desktop-text-layout",t),this.initLayout()},this.changeNumberOfColumns=t=>{this.gallery.attr("data-desktop-columns",this.numberOfColumns),this.initLayout()},this.onViewImagesClicked=t=>{t.preventDefault(),t.stopPropagation();const e=this.viewImagesButton.attr("data-mode")||"all";this.viewImagesButton.attr("data-mode","all"===e?"less":"all"),this.initLayout()},this.cleanAnchors=()=>{this.imagesStack.getAsJQuery().find(".image-container a").css("background-image","")},this.addEvents=t=>{const e=this.gallery.find(".caption-button");if(this.viewImagesButton.off("click.viewallbutton").on("click.viewallbutton",this.onViewImagesClicked),P()||x()){const t=this.gallery.find(".image-container > a");if(t.off("click.photogallery").on("click.photogallery",(function(t){this.getAttribute("href")&&this.getAttribute("href")!==this.getAttribute("data-image-url")||t.preventDefault()})),P()?h.d.bindLinks(e):e.on("click",t=>{t.stopPropagation()}),"photoSwipe"===this.galleryType){if(T()&&!P())return void this.imagesStack.getAsJQuery().off("click.photoSwipe");this.initPhotoSwipeFromDOM()}else this.imagesStack.getAsJQuery().off("click.photoSwipe");h.d.initRuntimeLinks(t),h.d.initRuntimeLinks(e)}if(T()){const e=setInterval(()=>{var i,a,s;const o=null===(i=window)||void 0===i||null===(a=i.parent)||void 0===a||null===(s=a.$)||void 0===s?void 0:s.dmx;o&&(clearInterval(e),o.events&&(window.parent.$.dmx.events.on("siteHeightChange",()=>{this.onUnveil(t)}),window.parent.$.dmx.events.on("previewMobileOrientationRotated.photogallery-"+this.galleryId,()=>{this.initLayout()},!0,{scope:"page"}),window.parent.$.dmx.events.off("onePreviewToggle.photogallery-"+this.galleryId).on("onePreviewToggle.photogallery-"+this.galleryId,t=>{this.photoSwipeGallery&&this.photoSwipeGallery.close(),t&&t.preview?this.initLayout():this.imagesStack.getAsJQuery().off("click.photoSwipe")})))},300)}},this.getNumberOfColumns=()=>this.layoutProvider.getNumberOfColumns(),this.equalCaptionsHeight=t=>{this.layoutProvider.equalCaptionsHeight(t)},this.setLinkGallery=t=>{t?(this.galleryType="link",this.imagesStack.get().forEach(t=>{const e=$(t).find(".image-container a"),i=e.attr("data-link-url")||"";e.attr("href",i)})):(this.imagesStack.get().forEach(t=>{const e=$(t).find(".image-container a"),i=e.attr("href");e.attr("data-link-url",i)}),this.galleryType="photoSwipe"),this.initLayout()},this.initAnimation=(t,e)=>{this.gallery.find("li.photoGalleryThumbs").removeClass("animated "+e).addClass("animated "+t).css("animation-name",""),this.gallery.attr("data-image-animation",t),this.animation=t,this.initLayout()},this.getNextImage=t=>this.imagesStack.getNextImage(t),this.getId=()=>this.gallery[0].id,this.swapImages=(t,e)=>{this.imagesStack.swap(t,e),this.initLayout()},this.getImages=()=>this.imagesStack.get(),this.addImage=(t,e)=>{this.imagesStack.add($(t),e),this.initLayout()},this.removeImage=t=>{this.imagesStack.remove(t)},this.isInPopup=()=>this.gallery.closest("#dmPopup"),this.init(t)}get animation(){return this._animation}set animation(t){this._animation!==t&&(this._animation="none"!==t?t:null)}isInstagramConnected(){return this.gallery.attr(b.b.INSTAGRAM_USERNAME_ATTRIBUTE)}oldLayoutFix({thumb:t}){this.layoutProvider.calculateImageHeight(t);const e=this.gallery.attr("data-image-hover-effect");return this.animation&&e&&"false"!==e&&"none"!==e}waitForTransition(t){return new Promise(e=>{$(t).one("transitionend",e)})}getElementDimensions(t){const e=t.length?t[0]:t;try{const t=e.getBoundingClientRect();return{width:t.width,height:t.height}}catch(t){return{width:0,height:0}}}replaceSourcePath(t,e){return A.c(t)?A.a(t,e):t.replace(/\/multi\/(?:desktop\/|tablet\/|thumbnail\/|mobile\/)?/gi,`/multi/${e}/`)}}E.displayName="PhotoGallery";let R=[];function O(t={}){const e=$(".dmPhotoGallery"),i=e.length;R=[],$.dmrt.components.photogallery={load(){},default:{ready(){},load(){}}},$.dmrt.components.photogallery.oldComponent=Object.assign({},$.dmrt.photogallery.oldComponent);for(let a=0;a