/*! E-Gallery v1.2.0 by Elementor */ var EGallery=function(t){var e={};function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)i.d(n,s,function(e){return t[e]}.bind(null,s));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=9)}([function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function i(t,e){for(var i=0;i0&&void 0!==arguments[0]&&arguments[0],e=this.settings.tags,i=[];if(!e.length)return t?(this.$items.each(function(t){i.push(t)}),i):this.$items;var n=this.$items.filter(function(n,s){var r=s.dataset.eGalleryTags;return!!r&&(r=r.split(/[ ,]+/),!!e.some(function(t){return r.includes(t)})&&(t&&i.push(n),!0))});return t?i:n}},{key:"getImageData",value:function(t){return this.settings.tags.length&&(t=this.getActiveItems(!0)[t]),this.imagesData[t]}},{key:"compileTemplate",value:function(t,e){var i=this;return t.replace(/{{([^}]+)}}/g,function(t,n){return i.getTemplateArgs(e,n.trim())})}},{key:"createOverlay",value:function(t){var e=this.settings,i=e.classes,n=e.overlayTemplate,s=jQuery("
",{class:this.getItemClass(i.overlay)}),r=this.compileTemplate(n,jQuery.extend(!0,this.settings,t));return s.html(r),s}},{key:"createItem",value:function(t){var e,i=this.settings.classes,n=jQuery("
",{class:this.getItemClass(i.item),"data-e-gallery-tags":t.tags}),s=jQuery("
",{class:this.getItemClass(i.image)});this.settings.lazyLoad||s.css("background-image","url("+t.thumbnail+")"),this.settings.overlay&&(e=this.createOverlay(t));var r=n;return t.url&&(r=jQuery("",{class:this.getItemClass(i.link),href:t.url}),n.html(r)),r.html(s),e&&r.append(e),n}},{key:"debounce",value:function(t,e){var i,n=this;return function(){for(var s=arguments.length,r=new Array(s),a=0;a1&&void 0!==arguments[1]?arguments[1]:"top",i=t.getBoundingClientRect().top,n=t.offsetHeight,s=i+n;return("middle"===e?i+n/2:"bottom"===e?s:i)<=innerHeight&&s>=0}(n))return!0;s.loading=!0;var r=jQuery(n),a=new Image;return new Promise(function(t){a.onload=t}).then(function(){r.find(t.settings.selectors.image).css("background-image",'url("'+s.thumbnail+'")').addClass(t.getItemClass(t.settings.classes.imageLoaded)),t.loadedItemsCount++,t.loadedItemsCount===t.settings.items.length&&(t.lazyLoadComplete=!0)}),a.src=s.thumbnail,!0})}}},{key:"calculateImageSize",value:function(t,e){this.imagesData[e]={width:t.width,height:t.height,ratio:t.width/t.height}}},{key:"createImagesData",value:function(){var t=this;this.settings.items.forEach(function(e,i){return t.calculateImageSize(e,i)})}},{key:"makeGalleryFromContent",value:function(){var t=this.settings.selectors,e=this.settings.lazyLoad,i=[];this.$items=this.$container.find(t.items),this.$items.each(function(n,s){var r=jQuery(s).find(t.image);i[n]={thumbnail:r.data("thumbnail")},e?(i[n].width=r.data("width"),i[n].height=r.data("height")):r.css("background-image",'url("'.concat(r.data("thumbnail"),'")'))}),this.settings.items=i}},{key:"prepareGallery",value:function(){this.settings.items?this.buildGallery():this.makeGalleryFromContent(),this.imagesData=[],this.settings.lazyLoad?(this.loadedItemsCount=0,this.lazyLoadComplete=!1,this.createImagesData()):this.loadImages()}},{key:"runGallery",value:function(t){var e=this,i=this.$container[0].style;i.setProperty("--hgap",this.getCurrentDeviceSetting("horizontalGap")+"px"),i.setProperty("--vgap",this.getCurrentDeviceSetting("verticalGap")+"px"),i.setProperty("--animation-duration",this.settings.animationDuration+"ms"),this.$items.addClass(this.getItemClass(this.settings.classes.hidden)),this.getActiveItems().removeClass(this.getItemClass(this.settings.classes.hidden)),this.settings.lazyLoad&&setTimeout(function(){return e.lazyLoadImages()},300),this.run(t)}},{key:"setSettings",value:function(t,e){var i=this.getNestedObjectData(this.settings,t);i.object&&(i.object[i.key]=e,this.runGallery(!0))}},{key:"unbindEvents",value:function(){this.elements.$window.off("resize",this.runGallery)}},{key:"destroy",value:function(){this.unbindEvents(),this.$container.empty(),this.timeouts.forEach(function(t){return clearTimeout(t)})}}]),t}(),f=function(t){function e(){return s()(this,e),l()(this,c()(e).apply(this,arguments))}return y()(e,t),a()(e,[{key:"getDefaultSettings",value:function(){return{aspectRatio:"16:9"}}},{key:"setItemsPosition",value:function(){var t=this.getCurrentDeviceSetting("columns");this.getActiveItems().each(function(e,i){i.style.setProperty("--column",e%t),i.style.setProperty("--row",Math.floor(e/t))})}},{key:"setContainerSize",value:function(){var t=this.getCurrentDeviceSetting("columns"),e=Math.ceil(this.getActiveItems().length/t),i=this.$container[0].style;i.setProperty("--columns",t),i.setProperty("--rows",e);var n=this.getActiveItems().width(),s=this.settings.aspectRatio.split(":"),r=s[1]/s[0],a=(r*n*e+this.getCurrentDeviceSetting("horizontalGap")*(e-1))/this.$container.width()*100;i.setProperty("--aspect-ratio",100*r+"%"),i.setProperty("--container-aspect-ratio",a+"%")}},{key:"run",value:function(){var t=this,e=this.getItemClass(this.settings.classes.animated);this.$container.addClass(e),setTimeout(function(){t.setItemsPosition(),t.setContainerSize(),setTimeout(function(){return t.$container.removeClass(e)},t.settings.animationDuration)},50)}}]),e}(g),m=function(t){function e(){return s()(this,e),l()(this,c()(e).apply(this,arguments))}return y()(e,t),a()(e,[{key:"getDefaultSettings",value:function(){return{idealRowHeight:200,lastRow:"auto",breakpoints:{1024:{idealRowHeight:150},768:{idealRowHeight:100}}}}},{key:"run",value:function(){this.rowsHeights=[],this.rowsCount=0,this.containerWidth=this.$container.width(),this.makeJustifiedRow(0)}},{key:"makeJustifiedRow",value:function(t){for(var e=0,i=t;;i++){var n=this.getImageData(i),s=Math.round(this.getCurrentDeviceSetting("idealRowHeight")*n.ratio);s>this.containerWidth&&(s=this.containerWidth);var r=e+s;if(r>this.containerWidth)if(this.containerWidth-ee+5&&(c=e,h=t)}),r[t]=n[h],n[h]+=u,i.style.setProperty("--item-height",o.height/o.width*100+"%"),i.style.setProperty("--column",h),i.style.setProperty("--items-in-column",s[h]),s[h]++});var y=Math.max.apply(Math,n),g=n.indexOf(y),f=s[g]-1,m=y/o;this.$container[0].style.setProperty("--columns",a),this.$container[0].style.setProperty("--highest-column-gap-count",f),this.$container.css("padding-bottom",100*m+"%"),u.each(function(t,e){var i=r[t]?r[t]/y*100:0;e.style.setProperty("--percent-height",i+"%")})}}}]),e}(g);i(8);i.d(e,"default",function(){return p});var p=function(){function t(e){s()(this,t),this.userSettings=e,this.initGalleriesTypes(),this.createGallery()}return a()(t,[{key:"getDefaultSettings",value:function(){return{container:null,items:null,type:"grid",tags:[],overlay:!1,overlayTemplate:'
{{ title }}
{{ description }}
',columns:5,horizontalGap:10,verticalGap:10,rtl:!1,animationDuration:350,lazyLoad:!1,classesPrefix:"e-gallery-",classes:{container:"container",item:"item",image:"image",overlay:"overlay",overlayTitle:"overlay__title",overlayDescription:"overlay__description",link:"link",firstRowItem:"first-row-item",animated:"-animated",hidden:"item--hidden",lazyLoad:"-lazyload",imageLoaded:"image-loaded"},selectors:{items:".e-gallery-item",image:".e-gallery-image"},breakpoints:{1024:{horizontalGap:5,verticalGap:5,columns:4},768:{horizontalGap:1,verticalGap:1,columns:2}}}}},{key:"initGalleriesTypes",value:function(){this.galleriesTypes={grid:f,justified:m,masonry:d}}},{key:"createGallery",value:function(){var t=jQuery.extend(this.getDefaultSettings(),this.userSettings),e=this.galleriesTypes[t.type];this.galleryHandler=new e(t)}},{key:"setSettings",value:function(t,e){this.galleryHandler.setSettings(t,e)}},{key:"destroy",value:function(){this.galleryHandler.destroy()}}]),t}()}]).default;!function(t,e,s){t(function(){if(void 0!==e){window.wcTracks=window.wcTracks||{},window.wcTracks.recordEvent=window.wcTracks.recordEvent||function(){};var a,n,o=!1;e.suggestions_data&&(a=e.suggestions_data,n=[],t(".marketplace-suggestions-container").each(function(){var s=this.dataset.marketplaceSuggestionsContext,i=function(t,s){var a=_.filter(t,function(t){return _.isArray(t.context)?_.contains(t.context,s):s===t.context});return a=_.filter(a,function(t){return!_.contains(e.dismissed_suggestions,t.slug)}),a=_.filter(a,function(t){return!_.contains(e.active_plugins,t.product)}),a=_.filter(a,function(t){return!t["show-if-active"]||_.intersection(e.active_plugins,t["show-if-active"]).length>0})}(a,s),r=_.sample(i,5);for(var d in r){var l=r[d]["link-text"],p=!0;r[d]["link-text"]&&(l=r[d]["link-text"],p=!1);var g=!0;!1===r[d]["allow-dismiss"]&&(g=!1);var m=c(s,r[d].product,r[d].promoted,r[d].slug,r[d].icon,r[d].title,r[d].copy,r[d].url,l,p,g);t(this).append(m),t(this).addClass("showing-suggestion"),n.push(s),u(s)||window.wcTracks.recordEvent("marketplace_suggestion_displayed",{suggestion_slug:r[d].slug,context:s,product:r[d].product||"",promoted:r[d].promoted||"",target:r[d].url||""})}t("ul.product_data_tabs li.marketplace-suggestions_options a").on("click",function(t){if(t.preventDefault(),"#marketplace_suggestions"!==o&&u(s))for(var e in r)window.wcTracks.recordEvent("marketplace_suggestion_displayed",{suggestion_slug:r[e].slug,context:s,product:r[e].product||"",promoted:r[e].promoted||"",target:r[e].url||""})})}),function(e){var s=_.intersection(e,["products-list-empty-body","orders-list-empty-body"]).length>0;s&&(t("#screen-meta-links").hide(),t("#wpfooter").hide()),s||(t('.marketplace-suggestions-container[data-marketplace-suggestions-context="products-list-empty-header"]').hide(),t('.marketplace-suggestions-container[data-marketplace-suggestions-context="products-list-empty-footer"]').hide(),t('.marketplace-suggestions-container[data-marketplace-suggestions-context="orders-list-empty-header"]').hide(),t('.marketplace-suggestions-container[data-marketplace-suggestions-context="orders-list-empty-footer"]').hide())}(n),d(),t("ul.product_data_tabs").on("click","li a",function(e){e.preventDefault(),o=t(this).attr("href")})),t("a.marketplace-suggestion-manage-link").on("click",function(){window.wcTracks.recordEvent("marketplace_suggestions_manage_clicked")})}function i(a,n,o,i,r){var c=document.createElement("a");return c.classList.add("suggestion-dismiss"),c.setAttribute("title",e.i18n_marketplace_suggestions_dismiss_tooltip),c.setAttribute("href","#"),c.onclick=function(c){c.preventDefault(),function(a,n,o,i,r){if(t("[data-suggestion-slug="+r+"]").fadeOut(function(){t(this).remove(),d()}),jQuery.post(s,{action:"woocommerce_add_dismissed_marketplace_suggestion",_wpnonce:e.dismiss_suggestion_nonce,slug:r}),_.contains(["products-list-inline"],a)){var c="woocommerce_snooze_suggestions__"+a;Cookies.set(c,"true",{expires:2});var u="woocommerce_dismissed_suggestions__"+a,l=parseInt(Cookies.get(u),10)||0;Cookies.set(u,l+1,{expires:31})}window.wcTracks.recordEvent("marketplace_suggestion_dismissed",{suggestion_slug:r,context:a,product:n||"",promoted:o||"",target:i||""})}(a,n,o,i,r)},c}function r(t,s,a,n,o,i,r){var c=document.createElement("a"),d=function(t,s){var a=e.in_app_purchase_params;a.utm_source="unknown",a.utm_campaign="marketplacesuggestions",a.utm_medium="product";var n=_.findKey({productstable:["products-list-inline"],productsempty:["products-list-empty-header","products-list-empty-footer","products-list-empty-body"],ordersempty:["orders-list-empty-header","orders-list-empty-footer","orders-list-empty-body"],editproduct:["product-edit-meta-tab-header","product-edit-meta-tab-footer","product-edit-meta-tab-body"]},function(e){return _.contains(e,t)});return n&&(a.utm_source=n),s+"?"+jQuery.param(a)}(t,o);c.setAttribute("href",d);if(_.includes(["product-edit-meta-tab-header","product-edit-meta-tab-footer","product-edit-meta-tab-body","products-list-empty-footer"],t)&&c.setAttribute("target","blank"),c.textContent=i,c.onclick=function(){window.wcTracks.recordEvent("marketplace_suggestion_clicked",{suggestion_slug:n,context:t,product:s||"",promoted:a||"",target:o||""})},r)c.classList.add("button");else{c.classList.add("linkout");var u=document.createElement("span");u.classList.add("dashicons","dashicons-external"),c.appendChild(u)}return c}function c(t,s,a,n,o,c,d,u,l,p,g){var m=document.createElement("div");m.classList.add("marketplace-suggestion-container"),m.dataset.suggestionSlug=n;var _=function(t){if(!t)return null;var e=document.createElement("img");return e.src=t,e.classList.add("marketplace-suggestion-icon"),e}(o);return _&&m.appendChild(_),m.appendChild(function(t,s,a){var n=document.createElement("div");if(n.classList.add("marketplace-suggestion-container-content"),s){var o=document.createElement("h4");o.textContent=s,n.appendChild(o)}if(a){var i=document.createElement("p");i.textContent=a,n.appendChild(i)}if(-1!==["product-edit-empty-footer-browse-all","product-edit-meta-tab-footer-browse-all"].indexOf(t)){n.classList.add("has-manage-link");var r=document.createElement("a");r.classList.add("marketplace-suggestion-manage-link","linkout"),r.setAttribute("href",e.manage_suggestions_url),r.textContent=e.i18n_marketplace_suggestions_manage_suggestions,n.appendChild(r)}return n}(n,c,d)),m.appendChild(function(t,s,a,n,o,c,d,u){var l=document.createElement("div");if(c||(c=e.i18n_marketplace_suggestions_default_cta),l.classList.add("marketplace-suggestion-container-cta"),o&&c){var p=r(t,s,a,n,o,c,d);l.appendChild(p)}return u&&l.appendChild(i(t,s,a,o,n)),l}(t,s,a,n,u,l,p,g)),m}function d(){if(0>=t('.marketplace-suggestions-container[data-marketplace-suggestions-context="product-edit-meta-tab-body"]').children().length){var e='.marketplace-suggestions-container[data-marketplace-suggestions-context="product-edit-meta-tab-body"]';e+=', .marketplace-suggestions-container[data-marketplace-suggestions-context="product-edit-meta-tab-header"]',t(e+=', .marketplace-suggestions-container[data-marketplace-suggestions-context="product-edit-meta-tab-footer"]').fadeOut({complete:function(){t(".marketplace-suggestions-metabox-nosuggestions-placeholder").fadeIn()}})}}function u(t){return _.includes(["product-edit-meta-tab-header","product-edit-meta-tab-body","product-edit-meta-tab-footer"],t)}})}(jQuery,marketplace_suggestions,ajaxurl);